You Are Here: Home » How-To » Linux

How To Exclude Certain Applications From Autostarting In A Particular Desktop Environment

By Ricky on July 27th, 2011 

Here is the thing that has been bugging:

I use both KDE SC and GNOME. In GNOME I have given into the charms of Docky and have been using it. But KDE SC is too awesome and I would rather use the default KDE Task Manager rather than Docky. But since Docky is set to autostart in GNOME, it starts on login in KDE as well. If I disable it from the KDE System Manager, it does not start at login in GNOME.

So, what I wanted was for Docky to start at login in GNOME and to not start at login in KDE SC.

I decided to ask in the recently started Ubuntu Stack Exchange and sure enough someone pointed out what I need to do. (Thanks Ressu.)

So in case other need it, here is how to do it. In this example, I will use Docky, but it should work for any startup applications.

In case you know know your way around Ubuntu, here is how to do it in short - add OnlyShowIn=GNOME (replace GNOME by KDE for KDE SC) in ~/.config/autostart/docky.desktop.

If you are new, here is a step by step insteruction:

  • Open the Terminal/Konsole. In KDE SC, press ALT+F2, type konsole. In GNOME, Applications -> Accessories -> Terminal.
  • Go to ~/.config/autostart with the command

cd ~/.config/autostart/

  • The .desktop files of the startup applications are in this directory. You can see them with the ls command.
  • Now open the .desktop file of the application in question in your favorite text editor. I will take Docky for this example and  will use nano as the text editor.

nano docky.desktop

  • This is the current content of docky.desktop

[Desktop Entry]
Comment=The finest dock no money can buy.

  • Now add the line given below to make it start at login only in GNOME. If you want it to start only in KDE SC, replace GNOME with KDE.


  • Now save the file and exit.
  • Done. 🙂


How To Exclude Certain Applications From Autostarting In A Particular Desktop Environment was originally published on on August 5, 2010 - 11:19 pm (Indian Standard Time)