Run debug program as root, or start CLion as root?

I have a program that requires root access. I can run it from the command line in the Debug directory - sudo ./MyProject

I would like to run it using the CLion debugger. Is there a way to start the program as root? Or launch CLion as root on Linux? I can only seem to find the install script. 

0

Hi!

You can launch CLion as root via

sudo ./clion.sh

As for the debugging as root we have a feature request in the tracker: https://youtrack.jetbrains.com/issue/OC-7325. Please upvote.

2
Avatar
Permanently deleted user

Thanks, Anna. I started to try that before but it looked like it was installing clion again. I went all the way through it this time and I was able to debug my program. I can get back to working more efficiently without having to debug in a terminal. Thanks!

I'm using Ubuntu. I still have a desktop app that will open CLion and run without sudo privileges. When I re-ran the script as sudo, I did not have to go through the "installation" screens again.

Is there a way to get the sudo'd installed version on my launcher? Or at least remove the the first normal installation so I don't inadvertently open it? Installation is probably not the right word, but it seems I have two configuration type files somewhere.

Thanks!

 

0

If you run CLion as root, it uses root home directory, not yours, so it feels like a fresh installation.

1
Avatar
Permanently deleted user

Thanks

0

This is the correct way to launch a pk (polkit) agent in a terminal window to accept pkexec elevation requests.

https://stackoverflow.com/questions/34927781/run-a-c-program-in-clion-as-root/76475766#76475766

0

请先登录再写评论。