You are not logged in.

#1 2017-01-05 15:27:29

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

[SOLVED]Start firefox with different WM_CLASS ?

Is there a way to start firefox such that it sets the WM_CLASS of its window to different string than "Navigator", "Firefox" ?
Changing it after startup with xprop -set doesn't do what i want.

Last edited by teateawhy (2017-01-05 18:34:28)

Offline

#2 2017-01-05 15:42:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [SOLVED]Start firefox with different WM_CLASS ?

teateawhy wrote:

Changing it after startup with xprop -set doesn't do what i want.

What do you want to do?  Why is matching against the existing WM_CLASS (res_name or res_class) not suitable?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-01-05 15:43:15

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [SOLVED]Start firefox with different WM_CLASS ?

The KDE taskbar uses the WM_CLASS to determine the icon and which windows get grouped together.

Offline

#4 2017-01-05 15:44:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [SOLVED]Start firefox with different WM_CLASS ?

OK, and you don't want firefox windows to show a firefox icon?  Or you don't want different firefox windows grouped together?  If you want to change the icon, there are easier ways.

But if you really want to change WM_CLASS, use --class=...


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2017-01-05 15:55:54

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [SOLVED]Start firefox with different WM_CLASS ?

Trilby wrote:

OK, and you don't want firefox windows to show a firefox icon?  Or you don't want different firefox windows grouped together?  If you want to change the icon, there are easier ways.

Both.
I have a custom desktop file which starts firefox in firejail and one that starts it with private window, and i want to seperate the "normal" firefox windows from the private windows and from the jailed windows etc.

Also i want to have the behaviour of joining application starters and dock icons which give access to windows of that application. (Like the windows taskbar.)
When i add a starter for the custom desktop file with a custom icon, and click on that icon,  the normal firefox icon appears next to it instead of showing the custom icon as running.

[Desktop Entry]
Type=Application
Name=Sandboxed Firefox
GenericName=Secured Firefox
Exec=firejail /usr/lib/firefox/firefox
Categories=Network
Icon=firefox-symbolic
Terminal=false
Trilby wrote:

But if you really want to change WM_CLASS, use --class=...

Doesn't seem to work.
xprop still says
WM_CLASS(STRING) = "Navigator", "Firefox"

EDIT: The -class argument is working, the problem was that firefox opened new windows, not new instances, and these have the same WM_CLASS as the first window. So the different desktop files only opened new windows in the old instance with the same WM_CLASS.
This means you can't have different icons for the private windows, unless you run different profiles and instances.

Last edited by teateawhy (2017-01-05 18:35:08)

Offline

#6 2019-01-30 23:25:36

najamelan
Member
Registered: 2018-01-11
Posts: 7

Re: [SOLVED]Start firefox with different WM_CLASS ?

You can do this but you also have to set:

StartupWMClass = MyOtherClass

in your my-other-firefox.desktop file...

Offline

#7 2019-01-31 00:57:41

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED]Start firefox with different WM_CLASS ?

najamelan, please pay attention to the dates on threads. This thread is two years old and marked [solved]. Please do not necrobump.

Closing.


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB