Google Picasa and KDE - very simple fix for default browser and mail composer.
I took the excellent Google Picasa for a spin after a number of friends recommended it to me, and being a KDE user, I noticed a little foible regarding Picasa's calls to email and web browsers in KDE - it doesn't open links in the default web browser and it doesn't take you to that nice fast "compose window" KMail users are used to (or your other default email client) when you choose to mail stuff.
From the Picasa FAQ:
Oops - a call directly to a running kmail instance isn't quite right for KDE users. KDE lets you open mailto links in the configured default mail client, and if that's kmail, it doesn't need to be up and running - either way you can just do a kde-open "mailto:*whatpicasapasses*" to do this, and it won't just die if there's no running kmail. Why a shell command? Keep reading.
Regarding the web browser:
KonquerorIface openBrowserWindow is a DCOP call to an instance of the Konqueror browser, not a request to KDE to open in your default browser, so it would never call your default browser anyway.
As it happens, a call to open a URL in your default browser (as configured in KDE control centre) is easily done, in this case, we'll use kde-open in a shell script to call the default browser component because that's the method google offer us (see below).
Having said all that, the very hard working Picasa folks (did you see how many patches they submitted to wine? Cor blimey!) seem to have a desire to find out what the default browser component is for their own app, which the way I do it in a shell script looks mighty ugly:
- the double sed is to allow for an empty BrowserApplication setting meaning "konqueror".
Well anyway, from that same FAQ you find those open-source-friendly guys at google that make Picasa have provided hooks to all this stuff, so no need for a patch to fix it, KDE users can place the following tiny, simple scripts somewhere in their PATH (say /usr/bin/ or ~/bin/) and have their default mail client and web browser components properly used by Picasa in KDE.
picasa-hook-email.sh:
picasa-hook-urlhandler.sh :
...and you're set without a patch - thanks to the forethought of the Picasa developers. Good work, that Google.
Now, if Picasa could just lose its "multiple email attachments" bug we'd be cooking with gas.
From the Picasa FAQ:
"Q: Why won't Picasa use my native email program?
The interface for starting a native Linux email program isn’t standardized, and often doesn't work.
We do our best to launch the proper email client, but there are only a few combinations that we’ve found to work. Those include using Evolution under Gnome, and using KMail under KDE, but only when KMail is already up and running in the background."
Oops - a call directly to a running kmail instance isn't quite right for KDE users. KDE lets you open mailto links in the configured default mail client, and if that's kmail, it doesn't need to be up and running - either way you can just do a kde-open "mailto:*whatpicasapasses*" to do this, and it won't just die if there's no running kmail. Why a shell command? Keep reading.
Regarding the web browser:
"Under KDE, Picasa will use the dcop command-line tool to interface to Konqueror, and use the KonquerorIface openBrowserWindow method to open a URL. Unfortunately, as far as we can tell, KDE will always open with Konqueror, regardless of what you’ve configured as your default browser"
KonquerorIface openBrowserWindow is a DCOP call to an instance of the Konqueror browser, not a request to KDE to open in your default browser, so it would never call your default browser anyway.
As it happens, a call to open a URL in your default browser (as configured in KDE control centre) is easily done, in this case, we'll use kde-open in a shell script to call the default browser component because that's the method google offer us (see below).
Having said all that, the very hard working Picasa folks (did you see how many patches they submitted to wine? Cor blimey!) seem to have a desire to find out what the default browser component is for their own app, which the way I do it in a shell script looks mighty ugly:
grep BrowserApplication `kde-config --localprefix`/share/config/kdeglobals | sed -e "s/BrowserApplication=\!//" -e "s/BrowserApplication=/konqueror/"
- the double sed is to allow for an empty BrowserApplication setting meaning "konqueror".
Well anyway, from that same FAQ you find those open-source-friendly guys at google that make Picasa have provided hooks to all this stuff, so no need for a patch to fix it, KDE users can place the following tiny, simple scripts somewhere in their PATH (say /usr/bin/ or ~/bin/) and have their default mail client and web browser components properly used by Picasa in KDE.
picasa-hook-email.sh:
#!/bin/bash
kde-open mailto:"$*"
picasa-hook-urlhandler.sh :
#!/bin/bash
kde-open "$*"
...and you're set without a patch - thanks to the forethought of the Picasa developers. Good work, that Google.
Now, if Picasa could just lose its "multiple email attachments" bug we'd be cooking with gas.
0 Comments:
Post a Comment
<< Home