How to create a symbolic link to a full path?

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
fulalas
DEV Team
DEV Team
Posts: 779
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

How to create a symbolic link to a full path?

Post#1 by fulalas » 20 Nov 2016, 20:28

If you create a symbolic link from let's say /mnt/unit1/test_folder and put it on /home/guest/Desktop then if you double click this symlink you won't get the full path (/mnt/unit1/test) but /home/guest/Desktop/test_folder. How to avoid this?
Last edited by fulalas on 20 Nov 2016, 20:41, edited 1 time in total.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: How to create a symbolic link to a full path?

Post#2 by Bogomips » 20 Nov 2016, 20:36

Please provide a code example. Have experienced problems in that direction, but resolved them. At the moment don't know exactly what you mean. :unknown:
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

fulalas
DEV Team
DEV Team
Posts: 779
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: How to create a symbolic link to a full path?

Post#3 by fulalas » 20 Nov 2016, 20:47

Sorry. Let's try another way. :)

Firstly, I'm not exactly sure if this is a XFCE specific behavior, but try to create a folder shortcut (symlink) using the GUI and put it inside Desktop. If you execute (double click) this shortcut you'll notice that you get /home/guest/Desktop/test_folder instead of the full path /mnt/unit1/test_folder. In other words: symlinks change according to where they're. But I want them to be static pointing always to the full path of the destination.

Is it better explained now? :D

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: How to create a symbolic link to a full path?

Post#4 by brokenman » 21 Nov 2016, 02:24

Perhaps you are seeing the representation of the path in the file browsers address bar? For example, if you have created the symlink /home/guest/Desktop/test_folder, then navigate there in your file browser and create another file called tester, you can then open a console and check that the actual path is indeed in /mnt/unit1/test_folder/tester
How do i become super user?
Wear your underpants on the outside and put on a cape.

tome
Contributor
Contributor
Posts: 571
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: How to create a symbolic link to a full path?

Post#5 by tome » 21 Nov 2016, 10:57

I use spacefm file manager (easy to replace Thunar) and it has right click menu Go -> Real Path - I added key shortcut to it also. You can add also action to your Thunar:

Code: Select all

Thunar `realpath %F`
but directory will be opened in new window.

fulalas
DEV Team
DEV Team
Posts: 779
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: How to create a symbolic link to a full path?

Post#6 by fulalas » 22 Nov 2016, 01:42

tome wrote:

Code: Select all

Thunar `realpath %F`
but directory will be opened in new window.
Yeah, it works, but I don't know how to change folder shortcuts association to use this command by default.

Thanks

Post Reply