Browse Source

Add automatic startx on tty1 login

Frans Bergman 5 years ago
parent
commit
8ef6dd528c
2 changed files with 4 additions and 0 deletions
  1. 3 0
      .profile
  2. 1 0
      .zshrc

+ 3 - 0
.profile

@@ -26,3 +26,6 @@ export LESS_TERMCAP_ZN=$(tput ssubm)
 export LESS_TERMCAP_ZV=$(tput rsubm)
 export LESS_TERMCAP_ZO=$(tput ssupm)
 export LESS_TERMCAP_ZW=$(tput rsupm)
+
+# Start graphical server if Xorg not already running.
+[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x Xorg >/dev/null && exec startx

+ 1 - 0
.zshrc

@@ -1,3 +1,4 @@
+source ~/.profile
 # If you come from bash you might have to change your $PATH.
 # export PATH=$HOME/bin:/usr/local/bin:$PATH