Proof of concept of how to run headless remote desktop sessions.

Installation Instructions

Configuration can be done e.g. via a VT or via ssh.

Step 1: Configure a headless gnome-remote-desktop.

# Run the following commands as USER mkdir -p ~/.local/share/gnome-remote-desktop/ openssl req -new -newkey rsa:4096 -days 720 -nodes -x509 -subj /C=DE/ST=NONE/L=NONE/O=GNOME/CN=localhost -out ~/.local/share/gnome-remote-desktop/rdp.crt -keyout ~/.local/share/gnome-remote-desktop/rdp.key grdctl --headless rdp set-tls-cert ~/.local/share/gnome-remote-desktop/rdp.crt grdctl --headless rdp set-tls-key ~/.local/share/gnome-remote-desktop/rdp.key grdctl --headless set-credentials USER PASSWORD # USER and PASSWORD doesn't need to match the username or password of the system grdctl --headless rdp enable systemctl --user enable gnome-remote-desktop-headless.service

Step 2: Launch a headless session

sudo systemctl start gnome-remote-session@USER.service

This will launch a whole session, by default GNOME Shell, as well as a RDP server.

The session lauched is retrieved from accountsservice. To change it without using GDM, run the following as USER:

gdbus call -y -d org.freedesktop.Accounts -m org.freedesktop.Accounts.User.SetSession -o /org/freedesktop/Accounts/User$UID gnome-classic

to change to gnome-classic. Available sessions can be seen in /usr/share/wayland-sessions. Only the ones with X-GDM-CanRunHeadless=true in the session desktop file can be run this way.

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download Fedora 39 aarch64 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora 39 (0 downloads)

* Total number of packages downloaded in the last seven days.

This is a companion discussion topic for the original entry at https://copr.fedorainfracloud.org/coprs/jadahl/headless-sessions

thanks for the document, I’m failing at the to execute the above scripts.

I think there is a typo on:
grdctl --headless set-credentials USER PASSWORD
perhaps that should be grdctl --headless rdp set-credentials USER PASSWORD
I cannot however run

systemctl --user enable gnome-remote-desktop-headless.service

as it seems that it: ‘Failed to enable unit: Unit file gnome-remote-desktop-headless.service does not exist.’ as a result ’

sudo systemctl start gnome-remote-session@USER.service

does not exist. what version does this work on? I’m on 45.1