I have a dual-monitor setup and I am trying to use use different wallpapers on multiple monitors in Linux. What I want is simply to have a different background on each of the two monitors. Most of the solutions I Googled were about Ubuntu and about virtual desktops (aka workspaces). I only use one workspace, but two monitors, i.e. my laptop and a monitor attached via VGA cable. As you can see from the screen-shot below, I finally managed to find a good solution to use different wallpapers on multiple monitors in Linux (well it seems to be working for an unlimited number of Monitors).
I use a Debian derivative Linux distro (Kali Linux) which is designed specifically for penetration testing and it’s somewhat a heavily modified version of full fledged Debian Linux. Now folks, keep in mind that Ubuntu is also a derivative of Debian Linux. So usually anything that works in Debian, works in Ubuntu and would also work in Kali Linux.
Kali Linux uses Gnome 3.4.2 (gnome-session-fallback aka Gnome Classic). Again note that as of todays date, Gnome v 3.14 is available but most distro’s didn’t upgrade to latest Gnome due to different issues.
Finding gnome version
In case you are wondering how to get all these version info about your Gnome desktop, here’s how:
[email protected]:~# gnome-shell --version GNOME Shell 3.4.2 [email protected]:~# [email protected]:~# gnome-session --version gnome-session 220.127.116.11 [email protected]:~# [email protected]:~# gnome-wm --version metacity 2.34.3 Copyright (C) 2001-2009 Havoc Pennington, Red Hat, Inc., and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [email protected]:~# [email protected]:~# gnome-session-fallback --version gnome-session 18.104.22.168 [email protected]:~#
Introducing nitrogen – wallpaper browser and changing utility for X.
nitrogen is a graphical wallpaper utility that can be used in two modes, browser and recall. Some of the things to look for in nitrogen are:
- Multihead and Xinerama support (setting different wallpapers for each monitor)
- Recall mode to restore wallpapers via startup script
- Uses freedesktop.org standard for thumbnails
- Can set GNOME background
- Command line set modes for script usage
- Inotify monitoring of browsed directories
To install it, run the following command in terminal:
sudo apt-get install nitrogen (or if you're root already) apt-get install nitrogen
nitrogen doesn’t have a desktop launch file by default when is installed, so you need to run it using ALT+F2 or frrom a terminal.
If you are using ALT+F2 then just type ‘nitrogen’ and press Run
If you are using terminal then just type nitrogen (but don’t close the terminal window until you’re done).
nitrogen will open and following is what you will see:
Follow steps below to add wallpapers/folder in nitrogen:
- Click Preferences
- Click Add
- Browse to the folder where you have all your wallpapers. i.e. /usr/share/wallpapers
- Click Select to select that folder.
- Click OK.
Now you will see those pictures populating nitrogen’s window.
Set different wallpapers on multiple monitors using nitrogen
Follow steps below to use different wallpapers on multiple monitors in Linux using nitrogen:
- Select Screen 1 (Screen 2 and so on).
- Highlight a Wallpaper you like
- Double click on the wallpaper to activate it for that screen (keep doing it until you’re happy)
- Press Apply to apply the configuration. (Doubleclick actually applies and let you view it anyway).
Disable File manager from handling Desktop
To be able to set a different wallpaper for each monitor, you need to disable the file manager from handling the desktop. The downside is you won’t have any folders on your desktop anymore.
In GNOME / Unity, install GNOME Tweak Tool:
sudo apt-get install gnome-tweak-tool (or if you're root already) apt-get install gnome-tweak-tool
Then open GNOME Tweak Tool from Applications > System Tools > Preferences > Advanced Settings and on the Desktop section, change Have file manager handle the desktop to OFF.
Set nitrogen to run at each startup:
Add nitrogen to
Applications > System Tools > Preferences > Startup Applications > type in nitrogen –restore in command
(Name and description can be anything).
Reboot your PC to test your configuration.
Linux desktop are very configurable and you can do a lot more than any other known operating systems. Having multiple wallpapers doesn’t really add any value to your productivity but it can be very pretty and easy on eyes when you are working longer hours. But hey, for me, I like my desktop them colorful! That’s another reason I’ve added this awesome Conky Manager and Cairo-Dock to my desktop.
Enjoy your colorful desktop and don’t forget to share RT.