Thunar and Desktop link - parent folder behaviour - XFCE

Hi,
In Thunar
Suppose you have directories as such

/run/media/myPC/subA/subB/subC/subD

In the right pane, you go on subD to create a desktop link;
by right-clicking and selecting SendTo>"Desktop(create a link)

Now you go on the Desktop and activate the link
Thunar opens itself with address
/home/myPC/Desktop/subD
So far so good.
But in Thunar,

If you click on the button parent directory (icon arrow up) it jumps to "/home/myPC/Desktop/",
while the expected behaviour is to jump to the parent folder of 'subD',
namely 'subC', viz /run/media/myPC/subA/subB/subC

How to match the behaviour of Desktop link to jump to the parent "subC" ?

difference between a soft link and a hard one

This is the expected behavior.
A symbolic link is not a shortcut as in Windows, it points to a target file/directory but navigating to it retains where you come from. Thus the parent of /home/myPC/Desktop/subD is /home/myPC/Desktop, whether subD is a natural file/folder or a link pointing to it.

If you want to have Thunar open that folder from the desktop as if it comes from the actual target's parent, you can replace the link with an executable file including the code below :
thunar /run/media/myPC/subA/subB/subC/subD

1 Like

Indeed,
I can created a thisIsALink.sh file with
Thunar "".
Then make this shell script executable and run it.

But, then why the heck Thunar is making a Desktop link who is different that Thunar ""?

How do I create a right-click context menu who will dump into a executable sh file :
Thunar ""?

Because creating a link at the desktop creates a symbolic link, as described and AFAIK as it always did.

You may try creating a custom action for your kind of shortcut, with something like this (needs fine-tuning):
echo "thunar %f" > ~/Desktop/%n && chmod +x ~/Desktop/%n

Though if you'd regularly need to go up the (original) parent, i'd advice making a link towards that parent instead.

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

Forum kindly sponsored by