How can I use sudoedit in thunar custom action?

asked 2017-04-30 10:41:54 -0500

ThanosApostolou gravatar image

I'm using fedora 26 xfce. In order to edit root files I use a custom action with the command beesu gedit %f.

Recently the kde team stopped dolphin working with kdesu for security reasons and urged everybody to use sudoedit instead. So, I thought to use sudoedit with thunar as well for security reasons. The command I tried is this:

echo $(zenity --password) | SUDO_EDITOR="gedit -s" sudoedit -Se %f

However it doesn't work. If I run the command from terminal, replacing %f with the file's path then it works. P.S. gedit -s is needed instead of gedit because if gedit is already open it doesn't work at all.

edit retag flag offensive close merge delete