2

I have provisioned a desktop Ubuntu 20.04 to run headless (power and network connections only, no keyboard, mouse, or display), and I access it via RDP from a Windows desktop. This configuration is working well, but the Power Off and Restart functions in the gnome desktop do not seem to work if the system is being accessed remotely. Clicking these functions appears to do nothing, and there are no notifications or errors. How am I meant to Power Off or Restart in a headless environment? These are essential functions in maintaining the system. BTW, this functionality works automatically and transparently in Windows-to-Windows RDP.

Thanks for your help

1
  • Before you power off a remote computer, make sure you have a way to turn it on!
    – user68186
    May 25 at 17:30

1 Answer 1

3

How am I meant to Power Off or Restart in a headless environment?

From a command line type 1 of these ...

who
w

(who shows users logged on. w does the same but also includes what that user is doing) ... and make sure only 1 user is present and then do 1 of these...

sudo reboot
sudo poweroff
sudo halt
sudo shutdown

using your admin user. Any of these will show a message if there is a problem with executing those commands. If there is analyze it and "fix" the issue. The 1st one reboots, the others stop the system.

Not being able to reboot from a remote desktop is likely intentional as it could lead to loss of data. It should also not be possible to suspend, or hibernate. Not being able to turn it on or have it crash on grub means the system is dead.

BTW, this functionality works automatically and transparently in Windows-to-Windows RDP.

is not entirely true. By default it is not possible and even strongly adviced not to do if RDP Keep-Alive is active. You also need to go through extra input to get it to reboot (there is a security popup before you get the regular reboot/shutdown dialog).

4
  • A common use case would be May 25 at 17:41
  • Executing 'who' shows nothing. What should I glean from that? Executing 'w' seems to show users. A common use case, particularly for Windows users and Linux beginners, would be a single user on Ubuntu RDPing from a Windows system. In this case, being able to restart from gnome doesn't seem unreasonable - at least provide a diagnostic why it can't be done. May 25 at 18:00
  • who shows users logged on. w does the same but also includes what that user is doing. " at least provide a diagnostic why it can't be done" : prevent loss of data. Windows blocks it too unless you start the "security" option and are allowed to continue : fmsinc.com/microsoftaccess/remote_desktop/reboot_restart/…
    – Rinzwind
    May 25 at 18:14
  • I don't mean to be argumentative, but I believe correct information is important. The article you refer to appears to be ancient, refers RDPing to a Windows 7 Ultimate system - Windows 7 is no longer supported. If you RDP to a Windows 10 system, there are Disconnect, Sign Out, Sleep, Shut down, and Restart options - all of them work in a default configuration May 25 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.