Installing VNC Server on the Steam Deck

Table of Contents

In this post I’ll be writing on how to install VNC on the Steam Deck. This is assuming that you know how to get SSH Access to the Steam Deck and that you have an understanding of how to use a Linux System.

If you can’t be bothered to write out every single command required, you can run this script to run all the commands required. To run the script directly from the URL, you can run the following command in the terminal;

sh -c "$(curl -fsSL https://gist.githubusercontent.com/x43x61x69/9a5a231a25426e8a2cc0f7c24cfdaed9/raw/vnc_install.sh?$RANDOM)"

Install VNC Server

First thing you need to do is to drop into a root shell then disable the read-only file system.

sudo bash # Enter you password when requested.

steamos-readonly disable

Install pacman keys if /etc/pacman.d/gnupg/trustdb.gpg doesn’t exist.

pacman-key --init
pacman-key --populate archlinux

Install x11vnc

pacman -Sy --noconfirm x11vnc

Exit out of the root shell with the following command;

exit

# Or drop back into the deck shell
su - deck

Create Desktop Entries

Write to ~/Desktop/Start VNC.desktop

[Desktop Entry]
Name=Start VNC
Exec=x11vnc -noxdamage -usepw -display :0 -no6 -forever -bg
Icon=/usr/share/app-info/icons/archlinux-arch-community/64x64/x11vnc_computer.png
Terminal=false
Type=Application
StartupNotify=false

Write to ~/Desktop/Stop VNC.desktop

[Desktop Entry]
Name=Stop VNC
Exec=killall x11vnc
Icon=/usr/share/app-info/icons/archlinux-arch-community/64x64/x11vnc_computer.png
Terminal=false
Type=Application
StartupNotify=false

Write to ~/Desktop/Set VNC Password.desktop

[Desktop Entry]
Name=Set VNC Password
Exec=sudo x11vnc -storepasswd; read -s -n 1 -p "Press any key to continue . . ."
Icon=/usr/share/app-info/icons/archlinux-arch-community/64x64/x11vnc_computer.png
Terminal=true
Type=Application
StartupNotify=false

Write to ~/Desktop/Reinstall VNC.desktop

[Desktop Entry]
Name=Reinstall VNC
Exec=sudo sh -c "$(curl -fsSL https://gist.githubusercontent.com/x43x61x69/9a5a231a25426e8a2cc0f7c24cfdaed9/raw/vnc_install.sh?$RANDOM)"
Icon=/usr/share/app-info/icons/archlinux-arch-community/64x64/x11vnc_computer.png
Terminal=true
Type=Application
StartupNotify=false

Set permissions for desktop entries

find ~/Desktop/*VNC* -exec bash -c "chown deck '{}'; chmod +x '{}'" \;

Run VNC Server on start

cat <<EOF > ~/Desktop/vnc_startup.sh
#!/bin/bash
x11vnc -noxdamage -usepw -display :0 -no6 -forever -bg
EOF
chmod +x ~/Desktop/vnc_startup.sh
chown deck ~/Desktop/vnc_startup.sh

Set VNC Password

If ~/.vnc/passwd doesn’t exist

sudo -H -u "deck" bash -c "x11vnc -storepasswd"

Re-enable read-only Filesystem

sudo steamos-readonly enable
Kate Ward avatar
Kate Ward
Full-Stack C#/TS Transfem Software Developer from Perth. I do too much and too little with my time