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 want certain applications (such as indicator-multiload) to run at startup only if I sign into Unity, not GNOME-shell. I also want some other applications to only start in GNOME-shell (like Shutter).

Is there, say, something I can add before the command in "Startup Applications" that does this for me? Or do I need to install some sort of extension?

share|improve this question
up vote 1 down vote accepted

This can be a starting point for your question. You can place a conditional statement withing the command to execute field in the Startup Application. This command will check what is the current desktop session and will act based on that. E.g.

if [ "$DESKTOP_SESSION" == "ubuntu" ]; then (echo "Unity"); else (echo "Gnome") ; fi

The condition checks if it is Unity session and prints Unity if true. Otherwise, it will print Gnome.
You can replace the echo commands with any command you wish to execute or omit the else part.
Another example:

if [ "$DESKTOP_SESSION" == "ubuntu" ]; then (shutter); fi

This will run Shutter application only in Unity.

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.