Possible bug? Permanently Remove filenames with a space.

Forum rules
Before you post please read this

Possible bug? Permanently Remove filenames with a space.

Postby igor83 on Thu Dec 13, 2012 5:06 pm

On Linux Mint Maya Xfce, in Thunar, the Permanently Remove option will not remove filenames that have a space in them. It will go through the motions of deleting the file, including the user confirmation, but no file with a space (or possibly other atypical characters) in it will be removed.

By editing /usr/bin/mint-xfce-delete, I managed to fix this behavior by replacing this line:

Code: Select all
rm -rf "$file" | tee | sleep 3 |(zenity --title="$title   " --progress --pulsate --auto-kill --auto-close --text "<b>$title1      </b>" )


with these lines:

Code: Select all
until [ "$*" = "" ]
do
  rm -rf "$1"
  shift
done
#rm -rf "$file" | tee | sleep 3 |(zenity --title="$title   " --progress --pulsate --auto-kill --auto-close --text "<b>$title1      </b>" )


I am not sure why rm -rf "$file" won't work in instances where the filename has a space, because the syntax appears correct, as $file has been defined earlier as "$*", which should include all the user-selected files and folders passed from Thunar. Somehow the space in the filename jams the works.

I am new to Linux, so perhaps someone can explain this for me. If I am mistaken and there is something amiss with my system, I'd like to know that as well.
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Linux Mint is funded by ads and donations.
 

Re: Possible bug? Permanently Remove filenames with a space.

Postby xenopeek on Thu Dec 13, 2012 5:21 pm

I don't have Xfce installed right now; could you run the following command to find which package installs the /usr/bin/mint-xfce-delete file?
Code: Select all
dpkg -S mint-xfce-delete
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14987
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Possible bug? Permanently Remove filenames with a space.

Postby igor83 on Fri Dec 14, 2012 3:10 am

Vincent Vermeulen wrote:I don't have Xfce installed right now; could you run the following command to find which package installs the /usr/bin/mint-xfce-delete file?
Code: Select all
dpkg -S mint-xfce-delete


Thanks for the reply. The output of that command is:
Code: Select all
igor@igorland ~ $ dpkg -S mint-xfce-delete
mint-artwork-xfce: /usr/bin/mint-xfce-delete
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Re: Possible bug? Permanently Remove filenames with a space.

Postby xenopeek on Fri Dec 14, 2012 5:02 am

Hmmm. This package doesn't have a repository on GitHub. You could post a bug for this on Launchpad: https://bugs.launchpad.net/linuxmint
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14987
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Possible bug? Permanently Remove filenames with a space.

Postby igor83 on Fri Dec 14, 2012 12:56 pm

Vincent Vermeulen wrote:Hmmm. This package doesn't have a repository on GitHub. You could post a bug for this on Launchpad: https://bugs.launchpad.net/linuxmint


Done. This being my first time, I wasn't quite sure whether my analysis was up to snuff and wanted to pass it through the forum in case I had overlooked something simple. Now I'm fantasizing about getting my little patch included in the next version of Linux Mint Xfce. :P
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Re: Possible bug? Permanently Remove filenames with a space.

Postby yerc on Sat Dec 15, 2012 6:30 pm

igor83 wrote:
Vincent Vermeulen wrote:Hmmm. This package doesn't have a repository on GitHub. You could post a bug for this on Launchpad: https://bugs.launchpad.net/linuxmint


Done. This being my first time, I wasn't quite sure whether my analysis was up to snuff and wanted to pass it through the forum in case I had overlooked something simple. Now I'm fantasizing about getting my little patch included in the next version of Linux Mint Xfce. :P

The 32-bit edition installed on my netbook does not have this issue.
Your signature line tells me you have LM 13 xfce 64-bit edition. Perhaps you might want to update your bug report with this information? :)
yerc
Level 1
Level 1
 
Posts: 22
Joined: Wed Mar 30, 2011 2:44 pm

Re: Possible bug? Permanently Remove filenames with a space.

Postby igor83 on Sat Dec 15, 2012 10:48 pm

yerc wrote:
igor83 wrote:
Vincent Vermeulen wrote:Hmmm. This package doesn't have a repository on GitHub. You could post a bug for this on Launchpad: https://bugs.launchpad.net/linuxmint


Done. This being my first time, I wasn't quite sure whether my analysis was up to snuff and wanted to pass it through the forum in case I had overlooked something simple. Now I'm fantasizing about getting my little patch included in the next version of Linux Mint Xfce. :P

The 32-bit edition installed on my netbook does not have this issue.
Your signature line tells me you have LM 13 xfce 64-bit edition. Perhaps you might want to update your bug report with this information? :)


It is interesting that you say the 32-bit version does not have this issue, because I've noticed other problems with launching batch files from Thunar as well. I have noticed that batch files may have a maximum size of one line if launched from Thunar. Any more, and they won't work at all. That seemed like such a severe problem that I was suspicious I might be doing something wrong. Can you get a batch file to launch as a custom action from Thunar that executes more than one line?
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Re: Possible bug? Permanently Remove filenames with a space.

Postby yerc on Sat Dec 22, 2012 6:28 pm

igor83 wrote:It is interesting that you say the 32-bit version does not have this issue, because I've noticed other problems with launching batch files from Thunar as well. I have noticed that batch files may have a maximum size of one line if launched from Thunar. Any more, and they won't work at all. That seemed like such a severe problem that I was suspicious I might be doing something wrong. Can you get a batch file to launch as a custom action from Thunar that executes more than one line?

MD5 Checksum action item (with multiple lines) does what it's meant to here.
Does it work in your 64-bit install ?
yerc
Level 1
Level 1
 
Posts: 22
Joined: Wed Mar 30, 2011 2:44 pm

Re: Possible bug? Permanently Remove filenames with a space.

Postby igor83 on Sun Dec 23, 2012 11:35 pm

yerc wrote:
igor83 wrote:It is interesting that you say the 32-bit version does not have this issue, because I've noticed other problems with launching batch files from Thunar as well. I have noticed that batch files may have a maximum size of one line if launched from Thunar. Any more, and they won't work at all. That seemed like such a severe problem that I was suspicious I might be doing something wrong. Can you get a batch file to launch as a custom action from Thunar that executes more than one line?

MD5 Checksum action item (with multiple lines) does what it's meant to here.
Does it work in your 64-bit install ?


Note: to be clear, the above problem you are referring to, I have only verified in Xubuntu 12.10, not Linux Mint Maya Xfce.

Xubuntu has some funky ways of its own.

From Thunar, I've tested a custom action that calls a shell script with the following lines:

Code: Select all
 #!bin/sh
vlc "$1" & sleep 5 && xscreensaver-command -activate


This script is fully documented here. If I add lines above the second one, such as an if...then, checking for whether the selected file exists in order to avoid the dreaded VLC file-not-found endless loop (*if you have auto-rewind selected as a playlist option in VLC), well Linux Mint Maya Xfce will not accept any lines more than two, as a custom action from Thunar, at least in my testing. Although it is quite possible I'm overlooking something basic, as I'm a Linux novice!

Overall, there are things I like about Xfce, but I really do miss a lot of the usability and convenience I found in Mate, and didn't have quite so many unusual issues in Mate to my recollection. I know that another fellow has been calling Nadia Xfce the "worst release ever;" that seems pretty harsh. But, when I got myself a laptop there was no question which distro/desktop to install. Linux Mint Maya Mate, and I'm very pleased with it. But I will retain Xfce on my desktop because I've spent so many hours customizing it that it's about as good as Mate in many respects. If I could get this quirk with shell scripts ironed out, and figure out why Xfce won't permanently delete files, that would be nice.

Today it occurred to me that Xfce may be choking because of some atypical system configuration parameter, such as noatime in every entry in my fstab, or tmpfs for /tmp. The perm. remove may depend upon access time or something like that and may break because I optimized the system for efficiency. That would also explain why nobody else has raised their hand and said, "Yeah, this bug happened to me too."
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Linux Mint is funded by ads and donations.
 

Return to XFCE

Who is online

Users browsing this forum: No registered users and 1 guest