Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on How can I use Remote Desktop to connect to a sleeping Ubuntu machine and wake it up?

Post

How can I use Remote Desktop to connect to a sleeping Ubuntu machine and wake it up?

+4
−0

I have a laptop running Ubuntu 24.04.1 LTS that I would like to access with Remote Desktop (or VNC)[1] from a Mac. I found the Ubuntu system settings to enable Remote Desktop and am able to connect from the Mac using the RDP client published by Microsoft (vaguely named "Windows App") when the Ubuntu machine is active (I'm logged in and the machine is not locked). I should mention that today is the first time I've had a Linux machine or used the Ubuntu desktop, though I've accessed Linux machines via ssh in the past to do command-line stuff. (In other words: comfortable in bash, new to the Ubuntu desktop.)

I stay logged in all the time on the Ubuntu machine, but usually it is not "awake" -- I left it idle and it auto-locked and the screen shut off. (I don't know if I should be calling that state "lock", "sleep", or "hibernate".) If it's not awake, connecting with the RDP client immediately fails; I don't get a chance to type anything. (I expected to have to type my password to unlock it.)

Since the machine is in the same room, I thought I could mitigate this by touching a key on the Ubuntu machine to get it to show the lock screen and then make the connection and unlock. However, the client can't connect in that state either. I have to type my password on the Ubuntu machine to unlock it, and only then can I connect using the RDP client.

I would like to be able to stick the Ubuntu machine somewhere out of the way, leaving it on and logged in, and interact with it only remotely. How can I make a remote connection when the machine is not awake?

Some further details:

  • I can connect through ssh when the machine is not awake. If there's something I can do via ssh to wake the machine up so that RDP would then work, that's acceptable.

  • The Ubuntu machine is an older laptop with some glitchy keys in the keyboard. I can probably type a password on it to unlock if I have to, but I'd rather not.

  • The machine isn't going to be moved around. I was planning to plug it in and leave it logged in on my home network. If disabling the auto-locking when idle would help, I'm open to that. (I don't yet know how.) I'd like to avoid having the screen on all the time, though. Ideally, the machine would be closed, unlocked or remotely unlockable, and available for remote connections.


  1. I already had a VNC client on the Mac, so I first tried to set up a VNC server on the Ubuntu machine. I've read that a VNC server is built in, but the documentation I found didn't match the settings I see, which say only RDP, not VNC. I don't care which I use, now that I've gone and gotten the other client, but mention this in case my problem is better solved through VNC and that is actually possible. ↩︎

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Doesn't sound like actual sleep (2 comments)
Doesn't sound like actual sleep
GeraldS‭ wrote about 1 month ago

If you can't reach it until you logged in it doesn't sound like sleep or hibernate, it rather sounds like the RDP service is only started at login time. What happens if you log in and leave the machine es it is? Does the RDP connection stop working after some time, or only after a reboot or logout?

Monica Cellio‭ wrote about 1 month ago

The laptop is running and I'm logged in. After a while, the screen turns off and RDP doesn't connect. If I type anything on the laptop the screen comes back on and I need to type my password to unlock (not log in). If the RDP service starts at login then it should still be running. I'm assuming that the service doesn't stop and then restart upon unlock; I'm guessing it's running just fine but not accepting connections in that state. I'm not sure how I would test that guess.