12

i'm on mint linux with i3wm

i want to discriminate a special firefox session from the default sessions when its starts. So i need it to have at least one altered property right at the beginning (later it changes its title but then it is to late. I want to assign it via an i3 command to a special workspace)

i tried this

firefox --class="pidgin"
#xprop output: WM_CLASS(STRING) = "Navigator", "Firefox"
firefox --class=pidgin
#xprop output: WM_CLASS(STRING) = "Navigator", "Firefox"

this works:

xprop -set WM_NAME "Horst" #this works but its not at startup
#xprop output: WM_NAME(STRING) = "Horst"

this dosn't:

xprop -set WM_CLASS "Pidgin"
xprop: error: unsupported conversion for WM_CLASS

1) how do i check that the firefox --class=<1> command works?

2) what is a valid value for <1>?

3) is there any other way/command to start firefox with an altered property?

BorstenHorst
  • 301
  • 2
  • 6

1 Answers1

6

To address 2), any string does the job:

$ firefox --class foo

i3 assign catches it (which is enough for me), but xprop still shows the old value.

bertieb
  • 7,344
  • 36
  • 42
  • 54
BorstenHorst
  • 301
  • 2
  • 6
  • 3
    This works, but only if firefox is not already running. – gladed Feb 22 '18 at 16:45
  • 1
    @gladed use the `--no-remote` option in combination with `-P profile` if you desire multiple instances of firefox with unique class names. so for example `firefox --no-remote -P default --class foo`. – pkfm Nov 12 '19 at 18:24
  • Combining this with one-line shell scripts to start firefox alongside with the correct profile and simply using that instead of ``firefox`` to start it works like a charm—at least for those of us who have their browsers open continuously. – Jonas Schäfer Mar 10 '20 at 20:13