tigervnc-server quirks

Issues related to applications and software problems
Post Reply
gostal
Posts: 71
Joined: 2019/09/23 15:26:45

tigervnc-server quirks

Post by gostal » 2021/02/27 14:01:43

It seems I have now succeeded in setting up tigervnc-server-1.8.0-22 correctly despite misleading information here and there on the Internet. Some quirks, though: The default xstartup under ~/.vnc gives me a Gnome desktop but not before issuing three password prompts to get a colour profile. Any way to get rid of those? When logging out from the viewer I found to my surprise that the server was killed and had to be restarted to get another session. The systemd start script reveal that this behaviour is intentional and hidden in the wrapper script being called. Although intentional this isn't very practical but I found a solution here:
https://unix.stackexchange.com/question ... er-log-out
that restarts the server one minute after it's been killed. Since the guides on the Internet provide systemd code to start the server during reboot there doesn't seem to be any reason not to have it running on "stand by", so to speak. Or is that a bad idea, altogether?

My desktop of choice is, however, Mate and it took some trial and error with the xstartup file to make it work. This is what I have:

Code: Select all

#!/bin/sh

# unset SESSION_MANAGER  #tweak
unset DBUS_SESSION_BUS_ADDRESS
# /etc/X11/xinit/xinitrc #tweak
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
#dbus-launch --exit-with-session gnome-session & #tweak
mate-session & #tweak
# Assume either Gnome or KDE will be started by default when installed
# We want to kill the session automatically in this case when user logs out. In case you modify
# /etc/X11/xinit/Xclients or ~/.Xclients yourself to achieve a different result, then you should
# be responsible to modify below code to avoid that your session will be automatically killed
#if [ -e /usr/bin/gnome-session -o -e /usr/bin/startkde ]; then #tweak
#    vncserver -kill $DISPLAY #tweak
#fi #tweak

where changes from the default are marked with #tweak at the end of the line.
This gives me a Mate desktop on the viewer but in order to make it work I had to comment out the killing lines at the end. Note that these lines serve to kill the instance of Xvnc that the server fires up but they don't kill the server. That's taken care of by the systemd script. So logging out in the viewer leaves a stale window which has to be manually removed by:

Code: Select all

vncserver kill :displaynumber
on the server machine and once that's done the server dies (and restarts). Is there any way to tweak the xstartup file to keep the Xvnc-killing behaviour? The manual killing of the window is, however, a breeze compared to the annoying password prompt when using Gnome.

One thing is annoying and that is that I have Xpad in the Mate panel and apparently vnc creates a new empty note window every time it is started. These don't appear in the viewer but on the ordinary desktop. Is there any way to get rid of that except uninstalling Xpad?

BTW it's frequently mentioned that Selinux gets in the way and the advice is to issue setenforce=0 to run it in permissive mode but that doesn't stop it from giving me alerts. The troubleshooting doesn't help so for now I have setenforce=1 and just delete the alerts when they show up.

Cheers,
gostal
Desktop Dell T5810 Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz, 72 GB RAM, Radeon Pro WX 7100
CentOS 7.9.2009

Post Reply