Last active
February 28, 2018 08:11
-
-
Save kripul/5e34cd84f0591f3d13208c11ac9197a8 to your computer and use it in GitHub Desktop.
ubuntuvnc.sh
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/bash | |
DEBIAN_FRONTEND=noninteractive sudo apt-get update | |
DEBIAN_FRONTEND=noninteractive sudo apt-get upgrade -y | |
DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal unzip -y | |
DEBIAN_FRONTEND=noninteractive sudo apt-get install ubuntu-restricted-extras -y | |
DEBIAN_FRONTEND=noninteractive sudo apt-get install vnc4server -y | |
vncserver :1 | |
vncserver -kill :1 | |
cat > .vnc/xstartup <<END | |
#!/bin/sh | |
# Uncomment the following two lines for normal desktop: | |
# unset SESSION_MANAGER | |
# exec /etc/X11/xinit/xinitrc | |
[ -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 & | |
gnome-panel & | |
gnome-settings-daemon & | |
metacity & | |
nautilus & | |
END | |
vncserver :1 | |
cat <(crontab -l) <(echo "@reboot /usr/bin/vncserver :1") | crontab - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment