Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 06-21-2010, 10:24 PM   #1
LQ Newbie
Registered: Jun 2010
Location: Madison, WI
Distribution: Debain and Ubuntu
Posts: 2

Rep: Reputation: 0
The color around a centered background image Fluxbox

I tried doing a search through the forums and found a lot of topics but I didn't see one to specifically answer my question:

I have a small image that I want to set centered as the background in Fluxbox. I know how to do that with fbsetbg, the style file, the init file, etc. However, the color of the background around the picture is always black. I would like to change the background color around the picture to something else. Is this possible? If so, how would I go about doing that?

So far I'm running from a basic cli install of Debian lenny and installed xorg and fluxbox manually and haven't really changed them since installing them.
Old 06-22-2010, 11:33 AM   #2
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
Why can't you set it in the style file ?
background.color: <color>

Or, create a new image with the desired background colour and use that instead.
Gimp can enlarge an image canvas and keep the original image centred as it does it. Set your desired background colour first on the tool box menu.

Last edited by smoker; 06-22-2010 at 11:38 AM.
Old 06-22-2010, 12:53 PM   #3
LQ Newbie
Registered: Jun 2010
Location: Madison, WI
Distribution: Debain and Ubuntu
Posts: 2

Original Poster
Rep: Reputation: 0
It seems that using background.pixmap always takes precedence over background.color and just ignores it.

Changing the image itself is a pretty good idea though. I'll do that if I can't figure it out in Fluxbox.
Old 06-22-2010, 02:14 PM   #4
LQ Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
I've tried different ways, and I don't think it's possible. You may just have to add the color using GIMP.
Old 06-22-2010, 02:46 PM   #5
LQ Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
in my nfluxos arch edition I used this .fluxbox/startup script it has

/usr/bin/fbsetroot -solid black
see if that does anything?
heres whole script

# fluxbox startup-script:
# Lines starting with a '#' are ignored.

# You can set your favourite wallpaper here if you don't want
# to do it from your style.
# fbsetbg -f /root/pictures/wallpaper.png
# This sets a black background
# /usr/bin/fbsetroot -solid black

# This shows the fluxbox-splash-screen
# fbsetbg -C /usr/share/fluxbox/splash.jpg

# this shows a random background
# fbsetbg -r /usr/share/wallpapers/

# this shows the last used background
 fbsetbg -l /usr/share/wallpapers/

# Other examples. Check man xset for details.
# Turn off beeps:
# xset -b
# Increase the keyboard repeat-rate:
# xset r rate 195 35
# Your own fonts-dir:
# xset +fp "/root/.fonts"
# Your favourite mouse cursor:
# xsetroot -cursor_name right_ptr
# Change your keymap:
# xmodmap "/root/.Xmodmap"

# Applications you want to run with fluxbox.
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &

# nitrogen --restore
 conky -d
 fbpanel &
 volwheel &
# parcellite &
# systray-volume-control &

# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.

exec /usr/bin/fluxbox
# or if you want to keep a log:
# exec /usr/bin/fluxbox -log "/root/.fluxbox/log"
Old 03-15-2012, 04:24 AM   #6
LQ Newbie
Registered: Sep 2011
Distribution: Debian sid/unstable
Posts: 5

Rep: Reputation: 1

yes, i've seen that this post is >1.5 years old,
BUT i was searching for exactly the same thing, google led me here, so if anyone searches in the future, he will probably get here too..

I don't have a 100% solution, but found a way to set the background without manually expanding the source picture.
This assumes that you have Esetroot installed.
Quick check:
% fbsetbg -i
Esetroot is a nice wallpapersetter. You won't have any problems.
Then you can e.g. set a centered wallpaper and additionally set a background color (resulting in a canvas around the image):
% Esetroot -bgcolor white -c ~/images/wallpapers/NiceWallpaperSmallerThanDisplayResolution.jpg
colors can be given in hex notation '#rrggbb' as well:
Esetroot -bgcolor '#7a1f00' -c ~/images/wallpapers/NiceWallpaperSmallerThanDisplayResolution.jpg
(just for reference: #7a1f00 is "dirty" orange(/red))

Disadvantage of this approach is that the setting isn't kept over a fluxbox restart as it is the case when using the fbsetbg wrapper (which stores the last wallpaper in ~/.fluxbox/lastwallpaper).

Is there a documentation for the syntax of ~/.fluxbox/lastwallpaper ? I didn't found one. If there is a way to put the Esetroot command in, the background setting would be restored after a fluxbox restart..
Old 03-25-2012, 09:46 PM   #7
Registered: Dec 2010
Posts: 277

Rep: Reputation: 24
fbsetbg -b

I know it is an old thread, but I was brought here by search and none of the previous suggestions worked for me.

I found a solution that did what I wanted it to, so I thought I would append it to this thread.

# fbsetbg -b -solid COLOR
... the -b sends the remaining arguments to fbsetroot().

The reason you use fbsetbg() instead of fbsetroot() directly is because fbsetbg() updates the necessary variables for the lastwallpaper to store properly. With only using fbsetroot() your changes will not carry over to the next time you load fluxbox.

Last edited by cin_; 03-25-2012 at 09:49 PM. Reason: gramm`err


background, fluxbox

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Xubuntu - monitor image is not centered - UomoApe Ubuntu 1 10-21-2009 11:20 AM
gnome background centered on edge of screen dainsane1 Linux - Newbie 2 01-02-2009 01:09 AM
Setting background image in Fluxbox phantom_cyph Linux - Desktop 2 03-27-2007 10:17 PM
fluxbox ... menu ... centered items ... how do I ... ? t3gah Linux - Software 3 04-19-2005 03:48 PM
Change Background Color/Image tonyfreeman Programming 1 03-11-2005 02:32 PM

All times are GMT -5. The time now is 04:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration