Page 1 of 2

Re: Let's compare filemanagers

Posted: Wed Jul 27, 2022 7:36 pm
by norgo

I'm using pcmanfm-qt ( NOT pcmanfm )

one OR two panels
additional several tabs for each site possible
very good connectivity and a lot of supported transfer protocols

@ozsouth ( for info only ) auto-refresh of screencontent works without problems in pcmanfm-qt

and this feature I like very much !
when I navigate in pcmanfm-qt to a directory where the desired file is located
and I choose open Terminal or press F4
the terminal is opening automatically in the same directory


Re: Let's compare filemanagers

Posted: Wed Jul 27, 2022 8:17 pm
by williams2

when I navigate in pcmanfm-qt to a directory where the desired file is located
and I choose open Terminal or press F4
the terminal is opening automatically in the same directory

Using rox in Puppy, press ~ (the tilde key, left of the 1 key, using the US keymap.)
or press F4

Or using the rox menu window ==> Terminal Here


Re: Let's compare filemanagers

Posted: Thu Jul 28, 2022 5:44 am
by wiak

I am happy enough generally with either pcmanfm or thunar. RIght-click custom actions are easy to set up in thunar for example. It is also no issue to open up two instances of either pcmanfm or thunar (in addition to the usual dual-pane normal modes) so can copy and paste between these two separate instances (as well as or in addition to separate tabs for different directories in either) - this is pretty powerful as is the usual mount filesystem capabilities either are usually configured to provide (maybe via gvfs for example in pcmanfm).

However... one thing I hate about both pcmanfm and thunar that I love about rox is the creation of symlinks during copy paste operations... Rox has these wonderful options: move, copy or make either relative or absolute symlink!

I just can't do relative symlinks, for example using either pcmanfm or thunar (I can get absolute symlink via menu in thunar, for example, but when I'm making a filesystem that I intend moving around sometimes I need relative symlinks...). So, generally, on the systems I use that have either pcmanfm or thunar on them (or similar) by default, I always resort to the commandline when creating symlinks - that is a pain - I lose the user-friendly benefit of GUI quick copy/paste make symlinks - unless I install rox-filer!!!

But there is an issue... Rox-filer is ANCIENT and it is GTK+2 is it not, which means deprecated and will add bloat to support on modern systems (needs libgtk2.0 and so on)?
So what is the long term answer from Puppy Linux for this?

Look at the github commit years in the attached image...


Re: Let's compare filemanagers

Posted: Thu Jul 28, 2022 6:22 am
by williwaw
wiak wrote: Thu Jul 28, 2022 5:44 am

However... one thing I hate about both pcmanfm and thunar that I love about rox is the creation of symlinks during copy paste operations... Rox has these wonderful options: move, copy or make either relative or absolute symlink!

I just can't do relative symlinks, for example using either pcmanfm

preferences>general>default drop action=ask gives you a choice, not sure what of what kind of links however


Re: Let's compare filemanagers

Posted: Thu Jul 28, 2022 6:39 am
by wiak
williwaw wrote: Thu Jul 28, 2022 6:22 am
wiak wrote: Thu Jul 28, 2022 5:44 am

However... one thing I hate about both pcmanfm and thunar that I love about rox is the creation of symlinks during copy paste operations... Rox has these wonderful options: move, copy or make either relative or absolute symlink!

I just can't do relative symlinks, for example using either pcmanfm

preferences>general>default drop action=ask gives you a choice, not sure what of what kind of links however

Currently just have thunar in front of me. I can easily enough create absolute link by drag drog via ctrl shift key press, but don't know how to create relative link (i.e. the ../../linkname kind of thing).

Also in thunar you can highlight source file and use Edit > Make Link, but again creates an absolute target address for the symlink.


Re: Let's compare filemanagers

Posted: Thu Jul 28, 2022 7:17 am
by williwaw

dunno about thunar.
the recommendation was from a test I did on vanilla, which I guess uses a pcmanfm deb


Re: Let's compare filemanagers

Posted: Thu Jul 28, 2022 8:32 am
by wiak
williwaw wrote: Thu Jul 28, 2022 7:17 am

dunno about thunar.
the recommendation was from a test I did on vanilla, which I guess uses a pcmanfm deb

I just quickly installed pcmanfm on my system. Probably had most dependencies already so only a 6MB download and only occupies further 27MB on my system. Very similar to thunar when it comes to symlink creating (Edit menu > Create Link) and also just absolute link... Rox wins there for me for sure (choice of relative or absolute link)...


Re: Let's compare filemanagers

Posted: Thu Jul 28, 2022 11:59 am
by geo_c
wiak wrote: Thu Jul 28, 2022 8:32 am

I just quickly installed pcmanfm on my system. Probably had most dependencies already so only a 6MB download and only occupies further 27MB on my system. Very similar to thunar when it comes to symlink creating (Edit menu > Create Link) and also just absolute link... Rox wins there for me for sure (choice of relative or absolute link)...

Xfe doesn't give an option for relative symlinks either, and that's one of the reasons I still use Rox.


Re: Let's compare filemanagers

Posted: Thu Jul 28, 2022 1:21 pm
by wizard

@geo_c

XFE's right click menu let's you create a "symlink to". If using two panes it is placed automatically in the second pane unless you choose another target or if using one pane it prompts you to navigate to the target directory. Quite handy and it is a relative symlink. XFE does not have an option to create an absolute link.

wizard

xfe-symlink.jpg
xfe-symlink.jpg (44.35 KiB) Viewed 2215 times

Re: Let's compare filemanagers

Posted: Thu Jul 28, 2022 7:25 pm
by geo_c
wizard wrote: Thu Jul 28, 2022 1:21 pm

@geo_c

XFE's right click menu let's you create a "symlink to". If using two panes it is placed automatically in the second pane unless you choose another target or if using one pane it prompts you to navigate to the target directory. Quite handy and it is a relative symlink. XFE does not have an option to create an absolute link.

wizard
xfe-symlink.jpg

Right, I'm getting my terms confused. Relative symlink or absolute symlink, versus hardlink. I think this where MC probably beats them all. It's got link, symlink, relative symlink right in the file menu. Except you can't do what I did with 12 simple one-pane ROX windows open in MC either, at least not drag and drop between them. I suppose you could have 6 dual pane terminal windows open.

I have opened three or four dual pane XFE windows in the past, but sometimes it gets buggy doing that. You might wonder why someone needs to open so many file manager windows, well, I just did this to make all the icons sets I put in the Eye Candy section of the forum. I needed to make sure every set had every icon correctly, so I opened all of them side by side in narrow strips as I batch processed them. That's ROX's strong point, as well as doing panels and pinboards, and being built in to puppy.

One thing I like about XFE is it uses the standard MC like function-key bindings, for the most part. It's got good keybindings out of the box, as well as good mouse and right click functions.


Re: Let's compare filemanagers

Posted: Fri Jul 29, 2022 2:09 am
by mikewalsh

A BIG thumbs-up for ROX, here.

As Flash says, yes; it does take some getting used to if all you've ever known is Windows. My first several questions on the old Forum when I joined over 8 years ago revolved around this.

But having used it all these years, I've now got so handy with it I just can't imagine using anything else. Drag'n'drop is so natural - for me - I hate PCManFM and Thunar mainly for this very reason, 'cause copy/paste and switching directories all the time is SUCH a PITA.....and slows me down no end. Admittedly, with the new, much bigger screen I have now, it's a lot easier to have multiple ROX windows open at the same time without them obscuring each other.

It was definitely an issue with the old 1024x768 monitor I used to use....but I prefer them 'floating'; tried tiling managers, and, er, no.....I don't like them. To me, it's not organisation so much as "regimentation" (again).

Each to their own, of course. We all have our preferred way of doing things.

Mike. ;)


Re: Let's compare filemanagers

Posted: Fri Jul 29, 2022 3:05 am
by wiak
mikewalsh wrote: Fri Jul 29, 2022 2:09 am

But having used it all these years, I've now got so handy with it I just can't imagine using anything else. Drag'n'drop is so natural - for me - I hate PCManFM and Thunar mainly for this very reason, 'cause copy/paste and switching directories all the time is SUCH a PITA.....and slows me down no end.

But Mike, there is no such issue... I like all of them: Rox, pcmanfm, and thunar, except for that symlinks copy issue, where Rox is a real beauty for me.

There is no issue with Drag'n'drop files - only seems so because when most people use the likes of thunar they open one instance and mess about thinking they need to open different tabs to different directories and keep switching between these as they copy and paste. But actually, you can do copy and paste exactly like you would with Rox - i.e. open a second instance of say thunar and copy between the windows of the two instances - so you have that choice! If you do it that way, there is basically no difference whether you are using two Rox windows for Drag'n'drop or two pcmanfm windows, or two thunar windows - you don't even need dual panes to be active in either pcmanfm or thunar, so pretty much just like using Rox...

My issue remains that of relative symlink Drag'n'Drop; nothing I know of beats Rox for that manoevre, but, alas, Rox is ancient and not supported any more... I've tried messing with 'Custom Actions' in thunar and I can use that to make relative symlinks in same directory buit not for relative symlinks in entirely different directories - just no easy way I have ever found (maybe I just don't know the method, but I have tried...).


Re: Let's compare filemanagers

Posted: Fri Jul 29, 2022 3:22 am
by rockedge

In KLV-Airedale-beta16 I drag & drop files between Thunar and Rox which works really well. Otherwise no problem using Thunar in a similar style as Rox, with 2 instances open in separate windows


Re: Let's compare filemanagers

Posted: Fri Jul 29, 2022 6:28 am
by peebee

Agree 100% with comments about Rox superiority with relative symlinks - both in their creation but also reporting easily where they link to (just hover).

Rox "Properties" report also provides extra information that is sometimes useful.

Use PcManFM majority of time under LXDE with occasional Rox when needed.

BTW - Woof-CE Rox petbuild uses a Woof-CE fork of Rox source:
https://github.com/puppylinux-woof-CE/r ... r/releases
https://github.com/puppylinux-woof-CE/w ... /rox-filer


Re: Let's compare filemanagers

Posted: Fri Jul 29, 2022 8:10 am
by MochiMoppel
peebee wrote: Fri Jul 29, 2022 6:28 am

Rox "Properties" report also provides extra information that is sometimes useful.

It's more than information. This "Properties" dialog holds a little secret. One of the last lines may read
"Link target:/mnt/sdc1"
This looks like a mere label, but in fact it's an entry field. You can change the link target here. Just doubleclick and edit. Press Enter when finished. No need to click "Refresh".

This is very useful in case of dead links and my example is what I actually had to do 10 minutes ago. After waking up from suspend my PC suddenly had reassigned my SD card from sdc1 to sdb1, and /mnt/home, which used to be a symlink to /mnt/sdc1, was dead, and so were all my desktop icons. I changed the link in the "Properties" dialog for /mnt/home to /mnt/sdb1, now everything is back to normal. Very easy.


Re: Let's compare filemanagers

Posted: Fri Jul 29, 2022 8:17 am
by backi

Hi @MochiMoppel wrote:

This is very useful in case of dead links and my example is what I actually had to do 10 minutes ago. After waking up from suspend my PC suddenly had reassigned my SD card from sdc1 to sdb1, and /mnt/home, which used to be a symlink to /mnt/sdc1, was dead, and so were all my desktop icons. I fixed the link in the "Properties" dialog for /mnt/home. Very easy.

I occasional run/ran into this Kind of Problem.

Cool Tip/Information :thumbup2:


Re: Let's compare filemanagers

Posted: Fri Jul 29, 2022 10:08 am
by mikewalsh
MochiMoppel wrote: Fri Jul 29, 2022 8:10 am
peebee wrote: Fri Jul 29, 2022 6:28 am

Rox "Properties" report also provides extra information that is sometimes useful.

It's more than information. This "Properties" dialog holds a little secret. One of the last lines may read
"Link target:/mnt/sdc1"
This looks like a mere label, but in fact it's an entry field. You can change the link target here. Just doubleclick and edit. Press Enter when finished. No need to click "Refresh".

Once again, interesting and useful information. Thanks, Mochi.

Mike. ;)


Re: Let's compare filemanagers

Posted: Fri Jul 29, 2022 3:01 pm
by wizard

I spend a lot of time managing and manipulating files on my network and I've tried every Linux file manager I could find.

For many years I have used the combination of Rox and XFE. I like Rox for its integration with Puppy and have watched it become more useful with features like "copy and paste", "/" search, and bookmarks. One annoyance for me has been on my 100Mbps network I have some directories with over 1000 files and Rox may take 8-10 seconds to populate the file names. Other file managers are almost instant.

I chose XFE for its power and customization ability. Dual pane detail mode allows me to see, compare and manipulate directory contents easily. It has an integrated file search function as well as a file compare. XFE can work in concert with ROX and here are some things that make the combination more useful.

XFE can set up its own file associations that only apply when using XFE., plus you can assign separate programs to open, view or edit a file.
Create XFE file associations to ROX (just right click one of the file types>properties) for:
.pet
.sfs
.deb
.iso
This lets XFE call Rox to install/uninstall or mount/open those file types.

I've added half a dozen scripts/programs into XFE Tools>Go to scripts folder that allow mounting drives and network shares from within XFE. The scripts can then be accessed by right clicking any file or folder.

This right click feature is very powerful since other scripts can take advantage of the fact that when run it will take the selected file/directory as the first argument of a function.

xfe-scripts.jpg
xfe-scripts.jpg (81.64 KiB) Viewed 1889 times

XFE has more features and functions than are practical to list here and even after all my use I am still finding some of them and ways to make my task easier.

For every day casual file management Rox is my choice, but for a power tool it's XFE.

wizard


Re: Let's compare filemanagers

Posted: Sat Jul 30, 2022 2:08 am
by wiak

So it is easy to create an absolute symlink in either pcmanfm or thunar and then of course you can move that anywhere since it uses absolute addressing. Or you can create absolute link via drag and drop in pcmanfm or thunar if you press ctrl+shift whilst doing the drag'n'drop.

Issue I have is that I later sometimes want to convert such adsolute symlinks to relative ones so I can move blocks of directories to alternative mount points and similar.

Of course it is far too much work often to manually modify all absolute symlinks to relative ones, but fortunately there is a tiny little commandline utility called 'symlinks' that will convert all symlinks in any directory (and can do so recursively) into relative symlinks, so that is a way to address the matter. Still not as convenience as Rox drag and drop relative symlinks ability but useful in other situations anyway. Oddly I feel, the 'symlinks' utility will not convert a single symlink to a file from absolute to relative, you need to specify a directory (which can be a single dot) and it will convert all absolute symlinks in that dir to relative.

Debian/Ubuntu have 'symlinks' program in their repos, so could also access that via a Custom Action script in pcmanfm or thunar.

How to use it: https://rubenvarela.com/guides/symlinks-utility/

Might also be worth looking at the C source code for symlinks to see if could be easily modified. EDIT: I'm looking at symlinks sourcecode now; not unsurprisingly it is a relatively simple short piece of code so despite being a few years since I programmed in C making this work the way I want may prove possible. But I'm busy just now - added it to my list of things to do!!! EDIT2: Given up on idea to modify the util; original symlinks util is good enough for my purposes and despite being short program it has several includes and involves recursive directory walks - not at all a trivial job to modify probably.


Re: Let's compare filemanagers

Posted: Sat Jul 30, 2022 12:19 pm
by Burunduk

It seems the GNU ln command can convert a single absolute symlink to a relative one.

Code: Select all

ln -srf link-to-file
ln -srf link1 link2 dir

The busybox ln can't do that (-r is not supported).
Edit: removed an unnecessary option.


Re: Let's compare filemanagers

Posted: Mon Aug 01, 2022 3:50 am
by wiak
Burunduk wrote: Sat Jul 30, 2022 12:19 pm

It seems the GNU ln command can convert a single absolute symlink to a relative one.

Code: Select all

ln -srf link-to-file
ln -srf link1 link2 dir

The busybox ln can't do that (-r is not supported).
Edit: removed an unnecessary option.

wow, great tip! I knew the option to make a relative symlink, but didn't realise it could convert single absolute link to relative link in that simple matter. That could be conveniently scripted as a custom action in either pcmanfm or thunar - solves my original problem, thanks. The symlinks utility useful for bulk changes from absolute to relative, so that's doubly great.
Next would be to create the custom actions and try and get them always included in Puppy or Dog builds that are using pcmanfm or thunar - that way users don't need to find this post and technical matters like this should be dealt with by the distro developers. No real need for Rox for me in this scenario to be honest since can always open two thunar or pcmanfm windows if I prefer that to side panel menu mode.


Re: Let's compare filemanagers

Posted: Wed Aug 03, 2022 8:43 pm
by mikeslr

Efficiency.

The value of rox's drag & drop to create relative symbolic links has been mentioned several times. For me, it's not just a matter of convenience. I can create symbolic links using the command line. However, often when doing so I'll mis-read the name [or full path when that's needed], or mis-type it.

Combine the ease of creating symbolic links with rox's book-marking function and you have a very efficient system for getting where you want, when you want.

Have folders you often work with, e.g. /mnt/home/, /mnt/home/stuff, /usr/share/applications, /usr/share/pixmaps -- No problem. Book-mark them once. Thereafter they can be reached in a second: open rox, click Bookmarks, scroll, click.

Working with a folder 10 levels deep. NO Problem. File-browse once and book-mark it. After that it's one second away. No longer need it; edit bookmarks, delete.

Don't want to have to execute a SAVE to preserve bookmarks. No problem. Open two rox windows: one on any partition/drive. The second so you can see the folder you want to be opened quickly. Drag that folder into the other window. Select Link(relative). Of course, both partitions must be mounted for the link to function. But that's the point. You can quickly access folders even on partitions you rarely mount.

Using only rox you occasionally need two folders. Right-Click the UP-Arrow. Reposition the windows, then use rox's bookmarks to have them display the two folders you want.

Add /root/my-applications/bin to your bookmarks and you have a convenient location 'on-the-path' for dragging and dropping to create symbolic links to scripts and binaries NOT 'on-the-path'. [Of course, any place on-the-path could have been used].

Recently the Devs have added 'Duplicate' to the Right-Click menu. Great for trying out ideas without jeopardizing something which works. Before that I had to copy into a folder, rename then copy it back. Duplicate is my preliminary step before up-dating web-browsers.

Need a detail view of the contents of a folder. It's one click away.

Using Right-Click menu to provide choices: Often I'll just want to read a pdf. The build-in pdf-viewer is fine for that while a pdf-editor will take longer to open and provide a busier display. By customizing the Right-Click menu, I have the best of both worlds. mtpaint/gimp, abiword/LibreOffice-writer and other combinations can be handled the same way.

Tip about Right-Click 'run-in-terminal': run-in-terminal is a Right-Click option in most Puppys. IMHO, it's an essential command for trying to figure out why something isn't working. [Of course, you could file-browse into the folder holding the file, click the ~ key, then type ./FILENAME. But how efficient is that?] Although it may be built in, it may not be associated with all the file-types you'd want to use it with. AppImages for example. You could Right-Click an AppImage, Select Customize Menu, then drag Run_in_Terminal folder from /usr/local/apps into the window which opens, if you knew where Run_in_Terminal's executable was located. It might, however, be easier to file-browse to a file you know is associated with 'run-in-terminal', Right-Click it, select 'Customize Menu', and leave the widow displaying the symbolic link to 'Run-in-Terminal' open. Then Right-Click an AppImage, select 'Customize Menu' and drag the aforementioned symbolic link into the window which opened for the AppImage file-type and select Copy.

The same copy technique can be used with any other application already on the Right-Click menu for some file-type.

I don't know other file-managers as well as I know rox. If I did, perhaps I wouldn't be as much of a rox-fan.

