Skip to content

Instantly share code, notes, and snippets.

@djsnipa1
Forked from miguelmota/config
Last active May 5, 2023 18:38
Show Gist options
  • Save djsnipa1/2c9ec01d4b5bdbde3a6d5a6806d38399 to your computer and use it in GitHub Desktop.
Save djsnipa1/2c9ec01d4b5bdbde3a6d5a6806d38399 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
#!/bin/bash
printf "\nWhat is your editor of choice?\n"
read EDITOR
printf "\nThis will setup TigerVNC on Arch linux\n\n"
printf "\nPress ENTER key to setup\n\n"
#while [ true ]
#do
read -s -N 1 key
if [[ $key == $'\x0a' ]]; then # if input == ENTER key
printf "\nInstalling tigervnc\n"
pacman -S tigervnc
printf "\nCreate a password using vncpasswd which will store the hashed password in ~/.vnc/passwd.\n"
vncpasswd
printf "\nReplace your_username with the username you wish to use\n"
$EDITOR ./vncserver.users
printf "\nCopying vncserver.users to /etc/tigervnc/\n"
cp vncserver.users /etc/tigervnc/vncserver.users
printf "\nMake any changes to the following config\n"
$EDITOR ./config
printf "\nCopying config to ~/.vnc/config\n"
cp config ~/.vnc/config
printf "\n Starting VNC server..."
systemctl start vncserver@:1
else
printf "you pressed $key"
fi
printf "\nYou have setup and installed TigerVNC \n"
exit
#done
# ufw allow 5901
# vnc viewers
:1=your_username
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment