Open kiers opened 10 years ago
That is/was correct. Today's Release should have fixed the issue. Let me know if it works for you.
Hi Alfcx, afraid not (note: I commented out the config.ini and language selection portions of the shell file)
I've been tinkering with all manner of flag settings in Nemo Actions (like quote=double, or separator=",", but they simply do not work in Linux Mint 17. I think it's a bug.
Hi kiers
1.You have zenity and pdftk installed on your system, do you?
sudo apt-get update
sudo apt-get install zenity pdftk
If yes:
I also think, there's issue with Nemo Actions in Linux Mint 17. I'm on Linux Mint 16 and with yesterday's changes the pdf-merger script works with spaces in directory-names and filenames.
I may can help you with an explanation of the changes I did yesterday.
pdf-merger.nemo_action
Exec=<"pdf-merger/pdf-merger.sh" %F>
Quote=double
flag (without this setting it doesn't work on Linux Mint 16)pdf-merger.sh
The pdtk command now works with all the arguments (filenames) passed by the pdf-merger.nemo_action in exactly the form they are passed ("$@").
pdftk "$@" cat output "$dir/$OUTPUTNAME.pdf" ;
As a result of the changes above I also had to change the variables (inputfiles and dir) at the beginning of the script.
Here's a complete overview on the changes.
I also experimented with the seperator=...
flag without success.
In my opinion the lack of support of filenames with spaces can only lay in the way nemo-actions passes the arguments to the shell script (because the shell script now uses the arguments exactly in the form they are passed by nemo-actions, as you can see above). Another explanation would be, that there was a change in pdftk, but that's way less likely.
I really have no idea ho to resolve this issue. I've made the experience that nemo-actions is poorly documented. So it's a nice thing if it works, but a pain in the a\ if it doesn't.
I hope my thoughts above can help you to find a solution. I'm interested in every progress you make, so feel free to post it.
Sincerely Alfcx
Hello Alfcx,
Thank you for your timely responsive help in this matter. I am surprised there is so much change between Mint 16 and Mint 17! (for the worse too)! (have not played with Mint 15 (which introduced/debut nemo-actions) nor Mint 16.)
I agree, it's not pdftk.
The interesting bit for Mint 17 is that the "full" filenames with path generated from %F are presented with spaces (in basename) that are NOT escaped (at least in Mint 17, have not tried others)
However, this of itself is not too much problem b/c user can process arguments (stream) via sed to correctly "escape" spaces in own wrapper script (mergepdf.sh) to correct this.
Nonetheless, apparently, according to Mr Webster (admin for nemo i presume) :
"So, no matter what, if you use (with the double quotes): "/home/mtwebster/foo\ bar/more\ foo/test.py" the escape characters do not get absorbed, and you have an invalid path there. The same goes with single quotes (which is supposed to behave this way anyhow)." (https://bugs.launchpad.net/linuxmint/+bug/1330225)
Hi Kiers
I had a look at your nemo-actions bug description at launchpad.
According to that your exec is Exec=./wrapper.sh %F
. May it would help, if you gave the following a try: Exec=<./wrapper.sh %F>
or Exec=<"./wrapper.sh" %F>
.
Alfcx
Hello, Putting <....> not required b/c full path, putting " " results in script not being called at all.
actually I had the whole path to wrapper.sh starting from root, in the Exec...ie. /home/...etc (this is not shown in launchpad for brevity)
plus i had plenty of debug output (echo "$@" >> to file etc) so there was no doubt shell was being executed.
I am still shocked how something so simple and ALREADY WORKING in Mint 15,16 is NOT in 17. Why would be broken the doublequote functionality within nemo actions file? amazing.
Invoking the wrapper in shell with command line argument string...WORKS Invoking the wrapper by passing THE SAME %F from pdftk...NO Have you loaded Mint 17 yourself?
Hi kiers I haven't loaded Mint 17 yet. I recently switched to Arch64 with gnome3. I think I'll stay with that, but I'll try out Mint 17 in a Virtual Box as soon as possible.
I've had a similar problem on Debian Testing w/Cinnamon recently. It can be solved by using xargs to handle the arguments. I don't have the code with me at the moment though.
I believe this script not handle spaces in names, correct? Any work around possible to handle filenames\ with\ spaces?