Does any one know how to make custom actions not appear for particular folders

Message
Author
User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: Does any one know how to make custom actions not appear for particular folders

#11 Post by fehlix »

dolphin_oracle wrote: Tue Oct 30, 2018 4:33 pm
fehlix wrote: Tue Oct 30, 2018 4:29 pm What is actually the use case for OPs question?
Would hide the "specific item" by using thunars hidden-feature, provide a workaround?
My use case is to hide the change ownership functions for certain folders.
Ahh thanks. So we back to Jerry's proposal and "hide"/disable change ownership within the actual script itself for certain folders with a given "pattern", as Thunar is not able to accept ignore pattern. Which will still show the Thunar action,
but will not do harm to those folders.
Can you give a list of those folder names, perhabs I have a look to adjust the actions ...
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
dolphin_oracle
Developer
Posts: 20032
Joined: Sun Dec 16, 2007 1:17 pm

Re: Does any one know how to make custom actions not appear for particular folders

#12 Post by dolphin_oracle »

$HOME and /

especially since if you just open the file manager, and are in $HOME, even without a file selected, $HOME is selected (as skiddoo pointed out).
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: Does any one know how to make custom actions not appear for particular folders

#13 Post by fehlix »

dolphin_oracle wrote: Tue Oct 30, 2018 5:25 pm $HOME and /
Change Owner ship to Root
from

Code: Select all

gnome-keyring-daemon -r -d;gksu "chown -R root:root %F"
to

Code: Select all

bash -c 'declare -A F;F=([$HOME]=x [/]=x); declare -a D; for f in "$@"; do [ x${F[$f]} != xx ] && D+=("$f"); done; [ ${#D} == 0 ] && exit; gnome-keyring-daemon -r -d; gksu "chown -R root:root ${D[@]}" ' "" %F
and will ignore $HOME and /
and will do nothing if no other selected.
:puppy:

EDIT: cleared some test echo's
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: Does any one know how to make custom actions not appear for particular folders

#14 Post by fehlix »

Would recommend to add "sudo -k" in front of gksu, to clear sudo pw-cache as user can opt to use gksudo triggered by gksu.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Post Reply

Return to “General”