It is unfortunate that rox is not being actively up-dated/up-graded. I wouldn't expect those accustomed to thunar, pcman or the other file-managers built into the major distros to have an interest in doing so. Perhaps one of our gurus should consider adopting it.


Re: Let's compare filemanagers

Posted: Thu Aug 04, 2022 1:19 am
by wiak
mikeslr wrote: Wed Aug 03, 2022 8:43 pm

Efficiency.

The value of rox's drag & drop to create relative symbolic links has been mentioned several times. For me, it's not just a matter of convenience. I can create symbolic links using the command line. However, often when doing so I'll mis-read the name [or full path when that's needed], or mis-type it.

Combine the ease of creating symbolic links with rox's book-marking function and you have a very efficient system for getting where you want, when you want.

Have folders you often work with, e.g. /mnt/home/, /mnt/home/stuff, /usr/share/applications, /usr/share/pixmaps -- No problem. Book-mark them once. Thereafter they can be reached in a second: open rox, click Bookmarks, scroll, click.

Working with a folder 10 levels deep. NO Problem. File-browse once and book-mark it. After that it's one second away. No longer need it; edit bookmarks, delete.

Bookmarking itself is a standard feature in both thunar and pcmanfm, but the symlink capability of Rox adds to that capability for sure.
https://unix.stackexchange.com/question ... le-manager

Thunar and pcmanfm use the bookmark system provided by GTK as does Nautilus and various other apps I believe
https://newbedev.com/where-does-nautilu ... mark-names


Re: Let's compare filemanagers

Posted: Thu Aug 04, 2022 2:45 am
by MochiMoppel
mikeslr wrote: Wed Aug 03, 2022 8:43 pm

Recently the Devs have added 'Duplicate' to the Right-Click menu. Great for trying out ideas without jeopardizing something which works.

I assume that you mean the ROX "File" submenu (Ctrl+rightclick) and not the "Open with" menu (Shift+rightclick). The former is controlled by the ROX devs, the latter by Puppy devs/users.

The function always existed. The devs only changed the name from 'Copy' to 'Duplicate' because users often confused it with the MS Copy. It wasn't helpful either that the menu item previously named 'Copy' carried the same Ctrl+C shortcut that users normally associate with the MS Copy.


Re: Let's compare filemanagers

Posted: Thu Aug 04, 2022 10:45 am
by fredx181
wiak wrote: Mon Aug 01, 2022 3:50 am
Burunduk wrote: Sat Jul 30, 2022 12:19 pm

It seems the GNU ln command can convert a single absolute symlink to a relative one.

Code: Select all

ln -srf link-to-file
ln -srf link1 link2 dir

The busybox ln can't do that (-r is not supported).
Edit: removed an unnecessary option.

wow, great tip! I knew the option to make a relative symlink, but didn't realise it could convert single absolute link to relative link in that simple matter. That could be conveniently scripted as a custom action in either pcmanfm or thunar - solves my original problem, thanks. The symlinks utility useful for bulk changes from absolute to relative, so that's doubly great.
Next would be to create the custom actions and try and get them always included in Puppy or Dog builds that are using pcmanfm or thunar - that way users don't need to find this post and technical matters like this should be dealt with by the distro developers. No real need for Rox for me in this scenario to be honest since can always open two thunar or pcmanfm windows if I prefer that to side panel menu mode.

That works indeed, but I noticed that it does resolve symlinks, e.g. if the symlink to convert is pointing to another symlimk somewhere, result is that the converted symlink will point to the source file, not to the initial symlink.
For example, I have abs. symlink /usr/share/zoneinfo/localtime which points to /etc/localtime (which is a symlink too)

Code: Select all

root@live:~# ls -l /usr/share/zoneinfo/localtime
lrwxrwxrwx 1 root root 14 aug  4 12:23 /usr/share/zoneinfo/localtime -> /etc/localtime
root@live:~# ls -l /etc/localtime
lrwxrwxrwx 1 root root 36 aug  4 11:08 /etc/localtime -> /usr/share/zoneinfo/Europe/Amsterdam

Now convert using the -r option :

