Skip to content

Instantly share code, notes, and snippets.

@muzzol
Last active December 5, 2023 09:52
Show Gist options
  • Save muzzol/f01fa6a3134d2ec90d3eb3e241bf541b to your computer and use it in GitHub Desktop.
Save muzzol/f01fa6a3134d2ec90d3eb3e241bf541b to your computer and use it in GitHub Desktop.
script for installing x11vnc on Steam Deck
#!/bin/bash
# script for installing x11vnc on Steam Deck
# ATENTION: USE IT AT YOUR OWN RISK!!!!
#
# this will modify root filesystem so it will probably get
# overwrite on system updates but is totally ok executing
# it several times, so if something stops working just
# launch it again
#
# if you don't like seeing the terminal window, change
# Terminal=true for Terminal=false on desktop entry below
# àngel "mussol" bosch - [email protected]
echo -n "Checking permissions: "
if [ "$(id -ru)" == "0" ]; then
echo "OK"
else
echo "ERROR!"
echo "this script must be executed by root"
echo "Ex: sudo $0"
exit 1
fi
## system related comands
echo "Disabling readonly filesystem"
steamos-readonly disable
if [ ! -e "/etc/pacman.d/gnupg/trustdb.gpg" ]; then
echo "Initalizing pacman keys"
pacman-key --init
pacman-key --populate archlinux
fi
echo "Installing package"
pacman -Sy --noconfirm --overwrite "*" x11vnc
echo "Re-enabling readonly filesystem"
steamos-readonly enable
## user related commands
# default deck user (I'm probably too cautious here as this
# will hardly change in the future)
DECK_USER=$(grep "^User=" /etc/sddm.conf.d/steamos.conf | cut -d"=" -f2)
echo "Creating desktop entry"
LAUNCHER_TEXT='[Desktop Entry]
Name=Remot x11vnc
Exec=x11vnc -accept popup
Icon=/usr/share/app-info/icons/archlinux-arch-community/64x64/x11vnc_computer.png
Terminal=true
Type=Application
StartupNotify=false'
echo "$LAUNCHER_TEXT" > "/home/${DECK_USER}/Desktop/SD_x11vnc.desktop"
chown "${DECK_USER}" "/home/${DECK_USER}/Desktop/SD_x11vnc.desktop"
echo "Done"
@BoxedBrain
Copy link

Thanks @muzzol for your effort!

I got the following error while running the script (translated using deepl):

(1/1) Keys in the key bundle are checked [############] 100%
(1/1) Package integrity is checked [############] 100%
Error: x11vnc: signature from "GitLab CI Package Builder <[email protected]>" is unknown trust
:: File /var/cache/pacman/pkg/x11vnc-1:0.9.16-7-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Should the file be removed? [Y/n] 
Error: The operation could not be performed (invalid or damaged package (PGP signature))

By temporary changing from SigLevel = Required DatabaseOptional to SigLevel = Never in /etc/pacman.conf I got it installed. However, this is not a good practice. Also, the shortcuts icon is not found.

Maybe you could take a look? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment