LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   The color around a centered background image Fluxbox (http://www.linuxquestions.org/questions/linux-desktop-74/the-color-around-a-centered-background-image-fluxbox-815561/)

mentaluprising 06-21-2010 11:24 PM

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.

smoker 06-22-2010 12:33 PM

Why can't you set it in the style file ?
background.color: <color>
http://manpages.ubuntu.com/manpages/....html#toptoc10

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.

mentaluprising 06-22-2010 01:53 PM

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.

H_TeXMeX_H 06-22-2010 03:14 PM

I've tried different ways, and I don't think it's possible. You may just have to add the color using GIMP.

linus72 06-22-2010 03:46 PM

in my nfluxos arch edition I used this .fluxbox/startup script it has

Code:

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

Code:

# 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.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
#
# 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"


yenco 03-15-2012 05:24 AM

Hi,

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:
Code:

% 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):
Code:

% Esetroot -bgcolor white -c ~/images/wallpapers/NiceWallpaperSmallerThanDisplayResolution.jpg
colors can be given in hex notation '#rrggbb' as well:
Code:

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..

cin_ 03-25-2012 10:46 PM

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.

Code:

# 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.


All times are GMT -5. The time now is 12:26 PM.