Re: Well, I've switched to KDE now

2011-05-06 Thread David L
On Wed, May 4, 2011 at 8:23 PM, David L wrote:

> One thing
> I do is query the screensaver in a cron job to log
> my consulting hours.  So I figured I'd attempt to use
> a portable way of doing that, so I tried:
>
> xdg-screensaver status
>
FWIW, this seems to work to query screensaver status in KDE:

qdbus org.freedesktop.ScreenSaver /ScreenSaver
org.freedesktop.ScreenSaver.GetActive

That can be combined with this wmctrl command:

wmctrl -d | awk '($2=="*"){print}' |awk '{for
(x=10;x<=NF;x++){printf("%s ",$x)}}'

to get the name of the active desktop, which can be used
to log what you were doing at any given time.  I find this
very useful for logging hours if I name my desktops by
the projects I'm working on.

  David
-- 
test mailing list
test@lists.fedoraproject.org
To unsubscribe: 
https://admin.fedoraproject.org/mailman/listinfo/test


Re: Well, I've switched to KDE now

2011-05-05 Thread Bryn M. Reeves
On 05/05/2011 04:23 AM, David L wrote:
> Since gnome shell wasn't working well for me, I've
> switched to KDE.  I'm trying to get back some of
> the functionality I was using in gnome2.  One thing
> I do is query the screensaver in a cron job to log
> my consulting hours.  So I figured I'd attempt to use
> a portable way of doing that, so I tried:
> 
> xdg-screensaver status
> 
> which I thought was supposed to be a desktop
> agnostic way of checking the screensaver.  But
> I got this error:
> 
> Error org.freedesktop.DBus.Error.ServiceUnknown: The name
> org.gnome.ScreenSaver was not provided by any .service files disabled
> 
> So how do I make that work and why am I still
> getting gnome errors when I'm using KDE?

It appears you may have found a bug in the xdg-screensaver shell script.

You may like to report this in bugzilla.redhat.com.

I'd never come across the command before (so thanks for the pointer!) but at a
quick glance it appears that detectDE() may either be getting things wrong and
thinking you are running gnome when you are not or else an unguarded call of
dbus-send it spewing the above to the terminal when it shouldn't (I think that
this output is coming from the screensaver_gnome_screensaver() function but I
don't have a KDE install to try to reproduce with right now and I don't have the
time at the moment to try to trace the script by hand).

Running it with "sh -x $(which xdg-screensaver)" status should show you exactly
where things are going south.

Regards,
Bryn.

-- 
test mailing list
test@lists.fedoraproject.org
To unsubscribe: 
https://admin.fedoraproject.org/mailman/listinfo/test


Re: Well, I've switched to KDE now

2011-05-05 Thread Michael Spahn
Check your Dbus Services, it isn't a Gnome error.

2011/5/5 David L :
> Since gnome shell wasn't working well for me, I've
> switched to KDE.  I'm trying to get back some of
> the functionality I was using in gnome2.  One thing
> I do is query the screensaver in a cron job to log
> my consulting hours.  So I figured I'd attempt to use
> a portable way of doing that, so I tried:
>
> xdg-screensaver status
>
> which I thought was supposed to be a desktop
> agnostic way of checking the screensaver.  But
> I got this error:
>
> Error org.freedesktop.DBus.Error.ServiceUnknown: The name
> org.gnome.ScreenSaver was not provided by any .service files disabled
>
> So how do I make that work and why am I still
> getting gnome errors when I'm using KDE?
>
> Thanks,
>
>           David
> --
> test mailing list
> test@lists.fedoraproject.org
> To unsubscribe:
> https://admin.fedoraproject.org/mailman/listinfo/test
>
-- 
test mailing list
test@lists.fedoraproject.org
To unsubscribe: 
https://admin.fedoraproject.org/mailman/listinfo/test