How to make gnome-shell always start with command line arguments at system launch?


My task is simple: the system is installed on a rented GPU server a hundred miles away from me, so I need gnome-shell to always start with --wayland --headless --virtual-monitor arguments by default and without any interaction on my part.

I tried to configure a user default session for GDM, but .desktop files in /usr/share/wayland-sessions/ invoke gnome-session (not gnome-shell), so the above arguments don’t seem to be applicable here.
I have also been advised to edit org.gnome.Shell@wayland.service of systemd, but neither me, nor my advisor, are confident that this is the best approach.

And my end goal is to get a ready-to-use desktop on a virtual display whenever my server is online, which is a prerequisite for for using Sunshine – a much better alternative to VNC/RDP. (The official manual suggest creating a dummy display within X11, but today is the Wayland era, right?)

Any thoughts are welcome!

Modifying the service would be the way to go if you want to change how gnome-session starts gnome-shell. You don’t have to modify the .service file shipped with the package though and can instead put some overrides in the per user service directory in the home or put some overrides in the /etc service directory.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.