Join us on Facebook!
— Written by Triangles on July 27, 2016 • updated on May 13, 2020 • ID 41 —
Just create a simple text file and you're done.
Do you have the need to add a new application to my XFCE menu? Unfortunately, there are many confusing ways of doing it. In this article I want to tackle my favorite one: simple, easy, straight to the point.
Suppose you want to add a new program, say CLion (which is a pleasant IDE, even if such tools are not my cup of tea) to your XFCE menu. First of all, you have to prepare a simple .desktop
file that contains some information on the executable and the program itself.
.destkop
fileOpen your text editor and type something like the following:
[Desktop Entry]
Version=1.0
Type=Application
Name=<name-of-the-app>
Exec=<path-to-executable-file>
Icon=<path-to-icon-file>
Categories=<list-of-;-separated-categories>
What to change in the above template:
/opt/clion-2016.2/bin/clion.sh
;/opt/clion-2016.2/bin/clion.svg
;There are several additional parameters you can add, but what you see above should be enough. The last step: put that file somewhere useful, so that the system can be aware of it and update the menu accordingly.
.desktop
file in the right placeYou can place that file both in /usr/share/applications
or in [your-home]/.local/share/applications
. What's the difference? The former will enable the menu entry for every user, the latter only for you.
Xubuntugeek - Add items to Xfce Applications Menu (link)
FreeDesktop - Desktop Menu Specification (link)
have you ever tried to compare idle ram usage, M$ Windows vs any XFCE desktop based distribution ?
Windows = ease of use
XFCE = lghtweight and fast
geez ...
I've been using Linux for a long time and I've never had to do this until now.
XFCE developers should focus on things that affect a majority of users. Ease of use is a priority for Gnome
Seriously XFCE? It's an icon for a program or script. H E L L O?
@phreakerg
I'm very confused by the toxicity. Worse, it's toxicity based off blatantly incorrect information. If you had used XFCE even once, you would know.
Want to create a launcher?
Right click on desktop -> Create Launcher -> Fill in the GUI popup
To add it to a panel (taskbar), it's the same, but instead of right clicking on the desktop, you right click on the panel. It really is that easy.
In 99.9% of cases, applications are going to handle creating their own .desktop files when you install and uninstall them. It was standardized a long time ago, and every app supports it. The average user doesn't have to know how to write one by hand.
The one instance where creating your own does become useful though is when you write your own application or wrap one with WINE and want to set it to be discoverable all over your system. Any user who can do that is assumed to also be comfortable using a text editor.
Or if you really don't want to use a text editor, you can call:
exo-desktop-item-edit --create-new [DIRECTORY]
to bring up that familiar GUI and create your .desktop file.
That option is very hidden, but ok, systematically, it's possible to, eventually, find it.
It's not 99% applications, but like 70% of applications, BUT THERE IS like a 99% change that a common user of such system WILL need at least 1 application from that 30% ... and in that case they're sc** ....
The application launch and task bar ALREADY HAS ALL TECHNICALITIES to support drag&drop, you can actually drag app from task bar to launch bar and see it triggering little frames
- IT JUST DOESN'T DO ANYTHING , which after all those years, just blows my mind, so I'm not surprised by those angry reactions.
It's a GUI system for a reason - that reason is dismissed when you suggest to "program" or "code" a special file just to add a simple icon for everyday use.
And for the gnome/unity people - c'mon - if somebody is using xfce, there is a big change it's because they CAN'T use any other more performant-expensive GUIs...
So quick and easy if you know how to edit a text file.
I know they've been trying to make the OS more popular with consumers, but I'm really happy with the underlying text config.
I guess I should start my own desktop project - with no GUI config whatsoever.
Fixed
one thing alacarte has that menulibre doesn't is Restore System Configuration. fixes everything but knocks out your favorites so take a screenshot before you click this button. uninstall purge menulibre. install alacarte. click on restore system configuration. reinstall menulibre.
Also
restart xfce4-panel -r makes Windows Buttons unclickable so you reboot or logout.
copy with ctrl+c from a launcher will not work. You have to right click to menu and choose copy.
there's always .config/menus/xfce-applications.menu
i love my Linux 99% of the time even when it's broken.