I use Qt-Creator 2.5.2 SDK to develop C code on Linux. How is it possible to run the codes as root when it is run from the SDK interface (e.g., ctrl + R)?
The following actions were recommended on Qt support forum:
In Qt Creator, add remote Linux device in Options -> Devices. Set its address as localhost and user as root. Create a pair of authentication keys and paste public key to /root/.ssh/authorized_keys
.
Then clone Desktop kit in Options -> Kits and set the device for new kit to the device you've created on previous step.
Now, when you start debugging, Qt Creator should automatically connect over ssh to localhost as root, start gdbserver and perform debugging.
It works for running without debugging too.
Perhaps you should set up installation of your program on remote host, but that's a different story and it's done differently for Qmake and QBS.
https://forum.qt.io/post/185983