Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [[ -z $DISPLAY && "$(tty)" == "/dev/tty1" ]]; then
- if [[ -f /tmp/login-check-startx.flag ]]; then
- rm /tmp/login-check-startx.flag
- echo -e "\nFile '/tmp/login-check-startx.flag' found, maybe the last GUI session did not last long!\n"
- ## do nothing, drop to normal interactive shell
- elif [[ "$XDG_VTNR" ]]; then
- touch /tmp/login-check-startx.flag
- ( sleep 120; rm /tmp/login-check-startx.flag )&!
- cd
- echo -e "\n\n\n=========== START X ===========\n"
- exec startx
- elif [[ -f /tmp/xdg-vtnr-annoying-bug.flag ]]; then
- echo -e "\nFile '/tmp/xdg-vtnr-annoying-bug.flag' found, and XDG_VTNR is not set!\n"
- ## do nothing, drop to normal interactive shell
- else
- touch /tmp/xdg-vtnr-annoying-bug.flag
- sleep 2
- exit
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement