[openbox] Backgrounds
Michael Rasile
keeper at neo.rr.com
Thu Sep 25 00:59:05 EDT 2003
On Thu Sep 25, 2003 at 01:08:15PM +0930 or thereabouts, Tim Riley wrote:
> El jue, 25-09-2003 a las 13:44, Michael Rasile escribió:
> > Greetings!
> > Just wondering if I set a background during an ob3 session. How do I get
> > next session to start with the same background I finished with? Or don't
> > I? Thanks for anything.
>
> Esteemed Michael:
>
> Hi how are you? I am well. I hope this message finds you in good
> health.
>
> Openbox has no automatic way of saving the background. This makes
> sense, when you think about it. Openbox is a window manager and only a
> window manager, insofar as it manages windows and nothing else. Yes,
> the background is actually the root window, you say, but I never said
> openbox manages what is _inside_ the windows.
>
> So, we have ourselves now in a situation in which we must look outside
> openbox in order to achieve our goal of a persistent desktop
> background. You know, it's kind of funny, because the name of the
> window manager is openbox, and we are about to "step outside the box" in
> our solution. I know, I know, I am a sucker for irony, you say, but
> that's just me.
>
> Your question, when I read it first, seemed very familiar. Initially, I
> thought it was just a glitch in the Matrix, but when I searched my
> extensive email archives, I found this, dated Sunday 2003-09-07 at
> 15:27:
>
> On Sun, 2003-09-07 at 15:27, Michael Rasile wrote:
> > And, finally (his last question for a while) is there a way to start
> > with the same background that has been set from the menu? Well,
> > that's it for a while. Again, thanks for all your help.
>
> Remember that, Michael? Good, then it's not just me. Phew! You asked
> about keeping backgrounds set using the bgmenu persistent. A solution
> to this problem would be much the same as the question you ask now. Let
> us, then, see what I wrote in response to your initial question:
>
> "To set a background when you start up openbox, there are many ways, but
> one of these is just to put the command to set the background in your
> .xinitrc or .xsession, whichever of these files you use. At the moment
> the bgmenu does not modify these files, so it can't, in this manner,
> make the background persistent across settings.
>
> "However, I have a suggestion that you might like to try. You could
> modify the bsetbg source for it to print the command that it uses to set
> the background into a file (eg. ~/.bsetbg-last-background or something
> like that). This way, whenever the bsetbg command is run, it updates
> this file. Then, you could `source ~/.bsetbg-last-background` in your
> .xinitrc so that it will automatically display the most recently used
> background on startup.
>
> "bsetbg is written in Bash, so writing this modification would not be
> difficult. If you succeed, I'm sure many people would be interested in
> using it too!"
>
> Well, Michael, that is what I wrote. As I said, since openbox itself
> does not handle the background, we must do it ourself, to whichever
> degree of style we deem appropriate. The example I gave was simply to
> add one or two lines to a bash script (bsetbg), which would work to
> serve your purpose simply and reliably.
>
> Alternatively, we could go for a more highly engineered solution. That
> is, of course, to run openbox inside a GNOME session (ie., but running
> gnome-session in your .xinitrc). GNOME sessions automatically include a
> running daemon called the gnome-settings-daemon. This charming little
> process does such handy things as setting your desktop background, and
> remembering it on the next session startup. You can get this little
> fellow to change the background by using the GNOME background
> preferences window (packaged generally with the GNOME control-centre),
> or by using bsetbg with the --gnome argument (ie., put bsetbg --gnome
> inside a pipe menu entry in your menu file).
>
> So, there you have it, dear old friend. Two ways of moving "outside the
> box" and achieving your goal of a persistent desktop background in
> perfect harmony with the openbox window manager. Good luck with your
> endeavours, and please do not hesistate to keep us informed of your
> progress and to ask many, many more questions.
>
> To infinity and beyond!
>
> - Tim
Tim,
Well, obviously your memory is much better than mine. Probably because
you're much younger than I. I do use bgmenu.rb to set the background and
it works very well, so I shall continue to use it to set the bg and the
theme script to change styles. So, I really said all that in the quoted
email? Wow, I must have had a beer or two to be that verbose. So, thanks
for answering the question again and reminding me in a gentle but
forceful manner that I was being a pest. :-) Rest assured there will be no more
background questions from this email address.
Warp 7, cap'n. The batteries are dead!
--
Regards,
Mike
keeper at neo.rr.com
"Don't Fear The Penguin."
More information about the openbox
mailing list