I need to run two instances of the same program, and have different Openbox properties for each.

Lets say, I want to run two instances of Thunderbird. Even when I create two symlinks, i.e.


both instances still have the same NAME and TITLE:

$ obxprop | egrep '_OB_APP'
_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Icedove Mail/News"

How can I distinquish between two instances of the same program?

Can I start a program with a parameter, which will change the TITLE or NAME ?


Thunderbird, as a GTK+ application, supports a --class command-line option that sets the WM_CLASS property:

$thunderbird --class TEST &
$obxprop | grep 'OB_APP'
_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Mozilla Thunderbird"
_OB_APP_GROUP_NAME(UTF8_STRING) = "thunderbird"

Openbox supports per-application settings determined by the window class using the class attribute on an <application> entry in rc.xml. You can launch your two copies of Thunderbird with different command-line options and apply your window manager settings by the class you give.

Other GTK+ applications will generally support the same behaviour.

  • that works perfectly. Now I have noticed, Thunderbird is being executed as Exec=icedove %u. Do you have any idea what the %u means? – Martin Vegter Jul 11 '14 at 10:21
  • %u is replaced with "a single URL" in the command line if you drag something onto the launcher icon. – Michael Homer Jul 11 '14 at 10:25
  • @Michael Homer - so where should I put the class, infront or after %u?,i.e. icedove --class TEST %u, or icedove %u --class TEST? – user1968963 Jul 11 '14 at 10:31
  • thunderbird --help suggests options go before the URL parameter. – Michael Homer Jul 11 '14 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.