I\'m trying to run a program written in C++ by using CLion v1.2 as super user. Anyone here knows how to run it as superuser? I\'m using CMake.
You can create a bash script to help you. For example, run.sh:
run.sh
#!/usr/bin/env bash echo $LOGIN_PASSWD | sudo -S yourExecutable --with=some-arguments
Don't forget to chmod a+x run.sh, and export the password of current account as an environment variable in Run/Debug Configurations.
chmod a+x run.sh