Created
October 15, 2013 04:22
-
-
Save hyang0/6986436 to your computer and use it in GitHub Desktop.
vnc4server xstartup script
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
#!/bin/sh | |
release_number=`lsb_release -r|cut -f 2` | |
if [ $release_number = "12.04" ]; then | |
# Please install gnome-session-fallback at first | |
unset SESSION_MANAGER | |
unset DBUS_SESSION_BUS_ADDRESS | |
gnome-session --session=gnome-classic & | |
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup | |
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | |
xsetroot -solid grey | |
vncconfig -iconic & | |
elif [ $release_number = "13.04" ]; then | |
# Please install gnome-session-fallback at first | |
unset SESSION_MANAGER | |
unset DBUS_SESSION_BUS_ADDRESS | |
gnome-session-fallback & | |
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup | |
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | |
xsetroot -solid grey | |
vncconfig -iconic & | |
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & | |
x-window-manager & | |
else | |
# worked for RHEL 5.8 (Tikanga) | |
vncconfig -iconic & | |
gnome-terminal -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & | |
gnome-session & | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment