How can I create a menu item that points to a URL?
I've tried creating a mylink.desktop
entry like this:
[Desktop Entry]
Encoding=UTF-8
Name=My Link Name
Icon=my-icon
Type=Link
Categories=Office;
URL=http://www.example.com/
then using xdg-desktop-menu install mylink.desktop
should put this entry in the current user's menu. This does not work however. The file is copied into ~/.local/share/applications/
but the entry doesn't show up in the menu.
If I change Type
to Application
and define Exec
instead of URL
then it works. But I don't want to have menu entry for a local application. I want a default browser to launch on a specified address when the menu entry is selected.
How can I do that?
Also, by using this command: xdg-desktop-icon install mylink.desktop
the result is as expected - a new link is created on the desktop. So why doesn't it work in the menu?
I tested this on RedHat Enterprise Linux 6 with KDE, but I would like to know how to do it in Gnome as well.