Score:2

How to unlock screensaver over ssh on ubuntu 21.04?

tr flag

I want to unlock the black screen over ssh (screensaver). I have a desktop ubuntu 21.04 and I want to log into this via ssh and unlock the screensaver. I tried xdotool in a script:

#!/bin/bash
export DISPLAY=:0
xdotool type "1234"

and also ydotool:

#!/bin/bash
export DISPLAY=:0
ydotool type "1234"

xdotool does nothing and with ydotool i get an error ( ydotool: notice: ydotoold backend unavailable (may have latency+delay issues) terminate called after throwing an instance of 'std::runtime_error' what(): failed to open uinput device ).

How can I unlock the screensaver over an ssh connection?

Thanks

Regards David

Dave avatar
tr flag
@Nmath: Thank you very much. I hope the question is now clearer.
Dave avatar
tr flag
@Organic Marble: Thanks, yes thats the question. When I use the kill command like you write `sudo kill -9`, he tells me the help of the kill command
Score:0
tr flag

Solution: I don`t have a keyboard on this pc, because i have a touchscreen. When I insert a keyboard and use ydotool as su, it works. Maybe also this solution with keyboard but without sudo could work https://github.com/ReimuNotMoe/ydotool/issues/36

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.