Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Ideas | Propositions [TBR] Remote DBus control
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Ideas | Propositions

Subjects Author Language Messages Last message
[Locked] [TBR] Remote DBus control
SQP Français 5 SQP [Read]
13 April 2012 à 00:57

SQP, Monday 09 April 2012 à 17:05


Subscription date : 03 July 2010
Messages : 1081
As we discussed a few days ago, there should be a nice way to quit or reload the dock, even if this could be achieved with an alias or a shortcut to
dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.**Quit**

I had the idea to make a script to factorize the common part of this command that is always the same. Only the last part change from one command to another (in bold).

But as this would be great to give that ability to every user, without adding another script to their path, I tried to integrate it to the dock.

-R, --remote-control Send DBus commands to your running cairo-dock program. (ex: -R Quit)


with this, we can use such commands :
cairo-dock -R Quit
cairo-dock -R "Animate string:fire int32:60 string:module=clock"


Some string params should be escaped, but this can be a great step for easily manual or script control (no more killall or ctrl-c without this stupid dbus syntax).
Even if it can surely be improved, this is only a 10 lines patch. No need a separated script for this I guess.

bzr pull lp:~sqp/cairo-dock-core/main-add-remote-control-option

1052
Add command option -R = --remote-control : Send DBus commands to your running cairo-dock program


PS : I would still like to rename --colors to --color (to match ls and grep options), and it's shortcut -A is already taken by ask-backend

lylambda, Tuesday 10 April 2012 à 01:06


Subscription date : 06 September 2009
Messages : 1635
Very good idea ! It's nice work

matttbe, Thursday 12 April 2012 à 22:52


Subscription date : 24 January 2009
Messages : 12573
Thank you for the idea and the patch

But I don't think it's interesting to have this option which is in fact an alias (yes, Cairo-Dock is not launched with root right but I don't like that). If you want an alias, simply add it on you ~/.{bash,zsh}rc as you said on IRC.
But a parameter to only quit the dock is maybe better I think (and even better if we don't use dbus-send command - and it's an easier command: e.g. cairo-dock -q). (Note that DBus is a plug-in of Cairo-Dock (and can be not installed or disabled but it's a rare exception )

Even if it can surely be improved, this is only a 10 lines patch.
Yes but it adds new strings which have to be translated... So I guess it's better to wait for at least one week

SQP, Friday 13 April 2012 à 00:19


Subscription date : 03 July 2010
Messages : 1081
Having one untranslated line that won't really be usefull for people who won't be able to read the related doc (only in english) will not really hurt.

The text may say that DBus must be active, but I guess that it i clear enough that it is DBus related
I guess my print should be removed as it could lead to logging some things that shouldn't be (if used for displaying dock text popup for example). (same apply to xchat flood)

While not perfect, this ensure some nice features :
-Every users would have it. So it will enhance our dock debuging ability or advices we can give on the forum (more commands easily available)
-Will keep up to date if the dock DBus location change.

This solution seem a nice compromise to not have a dedicated script (executed like --version and --capuccino).

matttbe, Friday 13 April 2012 à 00:30


Subscription date : 24 January 2009
Messages : 12573
Having one untranslated line that won't really be usefull for people who won't be able to read the related doc (only in english) will not really hurt.
Yes, it's true but it's also a new feature and now each new feature has to be detailed for distribution maintainers...

So it will enhance our dock debuging ability or advices we can give on the forum (more commands easily available)
Yes but I think the only command that we'll use is to quit the dock.

-Will keep up to date if the dock DBus location change.
but it's still much better to launch a dbus-send command
DBus location should not change and if we want to create script, it's maybe better to directly use dbus-send (for the reply, string formatting, not loading cairo-dock binary, etc.)

SQP, Friday 13 April 2012 à 00:57


Subscription date : 03 July 2010
Messages : 1081
be sure I would be the last one to suggest such option if DBus commands were readable or writable but with such crap I don't see better.

To have a cairo-dock session to send commands to, it must be already loaded, so I'm not sure that would be too heavy to relaunch.

Ideas | Propositions

Subjects Author Language Messages Last message
[Locked] [TBR] Remote DBus control
SQP Français 5 SQP [Read]
13 April 2012 à 00:57


Glx-Dock / Cairo-Dock List of forums Ideas | Propositions [TBR] Remote DBus control Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.