With ssh-only access, how do you configure headless gnome-remote-desktop?

thank you!

For now, for testing, I did

grdctl rdp clear-credentials

and now am presented with
image

which feels suspicious, but probably because may xinit stuff is wrong.

Here is what I have so far (on the server):

❯ cat ~/.xsessionrc 
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
startx

❯ cat ~/.xinitrc 
# if [ -d /etc/X11/xinit/xinitrc.d ]; then
#   for f in /etc/X11/xinit/xinitrc.d/*; do
#     [ -x "$f" ] && . "$f"
#   done
#   unset f
# fi

exec gnome-session

How the plot has thickened, even though I’ve rdp’d to the above login screen, grdctl, shows that rdp is disabled.

❯ grdctl status
[11:26:28:981] [283848:000454c8] [ERROR][com.freerdp.crypto] - [x509_utils_from_pem]: BIO_new failed for certificate
RDP server certificate is invalid.
Overall:
	Unit status: active
RDP:
	Status: disabled
	Port: 3389
	TLS certificate: 
	TLS fingerprint: (null)
	TLS key: 
	View-only: yes
	Negotiate port: yes
	Username: (empty)
	Password: (empty)