LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-02-2018, 10:32 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,619

Rep: Reputation: 128Reputation: 128
Thunar - Unable to find or create Trash Directory


Using Slackware64 14.2, KDE, Thunar 1.6.10. I have a network shared drive mounted as:
Code:
ohprsstorage:/mnt/RAID/public /Xdrive nfs rw 0 0

# Exported on ohprsstorage as:

/mnt/RAID       192.168.0.0/24(rw,root_squash,all_squash,anonuid=1001,anongid=301)
With Thunar, trying to delete this file gives the message, "Unable to find or create Trash Directory" (I can SHFT-DEL the file). Dolphin does not give this error when deleting and is apparently able to move to Trash OK.

Is there a solution for Thunar or do I just need to go back to Dolphin. I like Thunar because it is the most "Windows Explorer-like" file manager I've found, important for trying to convert users from Windows to Linux.

Last edited by mfoley; 02-02-2018 at 11:51 PM.
 
Old 02-03-2018, 05:04 AM   #2
sidzen
Member
 
Registered: Feb 2014
Location: GMT-7
Distribution: Slackware64, xenialpup64, Slacko5.7
Posts: 203

Rep: Reputation: 36
KDE uses Dolphin -- suggest sticking with it!

Haven;t messed with RAID since W2k and scuzzy hdds!
 
Old 02-03-2018, 02:06 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,619

Original Poster
Rep: Reputation: 128Reputation: 128
Well, yes, I know all about Dolphin and will revert to that if necessary. However, if there's a solution to the "Trash" problem I'd like to try sticking with Thunar for reasons stated. It is a delicate thing trying to 'convert' office staff from Windows to Linux.

Anybody?
 
Old 02-03-2018, 05:50 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 11,617
Blog Entries: 9

Rep: Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076
Quote:
Originally Posted by mfoley View Post
With Thunar, trying to delete this file gives the message, "Unable to find or create Trash Directory" (I can SHFT-DEL the file).
this is by design.
thunar does not create trash directories on remote and removable drives.
and moving the files to another physical hard drive would be very resource intensive.
i'm not sure if it is a setting that can be changed.
i once read a lengthy discussion about the pro's and con's of this, iirc the gist was that neither solution is 100% satisfactory.
 
Old 02-03-2018, 06:25 PM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Quote:
Originally Posted by ondoho View Post
this is by design.
thunar does not create trash directories on remote and removable drives.
and moving the files to another physical hard drive would be very resource intensive.
i'm not sure if it is a setting that can be changed.
i once read a lengthy discussion about the pro's and con's of this, iirc the gist was that neither solution is 100% satisfactory.
Are you sure? I once deleted selected files in thunar from a sdcard using keyboard delete key and it created a .trash directory in the card (which the camera didn't like and didn't accept the card, deleting the .trash directory fixed it)

Since that I either open terminal here and rm the files or right click on selected files and choose delete from menu (that removes files without moving them in .trash)
 
Old 02-03-2018, 07:15 PM   #6
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,619

Original Poster
Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by ondoho View Post
this is by design.
thunar does not create trash directories on remote and removable drives.
and moving the files to another physical hard drive would be very resource intensive.
i'm not sure if it is a setting that can be changed.
i once read a lengthy discussion about the pro's and con's of this, iirc the gist was that neither solution is 100% satisfactory.
Hmmm, Dolphin deletes the file just fine and it's solution is "100% satisfactory" as far as I can tell; resource intensive or not.

I too have seen numerous solutions a non-tech user is unlikely to implement including creating a Trash-uid file on each volume where uid is the UID of the user wanting to delete files on that volume. Not only is this fiddley/techy, but as you can see from my OP this volume is always mapped to user 1001.

Perhaps I'm stuck with sidzen's "back to Dolphin" solution?
 
Old 02-03-2018, 08:54 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Maybe delete the file from right click pop menu in thunar?
 
Old 02-04-2018, 11:26 AM   #8
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,619

Original Poster
Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by keefaz View Post
Maybe delete the file from right click pop menu in thunar?
Yes, that works -- same as SHFT-DEL. Still requires an extra step or keystroke from the user. Both of those mechanisms permanently delete the file instead of copying to Trash, which would be fine as no one ever uses the trash.

In fact, I wonder if there is a config setting in Thunar to make the DEL key always do a permanent deletion?

Last edited by mfoley; 02-04-2018 at 09:59 PM.
 
Old 02-04-2018, 01:55 PM   #9
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
In xfce session, open Appearance, click on Settings tab and check Enable editable accelerators
Open a Thunar window, select a file then go to Edit menu and position the mouse cursor over the delete action, press delete key
Now delete key is assigned for Thunar delete action

In another window manager session I don't know, I think you have to manually edit ~/.config/Thunar/accels.scm
Close all thunar windows, open ~/.config/Thunar/accels.scm then find the line
Code:
; (gtk_accel_path "<Actions>/ThunarStandardView/delete" "")
And edit it so it becomes
Code:
(gtk_accel_path "<Actions>/ThunarStandardView/delete" "Delete")
save file

Last edited by keefaz; 02-04-2018 at 01:59 PM.
 
Old 02-04-2018, 10:51 PM   #10
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,619

Original Poster
Rep: Reputation: 128Reputation: 128
keefaz: didn't work, but that smells like the right idea! Here's the problem. As soon as I fire up Thunar it reset the accels.scm to

(gtk_accel_path "<Actions>/ThunarStandardView/delete" "")

i.e. it removes my "Delete" setting.

This has to be a Thunar thing, not a desktop thing. Any idea on how to keep the setting?
 
Old 02-05-2018, 04:08 AM   #11
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Maybe you have to log out X session and edit file from Linux console

Or do it the xfce way, stay in KDE, open a terminal and open xfce Appearance with command:
Code:
xfce4-appearance-settings
Then try the steps I described above for xfce.
Don't forget to make sure Thunar is not running before
 
Old 02-05-2018, 07:38 PM   #12
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,619

Original Poster
Rep: Reputation: 128Reputation: 128
keefaz: I was able to run xfce4-appearance-settings and do as you instructed, but that didn't work either; probably because I'd need to actually be running xfce for the 'editable accelerators' mechanism to work.

However, I did find a solution! The problem I was having was that as soon as Thunar was started, it for some reason reset the ~/.config/Thunar/accels.scm file back to its initial state, thus losing any changes made to that file. Not sure why this happens or if there is a way to stop it (if anyone knows, please post). So, my solution was to make that file owned by root with a+r permissions. I reasoned that if the logged in user is unable to change the file the settings would 'stick'. And sure enough, that worked! accels.scm retains the setting and hitting the delete key gives the "are you sure message", and if the user clicks "Delete", the file is removed, no "Unable to find or create Trash Directory" message. This will work for me.

Thanks for that tip on accels.scm. I was *sure* there was some way to make Thunar work with KDE and network files!

Last edited by mfoley; 02-05-2018 at 07:40 PM.
 
Old 02-06-2018, 04:04 AM   #13
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Or another way is to use xwmconfig before starting X and choose Xfce, do the edit menu steps then log out and use xwmconfig to reset to KDE
 
Old 02-07-2018, 12:36 AM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 11,617
Blog Entries: 9

Rep: Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076Reputation: 3076
Quote:
Originally Posted by ondoho View Post
thunar does not create trash directories on remote and removable drives.
and moving the files to another physical hard drive would be very resource intensive.
i'm not sure if it is a setting that can be changed.
i once read a lengthy discussion about the pro's and con's of this, iirc the gist was that neither solution is 100% satisfactory.
Quote:
Originally Posted by keefaz View Post
Are you sure? I once deleted selected files in thunar from a sdcard using keyboard delete key and it created a .trash directory in the card (which the camera didn't like and didn't accept the card, deleting the .trash directory fixed it)
actually i'm NOT sure, but the second part of that post is true.
i think it's not thunar doing this, but reading the freedesktop (?) trash specs, you would find what i was talking about.
in retrospect, i'd guess there is a setting in some lower-level software (gvfs?) that would allow to switch between creating trash dirs on removable drives, or not.
 
Old 02-07-2018, 08:32 AM   #15
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,619

Original Poster
Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by ondoho View Post
actually i'm NOT sure, but the second part of that post is true.
i think it's not thunar doing this, but reading the freedesktop (?) trash specs, you would find what i was talking about.
in retrospect, i'd guess there is a setting in some lower-level software (gvfs?) that would allow to switch between creating trash dirs on removable drives, or not.
Well, I don't particularly care if the Trash folder is on the same drive from which I am deleting the file, nor can I imagine the "overhead" is all that onerous. As I mention earlier, however Dolphin handles this would be fine as there is no "unable to create Trash ..." message with it. It should also be noted that Windows does not move files from network mapped drives to the Recycle Bin. They are just permanently deleted, which is fine too. In fact, this ends up being the solution I chose with keefaz's help. Although this also permanently deletes local files, that's not such a big deal as we do have daily backups.

Another interesting bit ... I'm using Thunar on my personal computer (same Slackware, etc.) and I do not have any issues deleting files from my network drive. This could very well be because I actually own the files on the network drive whereas the files on the drive from this post are "owned" by a different user (although the deleting user does have group rw permissions). Also, the drive in this post is nfs mounted whereas my personal drive is cifs mounted. Hmmm.

Last edited by mfoley; 02-07-2018 at 09:09 AM.
 
  


Reply

Tags
create, thunar, trash


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] No Trash or automount in Thunar under Fluxbox xj25vm Slackware 10 11-01-2016 09:47 AM
[SOLVED] Xfce/Thunar trash disappeared ahc_fan Linux - Software 6 08-27-2015 05:08 AM
[SOLVED] Thunar 1.4.0 and Fluxbox on -current: no trash or automount usb devices andrew.46 Slackware 29 09-05-2012 02:59 AM
Find current Thunar directory from CLI? jsteel Linux - General 3 04-21-2011 02:05 AM
Trash can thunar Tripsun Linux - Desktop 1 03-08-2011 09:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:45 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration