0

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?

ifb
  • 316
  • 1
  • 7
  • Just curious... how do you access the command line if the screen is locked ? – don_crissti Jan 05 '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 06 '17 at 09: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 06 '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 06 '17 at 21:37
  • 1
    Sure, replace everything after `Main.` [in my answer here](http://unix.stackexchange.com/a/224192) with `screenshield.lock();'` – don_crissti Jan 06 '17 at 21:41
  • Great! This opens up possibilities.... I wish this dbus evaluator thing was (better) documented... – ifb Jan 06 '17 at 21:45
  • I meant `screenShield` (the second `S` is a capital one)... What is it that you need documented ? You can find all the stuff that you can `eval` via `looking glass`... – don_crissti Jan 06 '17 at 21:48
  • I mean the existence of the DBUS evaluator itself and the possibility to send over JS expressions to be evaluated. This answers a major part of my question - the general ability to do _anything_ in Gnome Shell from the command line... – ifb Jan 06 '17 at 22:05

0 Answers0