Catching resume from suspend?

Anders Lund anders at alweb.dk
Mon Dec 7 11:00:29 GMT 2009


Thiago Macieira skrev:
> Em Segunda-feira 07 Dezembro 2009, às 10:29:02, Anders Lund escreveu:
> > As I see it, using pm-utils is a solution that will work in quite many
> > systems, afaik it is quite common. And it is there, it can be used right
> >  away.  So it could be a temporary solution untill someone can come up
> > with something better.
> 
> You cannot emit a signal on the system bus unless you edit
> /etc/dbus-1/system.conf or system.d and give permissions to do that. Which
> means you need root permissions to install the necessary files, plus you'll
> need to define the interface which will emit the signal and what
>  information it will carry.
> 
> Which means your solution will never be accepted by mainstream distros.
>  Which means it has little sense to add support for catching the signal in
>  KDE apps in the first place.
> 
> How about just doing the right thing and adding it to one of the system
> daemons that emit signals already?
> 

Doing the right thing sounds good! Of course this would require to install a 
file in /usr/lib/pm-utils/sleep.d, but that should be all. The dbus message is 
sent by pm-action, which is running on behalf of hal.

Is it a problem for KDE to install such a file?

I'm not very familliar with dbus, but i understand that a dbus message can be 
a signal that anyone can connect to. So if the signal is sent, any application 
or applet should be able to catch it?

-- 

Venlig hilsen,
Anders




More information about the kde-core-devel mailing list