[openbox] autostart.sh and bashrc

Anthony Thyssen A.Thyssen at griffith.edu.au
Fri Jun 29 01:55:49 EDT 2012

On Thu, 28 Jun 2012 22:31:53 -0700
Ian Zimmerman <itz at buug.org> wrote:
| Ian> This thread went a bit off-topic, but anyway what I do is keep a
| Ian> separate file ~/.environment, and source it from multiple places:
| Ian> 
| Ian> ~/.profile
| Ian> ~/.bash_profile
| Ian> ~/.xsession
| Ian> 
| Ian> also, I link to it from ~/.ssh/environment which means I get the vars
| Ian> even when I work remotely ...
| Anthony> That only works if you do not need to 'figure out' or 'program' the
| Anthony> environment.  Environments are not static. They change with time!
| Anthony> Also .profiles and .bashrc do a lot more than just set environment
| Anthony> variables and shell specific variables.
| That's why I wrote "I source it" and not "I link to it" for the local cases.
| The remote case is only interesting when running ssh with a single
| command, otherwise the shell run by ssh takes care of it via one of the
| profile files.
| It is a mess, but keeping the variables separately helps.

I agree... keeping things separate does simplify things

For example my own profile is called ".shrc"  and all the other
different shell profiles source it after doing their 'specific'

The ".shrc" uses my ".user_env.$HOST" after update checks, then
does all common stuff, though does contain specific $SHELL sections
too.  I also keep aliases (usually functions) separate in ".sh_aliases".

As for ".xsession" I started in the days when you launch X manually
so I have a ".xinitrc" file.  My ".xsession" just calls ".shrc", to set
environment before it 'exec' to ".xinitrc".

The ".xinitrc" file has evolved to a point where I have different sets
of start-up clients for different machines and situations, can change
window managers, and even restart all my X clients completely without
actually logging out.

openbox is just the window manager of choice. combined with some gnome
and other X window apps, that I like.

  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
  Ivoniva:   "Lets get out of here.  We are running out of time."
  Zatheris:  "Can not run out of time! There is infinite time!
              You are finite.  Zatheris is finite."
                                             -- Bablyon 5, "War Without End"
   Anthony's Castle     http://www.ict.griffith.edu.au/anthony/

More information about the openbox mailing list