On Sat, Jan 4, 2014 at 4:17 AM, Kevin Krammer wrote: > > > David L wrote: > > > I just upgraded to Kubuntu 13.10 and a script that used to work for me > stopped > > > working. Specifically, I had a script that I ran from a cron job that > > > locked the screen. The script looks like this: > > > > > > #!/bin/bash > > > export DISPLAY=:0.0 > > > export PATH=/usr/lib/x86_64-linux-gnu/qt4/bin:$PATH > > > qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock > > > > > > The same thing happened after upgrading from Mint 15 to Mint 16. > > > > > > Now I get this error when I use this previously working script from > ssh or > > > a cron job: > > > > > > Service 'org.freedesktop.ScreenSaver' does not exist. > > > > > > It still works from a local KDE session. > > > > > <snip>
> > @David: just to see if it would work with the actual bus address being > available: > - in your main session, get the value of $DBUS_SESSION_BUS_ADDRESS > - in your ssh session, set that variable to that value and try qdbus again > > That worked. Thanks! So I guess if I run a startup script that copies that variable to a file and then read that file from my cron job, that should do it. I'll try it later and respond if it doesn't work. Sorry if this wasn't an appropriate question for this list, but I thought this was the way to lock the screensaver from the command line in KDE per this (admittedly Ubuntu) answer: http://askubuntu.com/questions/61339/what-is-the-screen-locking-mechanism-under-kde So, if there is a better way to lock/unlock the screen in KDE, let me know what it is. I use this to unlock: qdbus | perl -ne 'qx/kquitapp $1/ if /(kscreenlocker_greet-\d+)/' Thanks again, David
___________________________________________________ This message is from the kde mailing list. Account management: https://mail.kde.org/mailman/listinfo/kde. Archives: http://lists.kde.org/. More info: http://www.kde.org/faq.html.