-
-
Save Thraka/ca4cb7a75b44a6723216231be44cc47a 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 - muzzol@gmail.com | |
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 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