Code: Select all

root@live:~# ln -srfv /usr/share/zoneinfo/localtime /usr/share/zoneinfo/
'/usr/share/zoneinfo/localtime' -> 'Europe/Amsterdam'

The relative symlink created is pointing to 'Europe/Amsterdam' in /usr/share/zoneinfo/ , not to /etc/localtime

OK, fine of course if that behavior is desired, but here's a simple script that does it different:

Code: Select all

#!/bin/bash

l=$1
linkdir=$(dirname "$l")
rel="$(realpath -s --relative-to="${linkdir}" "$(readlink "$l")")"
cd "$linkdir"; ln -v -sf "$rel" "$l"

To test, save e.g. as 'abs2rel' and run ./abs2rel /pathto/absolute-symlink

Code: Select all

[code]root@live:~# ls -l /usr/share/zoneinfo/localtime
lrwxrwxrwx 1 root root 14 aug  4 12:33 /usr/share/zoneinfo/localtime -> /etc/localtime

Code: Select all

root@live:~# ./abs2rel /usr/share/zoneinfo/localtime
'/usr/share/zoneinfo/localtime' -> '../../../etc/localtime'

This way it points relatively to symlink /etc/localtime


Re: Let's compare filemanagers

Posted: Thu Aug 04, 2022 4:34 pm
by Burunduk
fredx181 wrote: Thu Aug 04, 2022 10:45 am

OK, fine of course if that behavior is desired, but here's a simple script that does it different:

Code: Select all

#!/bin/bash

l=$1
linkdir=$(dirname "$l")
rel="$(realpath -s --relative-to="${linkdir}" "$(readlink "$l")")"
cd "$linkdir"; ln -v -sf "$rel" "$l"

To test, save e.g. as 'abs2rel' and run ./abs2rel /pathto/absolute-symlink

Probably this is not desired, the ln -srf command is simple but doesn't work well. Another thing that is different: it only works for links in the current directory. Your script doesn't have this limitation.

Note: on Fossapup64, realpath is a busybox applet - use realpath-FULL instead.

The argument for the script must be an absolute path of a link or a link in the current directory.

Code: Select all

#cd
#ln -s /bin/false Startup/false
#abs2rel Startup/false
ln: failed to create symbolic link 'Startup/false': No such file or directory

Maybe a little rearrangement:

Code: Select all

#!/bin/bash

l=$(basename "$1")
cd "$(dirname "$1")" && ln -sf "$(realpath -s --relative-to=. "$(readlink "$l")")" "$l"

Re: Let's compare filemanagers

Posted: Thu Aug 04, 2022 8:18 pm
by fredx181
Burunduk wrote:

Maybe a little rearrangement:
...

Yes, works nicely.

Note: on Fossapup64, realpath is a busybox applet - use realpath-FULL instead.

Probably that's the case on most Puppies, I guess, btw, I never understood if the ...-FULL is included that the default in PATH is the link to busybox (with less options generally).
So how about this then:

Code: Select all

#!/bin/bash

# check if realpath is link to busybox
if [ $(readlink $(command -v realpath)) = /bin/busybox ]; then
RPATH=realpath-FULL
else
RPATH=realpath
fi

l=$(basename "$1")
cd "$(dirname "$1")" && ln -sfv "$($RPATH -s --relative-to=. "$(readlink "$l")")" "$l"

Re: Thunar's "Bookmarks" and Symlinks

Posted: Thu Aug 04, 2022 11:56 pm
by mikeslr

Following wiak's reply that thunar and pcman had book-marking capabilities, I booted into Quickpup64_22.01 --currently the only 'non-rox' Puppy I have-- did some examining of it and some online searching.
The reason it's so hard to find anything about thunar's bookmarking capabilities is that it doesn't provide them under that name. But it does have an adequate substitute once you figure out how to use it.
Note, the version of thunar used by Quickpup64_22.01 is 4.16.11. Copyrights on "About" reflect modifications thru 2020. So other versions may be different. And I don't doubt that there may be other mysteries of Thunar of which I am unaware.

