LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-21-2010, 10:24 PM   #1
mentaluprising
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
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
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.

Last edited by smoker; 06-22-2010 at 11:38 AM.
 
Old 06-22-2010, 12:53 PM   #3
mentaluprising
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
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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"
 
Old 03-15-2012, 04:24 AM   #6
yenco
LQ Newbie
 
Registered: Sep 2011
Distribution: Debian sid/unstable
Posts: 5

Rep: Reputation: 1
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..
 
Old 03-25-2012, 09:46 PM   #7
cin_
Member
 
Registered: Dec 2010
Posts: 281

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.

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.

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


Reply

Tags
background, fluxbox



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:54 PM.

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