Skip to content

Instantly share code, notes, and snippets.

@awcator
Created February 26, 2021 14:11
Show Gist options
  • Save awcator/5aa81834d792009a179f25af7b6abafb to your computer and use it in GitHub Desktop.
Save awcator/5aa81834d792009a179f25af7b6abafb to your computer and use it in GitHub Desktop.
Simple VNC setup on GSHELL
sudo apt update
sudo apt upgrade
#sudo apt install -y xfce4 xfce4-goodies vnc4server novnc websockify python-numpy chromium
sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install xfce4 xfce4-goodies vnc4server novnc websockify python-numpy chromium
vncserver
vncserver -kill :1
echo "#!/bin/bash" > ~/.vnc/xstartup
echo 'xrdb $HOME/.Xresources' >> ~/.vnc/xstartup
echo "startxfce4 &" >> ~/.vnc/xstartup
vncserver -geometry 1280x720
#cd /etc/ssl
#sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout novnc.pem -out novnc.pem -days 365
#sudo chmod 644 novnc.pem
#sudo websockify -D --web=/usr/share/novnc/ --cert=/etc/ssl/novnc.pem 8080 localhost:5901
echo 'alias chromium="chromium --disable-dev-shm-usage"' > ~/.bashprofile
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '" >> ~/.bashprofile
if grep --quiet '. ~/.bashprofile' ~/.bashrc; then
echo ''
else
echo '. ~/.bashprofile' >> ~/.bashrc
fi
sudo websockify -D --web=/usr/share/novnc/ 8080 localhost:5901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment