Linux - move to trash

Moderators: XnTriq, helmut, cday, xnview, Dreamer

Post Reply
pim
Posts: 27
Joined: Sun Nov 06, 2011 12:11 pm

Linux - move to trash

Post by pim » Sat Sep 29, 2018 6:30 pm

Hello there.
What command is used in XnViewMP to move files to trash under Linux?
I'm asking because after fresh install the trash in XnView stopped working for me. Terminal output has shown nothing noticable.
Version 0.92 x64 (Sep 29 2018) - un*x

User avatar
xnview
Author of XnView
Posts: 30423
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux - move to trash

Post by xnview » Mon Oct 08, 2018 8:21 am

i use gvfs-trash
Pierre.

pim
Posts: 27
Joined: Sun Nov 06, 2011 12:11 pm

Re: Linux - move to trash

Post by pim » Sun Oct 14, 2018 4:25 pm

Well, gvfs-trash has been deprecated and is beeing replaced by:

Code: Select all

gio trash
However some conservative distros may still use the former command so it might be worth considering to use both commands in parallel at least for some time.

Thank you for support of Linux, Pierre and have a nice day.
Version 0.92 x64 (Sep 29 2018) - un*x

User avatar
pangwolin
Posts: 56
Joined: Sun Sep 25, 2016 7:53 pm

Re: Linux - move to trash

Post by pangwolin » Mon Nov 12, 2018 12:37 am

Hello, I have the same issue here. My system doesn't have gvfs-trash anymore, only gio-trash.

Files are moved to trash correctly, but they have the date of deletion appended to the base name, before their extension, and moved to trash afterwards.

I had noticed an issue in 0.90 recently, where files where not moved to trash at all, instead some strange 0 byte files were created in the trash. The deletion confirmation dialog box didn't seem to work, and the original file was still in its original path.

After updating to 0.92, the files are moved to trash properly, but the original path is not properly saved, and this strange date is appended to the file name as I said earlier.

Pierre, is there any plan to move to gio-trash eventually? Thanks, keep up the good work. :)

User avatar
xnview
Author of XnView
Posts: 30423
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux - move to trash

Post by xnview » Tue Nov 13, 2018 12:21 pm

pangwolin wrote:
Mon Nov 12, 2018 12:37 am
Pierre, is there any plan to move to gio-trash eventually? Thanks, keep up the good work. :)
yes it will be fixed
Pierre.

pim
Posts: 27
Joined: Sun Nov 06, 2011 12:11 pm

Re: Linux - move to trash

Post by pim » Mon Dec 10, 2018 6:54 pm

Hi pangwolin.
If the gio trash works for you correctly, you can use alias in the meantime.

Code: Select all

alias gvfs-trash='gio trash'
Put it into your ~/.bashrc file.
Version 0.92 x64 (Sep 29 2018) - un*x

User avatar
pangwolin
Posts: 56
Joined: Sun Sep 25, 2016 7:53 pm

Re: Linux - move to trash

Post by pangwolin » Tue Dec 11, 2018 1:21 am

Thanks for the suggestion, I had thought about it, but it doesn't seem to work. Albeit I haven't tried restarting my xorg server, which is probably what is missing. Is it really working on your end?

Either way, I found another workaround for now which works just fine for me.

Code: Select all

sudo vim /usr/bin/gvfs-trash && sudo chmod +x /usr/bin/gvfs-trash
-------------------------------------------
#!/bin/sh
exec gio trash "${@}"
------------------------------------------

pim
Posts: 27
Joined: Sun Nov 06, 2011 12:11 pm

Re: Linux - move to trash

Post by pim » Tue Dec 11, 2018 5:40 pm

No need to restart xorg. Alias should work right away. Anyway you have another working solution so anybody with similar issue can try what suits him better.
Version 0.92 x64 (Sep 29 2018) - un*x

User avatar
xnview
Author of XnView
Posts: 30423
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux - move to trash

Post by xnview » Tue Dec 18, 2018 4:46 pm

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.

Post Reply