Last active
December 5, 2023 09:52
-
-
Save muzzol/f01fa6a3134d2ec90d3eb3e241bf541b to your computer and use it in GitHub Desktop.
script for installing x11vnc on Steam Deck
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
#!/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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @muzzol for your effort!
I got the following error while running the script (translated using deepl):
By temporary changing from
SigLevel = Required DatabaseOptional
toSigLevel = 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!