Skip to content

Instantly share code, notes, and snippets.

@ngocnhan2003
Created December 2, 2017 16:32
Show Gist options
  • Select an option

  • Save ngocnhan2003/c4eb9becb07e131dd8ca7e8663f64804 to your computer and use it in GitHub Desktop.

Select an option

Save ngocnhan2003/c4eb9becb07e131dd8ca7e8663f64804 to your computer and use it in GitHub Desktop.
CONTENT=$( cat <<EEOF
sudo apt-get update -y;
sudo apt-get install gnome-core -y;
sudo apt-get install gnome-panel -y;
sudo apt-get install vnc4server -y;
vncserver
STARTUPCODE=\$( cat <<EOF
#!/bin/sh
def
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnome-settings-daemon &
metacity &
gnome-terminal &
EOF
)
mkdir ~/.vnc
echo "\$STARTUPCODE" > ~/.vnc/xstartup
vncserver -kill :1
echo "OK";
EEOF
)
echo "$CONTENT" > ./installVNCServer.sh
sh installVNCServer.sh
echo "--------"
echo "VNC server installed successfully!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment