Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've already tried adding it as an entry in the ~/.xinitrc and even in the ~/.config/openbox/autostart file.

I tried adding it as the following variants:

tint2 &
tint2 -c ~/dotfiles/linux/tint2rc
tint2 -c ~/dotfiles/linux/tint2rc &

None of them work in both files. Of course none of these at the same time, or in both files at the same time. With the first two I get errors regarding not finding the configuration file, so I just tell it where it is, even though there's a perfectly working symlink where it should be. :)

Am I doing something wrong? Am I missing something? Or is it just not working as it should?

Just thought I would note. After Openbox starts up, I can open any terminal and run tint2 -c ~/dotfiles/linux/tint2rc and it'll run just fine, immediately. However if I close that Terminal the process is terminated...

Any help is greatly appreciated. :)

share|improve this question
I have tint2 & in /home/nylon100/.config/openbox/autostart and it works fine. –  Rany Albeg Wein Apr 19 '13 at 14:07
@nylon100 Thanks for that! It's possible it's a specific issue with my install then. :/ –  Greduan Apr 19 '13 at 14:09
add comment

2 Answers

up vote 2 down vote accepted

Difficult to answer without seeing your .xinitrc, but assuming you're just calling the Openbox binary at the end, try this:

exec /path/to/wm & WMPID=$!
/path/to/tint2 --options &
# other bits
wait $WMPID

I use dbus to launch my WindowManager these days because of all that tight systemd integration, the above works nicely too.

share|improve this answer
Yes I am only calling openbox-session in my .xinitrc. So basically what this is doing is call Openbox, tint2 and other stuff, and then making it wait? –  Greduan Apr 19 '13 at 14:28
Yep - the first line executes your WM and collects the resulting PID in a variable. wait will instruct BASH to wait for the process and then return the exit code it returned.The theory in your case being that tint2 requires a Window Manager to be running. –  Mel Boyce Apr 19 '13 at 14:34
So the first line should be exec openbox-session & WMPID=$!? Also would this work in Zsh? I use Zsh. –  Greduan Apr 19 '13 at 14:36
Correct on both counts. Although, I use a BASH shebang for my .xinitrc. Old habits etc. –  Mel Boyce Apr 19 '13 at 14:59
Tried it, and it works perfectly. Thanks! –  Greduan Apr 19 '13 at 16:09
add comment

As far as I can tell, adding these lines to ~/.config/openbox/autostart should work. Unfortunately, I don't have openbox installed so I can't check.

However, I can tell you why it does not work with ~/.xinitrc. ~/.xinitrc is only read when you are launching X manually from a tty using startx or xinit (see here). When you log in from a graphical loigin manager, it is ignored and ~/.xsession is read instead. So, try adding the relevant lines to your ~/.xsession file instead.

share|improve this answer
Oops yes. Yes I am adding these entries to this file (autostart), not the other one (startup). A typo I just fixed. :P –  Greduan Apr 19 '13 at 14:02
@Eduan ah, not that simple a solution then :). Try the .xsession suggestion. –  terdon Apr 19 '13 at 14:06
I do use startx though, haven't taken the time to use a login manager yet. I'm the type that prefers control where it doesn't matter as much. :P –  Greduan Apr 19 '13 at 14:08
Perhaps it is starting too soon? Try adding a sleep in case tint2 depends on services that are loaded a bit later (I'm thinking of the systray). –  terdon Apr 19 '13 at 14:12
I tried adding sleep 10 to the line right above the one with the tint2 stuff. Didn't make a difference, and by that point it should have already loaded, since it does load in that time if I start it manually... –  Greduan Apr 19 '13 at 14:18
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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