Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 would like to have an application (most likely AWN or Docky) start only on XFCE, and not on KDE or Unity/GNOME. Is this possible? If so, how would I go about doing that?

share|improve this question
up vote 3 down vote accepted

Write the following script, replacing launch_app with the command that launches the application you want to launch at session start.

if [ "$DESKTOP_SESSION" = "xfce" ]; then

Give the script executable privileges with chmod +x, then tell your autostart configuration tool (not sure what XFCE uses) to use that script.

Should work.

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.