← 返回命令列表

Linux command

xinit 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start X with the default window manager

xinit

Start X with a specific window manager

xinit /usr/bin/[openbox]

Start X on a different display

xinit -- :1

Start X with a specific server

xinit -- /usr/bin/Xorg :0

Start X with server options

xinit -- -depth 24

说明

xinit starts the X Window System server and an initial client program. It is typically used on systems without a display manager or when running multiple window systems. Without arguments, xinit reads ~/.xinitrc to determine which clients to start, or uses a default (xterm). For the server, it checks ~/.xserverrc or uses the default X server. Programs in .xinitrc should run in the background except the last one (usually a window manager), which keeps the session alive. When the foreground client exits, xinit kills the X server and terminates.

参数

client
Client program to start (must begin with / or .)
--
Separator between client and server arguments
server
X server program to run (must begin with / or .)
display
Display number (:0, :1, etc.)

FAQ

What is the xinit command used for?

xinit starts the X Window System server and an initial client program. It is typically used on systems without a display manager or when running multiple window systems. Without arguments, xinit reads ~/.xinitrc to determine which clients to start, or uses a default (xterm). For the server, it checks ~/.xserverrc or uses the default X server. Programs in .xinitrc should run in the background except the last one (usually a window manager), which keeps the session alive. When the foreground client exits, xinit kills the X server and terminates.

How do I run a basic xinit example?

Run `xinit` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does client do in xinit?

Client program to start (must begin with / or .)