Re: getting workrave to notice gconf changes to /apps/workrave/gui/operation-mode

Joe Wells <[email protected]>
Newsgroups gmane.comp.misc.workrave.user
Message-ID <[email protected]>
Rob Caelers <[email protected]> writes:

>> via a menu instead of a check box?)  So I can do “gconftool-2 --type
>> int --set /apps/workrave/gui/operation-mode 0” and it does not return
>> Workrave to normal mode.
>> 
>> It seems this is probably a bug.
>
> Workrave does not monitor all (gconf) configuration settings. Operation mode
> is one of the settings that is not monitored. Will be fixed in the next version.
>
>> Is there a way to get Workrave to notice the changed setting of
>> /apps/workrave/gui/operation-mode, other than killing and restarting
>> Workrave?
>
> You can use DBus to control workrave. Versions 1.8.x:
>
> dbus-send --type=method_call --dest=org.workrave.Workrave
>   /org/workrave/Workrave
>   org.workrave.WorkraveInterface.SetOperationMode string:'quiet'

That sounds lovely!

Sadly, it does not work for me.  I'm using Workrave 1.8.5 that comes
with Ubuntu Hardy Heron (Ubuntu 8.04).  The command you give fails
silently.  When I add the “--print-reply” option of dbus-send, I get
this error message:

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

I am not sure what is wrong here.  When I run “ldd /usr/bin/workrave |
grep dbus”, I get this output:

	libdbus-glib-1.so.2 => /usr/lib/libdbus-glib-1.so.2 (0xb70d6000)
	libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0xb70a1000)

So it seems that Workrave has been compiled with Dbus support.  I
don't know enough to know what is meant by the complaint about
.service files.

Oh, well!

Meanwhile, I have a cron job that runs every half hour which inspects
the gconf setting of /apps/workrave/gui/operation-mode and if twice in
a row it sees that Workrave is not in normal mode it starts popping up
annoying windows to remind me to switch Workrave back into normal
mode.

-- 
Joe

> Version 1.9.0 and higher:
>
> dbus-send --type=method_call --dest=org.workrave.Workrave
> /org/workrave/Workrave/Core
>  org.workrave.CoreInterface.SetOperationMode string:'normal'
>
> Groetjes,
>   Rob


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Workrave-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/workrave-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.