I have a bash script which needs root privileges. I run it by sudo ./script.sh
.
I would like to create run configuration in IntelliJ IDEA, that runs this script with root privileges. It doesn't matter if it asks for password later.
Is it possible without running IDE as root or using tools like gksudo
or gksu
?
It was not super clear what Bash integration you use. Probably something like the plugin: BashSupport
The runtime configuration window for this plugin seems not to expose permission configuration.
Hence, a simple pragmatic solution could be to actually write two scripts.
sudo ./myscript.sh