0

So, after jumping from Ubuntu 18.04 to 20.04 I was surprised to find out that it appears there is no way to have .desktop be actual launcher anywhere else than the ~/Desktop, /usr/share/applications, or ~/.local/share/applications folders. I have a bunch of complicated launchers for beginners that run a series of steps and have had this in a separate subfolder (part of a git for easier syncing), so that all of them are easily found in one place. They are also organized in subfolder trees. Then, I simply add the main subfolder shortcut to the panel and users could start select apps/actions with effectively only a few clicks.

Now, it appears I can either only create clutter on the desktop (requiring all of the launchers to be toplevel) or bury such launchers in the main applications window.

Is there a way to add another path as an additional place where .desktop files can be activated as shortcuts and also recursively make the same permission apply to all its subfolders? Or, is there a secret way to enable such .desktop files to work in any folder on the system?

While installing all application shortcuts inside /usr/share/applications/ (for instance) works, it is in this case really messy. More so, creating symlinks from there to an arbitrary subfolder still does not work. Even creating a desktop symlink to a folder stored inside .local/share/applications/ folder does not work.

Why is it so hard to do something so simple: to have an application launcher shortcut in any other folder than the ~/Desktop or the aforesaid two system locations?

1 Answer 1

0

Why is it so hard to do something so simple: to have an application launcher shortcut in any other folder than the ~/Desktop or the aforesaid two system locations?

.desktop launchers are not designed for your particular use case.

They are placed in dedicated system locations. That way, the system can find them to know how to run application, and to create a menu to expose to the user.

  1. On Linux desktops with a traditional menu, you easily could do what you want using a menu editor. That menu editor would edit the .desktop files to place them in a given submenu, using the Categorie= key. Then, on every linux system, these .desktop files, placed in one of the system locations, would appear in an intended submenu. There are limitations:

    • There is only one level of submenu's
    • A desktop like Gnome Shell does not anymore work with the traditional menu structure in its Application Overview. There, you could use an extension instead.
  2. Clicking any executable file anywhere in a file manager to execute it directly is increasingly deprecated in more and more desktop environments, su using small scripts in a file directory structure is almost not an option anymore. Still, on many desktops, one can directly click a .desktop file anywhere in the file to launch it, provided the executable bit is set. On some desktops, including Gnome, this has been deprecated. Still, you could associate .desktop files with a utility that runs these files, such as dex, available in universe.

  3. As, like you noticed, the current system is not really designed for what you want to do, you may prefer using a dedicated menu system. For example, with "jgmenu" (available in Universe), you can easily create powerful cascade menus, even including search. A single application launcher then could give access to that menu.

3
  • Thank you for the response. Is there a way to have executable shell script files that can use a custom icon instead of a generic text file one? Aug 23, 2022 at 13:37
  • One can set different icons for individual files in Nautilus/Nemo, but this is not portable, i.e., not easily transferrable to a different system.
    – vanadium
    Aug 23, 2022 at 14:29
  • Thanks. It is disheartening to learn that Ubuntu/Gnome have bought into overly restrictive iOS-like interface, when the very defining trait of Linux that has made it both resilient and unique was its flexibility. It used to be if I wanted a walled garden I would get OSX, now I am not sure if I can distinguish between the two... Aug 23, 2022 at 15:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .