Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have two sessions - Unity and Gnome Fallback on my laptop. I'm using Unity in portable mode and gnome fallback with second display at home. And I want different wallpapers for Unity and fallback sessions. Light for Unity and dark for fallback.

I think, I can use autostart option showonlyin=, but don't know how. I don't want switch wallpapers manually every time.

share|improve this question

1 Answer 1

Using this bash script, you can achieve what you want.

#!/bin/bash

if [ "$XDG_CURRENT_DESKTOP" = "Unity" ]
then
  gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/warty-final-ubuntu.png'
else
  gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/The_Grass_aint_Greener_by_fix_pena.jpg'
fi

Add this script to Startup Applications (Add → Command sh path/to/script).

And replace the file path to the background image you want.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.