4

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 I couldn't figure out how to do it.

I have also cross-posted at askubuntu.

closed as off-topic by Rui F Ribeiro, msp9011, Jeff Schaller, Wouter Verhelst, Isaac Aug 21 '18 at 22:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – Rui F Ribeiro, msp9011, Jeff Schaller, Wouter Verhelst, Isaac

2

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

ShowOnlyIn=XFCE;

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 freedektop.org specification, which you can learn more about here:

http://standards.freedesktop.org/menu-spec/latest/index.html

1

For Ubuntu 10.10 and older releases

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

  • 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 '15 at 17:42
  • 1
    The answer was written 5 years ago and may be useful at that time – balki Dec 30 '15 at 5:45
  • 1
    @clearkimura this answer was posted in 2010 when such a warning would have made no sense. Remember that the SE sites are designed to allow editing. Why not suggest the edit instead of leaving a comment to that effect? – terdon Dec 30 '15 at 13:16
  • @terdon Suggested edit as per advised. From my finding, dconf-tools is made available since Ubuntu 11.04. So I assumed gconf is valid until Ubuntu 10.10 release only. – clearkimura Dec 30 '15 at 15:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.