LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 02-04-2024, 11:16 AM   #1
grumpyskeptic
Member
 
Registered: Apr 2016
Posts: 472

Rep: Reputation: Disabled
Thunar file manager - add duplicate as a new action, put recent folders in copy/move menus, and questions about verify,


Using Linux Mint Cinnamon Virginia on an OEM desktop computer.

I have successfully added "Copy To" and "Move To" the right-click menu by following the instructions given here https://blog.laczik.org/add-copy-to-...-file-manager/

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 -

https://www.reddit.com/r/linuxmint/c...les_with_nemo/

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.
 
Old 02-05-2024, 06:05 AM   #2
grumpyskeptic
Member
 
Registered: Apr 2016
Posts: 472

Original Poster
Rep: Reputation: Disabled
What I've managed to find out so far -

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.
 
Old 02-07-2024, 01:43 PM   #3
kreemoweet
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Rep: Reputation: Disabled
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.
 
Old 02-09-2024, 08:30 AM   #4
grumpyskeptic
Member
 
Registered: Apr 2016
Posts: 472

Original Poster
Rep: Reputation: Disabled
As far as I know the only two available Linux file copying commands that could be used are cp and rsync.

cp seems to be rather crude, for example it always overwrites files with the same name.

rsync - have not yet studied it https://rsync.samba.org/ftp/rsync/rsync.html

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.
 
Old 02-10-2024, 07:42 AM   #5
grumpyskeptic
Member
 
Registered: Apr 2016
Posts: 472

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by grumpyskeptic View Post
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.
 
Old 02-13-2024, 04:57 AM   #6
grumpyskeptic
Member
 
Registered: Apr 2016
Posts: 472

Original Poster
Rep: Reputation: Disabled
"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.
 
Old 02-29-2024, 08:27 AM   #7
grumpyskeptic
Member
 
Registered: Apr 2016
Posts: 472

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Find And Move Files In Xubuntu File Manager (Thunar) LXer Syndicated Linux News 0 05-25-2021 09:04 PM
Thunar custom action: navigate to directory instead of opening new window. Teufel Linux - Desktop 1 04-04-2013 05:20 PM
LXer: Delete directly without using/needing Trash in Xfce’s Thunar file manager with a Custom Action LXer Syndicated Linux News 0 03-13-2013 01:31 AM
Shell Script to compare folders,Sub-Folders and Sub-Sub-Folders unix_72427 Programming 8 08-08-2012 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration