Re: I Have Two Instances Of 'autostart.sh Running...
Dana Jansens <[email protected]>
| Newsgroups | gmane.comp.window-managers.openbox |
|---|---|
| Message-ID | <CAP1a_af6nTVsQOAt-KCm8T70u372jeZcLgUnWtBwWuViECXiuA@mail.gmail.com> |
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. On Wed, Oct 22, 2014 at 8:32 AM, R. Mattes <[email protected]> wrote: > On Wed, 22 Oct 2014 01:02:14 -1000, E R wrote > > I don't see anything complicated about this. The way I have the two > > sleep lines is a common way of doing this, this method has been > > practied this way for many years in Linux... > > Somehow, some of us here seem to get the impression that you don't > really unerstand your own shell program ... > > > I don't see any behind the keyboard errors here, LMAO, if so, someone > > please point it out in that copy of my autostart.sh below... > > > > # This shell script is run before Openbox launches. > > # Environment variables set here are passed to the Openbox session. > > > > > (sleep 1s && tint2) & > > (sleep 2s && redshift-gtk >/dev/null 2>&1) & > > So, here you run two subshells. Each subshell will execute /bin/sleep [1], > wait for sleep to exit, an then look at sleeps return code, and, if > sleep exited with return value 0, run the next program (tint2 or > redshift-gtk). Now, do you really expect 'sleep' to fail??? Most likely > not, so you might change this to > > (sleep 1s; tint2)& > > Next question: how long do you expect those subschells to run? The way > you programmed this, the shell will terminate once the last program it > invoked terminates. So, as long as tint2 or redshift-k run, you'll see > to shell processes in your top/ps output. Not what you want - so write > it like this: > > ( sleep 1s; tint2 & ) & > > That way the subshell forks tint2 and terminates. No more shell > processes arround. > > > /usr/lib64/xfce4/notifyd/xfce4-notifyd & > > /usr/bin/xbindkeys & > > eval `cat $HOME/.fehbg` > > That's a rather baroque way of doing this: a normal .fehbg file contains > an invokation of feh like this: feh --bg-fill .... which will terminate > feh. > So, a simple: > > sh $HOME/.fehbg > > or even_ > > . $HOME/.fehbg > > will do. > BTW: I never saw the need for all those sleep invokations, in my > autostart I'll just run > > tint2 & > > et al. > > HTH Ralf MAttes > > [1] Actually, it probably won't run an external program but rather > invoke the shell's buildin sleep command .... > > _______________________________________________ > openbox mailing list > [email protected] > http://icculus.org/mailman/listinfo/openbox > _______________________________________________ openbox mailing list [email protected] http://icculus.org/mailman/listinfo/openbox