How to make mate-desktop start in vnc session?

I just installed Rocky 8 using the Server with GUI profile, which installed Gnome and its dependencies.

I have also installed mate-desktop and its dependencies from EPEL.

This machine is only accessed via ssh and vnc. I would like to make the mate-desktop the default for all users in their vnc sessions. If this isn’t possible, what needs to go in the ~/.vnc/xstartup in order to start mate-desktop instead of gnome in VNC sessions?

For the ~/.vnc/xstartup method, you’ll most likely want a command like mate-session or dbus-launch mate-session. (I do something similar for some systems with XFCE-based remote desktops over xrdp. These systems don’t run any “local” GUI.)

I’ve never bothered properly setting a default, but method shown in this link appears to be valid under el8: Chapter 8. Setting a default desktop session for all users | Administering the system using the GNOME desktop environment | Red Hat Enterprise Linux | 9 | Red Hat Documentation

1 Like

Do you need the Gnome at all? If not, then you could remove it.
Default for GDM were discussed in Configure default session for GDM but does VNC use GDM?

I got this working. I found that installing “mate-desktop” and its dependencies was insufficient, I had to firstly install “mate-control-center” and “mate-session-manager”. This allowed the mate-desktop to start (I already had the code in my .vnc/xtartup file), but without a window manager, so then I installed “marco”.

Finally, it appeared that some useful mate packages were not installed, so I took a maximal approach:

yum install --skip-broken $(yum search mate | grep -v devel | grep “^mate-” | sed ‘s/ .*//’)

EPEL for el7 did define “yum group” for MATE. Neither EPEL 8 nor EPEL 9 seems to do so.

I did use that as base for my el9 MATE installs:

dnf_group_mate_desktop:
# EL7 @mate-desktop mandatory
- caja
- dconf
- gtk2-engines
- gvfs
- gvfs-fuse
- gvfs-gphoto2
- gvfs-mtp
- gvfs-smb
- libmatekbd
- libmateweather
- libsecret
- marco
- mate-backgrounds
- mate-control-center
- mate-desktop
- mate-icon-theme
- mate-media
- mate-menus
- mate-notification-daemon
- mate-panel
- mate-polkit
- mate-power-manager
- mate-session-manager
- mate-settings-daemon
- mate-system-monitor
- mate-themes
- xdg-user-dirs-gtk
- yelp
# EL7 @mate-desktop default
- NetworkManager
- atril
- atril-caja
- brasero
- dconf-editor
- engrampa
- eom
- filezilla
- gparted
- gucharmap
- lightdm
- lightdm-gtk
- mate-applets
- mate-calc
- mate-dictionary
- mate-disk-usage-analyzer
- mate-menus-preferences-category-menu
- mate-screensaver
- mate-screenshot
- mate-search-tool
- mate-system-log
- mate-terminal
- mozo
- network-manager-applet
- p7zip
- p7zip-plugins
- pluma
- seahorse
- setroubleshoot
- totem
- vim-enhanced
# other
- caja-actions
- caja-actions-doc
- caja-open-terminal