Page 1 of 1

[Solved] Editing the XFCE menu sort of thing

Posted: Sat Sep 11, 2010 10:10 pm
by M_Mynaardt

Could someone tell me how to edit the menu in XFCE? I uninstalled one program I didn't want, but it's icon is still on the menu (nothing happens when I click on it). I couldn't figure out how to manipulate the menu nor find a package to allow me to do so.


Re: Editing the XFCE menu sort of thing

Posted: Sun Sep 12, 2010 3:13 am
by kalwisti

You'll need to use the Terminal (aka command line) in order to accomplish this, as Xfce 4.6.x does not have a GUI-fied tool to edit the menu, AFAIK. You can start up the Terminal by going to the Mint menu > Accessories > Terminal.

You will be editing the unwanted application's .desktop file, which is located in /usr/share/applications. But before you dive in with the Terminal, I'd suggest that you first take a look at what's there with your graphical File Manager. You can do this by going to Places [on your panel] > File System > usr > share > applications.

You should see something like what is in the screenshot below. Although those icons may just look like icons, they are in fact .desktop files which can be opened up and edited with your Mousepad text editor.

As an example, let's navigate to that directory using the Terminal and see how things look there. First type:

Code: Select all

$ cd /usr/share/applications
Next, type the ls command to list the contents of this directory. (Note: the command begins with a lower-case letter l ('el'), not the Arabic numeral "1" or a capital letter "I" ('eye')):

Code: Select all

david@david-desktop /usr/share/applications $ ls
Your output will look something like the following. I have truncated the listing to save space:

Code: Select all

brasero-copy-medium.desktop            osmo.desktop
brasero.desktop                        palimpsest.desktop
brasero-nautilus.desktop               pan.desktop
catfish.desktop                        pidgin.desktop
ccsm.desktop                           pyNeighborhood.desktop
chestnut-dialer-gtk2.desktop           python2.6.desktop
claws-mail.desktop                     qalculate-gtk.desktop
defaults.list                          ristretto.desktop
dia-common.desktop                     scim-setup.desktop
dropbox.desktop                        scite.desktop
easytag.desktop                        screensavers
emacs22-gtk.desktop                    seahorse.desktop
Notice how Abiword (i.e., the Abiword icon in the graphical File Manager display below) is revealed to be a file called "abiword.desktop" in the Terminal display? In a minute, we'll be editing a .desktop file with Mousepad ...


As an example, let's remove / hide the menu item for Chestnut Dialer (a utility to help you connect to the Internet via a dial-up modem). Its menu item is located under Mint Menu > Network > Chestnut Dialer. Note: We will not be completely deleting its .desktop file, but will take the less destructive approach of removing it from the menu.

To do this, first start up your Terminal and navigate to the appropriate directory:

Code: Select all

$ cd /usr/share/applications
If you issue the ls command, you'll see that the file you want to edit is named chestnut-dialer-gtk2.desktop.

We will modify that file with Mousepad, but we have to be the root user (/) to edit it. Warning: In Linux, the root user / account is all-powerful, so you must work very carefully in order to not damage your system. The general principle before switching to the root user account is to go in knowing what you will do, remain as root only the minimum amount necessary, and then to immediately switch back to your regular user account.

This is a safe operation, so there's no need to panic ... Type the following from the Terminal in order to start up Mousepad as the root user and to edit the Chestnut dialer .desktop file:

Code: Select all

$ gksudo mousepad chestnut-dialer-gtk2.desktop

Next, you will be prompted to type in your password. Then you will see a warning like in the screenshot below, to notify you that you are working as the root user and might bork things if you aren't careful.

Scroll to the end / bottom of the text file that opens in Mousepad, and simply add this line:

Code: Select all

Save the change (Ctrl + S) and then quit Mousepad (Ctrl + Q).

Close your Terminal window by typing:

Code: Select all

$ exit
If all goes well, Chesnut Dialer should no longer appear in your menu ( Mint Menu > Network > Chestnut Dialer ).

You may restore it to the menu by working in reverse order, and deleting the "NoDisplay=true" line from the .desktop file you just modified.


For additional background and a more detailed explanation, please see:
Arnote, Paul. "Xfce 4.6.1: Customize Your Xfce Menu." PCLinuxOS Magazine issue 41 (June 2010).

If you want to disable Fortune (the humorous/clever quotes) in your Terminal, these instructions will show you how:
"Howto: Remove Fortune messages in the Terminal."

Re: Editing the XFCE menu sort of thing

Posted: Sun Sep 12, 2010 5:26 pm
by M_Mynaardt
Groovy!! It works!! :mrgreen:

That was easier than I thought! I was just too accustomed to the GUI way of changing things, but this works just fine!

Thanks for that!

I'll get used to this Linux business yet!

Re: Editing the XFCE menu sort of thing

Posted: Tue Nov 02, 2010 8:19 pm
by ahalin

That is the clearest explanation I have ever seen on customizing XFCE menus; thank you.


Re: Editing the XFCE menu sort of thing

Posted: Tue Nov 02, 2010 9:17 pm
by grey1960envoy
Very well done even a child could follow those directions thanks Kalwisti . I wish more people would take the time to help this way!

Re: Editing the XFCE menu sort of thing

Posted: Fri Nov 05, 2010 9:31 pm
by kalwisti
ahalin and grey1960envoy,

You're very welcome. I'm glad you found the directions helpful. Thanks for the kind words.

If the truth be told, Paul (parnote) did most of the heavy lifting on how to edit the menu; I don't think I added a lot of original content. I still have much to learn about Xfce ...