You are not logged in.
Pages: 1
Topic closed
Which would be the better option or a "more correct" way to set the background in openbox, running feh from .xinitrc or autostart.sh? This is not a "How-To" question so much as it is a philosophy question. I have used both options successfully and am currently only starting openbox with .xinitrc then starting conky and feh with autostart.sh. Any opinions on this? Which one is more correct and WHY? What was the original intention of each file?
Thanks,
Monstermudder78
Last edited by monstermudder78 (2008-10-06 19:43:22)
Offline
autostart.sh is a good choice if you are running a full openbox-session. It's the built-in session script explicitly for Openbox.
Technically speaking there is no difference between using xinitrc and autostart.sh to autostart your applications. As far as the original intentions go, xinitrc predates openbox and they aren't quite the same thing. xinitrc is intended to start session files for Xorg as a whole, while autostart.sh will only be parsed once openbox-session is already run (e.g. via xinitrc).
Strategically, there are some good practises to follow. For example, if you run several window managers and want to start certain applications only when Openbox is running, you can add them to autostart.sh. Then put everything else, such as wallpaper settings, in your xinitrc. This way items like wallpaper are set regardless of which WM is running. For a real example, I used to put my conky and xcompmgr executions in autostart.sh so they wouldn't start if I ran Awesome or Xmonad.
Last edited by thayer (2008-10-06 20:15:31)
thayer williams ~ cinderwick.ca
Offline
I don't think there is a really "more correct" way to do anything in linux, IMHO. When using openbox, I now use the .xinitrc option to eval`cat~/.fehbg` for my background transparency. I used to have it in autostart.sh and both ways work so I don't know if philosophical arguments even really need to apply. The nice thing about having it in .xinitrc is sometimes I want to use e17 instead of openbox and my conky transparency will still work whereas not so if I used the openbox/autostart.sh option. Keeps it simple.
Edit: Sorry if I sound like I'm repeating thayer. He beat me to the punch. I must type too slow--more likely think too slow.
Last edited by bgc1954 (2008-10-06 20:53:48)
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
autostart.sh: when using login manager like k,g-dm
.xinitrc: when using startx from console (or xdm)
Last edited by DonVla (2008-10-06 22:42:59)
Offline
autostart.sh: when using login manager like k,g-dm
.xinitrc: when using startx from console (or xdm)
Session managers will also read either .xressources or .xinitrc
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
I use openbox-gnome-session, and have used GNOME's session manager to create a new startup item: ~/.startup. This is a script I've made executable like any other, and I treat it like .xinitrc - I put whatever I want to exec at startup in it.
-dav7
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline
DonVla wrote:autostart.sh: when using login manager like k,g-dm
.xinitrc: when using startx from console (or xdm)Session managers will also read either .xressources or .xinitrc
xressources yes, xinitrc no.
Offline
What Thayer said.
Oh, and, FWIW, SLiM reads .xinitrc, DonVla.
Offline
What Thayer said.
Oh, and, FWIW, SLiM reads .xinitrc, DonVla.
GDM and WDM too. Select 'default' from the sessions menu.
I'm not sure about KDM but I assume it's much the same.
Offline
Misfit138 wrote:What Thayer said.
Oh, and, FWIW, SLiM reads .xinitrc, DonVla.
GDM and WDM too. Select 'default' from the sessions menu.
I'm not sure about KDM but I assume it's much the same.
Whether they read it or not depends on .xsession. The standard .xsession file in Arch looks like this:
#!/bin/sh
#
# ~/.xsession
#
# Executed by xdm/gdm/kdm at login
#
/bin/bash --login -i ~/.xinitrc
So, the answer is - if you haven't tinkered too much, .xinitrc gets read by login managers.
arch(3) adj amused because you think you understand something better than other people ;P
Offline
One thing I like about autostart.sh is that at least for me I don't have to put "sleep &&" in front of a lot of stuff to get them to start like I did in .xinitrc. It's a very minor little thing, but at the very least it saves typing a few keystrokes.
Offline
Thanks for all the input and discussion. For the sake of simplicity I have chosen to start openbox from .xinitrc, then everything else in autostart.sh, just so I only need to look in one place instead two to find what I'm looking for. Thanks again to those who have answered and I welcome anyone else's opinion who hasn't chimed in yet and wants to tell me I am doing it wrong .
Offline
Interesting read, I had exactly the same question.
I think i will not use autostart.sh/openbox-session at all. I don't have a session manager running anyway.
Through ~/.xinitrc I start all my needed apps (which are the same for all my WM-setups, so I rather put stuff there), and I'll just start openbox, my panel and I'm pretty much done.
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
Well, in the autostart.sh file says:
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.
So I think that it all depends if you want to launch your apps before or after openbox.
Offline
Do not necrobump threads. Closing...
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Pages: 1
Topic closed