Created
July 13, 2009 16:00
-
-
Save dennyhalim/146217 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (c) 2008 DennyHalim.com | |
# you're free to copy to copy and/or distribute this script under GPL license | |
# paste into your ~/.bashrc and it just works. | |
# it will startx / startxfce when you login at tty1 | |
# it can also logout/shutdown after you close x. | |
file=/tmp/.X0-lock | |
#check if x is running | |
if [[ -e $file ]] | |
then | |
echo "Ctrl+Alt+F7 to switch to XWindow" | |
#only run xfce4 if login at tty1 | |
elif [ $(tty) == /dev/tty1 ]; then | |
startxfce4 # use startx if you prefer so | |
# exit #to logout automatically after x closed | |
# halt #to shutdown automatically after x closed | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment