The purpose of the script /usr/bin/startx is to set up a call to the /usr/bin/xinit binary as:
xinit $client $clientargs -- $server $display $serverargs
The parameters that can be passed to startx are:
[[client] options ...] [-- [server] [display] options ...]
Which are the same parameters that can be passed to xinit
Note that startx can be run with no command line options, in which case the call will be:
xinit /home/user/.xinitrc -- /etc/X11/xinit/xserverrc :0
assuming the user has a .xinitrc and doesn't have a .xserverrc
If the first parameter passed starts with a . or a /, it is interpreted as a client. The same with the first parameter passed after the - -, otherwise they are interpreted as options (client args or server args)
The display (:n) must be the first parameter after the server (if given) otherwise the first parameter after the - -
The case statement keys on . / : and - - to parse the parameters and is quite clever
/etc/X11/xinit/xserverrc contains a single line:
exec /usr/bin/X11/X -nolisten tcp
/etc/X11/xinit/xinitrc contains a single line:
. /etc/X11/Xsession
See xsession to continue with the X run processes
NOTE: startx and xinit are intended to be started by a user from a console,
not an existing X session pseudo terminal.
user@host:0:~ $ startx -- :1
X: user not authorized to run the X server, aborting.
xinit: Server error.
user@host:0:~ $
To get rid of this message and be able to start from a pseudo terminal, change
allowed_users=console
to
allowed_users=anybody
in /etc/X11/Xwrapper.config. See man 5 Xwrapper.config
![]() |
This site best viewed with a browser |
| Warning: This is a Debian centric site | |
| Many thanks to Debra and Ian Murdock for making Debian possible | |
| First created Apr 22, 2008 ~ Last revised February 27, 2010 |