You are not logged in.
I would like to make a Thunar custom action that can remove files with the append only attribute.
I know I would need chattr -a and then a rm command.
Ubuntu-Mate 24.04
Offline
Since chattr requires root privileges, you could embed gksudo into your command, like:
for file in %F; do gksudo "chattr -a '"$file"'; rm '"$file"'"; done
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
It did not work.
gksudo box came up ok. Appearance conditions are checked off for text,audio,video,image, and other files.
File attributes are -rw-rw-r--
Ubuntu-Mate 24.04
Offline
Hrmmm. Try it this way. Create a shell script with the following content:
#!/bin/bash
for file in "$@"
do
chattr -a "$file"
rm "$file"
done
...and make it executable.
For the custom action command, set it to "gksudo /path/to/your/script %F"
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks a lot. Worked perfectly. :-)
Ubuntu-Mate 24.04
Offline
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 529.61 KiB (Peak: 531.01 KiB) ]