Thunar file manager - add duplicate as a new action, put recent folders in copy/move menus, and questions about verify,
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Question 1: How could I add a Duplicate command, which would copy myfile.abc to myfile(copy).abc in the same folder? (Having myfile(copy2).abc and myfile(copy3).abc..... and so on would be useful if some copies already exist).
Question 2: To my mind, the "killer app" of any file manager is the ability to remember recently used folders (not files). Saves a huge amount of repetitive clicking. How can I add Recent folders to the small location menu that appears after clicking "Copy to" and "Move to"?
The other "killer app" that Thunar has is having an option in the settings to automatically compare the original and the copied file to verify that they are identical, but -
Question 3: Will verification also always happen when using Copy To and Move To?
Question 4: Is the verifiction always of the actual disk, eg a pen drive, not just of a memory cache?
Question 5: The worst thing about Nemo file manager and probably others is that when it indicates that it has finished copying some big files to another disk, eg a pen drive, then it is not telling the truth. It has only copied them to a memory cache, not the actual disk. See more complaining here -
Even if you wait ten minutes after the copying is said to have finished, and then eject the pen drive, often not all the files have been completely copied. Is there any way within Thunar to stop this happening?
Thanks.
Last edited by grumpyskeptic; 02-05-2024 at 06:06 AM.
Q1 There is already a hidden Duplicate command. Highlight the file, then look in the Edit menu at the Toolbar.
Q3 No. They just use the cp command, which also over writes any file with the same name, and which is probably not the usual method used by Thunar. Adding the "-i" option to the command line has not made any difference.
Would be nice if file managers offered you a choice of which file copying/moving program to use, and someone wrote a low-level file copying program with options that tackled all the issues above.
I only heard of Zenity ten minutes ago and do not understand it.
When playing with Double Commander I saw that it had a double progress bar, which could refer to the disk and the cache, but I find double panes difficult to use, and as far as I know it does not remember recently used folders.
Last time I used Windows I used XYplorer, but it is not available for Linux, and I understand there are problems using it with Wine.
Last edited by grumpyskeptic; 02-05-2024 at 06:22 AM.
You can write your own Thunar "Custom Actions" using whatever program with whatever options you desire, and have it appear in the context menu for all suitable items in Thunar.
I think it is rather expected of the average Linux user to have the ability to do such things. Many have already been written and shared online for all to use.
Zenity is very useful in making such custom actions. Consult "man zenity" in your console, or online search if not yet installed on your system.
Be aware that Zenity is often replaced in later distributions by the similar YAD program: http://smokey01.com/yad/
If you use Thunar's ability to create "Bookmarks" (which appear in the "Places" sidepane), I'm pretty sure they will appear in the standard GTK file selection dialogs.
The abominable "Recent Files" is one of the first things I go out of my way to disable in Thunar and whatever else I possibly can.
In any case it seems that Thunar will never report back to the user any feedback from cp or rsync, but just ignores it.
(There is a graphical front-end to rsync called grsync, and it includes an option to copy individual files rather than folders. https://en.wikipedia.org/wiki/Grsync )
Recent files is useless, but recent folders would be extremely useful. Not just when you want to copy a file to a recent destination, but to go there in the first place.
What language are Thunar custom actions written in please?
The most important thing is telling you when files have finished copying to the actual disk rather just the memory cache. Often I eject the USB pen drive after copying of several large files appears to have finished, only to later find that the files are incomplete. No warning was given.
Last edited by grumpyskeptic; 02-09-2024 at 10:19 AM.
Question 4: Is the verification always of the actual disk, eg a pen drive, not just of a memory cache?
Yes, probably.
An experiment copying several medium-sized files to a usb pen drive, then as soon as possible safely removing the drive, then unplugging the drive and re-plugging it, and then checking to see if those copied files are identical with the originals, does suggest that the verification is of the disk rather than the cache. Now I shall have to try it with several large files, and on a usb drive with a different format.
Last edited by grumpyskeptic; 02-10-2024 at 07:49 AM.
"fsync" is something that can be appended to rsync to get the contents of the memory cache written to the physical disk for every file. Don't know how you would then do a checksum.
"sync" is a separate command that also forces the contents of the memory cache to be written onto the physical disk. It should be easy to add it as an extra line to each of these commands here https://blog.laczik.org/add-copy-to-...-file-manager/ although I would still like it to be verified, and in any case cp does bad things like overwriting existing files without any warning.
I've no idea if or how Zenity can be used to show the user error-messages and other feedback.
Edit: After copying some files to USB pen drive or anywhere else you can check if the file manager has actually finished copying to the physical disk by opening the Terminal and typing in
Code:
sync
If it has finished copying it will immediately show the command prompt again. If it has not finished copying you will see a blinking cursor until the copying is truly finished.
I tried this after copying a few files with Nemo. Dishonest Nemo had indicated it had finished copying, but it took several more minutes until copying to the physical disk was completed.
Last edited by grumpyskeptic; 02-18-2024 at 06:50 AM.
I tried copying several large files to a USB pen drive with Thunar, and got similar results.
Thunar quite quickly indicated that it had copied all the files and verified them. But using sync suggested that it was still secretly copying the files to disk for several minutes more, so it could not have verified them to disk either.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.