Thunar send to desktop (create link)

what kind of link does this option creates? because is not a normal ln -s in thunar case i can move this link around it never breaks but the normal ln -s cant move moved around

It is a regular symbolic link as you can see when you list the directory (or just the link).

ls -al ~/Desktop/target_file

If you create a symbolic link like this:

ln -s ~/some_directory/target_file target_file

you can move it around - the name stays the same (of course) and the link still points to the correct location

xfce:thunar:send-to [Xfce Docs]

Thunar includes a Send To menu, which provides possible targets where files and folders can be sent. To access the Send To menu, choose FileSend To from the main menu, or right-click on a file or folder and choose Send To.

By default, the Send To menu includes an entry named Desktop (Create Link) for all files and folders, which simply creates a link on the desktop for each selected file.

nope, like i said normal ln -s cannot be moved around if u move it to another folder it breaks

I have to disagree - I’m sure because I just tested it
(and gave an example)
in order make sure not to pretend I know, but actually do know.

You can move the link as you like - you just can’t displace the target of the link - then it will obviously break.

cat test1.txt
Nachlese   
ln -s test1.txt test2.txt
cat test2.txt
Nachlese
mkdir test2
mv test2.txt ..... /test2
cd test2/
cat test2.txt
cat: test2.txt: No such file or directory

See my example.
There are multiple ways to create a symbolic link.
Yours is different from what I did.

ln -s Target LinkName
where Target is the full Path

create a link in thunar using the option send to
image

ls
test1_thunar.txt  test1.txt

cat test1_thunar.txt
Nachlese

mkdir test_thunar
mv test1_thunar.txt /test/test_thunar
cat test_thunar/test1_thunar.txt
Nachlese

the link never broke even if i move the shortcut in another folder so is not ln -s

wrong conclusion

Do actually use ln -s instead of Thunar and you’ll see.
and use ls -al - not just ls - it may make things more transparent

take the shortcut and move it to another folder

ln -s test1.txt test2.txt
ls -al
image

mkdir test2
mv test2.txt removed/test/test2
cd test2/
ls -al
image
cat test2.txt
cat: test2.txt: No such file or directory

again: look at my example
I gave it the full Path - and the link name the same as the original file name
You didn’t.

This obviously won’t work when you are creating the link in the same directory (as you did). Can’t have the same name there.
But the name is not important anyway.

But I will not argue this anymore - you asked a question but won’t accept the answer. :man_shrugging:

As far as I can tell, Thunar send-to Desktop is not using -s or --symbolic option to make a symbolic link instead of a hard link

symlink(7) — Arch manual pages
link(2) — Arch manual pages

1 Like

… and @KA6T5Q as well:

Demo
create file and a link to it:

jo@mint:~/test4$ touch testfile
jo@mint:~/test4$ ln -s ~/test4/testfile link_to_testfile
jo@mint:~/test4$ ls -al
insgesamt 20
drwxrwxr-x   2 jo jo  4096 Mär  4 17:18 .
drwxr-x---+ 62 jo jo 16384 Mär  4 17:00 ..
lrwxrwxrwx   1 jo jo    23 Mär  4 17:18 link_to_testfile -> /home/jo/test4/testfile
-rw-rw-r--   1 jo jo     0 Mär  4 17:17 testfile

move the link:

mv link_to_testfile ~/Schreibtisch/
jo@mint:~/test4$ ls -al
insgesamt 20
drwxrwxr-x   2 jo jo  4096 Mär  4 17:19 .
drwxr-x---+ 62 jo jo 16384 Mär  4 17:00 ..
-rw-rw-r--   1 jo jo     0 Mär  4 17:17 testfile

look at where the link still points to:

jo@mint:~/test4$ ls -al ~/Schreibtisch/link_to_testfile 
lrwxrwxrwx 1 jo jo 23 Mär  4 17:18 /home/jo/Schreibtisch/link_to_testfile -> /home/jo/test4/testfile

Thunar creates a link to some file (with the same name) on the Desktop - the file is not already there, but somewhere else.
Not only the exact same thing as a symlink, but simply a symlink.

1 Like

u are correct … the relative path work if the username is one word in English

I think I understand the difference:

a Symbolic link can take both a relative, as well as an absolute path.
If you give it the absolute path, it works everywhere.
If you give it a relative path it becomes invalid the moment it is moved…

1 Like

exactly - that is the difference

it has got nothing to do with the user name or the language being english @KA6T5Q

ln --help

  -P, --physical              make hard links directly to symbolic links
  -r, --relative              with -s, create links relative to link location
  -s, --symbolic              make symbolic links instead of hard links

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