At least on mine, when Thunar opens its Left-pane displays a ‘Tree’ view. Menu>View>Side Pane enables you to toggle into ‘Shortcuts.’ You have to be displaying Shortcuts. Then just drag a folder from the Right-pane into the Left-(Shortcut)-Pane. Well, almost. :roll: I frequently want to access /usr/share/pixmaps so I dragged that folder into the Left-Pane and was confronted by something like “You can’t move a system file into Trash”. :shock:

Perhaps I wasn't being careful enough about where the folder was being dragged. Chances are I might not be any more careful the next time. And as Thunar might not be so cautious about dealing with folders on /mnt/home I figured it might be best to create a symbolic link and drag that to the Shortcut pane.

Short-cuts on the Short-Cut pane view appears on the “Go” Menu even when the Tree Pane view has been toggled on. Hence, the Go Menu becomes a reasonable approximation of Rox’s bookmark menu.

Curious thing is that when I Right-Clicked a folder and clicked “Create Symlink”, the pop-up menu of this version of Thunar offered the choice of creating either an Absolute or a Relative Link. That capability might not be available in all versions of Thunar.


Re: Thunar's "Bookmarks" and Symlinks

Posted: Fri Aug 05, 2022 1:05 am
by mistfire
mikeslr wrote: Thu Aug 04, 2022 11:56 pm

Following wiak's reply that thunar and pcman had book-marking capabilities, I booted into Quickpup64_22.01 --currently the only 'non-rox' Puppy I have-- did some examining of it and some online searching.
The reason it's so hard to find anything about thunar's bookmarking capabilities is that it doesn't provide them under that name. But it does have an adequate substitute once you figure out how to use it.
Note, the version of thunar used by Quickpup64_22.01 is 4.16.11. Copyrights on "About" reflect modifications thru 2020. So other versions may be different. And I don't doubt that there may be other mysteries of Thunar of which I am unaware.

At least on mine, when Thunar opens its Left-pane displays a ‘Tree’ view. Menu>View>Side Pane enables you to toggle into ‘Shortcuts.’ You have to be displaying Shortcuts. Then just drag a folder from the Right-pane into the Left-(Shortcut)-Pane. Well, almost. :roll: I frequently want to access /usr/share/pixmaps so I dragged that folder into the Left-Pane and was confronted by something like “You can’t move a system file into Trash”. :shock:

Perhaps I wasn't being careful enough about where the folder was being dragged. Chances are I might not be any more careful the next time. And as Thunar might not be so cautious about dealing with folders on /mnt/home I figured it might be best to create a symbolic link and drag that to the Shortcut pane.

Short-cuts on the Short-Cut pane view appears on the “Go” Menu even when the Tree Pane view has been toggled on. Hence, the Go Menu becomes a reasonable approximation of Rox’s bookmark menu.

Curious thing is that when I Right-Clicked a folder and clicked “Create Symlink”, the pop-up menu of this version of Thunar offered the choice of creating either an Absolute or a Relative Link. That capability might not be available in all versions of Thunar.

@mikeslr thank you for commenting I will try my new idea in my mind. I will try to create a simple tool for bookmarking on thunar

As a workaround:
To add a bookmark on Thunar type this command on terminal

Code: Select all

echo "file://[path] ">> $HOME/.config/gtk-3.0/bookmarks

Re: Thunar's "Bookmarks" and Symlinks

Posted: Fri Aug 05, 2022 1:17 am
by wiak
mikeslr wrote: Thu Aug 04, 2022 11:56 pm

Curious thing is that when I Right-Clicked a folder and clicked “Create Symlink”, the pop-up menu of this version of Thunar offered the choice of creating either an Absolute or a Relative Link. That capability might not be available in all versions of Thunar.

That's interesting. I may or may not have seen that rel link option. I can't remember now. But the problem for me is that I often want to put the rel symlink in a different folder and that is so simple to do with rox drag and drop. Maybe there is way in thunar or pcmanfm but I don't know it. Fact is, I always need to search online to work out thunar tricks, whereas for symlinks it is simply intuitive using rox so real pity it is not developed any more.