VNC / switchdesk

General support questions
Post Reply
roysubs
Posts: 20
Joined: 2008/03/24 11:48:40

VNC / switchdesk

Post by roysubs » 2019/07/19 15:52:43

I have CentOS 7 on a system and have setup VNC and connecting to it from Windows 10 with RealVNC Viewer. All working fine.

However, I have installed Gnome and KDE and Cinnamon on the server and while the server defaults into Cinnamon, VNC is stuck with Gnome and I have found no way to change it to KDE or Cinnamon. Does anyone know how to change this please?

I read about a tool called "switchdesk" which apparently switches between Window Managers, but have found this tool impossible to find or download. Could someone please show me how to get the "switchdesk" tool please?

$ sudo dnf install switchdesk switchdesk-gui

Extra Packages for Enterprise Linux 7 - x86_64 0.0 B/s | 0 B 00:00
CentOS-7 - Base 0.0 B/s | 0 B 00:00
CentOS-7 - Updates 0.0 B/s | 0 B 00:00
CentOS-7 - Extras 0.0 B/s | 0 B 00:00
No match for argument: switchdesk
No match for argument: switchdesk-gui
Error: Unable to find a match: switchdesk switchdesk-gui

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: VNC / switchdesk

Post by TrevorH » 2019/07/19 19:29:52

No-one packages switchdesk for CentOS. To choose the window manager for vnc, it runs ~/.vnc/xstartup which in turn calls /etc/X11/xinit/xinitrc and that script in turn tests and runs

Code: Select all

if [ -f $HOME/.Xclients ]; then
    exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients || \
    exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients
So you just need to create a $HOME/.Xclients file to invoke the WM you want.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

roysubs
Posts: 20
Joined: 2008/03/24 11:48:40

Re: VNC / switchdesk

Post by roysubs » 2019/07/19 20:08:02

That's amazing Trevor, thanks.

Do you happen to know what the line is to invoke each of the WM's correctly in the .Xclients file? I'm googling around but not getting clear answers. It would be good to know for: Gnome, KDE, Cinnamon, MATE, Xfce.

I thought I had found the KDE line: startkde &
So I put that into .Xclients, but actually, no, that doesn't work. In fact, even worse, if I do this, VNC will not connect at all. So maybe KDE needs to be invoked with systemctl or something? So difficult to find clear answers ... (and each test is multiple reboots, took me 3 or 4 to realise that the existence of startkde & was causing the VNC client to be unable to connect at all).

Post Reply