-
-
Save rehannali/2c5b8ff2f2e146ffe40f66ecc131b6d5 to your computer and use it in GitHub Desktop.
Install RealVNC Ubuntu Headless - Raspberry Pi 4 armhf or using armhf
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
#!/usr/bin/env bash | |
mkdir realvncserversetup && cd realvncserversetup | |
echo 'Adding armhf arch' | |
sudo dpkg --add-architecture armhf && sudo dpkg --print-foreign-architectures | |
echo 'Update Repositories' | |
sudo apt update && sudo apt upgrade -y | |
echo 'Install libx11-6' | |
sudo apt install -y libx11-6 | |
echo 'Download and install dependencies' | |
files=( libbcm_host.so libvcos.so libmmal.so libmmal_core.so libmmal_components.so \ | |
libmmal_util.so libmmal_vc_client.so libvchiq_arm.so libvcsm.so libcontainers.so ) | |
for i in "${files[@]}" | |
do | |
echo Downloading $i | |
wget -nv https://github.com/raspberrypi/firmware/raw/master/opt/vc/lib/$i | |
done | |
sudo mv *.so /usr/lib/ | |
echo 'Installing gdebi' | |
sudo apt install -y gdebi | |
echo 'Downloading RealVNC Server' | |
wget -nv https://downloads.realvnc.com/download/file/vnc.files/VNC-Server-6.9.1-Linux-ARM.deb | |
echo 'Installing RealVNC Server' | |
sudo gdebi VNC-Server-6.9.1-Linux-ARM.deb | |
echo 'Accessing root permission' | |
sudo -s | |
echo 'Configuring VNC Auth' | |
echo "Authentication=VncAuth" >> /root/.vnc/config.d/vncserver-x11 | |
echo 'Configuring password VNC Auth' | |
vncpasswd -service | |
echo 'Exiting root' | |
exit | |
echo 'Enable VNC Server & Virtuald service on boot' | |
sudo systemctl enable vncserver-x11-serviced.service | |
sudo systemctl enable vncserver-virtuald.service | |
echo 'Start VNC Server & Virtuald service' | |
sudo systemctl start vncserver-x11-serviced.service | |
sudo systemctl start vncserver-virtuald.service | |
echo 'vnclicensewiz' | |
sudo vnclicensewiz | |
echo 'uncommenting #WaylandEnable=false' | |
sudo sed -i 's/#WaylandEnable=false/WaylandEnable=false/g' /etc/gdm3/custom.conf | |
echo 'Cleaning up files' | |
cd .. | |
rm -rf realvncserversetup | |
rm -f install_realvnc_server.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can simple install by using
curl -s https://gist.githubusercontent.com/rehannali/2c5b8ff2f2e146ffe40f66ecc131b6d5/raw/0cbf59239bae3c150965fb19bc1b5d2232f0936b/install_realvnc_server.sh | bash