xinit [ [ client ] options ... ] [ -- [ server ] [ display ] options ... ]
描述
xinit程序用于在不使用显示管理器的系统上启动 X 窗口系统服务器和未使用显示管理器(如 xdm)或使用多个窗口系统的环境中的第一个客户端程序。当第一个客户端退出时,xinit将杀死 X 服务器,然后终止。
如果在命令行上未给出特定的客户端程序,xinit将在用户主目录中查找一个名为.xinitrc 的文件,作为shell脚本运行以启动客户端程序。 如果不存在此类文件,xinit将使用以下内容作为默认值:
xterm -geometry +1+1 -n login -display :0
如果在命令行上未给出特定的服务器程序,xinit 将在用户主目录中查找一个名为.xserverrc 的文件,以作为 shell 脚本运行以启动服务器。如果不存在此类文件,xinit 将使用以下内容作为默认值:
X :0
请注意,这假定当前搜索路径中存在一个名为 X 的程序。因此,站点管理员应创建指向计算机上适当类型的服务器的链接,或创建使用相应服务器运行xinit的 shell 脚本。
请注意,使用.xserverrc脚本时,请务必执行真正的 X 服务器。如果做不到这一点,X 服务器启动和退出的速度会变慢。例如:
exec Xdisplaytype
一个重要的点是,由.xinitrc运行的程序如果不立即退出,应在后台运行,以便它们不会阻止其他程序启动。但是,最后一个已启动的长寿命程序(通常是窗口管理器或终端模拟器)应留在前台,以便脚本不会退出(这表示用户已完成,并且 xinit应退出)。
在命令行上可以指定备用客户端或服务器。预期的客户端程序及其参数应作为 xinit 的第一个命令行参数给出。若要指定特定的服务器命令行,请将双破折号 ("--") 追加到 xinit命令行(在任何客户端和参数之后),后跟所需的服务器命令。
客户端程序名称和服务器程序名称都必须以斜杠("/") 或周期("")开始。否则,它们将被视为要追加到其各自的启动行中的参数。此设置使得无需重新键入整个命令行即可添加参数(例如,前景和背景颜色)。
如果未给出显式服务器名称,并且双破折号("--")之后的第一个参数是冒号后跟一个数字,则 xinit将使用该数字作为显示编号而不是零。所有剩余参数都追加到服务器命令行。
xinit [ [ client ] options ... ] [ -- [ server ] [ display ] options ... ]
Description
The xinit program is used to start the X Window System server and a first client program on systems that are not using a display manager, such as xdm, or in environments that use multiple window systems. When the first client exits, xinit will kill the X server and then terminate.
If no specific client program is given on the command line, xinit will look for a file in the user's home directory called .xinitrc to run as a shell script to start up client programs. If no such file exists, xinit will use the following as a default:
xterm -geometry +1+1 -n login -display :0
If no specific server program is given on the command line, xinit will look for a file in the user's home directory called .xserverrc to run as a shell script to start up the server. If no such file exists, xinit will use the following as a default:
X :0
Note that this assumes that there is a program named X in the current search path. The site administrator should, therefore, make a link to the appropriate type of server on the machine, or create a shell script that runs xinit with the appropriate server.
Note, when using a .xserverrc script be sure to exec the real X server. Failing to do this can make the X server slow to start and exit. For example:
exec Xdisplaytype
An important point is that programs that are run by .xinitrc should be run in the background if they do not exit right away, so that they don't prevent other programs from starting up. However, the last long-lived program started (usually a window manager or terminal emulator) should be left in the foreground so that the script won't exit (which indicates that the user is done and that xinit should exit).
An alternate client or server may be specified on the command line. The desired client program and its arguments should be given as the first command line arguments to xinit. To specify a particular server command line, append a double dash ("--") to the xinit command line (after any client and arguments) followed by the desired server command.
Both the client program name and the server program name must begin with a slash ("/") or a period ("."). Otherwise, they are treated as an arguments to be appended to their respective startup lines. This setting makes it possible to add arguments (for example, foreground and background colors) without having to retype the whole command line.
If an explicit server name is not given and the first argument following the double dash ("--") is a colon followed by a digit, xinit will use that number as the display number instead of zero. All remaining arguments are appended to the server command line.
未知的网友