[openbox] auto-starting xscreensaver

Jim Rees rees at umich.edu
Fri Feb 15 08:48:56 EST 2013


Louis-David Mitterrand wrote:

  Actually XDG scripts were not being executed because I used 
  
  'exec openbox'
  
  instead of 
  
  'exec openbox-session' 
  
  in my ~/.xsession file. However this raises another question: I use this
  line in my ~/.xsession file to set the background:
  
  xli -quiet -onroot ~/img/${HOSTNAME}.jpg
  
  as I have a collection of images for each of my computers. The problem
  is that 'openbox-session' resets the background to a solid color whereas
  'openbox' does not. And there is no expansion of ${HOSTNAME} in
  ~/.config/openbox/autostart
  
  Is there a way around this?

I had the same problem. Autostart doesn't seem to have any useful
environment, but if you start a helper script from it, that helper will. My
helper is csh, but this might work with sh too. After fooling around and
trying different things, here is what I ended up doing.

.xsession:
exec openbox-session

.config/openbox/autostart.sh:
~/com/setbg

~/com/setbg:
#!/bin/csh
feh --bg-tile background.jpg


More information about the openbox mailing list