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

2 thoughts on “SALT: CHANGE XUBUNTU DEFAULT BACKGROUND WITH SALTSTACK

  1. Pingback: Tunti 3 (w47) – Minions and Masters | Daniel Racero Saarnisuo

  2. Pingback: SALTSTACK: CUSTOMISE WORKSTATIONS | Juho Syrjänen

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