[Solved] Editing the XFCE menu sort of thing

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
M_Mynaardt
Level 4
Level 4
Posts: 232
Joined: Thu Sep 09, 2010 12:28 am
Location: Victoria, BC, Canada

[Solved] Editing the XFCE menu sort of thing

Post by M_Mynaardt » Sat Sep 11, 2010 10:10 pm

Hi!

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.

Thanks...
Last edited by M_Mynaardt on Sat Nov 20, 2010 9:30 pm, edited 1 time in total.
~*~ M_Mynaardt ~*~

Linux Mint is your computer's friend.
Always trust Linux Mint.

User avatar
kalwisti
Level 1
Level 1
Posts: 27
Joined: Mon Feb 15, 2010 11:30 am
Location: Rio Grande Valley, Texas

Re: Editing the XFCE menu sort of thing

Post by kalwisti » Sun Sep 12, 2010 3:13 am

Hi,

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

abiword.desktop                        openoffice.org-impress.desktop
aptoncd.desktop                        openoffice.org-math.desktop
asunder.desktop                        openoffice.org-writer.desktop
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

NoDisplay=true
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:

http://pclosmag.com/html/Issues/201006/page10.html
Arnote, Paul. "Xfce 4.6.1: Customize Your Xfce Menu." PCLinuxOS Magazine issue 41 (June 2010).

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

http://tinyurl.com/2dx8k6t
"Howto: Remove Fortune messages in the Terminal."
Attachments
mousepad-root-warning2.png
mousepad-root-warning2.png (65.8 KiB) Viewed 797 times
usr-share-applications.png
usr-share-applications.png (87.14 KiB) Viewed 797 times
Registered Linux User # 442201

Linux Mint 19.2 "Tina" Xfce ed. (64-bit)

AMD Athlon II X2 240 (Regor) 2.8 GHz, 4 GB RAM, SanDisk 512 GB SSD, XFX - AMD Radeon R5 220 video card, Samsung SH-S222L DVD-RW

User avatar
M_Mynaardt
Level 4
Level 4
Posts: 232
Joined: Thu Sep 09, 2010 12:28 am
Location: Victoria, BC, Canada

Re: Editing the XFCE menu sort of thing

Post by M_Mynaardt » Sun Sep 12, 2010 5:26 pm

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!
~*~ M_Mynaardt ~*~

Linux Mint is your computer's friend.
Always trust Linux Mint.

ahalin
Level 1
Level 1
Posts: 5
Joined: Tue Nov 02, 2010 8:10 pm

Re: Editing the XFCE menu sort of thing

Post by ahalin » Tue Nov 02, 2010 8:19 pm

Kalwisti,

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

:D

User avatar
grey1960envoy
Level 4
Level 4
Posts: 476
Joined: Mon Aug 23, 2010 10:21 pm
Location: 3rd rock from the sun

Re: Editing the XFCE menu sort of thing

Post by grey1960envoy » Tue Nov 02, 2010 9:17 pm

Very well done even a child could follow those directions thanks Kalwisti . I wish more people would take the time to help this way!
In a perfect world everything has it's place, Linux on my computer, windows on the wall, and M$ in the trash!
CrunchBang, LMDE, Mint 9 ,Peppermint Hackintosh and a few others :) Registered ...Machine; #432150 user ;#530829

User avatar
kalwisti
Level 1
Level 1
Posts: 27
Joined: Mon Feb 15, 2010 11:30 am
Location: Rio Grande Valley, Texas

Re: Editing the XFCE menu sort of thing

Post by kalwisti » Fri Nov 05, 2010 9:31 pm

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 ...
Registered Linux User # 442201

Linux Mint 19.2 "Tina" Xfce ed. (64-bit)

AMD Athlon II X2 240 (Regor) 2.8 GHz, 4 GB RAM, SanDisk 512 GB SSD, XFX - AMD Radeon R5 220 video card, Samsung SH-S222L DVD-RW

Post Reply

Return to “Newbie Questions”