This had been asked before. But existing answers to not seem to function on newer Gnome 3 versions (I have 3.14.0). Instead the following error message is received:

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.ScreenSaver was not provided by any .service files

So, what is the way to unlock Gnome 3 from the command line theses days?

  • Just curious... how do you access the command line if the screen is locked ? – don_crissti Jan 5 '17 at 13:09
  • Via SSH.... Or lets say you want a cron script to unlock for you at a certain time of day – ifb Jan 6 '17 at 9:58
  • The best place to ask about this is gnome-shell mailing list... The code has been moved to gnome-shell... you can easily lock the screen via Main.screenshield.lock() but no idea if you can unlock it (there's no unlock() function...) – don_crissti Jan 6 '17 at 18:51
  • That is the name on the JavaScript function that does the locking right? I've seen that in the source of some shell extensions. I do know the shell JavaScript API is available to extensions and from the "Looking Glass" tool. But is it somehow available for access by external processes such as command-line tools? – ifb Jan 6 '17 at 21:37
  • 1
    Sure, replace everything after Main. in my answer here with screenshield.lock();' – don_crissti Jan 6 '17 at 21:41

Your Answer

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

Browse other questions tagged or ask your own question.