You are not logged in.

#1 2011-05-18 17:15:00

onexused
Member
Registered: 2009-10-07
Posts: 117

How to remove xfce-added menu items?

1) I'm using nautilus-2.32 as my file manager with xfce4 and find xfce has added "Open With Open folder with Thunar" to directories' right-click menus and "Open with File Manager" to every file/directories' right-click menus (except .desktop files).  How do I get rid of this crap?  They don't show up in nautilus'/gnome's Open With settings.
2) Rather than using xfce's applications menu with the Applications Menu panel applet, I'm using a custom menu file - the one I was using before I switched from gnome (~/.config/menus/applications.menu).  But it seems xfce has somehow snuck a few items in which don't appear in ~/.config/menus/applications.menu or /etc/xdg/menus/applications.menu .  How do I remove them?  Alacarte doesn't use this file when I start it.  It uses xfce's default menu file instead.

Offline

#2 2011-05-19 02:29:19

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: How to remove xfce-added menu items?

1) See /usr/share/applications/Thunar-folder-handler.desktop.
2) Maybe they are .desktop files from ~/.local/share/applications.

Offline

#3 2011-05-21 17:02:53

onexused
Member
Registered: 2009-10-07
Posts: 117

Re: How to remove xfce-added menu items?

1) It appears /usr/share/applications/Thunar-folder-handler.desktop is the correct file for "Open With Open Folder with Thunar" since I can change the Name= line to make it just say "Open With Thunar".  But how do I get rid of it all together?  Commenting the MimeType and Categories lines doesn't help.  And how about the "Open With File Manager" entry?  I did try restarting nautilus after doing this.
2) Nope, but that led me to /usr/share/applications, where they are.  All I needed to do was add them to the <Exclude></Exclude> section of the menu file once I found out their file names. Thanks.

Offline

#4 2011-05-21 19:18:32

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: How to remove xfce-added menu items?

Try copying /usr/share/applications/Thunar-folder-handler.desktop to ~/.local/share/applications/ and adding "NoDisplay=true" at the end... Not sure if that will work though. It works to hide an entry from the menu.

Offline

#5 2011-05-24 02:45:22

onexused
Member
Registered: 2009-10-07
Posts: 117

Re: How to remove xfce-added menu items?

stqn wrote:

Try copying /usr/share/applications/Thunar-folder-handler.desktop to ~/.local/share/applications/ and adding "NoDisplay=true" at the end... Not sure if that will work though. It works to hide an entry from the menu.

That didn't work.  Anyone else have any ideas?

Offline

#6 2011-06-01 02:33:22

onexused
Member
Registered: 2009-10-07
Posts: 117

Re: How to remove xfce-added menu items?

Does anyone know how I might remove "Open With File Manager" entries from Nautilus' right-click menu?  These only appeared after I installed XFCE4 and XFCE added similar entries to the Applications menu.

Offline

#7 2011-06-01 12:32:13

flan_suse
Member
Registered: 2010-10-28
Posts: 121

Re: How to remove xfce-added menu items?

You can copy over the .desktop files you wish to modify into ~/.local/share/applications/ and then add NoDispaly=true at the bottom, which should hide them from view. Not sure if this will work for #1, but it'll remove it from your menus altogether as in problem #2.

I like to do a quick two-step process to hide menu items under Xfce:

# Copy it over from /usr/share/applications/
cp -v /usr/share/applications/foo.desktop ~/.local/share/applications/
# Append the NoDisplay line to hide it from view
echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop

Here's a handy guide to get a better understanding of the FreeDesktop specification. I've used it a couple of times in the past to make my own custom .desktop menu entries: http://standards.freedesktop.org/deskto … ec/latest/

Here is the list of keys you can use, such as NoDisplay: http://standards.freedesktop.org/deskto … 01s05.html

Last edited by flan_suse (2011-06-01 12:38:56)

Offline

#8 2011-06-07 07:01:00

onexused
Member
Registered: 2009-10-07
Posts: 117

Re: How to remove xfce-added menu items?

Thanks for your suggestions.  I already did get the icons out of my applications menu as I said in an earlier post.  Unfortunately, it seems NoDisplay doesn't affect nautilus' right-click menu entries.

Offline

#9 2011-06-07 11:26:19

flan_suse
Member
Registered: 2010-10-28
Posts: 121

Re: How to remove xfce-added menu items?

onexused wrote:

Thanks for your suggestions.  I already did get the icons out of my applications menu as I said in an earlier post.  Unfortunately, it seems NoDisplay doesn't affect nautilus' right-click menu entries.

For Nautilus itself, I don't know, sorry. I can't believe I missed the mention of NoDisplay=true above my post. I actually read through the thread and thought "Wonder why no one mentioned the NoDisplay option?" Can't believe I missed it!

Offline

#10 2013-02-18 10:27:40

hsk81
Member
Registered: 2012-02-04
Posts: 3

Re: How to remove xfce-added menu items?

I actually prefer to use the

Hidden=true

option, since according to Recognized desktop entry keys

Hidden should have been called Deleted. It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It's strictly equivalent to the .desktop file not existing at all, as far as that user is concerned. This can also be used to "uninstall" existing files (e.g. due to a renaming) - by letting make install install a file with Hidden=true in it.

This is in my use case (where I remove the mail client entry from the main menu) ideal, since I don't have a mail client installed. And simply removing the

*.desktop

entry does not really help, since with the next update the entry would come back. The definition for

NoDisplay=true

is on the other hand

NoDisplay means "this application exists, but don't display it in the menus". This can be useful to e.g. associate this application with MIME types, so that it gets launched from a file manager (or other apps), without having a menu entry for it (there are tons of good reasons for this, including e.g. the netscape -remote, or kfmclient openURL kind of stuff).

Offline

Board footer

Powered by FluxBB