startx
瑞兹 发表于 2020-12-09 09:11浏览次数:
在类似Unix的操作系统上,startx命令启动X11会话。
On Unix-like operating systems, the startx command launches an X11 session.
目录:
1 startx 运行系统环境
2 startx 描述
3 startx 语法
4 startx 例子
startx 运行系统环境
startx 描述
该startx的脚本是一个前端xinit的,它提供了更好的有些用户界面,用于运行X窗口系统的单个会话。它通常没有参数地运行。
startx命令后紧跟的参数用于以xinit相同的方式启动客户端。特殊参数“ - ”标记客户端参数的结尾和服务器选项的开头。您可能需要使用startx指定服务器选项,以更改颜色深度,每英寸点数或Xorg服务器和xorg.conf允许的其他服务器布局。
为了确定要运行的客户端,startx首先在用户的主目录中查找名为.xinitrc的文件。如果没有找到,它使用文件XINITRC在xinit的图书馆目录。如果给出了命令行客户端选项,它们将覆盖此行为并恢复为xinit行为。为了确定要运行的服务器,startx首先在用户的主目录中查找名为.xserverrc的文件。如果找不到,它将在xinit中使用文件xserverrc 库目录。如果给出了命令行服务器选项,则它们将覆盖此行为并恢复为xinit行为。用户很少需要提供.xserverrc文件。
在/ etc / X11 / xinit目录中找到系统范围的xinitrc和xserverrc文件。
The startx script is a front end to xinit that provides a somewhat nicer user interface for running a single session of the X Window System. It is often run with no arguments.
Arguments immediately following the startx command are used to start a client in the same manner as xinit. The special argument "--" marks the end of client arguments and the beginning of server options. You may need to specify server options with startx to change the color depth, dots-per-inch, or a different server layout, as permitted by the Xorg server and xorg.conf.
To determine the client to run, startx first looks for a file called .xinitrc in the user's home directory. If that is not found, it uses the file xinitrc in the xinit library directory. If command line client options are given, they override this behavior and revert to the xinit behavior. To determine the server to run, startx first looks for a file called .xserverrc in the user's home directory. If that is not found, it uses the file xserverrc in the xinit library directory. If command line server options are given, they override this behavior and revert to the xinit behavior. Users rarely need to provide a .xserverrc file.
The system-wide xinitrc and xserverrc files are found in the /etc/X11/xinit directory.
startx 语法
startx [ [ client ] options ... ] [ -- [ server ] [ display ] options ... ]
环境变量
DISPLAY
|
此变量设置为客户端应连接到的显示器的名称。请注意,这已设置,而不是读取。
|
XAUTHORITY
|
如果尚未定义此变量,则将其设置为$(HOME)/.Xauthority。如果没有给-auth参数,此变量将防止X服务器自动为本地主机设置基于主机的不安全身份验证。
|
档案
$(HOME)/.xinitrc
|
客户端运行。通常是一个Shell 脚本,在后台运行许多程序。
|
$(HOME)/.xserverrc
|
服务器运行。默认为X。
|
/ etc / X11 / xinit / xinitrc
|
如果用户没有.xinitrc文件,则运行客户端。
|
/ etc / X11 / xinit / xserverrc
|
如果用户没有.xserverrc文件,则运行的服务器。
|
startx [ [ client ] options ... ] [ -- [ server ] [ display ] options ... ]
Environment variables
DISPLAY
|
This variable gets set to the name of the display to which clients should connect. Note that this gets set, not read.
|
XAUTHORITY
|
This variable, if not already defined, gets set to $(HOME)/.Xauthority. This variable prevents the X server, if not given the -auth argument, from automatically setting up insecure host-based authentication for the local host.
|
Files
$(HOME)/.xinitrc
|
Client to run. Typically a shell script which runs many programs in the background.
|
$(HOME)/.xserverrc
|
Server to run. The default is X.
|
/etc/X11/xinit/xinitrc
|
Client to run if the user has no .xinitrc file.
|
/etc/X11/xinit/xserverrc
|
Server to run if the user has no .xserverrc file.
|
startx 例子
startx -- -depth 16
以16位色深开始X会话。
startx -- -dpi 100
以100 dpi(每英寸的点数)的分辨率开始X会话。
startx -- -layout Multihead
启动X会话并支持多种显示。
startx -- -depth 16
Start an X session at 16 bits color depth.
startx -- -dpi 100
Start an X session at 100 dpi (dots per inch) resolution.
startx -- -layout Multihead
Start an X session with support for multiple displays.