Home > debian, Just Learnt Something New (JLSN), laptop issues > nitrogen – Setting wallpapers

nitrogen – Setting wallpapers

Problem:
Needed to setup a wallpaper on fluxbox and it needed to appear on one or two screens.

Solution:
Installed nitrogen. (Esetroot just did not work nicely for me. YMMV)

(as root) apt-get install nitrogen

Set up your preferred wallpaper using nitrogen.

$ nitrogen

nitrogen

nitrogen


Click “Preferences” and select the folder with the wallpapers. Then pick the wallpaper you want for a fullscreen or selective screens.

Nitrogen settings

$less ~/.config/nitrogen/bg-saved.cfg
[xin_0]
file=/home/rodnee/Pictures/wolves_wide.jpg
mode=0
bgcolor=#000000

[xin_1]
file=/home/rodnee/Pictures/wolves_wide.jpg
mode=0
bgcolor=#000000
.config/nitrogen/bg-saved.cfg (END)

Now all that was left was to configure fluxbox

Add nitrogen –restore to ~/.fluxbox/startup

# 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 &
  xscreensaver &
  mate-power-manager &
  nitrogen --restore &

Added the following two lines to ~/.fluxbox/init

session.screen0.rootCommand:    nitrogen --restore
session.screen1.rootCommand:    nitrogen --restore

That was it.


Update (11th September 2014)

Above settings would work like a charm when I had a monitor plugged in. But the new wall paper would not take effect otherwise. To fix this I simply ran nitrogen again and picked the desired wallpaper. The nitrogen config file now looks like this

$less ~/.config/nitrogen/bg-saved.cfg
[xin_0]
file=/home/rodnee/Pictures/wolves_wide.jpg
mode=0
bgcolor=#000000

[xin_1]
file=/home/rodnee/Pictures/wolves_wide.jpg
mode=0
bgcolor=#000000

[:0.0]
file=/home/rodnee/Pictures/wolves_wide.jpg
mode=0
bgcolor=#000000
.config/nitrogen/bg-saved.cfg (END)

Now my wallpaper is set whether or not a monitor is plugged in.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s