Nitrogen on the MATE Desktop

Today Kai writes:

Hi there,

Maybe you can help me. I’m running Linux mint mate 18 and very new user. I downloaded nitrogen to change wallpapers on dual screens. Every time I try to change wallpaper, nothing happens. the old wall paper is still there. but when i turn off my system, I see a glimpse of the wallpapers I changed. went on the forums and they told me to run this gsettings set org.mate.background draw-background false

I ran it and nothing happens…usually it would prompt some kind of execution message. went on the forums again and they said it turned off caja background draw. I’m sure it did..but nitrogen still is not changing wallpaper. do u have any suggestions on what to do?..

Hi Kai,

As you’ve found out, setting up draw-background to false does absolutely nothing of value in this instance. What does however, is a sleep timer and xrefresh -none in a startup script.

Nitrogen

Here’s what you’re going to want to do. From Preferences (Preferences>Personal>Startup Applications on Ubuntu MATE), you’ll want to add the following script as follows:

sh nitrogen-fix.sh

Notice that I added ‘sh’ to the command in Startup Applications. I’ve tested it with and without absolute paths. The above approach works and other approaches don’t.

The script itself needs to contain the following:

#!/bin/bash
sleep 30
nitrogen --restore
xrefresh -none

The sleep timer allows the desktop to fully load up, then Nitrogen can run and override the desktop drawing with xrefresh. If you have x11-xserver-utils installed, xrefresh is installed already.

Once your nitrogen-fix.sh file is created in your text editor, save it to your home directory using that file name (nitrogen-fix.sh). Now open a terminal and let’s make it executable. You can also do this by right clicking on the file, going to the permissions tab and making it executable. Otherwise, just do this in a terminal:

chmod +x nitrogen-fix.sh

Now that the file is executable, you can test things out by rebooting your PC. Remember, you setup the script to run previously. Just reboot the computer, wait the 30-something seconds post-boot and then you’ll see the desktop revert to the Nitrogen set choices.

Do you have Linux questions you’d like Matt to help with? Hit the link here and perhaps you too, can Just Ask Matt!

More great Linux goodness!

Matt Hartley
Freedom Penguin’s founder & talking head – Matt has over a decade working with Linux desktops, his operating system experience consists of both Windows and Linux operating platforms. In addition to writing articles on Linux and open source technology for Datamation.com and OpenLogic.com/wazi, Matt also once served as a co-host for a popular Linux-centric podcast.

Matt has written about various software titles, such as Moodle, Joomla, WordPress, openCRX, Alfresco, Liferay and more. He also has additional Linux experience working with Debian based distributions, openSUSE, CentOS, and Arch Linux.

Leave a Reply

4 Comments on "Nitrogen on the MATE Desktop"

Notify of
Sort by:   newest | oldest | most voted
Daniel Hyldebrandt Hemmingsen
Member

According to Arch Wiki, adding “nitrogen –restore &” should be enough at boot of the desktop. And yes, I know. Arch Linux. But most of the stuff there, is like a bible. Even if you use another distribution.
This also has the added benefit of not having to run a script file. This could just be added to the “command” part of the dialog. https://wiki.archlinux.org/index.php/nitrogen#Freeze_with_dual_monitors

Matt Hartley
Member

Hi Daniel,

Sadly “nitrogen –restore &” on its own doesn’t work with Ubuntu MATE.

Using the Arch Wiki approach, I suspect, works with other desktops where some startup processes aren’t being inhibited. Without the sleep timer and xrefresh, it simply doesn’t run at all. Believe me, I’ve tested it on multiple installations of 14.04 and 16.04.

This is why the question likely rolled in for Linux Mint MATE edition.

Daniel Hyldebrandt Hemmingsen
Member

Oh I see. I use Debian with MATE. I don’t have two monitors – and I don’t care much for wallpapers anyway. So I haven’t tried. But the Arch Wiki, I would still say. 99% of the time, even if using another distro, is a good habit, to at least keep in mind.

Matt Hartley
Member

The Arch Wiki is an amazingly thorough resource. Most stuff is already there, usually. Sometimes there are little bits that need to be added/tweaked, but it’s a solid starting point for anyone needing a place to start from.

On my daily box, I run Variety. It’s cleaner to work with, more powerful, etc. The only hangup is using the same wallpaper on both monitors (which is what I do).

wpDiscuz