Launcher .desktop type Link

Hello, I need to create launchers .desktop type “Link”.
I’m using ubuntu 22.04 with gnome 42.5, I made several tests but don’t work.
In previous ubuntu’s version (with gnome), it works fine, but now no longer works.
How can I solve?

Hello, I don’t want a symlink. They changed the real address of the files or directory.
I need a simple link, in past I made it with the launchers. In my previous distro, ubuntu 18.04 (I don’t remember what gnome version) works fine! But in gnome 42.5 no more works.

So, I definitely need a simple link to the absolute address of the file.
Why do the launchers type “link” no longer work???

Since Files 3.30 it doesn’t handle .desktop files, including not opening Type=Link .desktop files like you’re asking about: Remove desktop files and links (!215) · Merge requests · GNOME / Files · GitLab

As per my understanding it was removed because it was considered a security risk. The file manager would show the file with the name and icon defined in the file, so without .desktop extension, and could run a command when double-clicked. So a file “what-a-view.jpg” extracted from some downloaded archive, showing with some a thumbnail image, could in fact be a .desktop file with an Exec command in it to do something nefarious.

You can add a bookmark for a directory on the left sidebar by dragging it there. Alternatively you can drag a directory or file onto the “Starred” entry on the left sidebar to star it, to make it a favorite (I’m not sure for 42.5 but you maybe can also star files from the context menu, or else on the Properties pane you can star it by clicking the star icon). All your starred files and directories are quickly accessible by going to Starred.

If these different ways of organizing favorite locations don’t work for you then you could instead install a different file manager that does handle .desktop files.

thank you for your reply.
I would like to try with the “starred” before go in other ways.
but I’m not able to do.
drag to “starred” section don’t work (as you said), on right click in context menu there is not the item to “star”, also in the properties window there is nothing to click to “star”.

IIRC the earliest implementations of the starring feature had “Star” directly in the context menu when you right-clicked a file or directory item. Have another look.

You can try the Nemo file manager. It was forked from an older version of Nautilus and retains .desktop shortcuts support along with desktop icons and such.

1 Like

it’s exactly what I tried to do, but don’t work.

sorry for the delay, I found other problems, then this became secondary.

I tried Ubuntu 22.04 on DistroSea. Indeed with that dragging to Starred doesn’t work, you have to select Star from the context menu:

Hello, I tried again… maybe I found the reason don’t work for me.
I can star files and folders in home (and subfolders), but I can’t star files (or folders) in other disks/partirions.
And naturally… I need to star files in other partitions… :disappointed:

Hello, I think I’ve found a solution.
Just to make normal launcher .desktop type “Application”, then insert as exec the command line to open the file.
In case it’s useful for someone, here’s some examples.

To open a libreoffice file:

Exec=libreoffice /path/to/filename

or for a text file:

Exec=gedit /path/to/filename

And to open a folder:

Exec=nautilus /path/to/folder

If you’re gonna do that, at least use xdg-open. This way, you’ll be able to change the default app without having to modify the . desktop files each time.

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.