Let's compare filemanagers

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

User avatar
wiak
Posts: 4020
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 60 times
Been thanked: 1166 times
Contact:

Re: Let's compare filemanagers

Post 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.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
mikeslr
Posts: 2915
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 175 times
Been thanked: 893 times

Re: Let's compare filemanagers

Post 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.

User avatar
wiak
Posts: 4020
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 60 times
Been thanked: 1166 times
Contact:

Re: Let's compare filemanagers

Post 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

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
MochiMoppel
Posts: 1196
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 19 times
Been thanked: 415 times

Re: Let's compare filemanagers

Post 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.

User avatar
fredx181
Posts: 2878
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 336 times
Been thanked: 1200 times
Contact:

Re: Let's compare filemanagers

Post 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

Burunduk
Posts: 249
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 124 times

Re: Let's compare filemanagers

Post 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"
User avatar
fredx181
Posts: 2878
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 336 times
Been thanked: 1200 times
Contact:

Re: Let's compare filemanagers

Post 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"
User avatar
mikeslr
Posts: 2915
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 175 times
Been thanked: 893 times

Re: Thunar's "Bookmarks" and Symlinks

Post 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.

mistfire
Posts: 714
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 169 times

Re: Thunar's "Bookmarks" and Symlinks

Post 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
User avatar
wiak
Posts: 4020
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 60 times
Been thanked: 1166 times
Contact:

Re: Thunar's "Bookmarks" and Symlinks

Post 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.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
MochiMoppel
Posts: 1196
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 19 times
Been thanked: 415 times

Re: Let's compare filemanagers

Post by MochiMoppel »

fredx181 wrote: Thu Aug 04, 2022 8:18 pm

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"

Here your check fails for 2 reasons:
1) realpath-FULL is not installed in Puppy 5.6. Your check may have to start with checking the existence of realpath-FULL.

2) condition [ $(readlink $(command -v realpath)) = /bin/busybox ] can never be true because readlink returns relative path:

Code: Select all

# readlink $(command -v realpath)                
../../bin/busybox

This would work:
[ $(realpath $(command -v realpath)) = /bin/busybox ]
or
[[ $(readlink $(command -v realpath)) = */bin/busybox ]]

Didn't test the rest or your code.

Burunduk
Posts: 249
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 124 times

Re: Thunar's "Bookmarks" and Symlinks

Post by Burunduk »

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.

The problem is solved.

fredx181 wrote: Thu Aug 04, 2022 8:18 pm

So how about this then:

This attempt to use ln -r seems to work better but it's not needed anymore.

Code: Select all

#!/bin/bash

link=$(readlink "$1")
ln -srfT "$(dirname "$link")" "$1"
ln -sfT "$(readlink "$1")/$(basename "$link")" "$1"

Edit: Added an option this time. -T to the first ln command too.
Edit 2: Check if the argument is an absolute symlink; remove ./ from links with a target in the same directory.

Code: Select all

#!/bin/bash

[[ -h "$1" ]] || exit 1
link=$(readlink "$1")
[[ "$link" == /* ]] || exit 1

ln -srfT "$(dirname "$link")" "$1"
link=$(readlink "$1")/$(basename "$link")
ln -sfT "${link#./}" "$1"
Last edited by Burunduk on Fri Aug 05, 2022 4:18 pm, edited 2 times in total.
mistfire
Posts: 714
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 169 times

Re: Let's compare filemanagers

Post by mistfire »

@wiak
@mikeslr

Some clarifications:
QuickPup's Thunar was customized under CUSTOM ACTIONS. The create symlink pop-up menu was homegrown puppy script named create-sym which was written by @rg66 and @Geoffrey way back 2015 which was installed on Thunar's custom actions by editing /root/.config/Thunar/uca.xml or set it on Thunar's settings

User avatar
wiak
Posts: 4020
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 60 times
Been thanked: 1166 times
Contact:

Re: Let's compare filemanagers

Post by wiak »

mistfire wrote: Fri Aug 05, 2022 3:20 am

@wiak
@mikeslr

Some clarifications:
QuickPup's Thunar was customized under CUSTOM ACTIONS. The create symlink pop-up menu was homegrown puppy script named create-sym which was written by @rg66 and @Geoffrey way back 2015 which was installed on Thunar's custom actions by editing /root/.config/Thunar/uca.xml or set it on Thunar's settings

Ah, ok, that's good.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

TerryH
Posts: 615
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 151 times
Been thanked: 151 times

Re: Let's compare filemanagers

Post by TerryH »

I just manually updated a weedogged MassOS install to the latest 22.08 release, which uses XFCE4. I like using Thunar, but would have preferred it to have a dual pane mode. I was pleasantly surprised to see that the version of Thunar in the latest MassOS, now has split view mode. The version of Thunar, is now 4.17.9.

Edit: Further testing, Thunar now also allows under Advanced Setting, click to Execute shell scripts.

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

User avatar
puddlemoon
Posts: 189
Joined: Sun Sep 06, 2020 9:26 pm
Location: In between
Has thanked: 89 times
Been thanked: 64 times

Re: Let's compare filemanagers

Post by puddlemoon »

Another loving fan of Rox here...
I also find the workflow I have acquired over my time with Rox just feels clumsy with the other two by comparison. Yet they do have those bonuses as well like the side pane with "devices" and "places".

One feature in Rox I didn't see mentioned is the ability to select (highlight) a file (or directory) in Rox and then, in a terminal, press shift+insert to paste the full path. Very handy indeed.

Post Reply

Return to “Users”