Dolphin option to follow symlinked folders when opened

Let’s say you have the following file structure:

folder-1/
    folder-1-1/
        folder-1-1-1/
             myfile.txt
    folder-1-2/
        ...
    folder-symlink => ./folder-1-1/

In Dolphin, I open folder-symlink. It now tells me I’m inside that folder, and not inside folder-1-1. If I then go further into folder-1-1-1, the path is shown as folder-1/folder-symlink/folder-1-1-1/, which doesn’t exist.

This makes things very confusing for me when navigating, so I would like an option that would send me to folder-1-1 when I open folder-symlink.

Now, I may just be stupid and be missing an existing setting. I found this old thread discussing the same thing, but the link to the brainstorm is broken, so I can’t check what the conclusion was, if any.

Thanks in advance.

folder-1/folder-symlink/folder-1-1-1/ exists. That’s just Unix filesystem, with an intermediate symlink folder.
A link is not a simple reference, it is a real folder it is own right.
If the path was resolved automatically and replaced, others might find it odd the opposite way (I would).

What you want here, then is a folder-link.desktop file that has Type=Link with URL key, that will do what you want.

No, since that won’t be compatible with most other software.

Hence why I’d think it best for it to be an option.

This only needs to work in Dolphin (and this works in plasma, file-dialogs), it should work in most file managers.

The option you want would only apply to Dolphin.

I only navigate the file system two ways: through Dolphin, and through the terminal. I want both to work the same.

The terminal I can easily fix. You can just hook into a CWD change and check if the realpath is the same or not. Dolphin I’m pretty sure is more difficult to do myself.

I could of course also build .desktop support into all the terminal commands. However, with tab autocompletion and all the other millions of programs that would need similar functionality, it would just be more work than it would be worth. I think it would be better if Dolphin could offer this functionality instead.

Or perhaps more generally, allow me to run a bash script on directory change, from which I could request the current dolphin instance to change CWD? That way I could take care of it myself, have it be a more generic feature, and clearly be for “advanced users” who know what they’re doing.

We have konsole integration (F4), and it can follow CWD from there.

I would consider a patch for this option acceptable, but it is low priority, since it is a niche use-case (symlink + terminal auto CWD resolving), so don’t count on maintainers to focus on this.

Having external CWD edition feels like a security hazard, a program could make think the user he is in a certain path when he is not and all sorts of issues. This also sounds overly complicated.

1 Like

i’m having trouble wrapping my head around what the problem is.

the only point of having the symlink is to put it somewhere else, not in the same folder as in your example.

it just seems like going out of your way to get the file you want.

if you do put the symlink somewhere else then it shows you an alternate path to get the file you want.

the end file is the same but the path is different.

so what is the issue exactly?

are you saying you want different paths to appear the same in a terminal window?

why would anyone want that?

confused.

Understandable, thanks.

Good point, didn’t consider that. Never mind on that bit then.

Plenty of people use that type of format to point to the latest version of a program, or some such. Not that the original post was indicative of my use-case, it was mostly to point out the issue.

That is the issue. Maybe I have a symlink to a folder, then I want to access a sister folder to where I end up. With the current implementation, I’d have to manually go from ~ or / or wherever, and find the sister folder that way. With this option, I’d just be able to hit “move up a folder” and I’d be where I need to be.
Maybe I need to check exactly what the symlinked path was, in case I have to document it somewhere or some such.
There are plenty of use-cases for this type of option.

A symlink is just a file that contains the path to another file or folder.

I don’t exactly understand your use case except your need to jump from a shortcut to the real path.

Why not simply use Dolphin feature “Add to Places”?

You can right-click on a symlink and “show target”.

1 Like

I think you can understand why replacing all my symlinks with “Add to Places” isn’t manageable. Perhaps if you could have conditional places, but then the link is once again locked as Dolphin-only, and not accessible via terminal.

I’d missed this one, I’ll admit. This is pretty much exactly what I want, with two alterations:

  1. Not opening in another window.
  2. Happening immediately upon double clicking the symlinked directory, instead of having to go through the context menu.

As an option, naturally. This is very good in the mean time though, thanks.

When symlinks don’t do what you want, or software doesn’t handle them the way you want, sometimes bind mounts can do the job instead.

2 Likes

i was going to suggest a hard link instead of a soft link but then i realized you can’t do hard links for directories…

but you can with a bind mount !

No, you can’t. It works basically the same way as symlinks.