Wrap Firefox in KDE app?

Stephen Dowdy sdowdy at ucar.edu
Wed Nov 14 00:33:33 GMT 2012


Dotan,

This doesn't completely help, however, here's something that may get
you closer to what you need.

>From the way, wayback, all X11 apps used to pass through X11 lib
initialization (IIRC, it was XtInitialize(args)) this allowed you
to set the name and class of the application, so the Window Manager
could manage different programs/classes differently. (and
geometry and X resources (xrm), etc)


When mozilla was netscape, this used to work properly (it's been
like 12 years since i did this, and i forget specifically why i used
to modify netscape's WM_CLASS, sigh).

So, since going through Gtk, they broke things, but eventually got
them partially fixed.  Gtk apps call gtk_init(args), and firefox
does this, too, but they aren't doing it quite right.

IIRC, XtInitialize() and gtk_init() are passed the full cmdline
argument vector, parse things they know about, and then return
the argument vector sans the items they knew and handled. the
application then took the rest of the args which presumably were
not generic UI toolkit args, but application specific args, and
processed them.

So, at least as of firefox 16, the '--class' argument is working as
expected, though --name is not.  As i often see by Mozilla devs,
they seem to lack the full comprehension of adhering to historical
standards:  (i'll paraphrase that as "Hey, man, doesn't impact
me, so it's not a problem!")

    Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=496653#c40
    Ref: http://developer.gnome.org/gtk/2.24/gtk-running.html

So, if you start a firefox profile, say "Banking", with:

   firefox -P Banking --class FF_Banking --no-remote

then the task manager will put that instance into a new task
grouping (since WM_CLASS instance is now FF_Banking and not
"Firefox".  Unfortunately, it will still have the standard Firefox
Icon.  Now, where does that icon come from? it's not the one in
{firefoxAPPDIR}/icons.  It *might* be found in 'omni.ja' (no
longer called a jar file, because Moz devs violate the ZIP file
specification, which is also JAR, in order to speed up indexing.).
Firefox may also support XDG icon directory lookups, etc, but
a quick 'strace' doesn't give me something obvious to work
off of.

So, if you can figure out the search order for firefox to
make its icons, and it allows lookups in the user's profile,
or based on the Class name, you might be able to fix that.
Worst case you could change the XDG variables to hunt for
Icon dirs, or the kde4 icon path, etc...

Good luck!

--stephen
-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  sdowdy at ucar.edu        -  http://www.ral.ucar.edu/~sdowdy/

___________________________________________________
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