Linux Ubuntu 20 - tigervnc settings for multiple users
Hello,
I tried to set tightvncserver for multiple users on linux Ubuntu 20 and it failed. Resp. for one user tightvnc is sufficient, but for multiple users it is useless.
Can anyone please advise how to set up a classic good tigervnc on ubuntu 20?
Thanks
Hi,
I don't even know where I found it anymore, but I set up tigervnc on Ubuntu 20 like this and it really works for one:
# install x11 desktop
# install tigervnc
# settings for user1
# turn on vnc for user1
#firewalld
# set up tigervnc as a service
# start + enable
I tried to set tightvncserver for multiple users on linux Ubuntu 20 and it failed. Resp. for one user tightvnc is sufficient, but for multiple users it is useless.
Can anyone please advise how to set up a classic good tigervnc on ubuntu 20?
Thanks
REPLY
Hi,
I don't even know where I found it anymore, but I set up tigervnc on Ubuntu 20 like this and it really works for one:
# install x11 desktop
apt install xfce4 xfce4-goodies
reboot
# install tigervnc
apt install tigervnc-standalone-server
# settings for user1
su user1
vncpasswd
vim ~/.vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startxfce4
chmod u+x ~/.vnc/xstartup
vim ~/.vnc/config
geometry=1920x1080
dpi=96
# turn on vnc for user1
vncserver
#firewalld
firewall-cmd --zone=public --permanent --add-port=5901/tcp
firewall-cmd --reload
# set up tigervnc as a service
vim /etc/systemd/system/vncserver@1.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
User=user1
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver :%i -localhost no -geometry 1920x1080 -alwaysshared -fg
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
# start + enable
systemctl start vncserver@1.service
systemctl enable vncserver@1.service