[openbox] I Have Two Instances Of 'autostart.sh Running...

Mathias Dufresne mathias.dufresne at gmail.com
Tue Oct 21 04:49:04 EDT 2014


Hi all,

Why not looking for the process which block your autostart script?
To do that you can use "ps" with "f" options to show processes as tree:
ps axf
This will show a tree of running processes.

Now to be more precise:
ps axf | grep autostart.sh -B6 -A5
This will show only lines for your both autostart scripts with the 6
previous lines and the 5 next.

As processes are shown as a tree, you will see what process is blocking
your script. So you will be able to work on that blocking command for it
become a non-blocking command.

Now some notes:
- read the manual.
- RFTM, really.
- take in consideration the problem is generally between the keyboard and
the chair. In others words, a misconfiguration is not a bug : )
- GNU/Linux system are composed by  numerous bricks (software bricks, but
still), each one depending on others and often with things depending of
them. On these systems you can change by yourself a lot of things,
configurations and behavior, but this freedom has a cost: the time to
understand once you produced a bad configuration ^^

Some notes about scripts:
Scripts are a bunch of commands executed sequentially, nothing else. This
means a command will start only if the previous one as finished or if the
process has been forked (using ampersand).
Any script will close itself once it has finished to run all commands
inside it. Finished to run means here each command has finished its job or
has been forked.

Cheers and welcome in this wonderful world that is open source world :)

mathias


2014-10-21 8:36 GMT+02:00 E R <ears.box at gmail.com>:

> TYPO before;
>
> Also something I forgot to mention, that application in question, I
> don't see them running in htop when using sleep,  instance/INSTEAD I just
> see
> it showing autostart.sh running....
>
> On Mon, Oct 20, 2014 at 8:35 PM, E R <ears.box at gmail.com> wrote:
> > So I've gone through everything again and all I can think of.
> >
> > Again, for some reason using the sleep cmd to run an app causes this
> > and this shouldn't happen.
> >
> > Also something I forgot to mention, that application in question, I
> > don't see them running in htop when using sleep, instance I just see
> > it showing autostart.sh running....
> >
> > So here's how I made it look now;
> >
> > # This shell script is run before Openbox launches.
> > # Environment variables set here are passed to the Openbox session.
> >
> > # D-bus
> > if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS";
> then
> >        eval `dbus-launch --sh-syntax --exit-with-session`
> > fi
> >
> > # Run XDG autostart things.  By default don't run anything
> desktop-specific
> > # See xdg-autostart --help more info
> > #DESKTOP_ENV="OPENBOX"
> > #if which /usr/libexec/openbox-xdg-autostart >/dev/null; then
> > #  /usr/libexec/openbox-xdg-autostart $DESKTOP_ENV
> > #fi
> >
> > compton --config ~/.config/compton -b --logpath /tmp/compton.log &
> > tint2 &
> > redshift-gtk >/dev/null 2>&1 &
> > /usr/lib64/xfce4/notifyd/xfce4-notifyd &
> > xbindkeys &
> > eval `cat $HOME/.fehbg` &
> >
> > # For use with BFS
> > #sudo schedtool -n -20 -I `pidof X`
> >
> > To be honest I don't need anything to sleep and now I see tint2 and
> > redshift appearing in htop...
> >
> > Hopefully Dana, OH DANA! :) What's going on here?
> >
> > I still say --> BUG hehe... :)
> >
> >
> > On Mon, Oct 20, 2014 at 8:17 PM, E R <ears.box at gmail.com> wrote:
> >> Yes I added the brackets back.
> >>
> >>
> >> For the problem.culprit I'm saying it appears to be openbox because if
> >> I make the autostart command as sleep like this; ( sleep 1 && tint2 )
> >> & then I see an instance of autostart.sh running in htop, but if just
> >> made tint start like this; tint2 & nothing appears. You understand
> >> now?
> >>
> >> I know that sh starts the script, that is not what I was talking
> >> about. Tint2 is an application, autostart.sh is a script, so I don't
> >> really get why it should appear in htop as a running process is what I
> >> meant...
> >>
> >> I've always used it as autostart.sh, but I'll rename it and try...
> >>
> >> I don't use a display manager, just startx and I'm running Slack...
> >>
> >> Also my understanding is only something you want to sleep you put
> >> brackets around it, not just anything that ends in ampersand &...
> >>
> >> So as I mentioned the culprit seems to be running a command as; (sleep
> >> 1 && appname) &
> >>
> >> On Mon, Oct 20, 2014 at 10:03 AM, TT <turkuting at gmail.com> wrote:
> >>> E R wrote:
> >>>>
> >>>> tint2 & redshift are both showing these instances, but if I
> >>>> don't make them sleep then I don't even see one instance of autostart
> >>>> running...
> >>>
> >>> on second thought, your bash syntax is probably off somewhere here:
> >>> try putting brackets around everything that has a "&" in the end - and
> maybe
> >>> something else, don't know, just guessing here.
> >>> try commenting out lines until you find the CULPRIT.
> >>>>
> >>>> compton --config ~/.config/compton -b --logpath /tmp/compton.log &
> >>>> sleep 1s && tint2 &
> >>>> sleep 2s && redshift-gtk >/dev/null 2>&1 &
> >>>> /usr/lib64/xfce4/notifyd/xfce4-notifyd &
> >>>> /usr/bin/xbindkeys &
> >>>> eval `cat $HOME/.fehbg`
> >>>>
> >>>>
> >>>
> >>> _______________________________________________
> >>> openbox mailing list
> >>> openbox at icculus.org
> >>> http://icculus.org/mailman/listinfo/openbox
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20141021/2424cb7d/attachment-0001.html>


More information about the openbox mailing list