Autostart X on login to TTY1, with no display manager
Posted: 16. Oct 2011, 16:37
This is how I generally handle starting X... I figured maybe some people here would be interested.
You just make sure that the xorg-xauth and xorg-xinit packages are installed, and put this in your ~/.profile:
In English, that would be something like:
So as soon as you log in to the first TTY, X instantly starts. You can still log into the other TTYs without X starting.
The benefits are fairly obvious; because some bloaty display manager isn't being loaded, you get faster boot times and less RAM usage. Not sure about the security though, using XDM might technically be more secure for work situations.
NB: if you have applications that make use of ConsoleKit, you may have to set your .xinitrc to launch it. Just replace
with
No further changes are necessary, because Salix doesn't use PAM and therefore doesn't need you to mess around with pam_ck_connector.
You just make sure that the xorg-xauth and xorg-xinit packages are installed, and put this in your ~/.profile:
Code: Select all
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
exec startx &> /dev/null
fi
Code: Select all
if the X server is not running and the virtual terminal is tty1 then
replace the shell process with X, and send the output to /dev/null
The benefits are fairly obvious; because some bloaty display manager isn't being loaded, you get faster boot times and less RAM usage. Not sure about the security though, using XDM might technically be more secure for work situations.
NB: if you have applications that make use of ConsoleKit, you may have to set your .xinitrc to launch it. Just replace
Code: Select all
exec $WINDOWMANAGER
Code: Select all
ck-launch-session $WINDOWMANAGER