Advertisement
Guest User

.zprofile

a guest
Sep 22nd, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. if [[ -z $DISPLAY && "$(tty)" == "/dev/tty1" ]]; then
  2.  
  3. if [[ -f /tmp/login-check-startx.flag ]]; then
  4. rm /tmp/login-check-startx.flag
  5. echo -e "\nFile '/tmp/login-check-startx.flag' found, maybe the last GUI session did not last long!\n"
  6. ## do nothing, drop to normal interactive shell
  7.  
  8. elif [[ "$XDG_VTNR" ]]; then
  9. touch /tmp/login-check-startx.flag
  10. ( sleep 120; rm /tmp/login-check-startx.flag )&!
  11. cd
  12. echo -e "\n\n\n=========== START X ===========\n"
  13. exec startx
  14.  
  15. elif [[ -f /tmp/xdg-vtnr-annoying-bug.flag ]]; then
  16. echo -e "\nFile '/tmp/xdg-vtnr-annoying-bug.flag' found, and XDG_VTNR is not set!\n"
  17. ## do nothing, drop to normal interactive shell
  18.  
  19. else
  20. touch /tmp/xdg-vtnr-annoying-bug.flag
  21. sleep 2
  22. exit
  23. fi
  24.  
  25. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement