Start X at login
Revision as of 17:36, 14 October 2012 by Thestinger (have to send stderr to /dev/null or it prints an error for every login shell inside of X)
|Summary help replacing me|
|Starting X automatically at login to a virtual terminal.|
|Automatic login to virtual console|
To manually start X,
xinit are used. Both will execute
~/.xinitrc, which may be customized to start the window manager of choice as described in the xinitrc article.
Shell profile file
- For Bash, add the following to the bottom of
~/.bash_profile. If the file does not exist, copy a skeleton version from
- For Zsh, add it to
(( $(fgconsole 2>/dev/null) == 1 )) && exec startx -- vt1
- This method can be combined with automatic login to virtual console.
- If you would like to remain logged in when X is killed, remove
- To redirect the output of the X session to a file, create an alias:
alias startx='startx &> ~/.xlog'
- Alternatively, you can use
startxis an extension anyway).