Configure KDE4's Device Notifier to Download Photos With Picasa

First, I created a new directory in my ~/.kde tree.

mkdir -p ~/.kde/share/apps/solid/actions

Next, I created a new file called picasa.desktop in that directory, and populated it with the following content:

[Desktop Entry]
X-KDE-Solid-Predicate=[ [ StorageVolume.ignored == false AND StorageVolume.usage == 'FileSystem' ] OR Camera.supportedDrivers == 'gphoto' ]
Type=Service
Actions=open;
 
[Desktop Action open]
# %f gives StorageAccess.filePath, %d gives Block.device, %i gives UDI
Exec=/usr/bin/picasa
Icon=/usr/share/icons/oxygen/32x32/apps/picasa.png
Name=Download Photos with Picasa

Picasa does not seem to come with a decent icon to use in the device notifier popup, so I did a bit of searching on the web and settled on the 32x32 icon at http://www.iconspedia.com/icon/picasa-2711.html. I downloaded this icon and stored it in /usr/share/icons/oxygen/32x32/apps/picasa.png.

Once everything was in place, I logged out and back in to get KDE to reload its configuration. Then I plugged the memory card into the reader, waited for the device notifier to pop up, clicked the device name and was greeted with a dialog showing "Download Photos with Picasa" as the first option for handling the device! Whoohoo!

Tags: