Catching resume from suspend?

Thiago Macieira thiago at kde.org
Mon Dec 7 17:54:45 GMT 2009


Em Segunda-feira 07 Dezembro 2009, às 12:00:29, Anders Lund escreveu:
> 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?

Indeed, but you cannot send such a signal unless you've given yourself 
permissions on the system bus.

And if you send a signal under the org.freedesktop.Hal hierarchy, you should 
*at least* ask the HAL developers for permission....

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20091207/8755a87e/attachment.sig>


More information about the kde-core-devel mailing list