You are not logged in.

#1 2017-06-14 14:13:33

justasug
Member
Registered: 2014-08-03
Posts: 174

[SOLVED] Openbox two autostart processes

I have noticed that there are two processes running the same Openbox autostart file.

$ ps x | grep autostart
  956 ?        Ss     0:00 /usr/bin/openbox --startup /usr/lib/openbox/openbox-autostart OPENBOX
  977 ?        S      0:00 sh /home/dino/.config/openbox/autostart
  978 ?        S      0:00 sh /home/dino/.config/openbox/autostart
 1271 pts/0    S+     0:00 grep --color=auto autostart

Is this normal behaviour? Can someone else using Openbox see how many they have? If not, how can I figure out what's starting the other one?
All of my programs in my autostart file have only 1 instance running, despite apparently being called twice by the two autostart processes?

I am starting Openbox with LightDM. I'll provide more information if needed.

Last edited by justasug (2017-06-14 22:00:23)

Offline

#2 2017-06-14 15:18:55

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Openbox two autostart processes

That's strange, mine just shows:

772 tty1     Sl     0:00 /usr/bin/openbox --startup /usr/lib/openbox/openbox-autostart OPENBOX

What is the contents of your "~/.config/openbox/autostart" file?

Offline

#3 2017-06-14 16:27:25

justasug
Member
Registered: 2014-08-03
Posts: 174

Re: [SOLVED] Openbox two autostart processes

Thanks for the tip, seems like the content of my autostart file is indeed responsible for this.

$ cat .config/openbox/autostart

compton --config ~/.config/compton/compton.conf &
setxkbmap -option caps:swapescape &
(nitrogen --restore && tint2) &

(mpd && mpdas) &

volumeicon &
#cbatticon -i symbolic -l 10 -r 2 &
orcsome &

qbittorrent &

I did a few tests and the line with nitrogen and tint2 is triggering the two processes. If I remove that line, I get the normal result of only one process.
What's so different with that line? Am I using the subshell (what I assume the whole content within the parenthesis) wrong? I also have the same thing in the line with mpd and mpdas, but it's not giving me the two processes. Or is the software itself, Nitrogen and Tint2, responsible for this?

EDIT:
Okay, I changed

(nitrogen --restore && tint2) &

to

nitrogen --restore &
tint2 &

and the problem is gone.
I'm still kind of curious why those two programs can't be run like that. Does anyone have an idea?

Last edited by justasug (2017-06-14 16:29:57)

Offline

#4 2017-06-14 17:27:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,408

Re: [SOLVED] Openbox two autostart processes

Brackets create a second seperate shell and as one of them at least (i suspect tint) is a GUI program openbox will also create itself a second time inside that new shell to host that new window. This condition is obviously not true for the mpd processes. Why are you using a subshell there in the first place?

Last edited by V1del (2017-06-14 17:29:00)

Offline

#5 2017-06-14 22:00:13

justasug
Member
Registered: 2014-08-03
Posts: 174

Re: [SOLVED] Openbox two autostart processes

That's what the examples on the Wiki page did. I assumed I had to use a subshell to "group" them together (with &&), but I now realize that I don't have to.
Thanks for the clarification.

Offline

Board footer

Powered by FluxBB