I want a simple semi-safe command that encrypts a file using gpg symmetric encryption and then remove the original file. In the terminal this command works fine:
gpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric <file> && rm <file>
where <file> is the file to be encrypted (and deleted). This works fine in the terminal, but when I try to do a custom action in Thunar in this way
xfce4-terminal -e gpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric %f && rm %f
and try to use this action in Thunar, nothing happens. Why, and is there some way to debug thunar custom actions?
xfce4-terminal -e gpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric %fwork? – muru Apr 03 '16 at 10:12xfce4-terminal -x gpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric %f? – muru Apr 03 '16 at 10:34xfce4-terminalcommand and callgpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric %f && rm %fdirectly. – Thomas Apr 03 '16 at 10:39&&:xfce4-terminal -x gpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric %f '&&' rm %f– muru Apr 03 '16 at 10:44xfce4-terminal -x gpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric "$1 && rm "$1"in~/bin/foo.sh), and use/home/user/bin/foo.sh %fas the action. What happens? – muru Apr 03 '16 at 10:59xfce4-terminal -x gpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric "$1 && rm $1"` didn't work, nothing happens
– Bengt Olsson Apr 03 '16 at 11:17#!/bin/bash xfce4-terminal -x gpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric "$1" && rm "$1"same behavior as before, deleted file only – Bengt Olsson Apr 03 '16 at 11:24bash -c "gpg --passphrase-file /home/xxx/.gnupg/sympass --symmetric %f && rm %f"? – terdon Apr 03 '16 at 11:39thunarfrom there. Then, try the custom action. If it fails, you should see an error message in the terminal you launched it from. What does it say? – terdon Apr 03 '16 at 12:56