Arch Linux startx on login
6,525
While I'd just use a display manager (I use LXDM set to automatically login to my user) and switch to the console when I need to be root, you might want to try this (from the Arch wiki):
For Bash, add the following to the bottom of
~/.bash_profile
. If the file does not exist, copy a skeleton version from/etc/skel/.bash_profile
For Zsh, add it to
~/.zprofile
instead.
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
Related videos on Youtube
Author by
Sindre Bjørnhjell
Updated on September 18, 2022Comments
-
Sindre Bjørnhjell over 1 year
I want to start my window manager when I log in with a spesiific user, but stay in the console if I log in as root. So I want the startup to be as it is, but at the login prompt, if I choose my user, it automaticly runs '$ startx' basicly, while if I log in as root, nothing happens. Is this at all possible?