8

Often, I have both KDE4 and Gnome installed on my machines. What really bothers me when I do this, is that the Gnome menu will show all kinds of things that I will hardly ever use in Gnome, like Konqueror, KMail and Konversation. (Just to name a few, the list is obviously much longer.)

I hate this.

I would love a way (an easy way) to make sure Gnome only shows Gnome related icons and KDE only shows KDE related icons. Of course, you can manually hide all the KDE icons from the Gnome menu, but that sucks **, so I'd rather not go that way.

Does any have a solution for this? A script maybe?

1 Answer 1

7

The menu entries are created from .desktop-files. There you can specify if the icon shall be only shown in Gnome, only in KDE or in both with e.g. a OnlyShowIn=KDE line.

To hide all KDE-apps, you might do as root

cd /usr/share/applications/kde4/
for i in *.desktop; do echo “OnlyShowIn=KDE” >> $i; done

To hide Gnome-Apps in KDE, echo “OnlyShowIn=GNOME” into the Gnome .desktop-files.

However, when an update to a package arrives, this could override this, so you might to have to repeat it, e.g. with a cron job. Make a backup of /usr/share/applications/kde4/ before doing this to be safe if something goes wrong.

For a list of all information which can be included in a .desktop-file, see http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html

3
  • B-E-A utiful! The actual syntax seems to be 'OnlyShowIn=' instead of ShowOnlyIn, but you certainly pointed me in the right direction. +1 and accepted for that! Thanks!
    – wzzrd
    Commented Oct 15, 2010 at 9:28
  • That's strange. I might have changed recently. In 2007 it still was ShowOnlyIn: redhat.com/archives/rhl-devel-list/2007-July/msg01103.html. I updated my answer to correct it. Thanks.
    – fschmitt
    Commented Oct 15, 2010 at 10:03
  • It seems like the Mate desktop environment ignores this flag (and still shows desktop files from KDE)
    – MRule
    Commented Jul 20, 2022 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .