Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I am new to Linux. I installed kubuntu-desktop and xubuntu-desktop over the default Ubuntu 10.10.

I want to unclutter the menu, so that applications related to a particular desktop appear in menu only during their respective sessions. (i.e., No KDE and XFCE apps in menu during Ubuntu GNOME session. Similarly in KDE and XFCE sessions.)

How can this be done via command line? (I want to learn things the command-line way.)
Should I backup anything before I do this?

Extra Information:
I googled and found this and other solutions in forums, but these address only the KDE on GNOME scenario. Perhaps this can be modified to include XFCE as well, but since I am a newbie, I couldn't figure out how to do it.

I have also cross-posted at askubuntu.

Gracias! Thanks!

share|improve this question

2 Answers 2

The code to show something only in XFCE follows the same idea:


Unfortunately, as far as I know, the way XFCE stores it's .desktop files is the same as the GNOME stores them, whereas KDE stores them in a separate folder (within /usr/share/applications). This is why the separation of KDE/GNOME, as described in the post you link to, is much easier to do en-mass.

All the files are stored in /usr/share/applications. The format of them is very simple, and you can copy any one of them to /home/you/.local/share/applications and it will override that menu entry for that user so you can more easily edit them without needing root privileges.

There is no simple way to separate XFCE apps from GNOME, especially since it's often a matter of opinion what you want to see. This also goes for KDE, since as long as you have the KDE libraries Dolphin or Konqueror will run in GNOME. I suppose if you're intent on using the cmd line you could come up with some grep/sed junk to selectively find and replace text inside certain .desktop files, but I thnk the easiest way would be to copy the files to ~/.local/share/applications so they don't get overwritten by updates and edit them by hand. Unless you've got a gazillion things installed it shouldn't be too difficult.

The menu works under the specification, which you can learn more about here:

share|improve this answer

All your preferences will be saved inside the .gconf folder in xml files; you can manually edit those, or use the GUI interface, gconf-editor. The proper way to remove is to use System -> Preferences -> Main menu or the command alacarte

share|improve this answer
GNOME now uses gsettings and dconf to handle such preferences. As such, gconf has been deprecated since 2014 or earlier. More details: Gconf to GSettings migration. – clearkimura Nov 10 at 17:42

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.