Tag Archives: wallpaper

SALT: CHANGE XUBUNTU DEFAULT BACKGROUND WITH SALTSTACK

In Xubuntu and Ubuntu changing the default background is relatively simple. All you need to do is locate the default background file (a binary file) and replace it with the wanted background.

In Xubuntu 14.04, the file is located in
/usr/share/xfce4/backdrops/
And goes by the name of xubuntu-wallpaper.png

In Salt, the easiest way to replace the default background is simply to override it with a state.

First, create a sls. -file for the state. I called mine background/ init.sls. Next you will want to dump your new background into the module folder.

Selection_003

The init.sls -file’s contents are the following:
(I used #!pyobjects to override the file)

#!pyobjects

File.managed("/usr/share/xfce4/backdrops/xubuntu-wallpaper.png", source="salt://background/img.png")

This piece of code will override the default wallpaper. After relogging the background should be updated to your chosen wallpaper.

Running the state:

Selection_004

  • Copying, modifying and redistributing this and all the other documents in this blog is allowed according to the GNU General Public License (versio 2 or newer).http://www.gnu.org/licenses/gpl.html
  • Based on the Linux course by Tero Karvinen 2015: terokarvinen.com
Advertisements