<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>

<font size="2"><b>On Wed, 22 Oct 2014 11:27:32 -0400, Dana Jansens wrote</b>
<br />> BTW 
Openbox runs autostart after it has started up now, instead of before, so those 
sleeps may be unnecessary with an up-to-date Openbox.
<br />
<br />As I said, my autostart works fine without any sleep invocations. That strange and silly (sleep ... & ...) seems to
<br />come from the Arch-Wiki page at https://wiki.archlinux.org/index.php/openbox#autostart. Maybe someone should 
<br />fix that page ;-)
<br />
<br /> Cheers, RalfD
<br />
<br />> On Wed, 
Oct 22, 2014 at 8:32 AM, R. Mattes <span dir="ltr"><<a target="_blank" href="mailto:rm@mh-freiburg.de">rm@mh-freiburg.de</a>></span> 
wrote:
<br />> <blockquote style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">On Wed, 22 Oct 2014 01:02:14 
-1000, E R wrote
<br />> 

<span class="">> I don't see anything complicated about this. The way I 
have the two
<br />> 

> sleep lines is a common way of doing this, this method has been
<br />> 

> practied this way for many years in Linux...
<br />> 
<br />> 

</span>Somehow, some of us here seem to get the impression that you 
don't
<br />> 

really unerstand your own shell program ...
<br />> 

<span class="">
<br />> 

> I don't see any behind the keyboard errors here, LMAO, if so, 
someone
<br />> 

> please point it out in that copy of my autostart.sh below...
<br />> 

>
<br />> 

> # This shell script is run before Openbox launches.
<br />> 

> # Environment variables set here are passed to the Openbox session.
<br />> 

>
<br />> 
<br />> 

</span><span class="">> (sleep 1s && tint2) &
<br />> 

> (sleep 2s && redshift-gtk >/dev/null 2>&1) &
<br />> 

<br />> 

</span>So, here you run two subshells. Each subshell will execute /bin/sleep 
[1],
<br />> 

wait for sleep to exit, an then look at sleeps return code, and, if
<br />> 

sleep exited with return value 0, run the next program (tint2 or
<br />> 

redshift-gtk). Now, do you really expect 'sleep' to fail??? Most 
likely
<br />> 

not, so you might change this to
<br />> 
<br />> 

 (sleep 1s; tint2)&
<br />> 
<br />> 

Next question: how long do you expect those subschells to run? The way
<br />> 

you programmed this, the shell will terminate once the last program it
<br />> 

invoked terminates. So, as long as tint2 or redshift-k run, you'll 
see
<br />> 

to shell processes in your top/ps output. Not what you want - so write
<br />> 

it like this:
<br />> 
<br />> 

 ( sleep 1s; tint2 & ) &
<br />> 
<br />> 

That way the subshell forks tint2 and terminates. No more shell
<br />> 

processes arround.
<br />> 

<span class="">
<br />> 

> /usr/lib64/xfce4/notifyd/xfce4-notifyd &
<br />> 

> /usr/bin/xbindkeys &
<br />> 

> eval `cat $HOME/.fehbg`
<br />> 
<br />> 

</span>That's a rather baroque way of doing this: a normal .fehbg file 
contains
<br />> 

an invokation of feh like this: feh --bg-fill .... which will terminate
<br />> 

feh.
<br />> 

So, a simple:
<br />> 
<br />> 

 sh $HOME/.fehbg
<br />> 
<br />> 

or even_
<br />> 
<br />> 

 . $HOME/.fehbg
<br />> 
<br />> 

will do.
<br />> 

BTW: I never saw the need for all those sleep invokations, in my
<br />> 

autostart I'll just run
<br />> 
<br />> 

tint2 &
<br />> 
<br />> 

et al.
<br />> 
<br />> 

HTH Ralf MAttes
<br />> 
<br />> 

[1] Actually, it probably won't run an external program but rather
<br />> 

invoke the shell's buildin sleep command ....
<br />> 
<br />> 

_______________________________________________
<br />> 

openbox mailing list
<br />> 

<a href="mailto:openbox@icculus.org">openbox@icculus.org</a>
<br />> 

<a target="_blank" href="http://icculus.org/mailman/listinfo/openbox">http://icculus.org/mailman/listinfo/openbox</a>
<br />> 

</blockquote>
<br />
<br />
<br />-- 

<br />
R. Mattes - 

<br />
Hochschule fuer Musik Freiburg 

<br />
rm@mh-freiburg.de 

<br />

<br />
</font>

</BODY>
</HTML>