Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Last active April 29, 2024 04:57
Show Gist options
  • Save miguelmota/9cd15049843ddf1ee1a52196f5c7e5ea to your computer and use it in GitHub Desktop.
Save miguelmota/9cd15049843ddf1ee1a52196f5c7e5ea to your computer and use it in GitHub Desktop.
Arch linux VNC server setup
session=lxqt
geometry=1920x1080
localhost # comment this out to allow connections from anywhere
alwaysshared
sudo pacman -S tigervnc
vncpasswd
vim /etc/tigervnc/vncserver.users
vim ~/.vnc/config
sudo systemctl start vncserver@:1
# ufw allow 5901
# vncvierwer
:1=your_username
@nicoandmee
Copy link

nicoandmee commented Mar 11, 2023

echo ":1:USER"  >> /etc/tigervnc/vncserver.users

This is incorrect. It should be:

echo ":1=$USER"  >> /etc/tigervnc/vncserver.users

$USER will be expanded to your username.

Also, output redirection isn't performed by sudo. So sudo cat won't work.
What works for me:

sudo bash -c "cat <<EOF > $HOME/.vnc/config
session=\$XDG_SESSION_DESKTOP
geometry=1920x1080
localhost=no
alwaysshared
EOF"

as always, ymmv

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