Jul
18
This tutorial is for those people that like to run gnome and KDE side by side. This will allow you to only show the native apps in the menus within each desktop environment instead of showing everything.
update: I wrote a script to automate this process. If you’d like to use that instead it is available below.
You can run the following commands to make gnome menu backups and KDE menu backups prior to making the changes, if you want to be safe.
mkdir -p ~/.menu-backup{gnome,kde}cp /usr/share/applications/* ~/.menu-backup/gnome
cp /usr/share/applications/kde/* ~/.menu-backup/kde
To update the menu listings then run (one continued line):
sudo -icd /usr/share/applications/ ; for i in *; do echo “ShowOnlyIn=GNOME” >> $i; done ; cd /usr/share/applications/kde/ ; for i in *; do echo “ShowOnlyIn=KDE” >> $i; done ; exit
The changes should take place immediately and you should now only see the native apps in each menu. Enjoy.
If everything seems to work the way you like you can delete the backup directories with the following commands:
rm -r ~/.menu-backup-gnomerm -r ~/.menu-backup-kde
I suppose I could write a small shell script to do the work for you.. would anyone prefer that? I got bored and wrote it.
I post tutorials very regularly on this site. You may want to consider subscribing to the RSS feed. Or if you'd prefer these tips sent to your inbox you can use Email Subscriptions.
Related Posts
Random Posts
-->Comments
30 Responses to “Removing KDE icons in gnome / remove gnome icons in KDE”
Leave a Reply
Rock on! I have been asking this everywhere with no reply. Awesome!
Btw, is this a permanent fix or will I need to run this everytime I install new applications?
Lucian - It is not a permanent fix, and I’ll need to update a bit of the code to allow it to cleanly be re-run after new apps are installed.. I’ll try to set some time for that.
Thanks for the reply. What will I need to do manually to run this script again?
NOTE: I have noticed some changes in the script since last night. Is it now possible to re-run the script or was something else fixed?
[...] state. Additionally, the script also hides Gnome apps in KDE. Two for the price of one none! Removing KDE icons in gnome / remove gnome icons in KDE [Ubuntu [...]
[...] state. Additionally, the script also hides Gnome apps in KDE. Two for the price of one none! Removing KDE icons in gnome / remove gnome icons in KDE [Ubuntu [...]
[...] state. Additionally, the script also hides Gnome apps in KDE. Two for the price of one none! Removing KDE icons in gnome / remove gnome icons in KDE [Ubuntu [...]
[...] Source : Ubuntu-Tutorials [...]
[...] Additionally, the script also hides Gnome apps in KDE. Two for the price of one none! Removing KDE icons in gnome / remove gnome icons in KDE [Ubuntu [...]
does it work with xfce4 too? Xubuntu-desktop? I’m gonna try it.
tidiman07 - it does not work with XFCE unless you run it *before* you install XFCE. The problem is the desktop menu icons are located in the same place for XFCE and gnome, whereas KDE places them in a separate directory.
If I get time to keep working on this I could put something together, but currently it’s gnome and KDE specific
I had written about this over a year ago. It is good to see it get around, though.
Hi, I am also looking to get this to work on Xfce. I would like to install Xubuntu so I can work with Documentation easier but dislike all the additional icons that clutter up the K menu. Have you done anything with editing the script? Also, a not so elegant solution would be to have the script run in a cron job so that it eventually cleans up the menus for KDE & GNOME.
[...] state. Additionally, the script also hides Gnome apps in KDE. Two for the price of one none! Removing KDE icons in gnome / remove gnome icons in KDE [Ubuntu [...]
404 on the script..
Brad - thank you for pointing that out. I have updated the link. It should work now.
Will this work on Fedora as well? I have both GNOME and KDE on Fedora 7 and I was looking for such a fix.
Chris - as far as I know it should work in KDE, although I have not directly tested it.
So far the terminal commands don’t work exactly as they shoud, some of the backing up had to be done manually. Right now I’m out but I’ll try the rest of it when I get home.
[...] sourced here [...]
Ok, so I finally got to run it in the terminal and it returned the following which I don’t know it it is normal or not:
-bash: kde: Is a directory
-bash: kde4: Is a directory
-bash: screensavers: Is a directory
logout
And the KDE menus are not hidden nor are the GNOME ones in KDE.
[...] state. Additionally, the script also hides Gnome apps in KDE. Two for the price of one none! Removing KDE icons in gnome / remove gnome icons in KDE [Ubuntu [...]
I happen to have the same problem that Chris has.
The problem in Ubuntu 7.10 is in “ShowOnlyIn=GNOME” and “ShowOnlyIn=KDE”
That parts should be written as:
“OnlyShowIn=GNOME” and “OnlyShowIn=KDE” (note: >”“”< )
Just a little fix.
If you’re running the commands manually, the first one should be:
“mkdir -p ~/.menu-backup/{gnome,kde}”
For those looking for the menu-cleaner.sh script: http://www.programming-designs.com/linux/menu-cleaner.sh
This tutorial didn’t help in Gutsy so I had to use the script instead.
Do I just copy the entire code above as one line, and do I need both GNOME and KDE already installed (one I’ve seen said to run part of the code first, then install KDE and then run the second part of the code)
There is a way to go back? i loose my backup and i want the kde apps back on my gnome menu. It’s possible?
THIS DOESN’T WORK IN HARDY, HELP!!! I TRIED WITH THE ORIGINAL POST AND THE CHANGES THAT ZLATAN SUGGEST BUT NOTHING HAPPENED!
The script that Daniel said
http://www.programming-designs.com/linux/menu-cleaner.sh
worked with KDE4 for me. but I had to change the script with a text editor (kde to kde4)
Thanks