Wrap Firefox in KDE app?

Dotan Cohen dotancohen at gmail.com
Wed Oct 31 10:58:17 GMT 2012


On Sat, Oct 27, 2012 at 1:01 AM, Duncan <1i5t5.duncan at cox.net> wrote:
> Dotan Cohen posted on Fri, 26 Oct 2012 17:47:32 +0200 as excerpted:
>
>> I would like to use different icons for each Firefox profile. Firefox
>> does not seem to support this, but all KDE applications support by
>> default the --icon flag. Is there a simple way to "wrap" a launcher to a
>> specific Firefox profile in a KDE application so that it might be
>> possible to change the icon?
>
> Very interesting question!  I don't know the answer for sure, but your
> question triggered a memory of a kde executable I'd seen, which looks
> quite promising.  Please try the below and see if it does what you need,
> then report back, as you have me curious too, now. =:^)
>
> kstart [Qt-options] [KDE-options] [options] command
>
> Of course it has the usual kde-app --help, --help-kde --help-qt --help-
> all options, which you'd need to look at to see if it can do what you
> need.  As I said a quick look looks promising, but you'll have to look
> closer than I did and probably actually try it, to be sure.
>
>

Thank you Duncan. Here is what I have found:

This starts Firefox with the regular Firefox icon:
$ kstart --icon /home/dotancohen/icon.png /usr/bin/firefox
-profilemanager -no-remote

This starts Dolphin with the regular Dolphin icon:
$ kstart --icon /home/dotancohen/icon.png dolphin

However, this does start Dolphin with the requested icon:
$ dolphin --icon /home/dotancohen/icon.png

This starts Konqueror with the regular Konqueror icon:
$ kstart --icon /home/dotancohen/icon.png konqueror

Alas, this starts Konqueror with the regular Konqueror icon:
$ konqueror --icon /home/dotancohen/icon.png

I then tried Konqueror again both ways with the preloaded option
disabled, after killing all the running instances that ps showed. Same
result: Konqueror even when not preloaded refuses to use any other
icon in the task bar. That is actually what I expected considering the
fact that the following Konqueror bug has remained unresolved:
https://bugs.kde.org/show_bug.cgi?id=154415

So it seems that --icon is only a suggestion and that the application
can freely ignore it. Even worse, it seems that kstart does not
support the --icon flag anyway.


> The other alternative, which should work anywhere a *.desktop-based file
> is the basis for launching (including the kickoff apps menu and many icon-
> based launchers), /is/ a *.desktop file (or menu entry based on one).
> This has the advantage of being a freedesktop.org standard, so should
> work in DEs other than kde, as well, but won't work where *.desktop file
> isn't used.
>
> The key here would be to use firefox's -P <profile> option as the
> command, not simply firefox, and to set a custom icon as desired.
>
> You'd then clone that launcher item multiple times, changing the profile
> and icon for each one.

Thanks. This does in fact change the icon of the launcher, but the
application launched still has the regular Firefox icon in the
taskbar!


> I'd guess one or the other of these solutions should work.  Maybe both,
> in which case you can take your pick. =:^)
>

No, neither worked but I did learn a bit! Thanks, though. I do
appreciate the detailed missive, even if it took me a few days to get
around to it.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list