1

With a clean Ubuntu 20.04 LTS Server running GNOME, everything is working fine when I physically log into the unit. But when I RDP into it as xfce4, the Restart, Shu Down, and Suspend button are all greyed out! The only button that is available is Log Out.

Screenshot 1

Screenshot 2

How can this be fixed so I can shutdown, suspend, or reboot via Remote Desktop?

Mark
  • 11

1 Answers1

0

This is still a problem in Linux Mint 22 (via xrdp, to access a Hyper-V VM). I found I had to apply the fix by FlawTECH found in here: https://github.com/neutrinolabs/xrdp/issues/2298 and this enables the shutdown option. It doesn't enable suspend, but I don’t need suspend in this case.

Essentially, create a file /etc/polkit-1/rules.d/50-xrdp.rules with the content:

polkit.addRule(function(action, subject) {
  polkit.log(action + ", " + subject);
  if (~["org.freedesktop.login1.power-off","org.freedesktop.login1.power-off-multiple-sessions","org.freedesktop.login1.reboot","org.freedesktop.login1.reboot-multiple-sessions"].indexOf(action.id)) {
    return polkit.Result.YES;
  }
});

I then rebooted, and can now log in via xRDP, and can shut down.

save this file as

Matt Gumbley
  • 101
  • 1