Last active
November 22, 2020 12:35
-
-
Save MohamedKari/9d3982f70849f273d51a3c86126ddb41 to your computer and use it in GitHub Desktop.
Setup VNC on EC2
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
# bash <(curl -s https://gist.githubusercontent.com/MohamedKari/9d3982f70849f273d51a3c86126ddb41/raw/c827f74257f847f352b1f489fc970381cec626db) | |
sudo apt -y update | |
sudo apt -y install ubuntu-desktop | |
sudo apt -y install tightvncserver | |
sudo apt -y install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal | |
mkdir -p ~/.vnc | |
cat <<EOF > ~/.vnc/xstartup | |
#!/bin/sh | |
export XKL_XMODMAP_DISABLE=1 | |
unset SESSION_MANAGER | |
unset DBUS_SESSION_BUS_ADDRESS | |
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup | |
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | |
xsetroot -solid grey | |
vncconfig -iconic & | |
gnome-panel & | |
gnome-settings-daemon & | |
metacity & | |
nautilus & | |
gnome-terminal & | |
EOF | |
chmod +x ~/.vnc/xstartup | |
sudo reboot | |
# vncserver -geometry 1600x1200 :1 | |
# vncserver -kill :1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment