Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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

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


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.