Open ryantm opened 3 years ago
I had similar errors in my logs and issues with gtk-apps after the upgrade to 21.05, although i use sway instead of gnome.
I do not fully understand what has happened here, but after much fiddling around, manually starting a dbus user session with dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus
appears to have things started working again.
@sydneymeyer Thanks, I confirmed that also fixes it for me. And it lead me to investigate further. I figured out that GNOME sets services.xserver.updateDbusEnvironment
which translates to ${lib.getBin pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all
in the xsession start script.
So changing it to something like this fixes the problem:
{
services.xrdp.defaultWindowManager = "${pkgs.writeScript "xrdp-xsession-gnome" ''
${pkgs.gnome3.gnome-shell}/bin/gnome-shell &
waitPID=$!
${lib.getBin pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all
test -n "$waitPID" && wait "$waitPID"
/run/current-system/systemd/bin/systemctl --user stop graphical-session.target
exit 0
''}";
}
It seems like a good way forward would be to expose the already created xsession scripts in a way that they could be used by xrdp. Or, update xrdp docs to recommend a login manager that can detect them.
I marked this as stale due to inactivity. → More info
I can confirm this is still an issue with xrdp+GNOME on 22.11, including with the normal xrdp configuration (which now seems to to work fine so maybe there's no more need for Enhanced Session). The workaround @ryantm suggested seems not to work anymore, though I could easily be doing it wrong.
Putting
dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus
in a user .Xclients
file does make it usable.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
On 23.11
@pdg137's workaround didn't work for me but @ryantm's workaround still kinda worked. I seem to be able to launch different apps but not the GNOME Settings app.
Are there any updates on this? Any alternative better ways to get RDP / remote desktop working with GNOME on NixOS?
GNOME supports RDP out of the box through gnome-remote-desktop. It can be enabled in the Settings app. You will also need to open the relevant port in firewall.
@jtojnar that failed when I first tried but your comment led to me trying again and I managed to make it work, thanks! The issue was with auto login and the resulting keyring problems. Needed to set the keyring password to be empty to make it work. Same bug: https://bugs.launchpad.net/ubuntu/+source/meta-gnome3/+bug/2000063
It can be enabled in the Settings app. You will also need to open the relevant port in firewall.
true, but not with declarative config.
i adapted the settings from above and elsewhere, and got a working setup needed to also patch the service ExecStart cmd as it was only binding to ipv6 https://gist.github.com/gotjoshua/3d7c51a76b3d74b213fc86e32cea3935#file-configuration-nix-L38-L46
maybe it helps another poor soul looking for help with xrdp config shenanigans
Describe the bug
I have a NixOS 21.05 VM running atop Hyper-V and when I connect to it using the Enhanced Session, which uses xrdp, the desktop displays fine, but no applications launch.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Gnome terminal opens. (This used to work on NixOS 20.09.)
Screenshots
Additional context
systemctl --user
output:relevant nixos config:
journal logs:
Notify maintainers
@NixOS/gnome
Metadata Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.