[Kde-hardware-devel] Solid SerialInterface and Device Notifier

Markus Becker mab at comnets.uni-bremen.de
Fri Jul 24 14:21:31 CEST 2009


> On Fri, Jul 24, 2009 at 9:36 PM, Markus Becker<mab at comnets.uni-bremen.de> 
wrote:
> > Hi,
>
> Hi Markus,
>
> > I am trying to create an action for a serial device, which should be
> > available in the Device Notifier.
> >
> > In order to do that I created the following serial.desktop file and put
> > it into /usr/share/kde4/apps/solid/actions/:
> >
> > -----------------
> > [Desktop Entry]
> > X-KDE-Solid-Predicate=[ IS SerialInterface ]

OK. This is seemingly wrong syntax. Working syntax:

X-KDE-Solid-Predicate=[ IS SerialInterface AND SerialInterface.port == 0 ]

> > Type=Service
> > Actions=open
> >
> > [Desktop Action open]
> > Name=Start Serial Device
> > Exec=kioclient exec %f
> > Icon=system-file-manager
> > ----------------
> >
> > Contrary to what I expected, no action is available in the Device
> > Notifier. Is the problem with the predicate? I tried the predicate using
> > PyKDE and for that it works fine.
>
> This is because the Device Notifier reads in the available predicates
> on startup. Therefore you either have to
> a) somehow convince Plasma to delete the DataEngine in question
> b) restart Plasma

OK. I did b) with:
kquitapp plasma-desktop
kstart plasma-desktop

>
> I found this out when writing the Device Actions KCM.
>
> > Is something in Device Notifier ignoring SerialInterfaces?
> >
> > Does KDE needs to be restarted to pick up the serial.desktop files?
>
> KDE does not need to be restarted, but running kbuildsyscoca4 might help

Once it has picked up the file, you can do modifications without restarting or 
running kbuildsyscoca4.

One GUI tool, which can create action files, I just stumbled across:
kcmshell4 solid-actions

> > Thanks in advance,
> > Markus
>
> Regards,
> Ben.

BR,
Markus

> > _______________________________________________
> > Kde-hardware-devel mailing list
> > Kde-hardware-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-hardware-devel
>
> _______________________________________________
> Kde-hardware-devel mailing list
> Kde-hardware-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-hardware-devel
------------------------------------------------
| Dipl.-Ing. Markus Becker
| Communication Networks
| Mobile Research Center
| TZI - Center for Computing Technologies
| University Bremen
| Germany
------------------------------------------------
| web: http://www.comnets.uni-bremen.de/~mab/
| mailto: mab at comnets.uni-bremen.de
| telephone: +49 421 218 2287
| building: NW1 room: N2260
------------------------------------------------


More information about the Kde-hardware-devel mailing list