Documentation for how to enable gnome-remote-desktop on a completly headless system

Bug #2064647 reported by Robert Fletcher
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-remote-desktop (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Asked to create a new bug from https://bugs.launchpad.net/ubuntu/+source/gnome-remote-desktop/+bug/2063333

I am on a completely headless system starting from a minimal ubuntu-server 24.04 installation.
I have installed the desktop using apt install ubuntu-desktop

I want to use the new gnome-remote-desktop so that I can create a developer machine in a VM environment that can be accessed through a thin client as an example using Microsoft RDP

I suspect there is some missing documentation.

Starting the service using systemctl start gnome-remote-desktop.service

results in:

journalctl -xeu gnome-remote-desktop.service
Apr 30 10:16:39 localhost systemd[1]: Starting gnome-remote-desktop.service - GNOME Remote Desktop...
░░ Subject: A start job for unit gnome-remote-desktop.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit gnome-remote-desktop.service has begun execution.
░░
░░ The job identifier is 2929.
Apr 30 10:16:39 localhost (p-daemon)[1613]: gnome-remote-desktop.service: Failed to determine user credentials: No such process
Apr 30 10:16:39 localhost systemd[1]: gnome-remote-desktop.service: Main process exited, code=exited, status=217/USER
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit gnome-remote-desktop.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 217.

Running sudo systemd-sysusers does create some new users, restarting the remote desktop now gives:
May 02 14:27:47 localhost gnome-remote-de[36906]: Init TPM credentials failed because No TPM device found, using GKeyFile as fallback
May 02 14:27:47 localhost gnome-remote-de[36906]: Init file credentials failed: Error creating directory /var/lib/gnome-remote-desktop: Permission denied
May 02 14:27:47 localhost gnome-remote-desktop-daemon[36906]: **
May 02 14:27:47 localhost gnome-remote-desktop-daemon[36906]: ERROR:../src/grd-settings.c:345:grd_settings_constructed: assertion failed: (priv->credentials)
May 02 14:27:47 localhost gnome-remote-desktop-daemon[36906]: Bail out! ERROR:../src/grd-settings.c:345:grd_settings_constructed: assertion failed: (priv->credentials)
May 02 14:27:47 localhost systemd[1]: gnome-remote-desktop.service: Main process exited, code=dumped, status=6/ABRT

As a headless system I can not use any UI controls so I suspect there is some command / config that needs to to be set before launching rdp

description: updated
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Are you able to file this issue upstream also?

https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues

There is also the grdctrl command, but I don't see enough detail in its manpage to solve your request.

Changed in gnome-remote-desktop (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Robert Fletcher (robrotheram) wrote :
Revision history for this message
Robert Fletcher (robrotheram) wrote :

From Upstream

I tried to enable using some commands through grdctl with no such luck grdctl enable

[20:15:58:493] [60992:0000ee40] [ERROR][com.freerdp.crypto] - [x509_utils_from_pem]: BIO_new failed for certificate
RDP server certificate is invalid.
Usage: grdctl [OPTIONS...] COMMAND [SUBCOMMAND]...

grdctl --headless enable

[20:[61000:0000ee48] [ERROR][com.freerdp.crypto] - [x509_utils_from_pem]: BIO_new failed for certificate 16:02:476]
RDP server certificate is invalid.
Init TPM credentials failed because No TPM device found, using GKeyFile as fallback.
Usage: grdctl [OPTIONS...] COMMAND [SUBCOMMAND]...

grdctl --system enable

Error changing to home directory /var/lib/gnome-remote-desktop: No such file or directory

From @pnowack
That's a packaging issue. Please report that to your distro. g-r-d installs both a sysusers and a tmpfiles file for the user for the system daemon and its config dirs.
The sysusers and tmpfiles hooks usually run on a reboot, but they also MUST run when installing the respective pkg, in particular: after the decompression of the files (post-installation hooks). This works fine on other distros, like Arch (pacman automatically detects such sysusers- or tmpfiles-file installation and runs the respective hooks for that).
apt or dpkg must also be able to correctly handle this (regardless of the pkg).

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Ok, so we also need to run

sudo systemd-tmpfiles

when we fix https://launchpad.net/bugs/2063333

You can run that. I don't know if that will be enough to fix your issue though.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.