Ubuntu 20.04 (running Windows 10 WSL2) Jetbrains CLion 2021.2.3 (linux)
In CLion's Run/Debug configurations, if I set "Run with root privileges", whenever I hit run or debug, I first get a popup "Starting elevation service", which then errors out.
CLion gives: Error running 'all-am': Failed to launch elevation service using 'pkexec': Process finished with exit code 127
I read another post stating to make sure you are not trying to execute a "library" which I'm not. (I'm running the executable for my project)
If I remove the "Run with root privileges", the software will run and I get my GUI, but I do need to be able to run/debug the software with root privileges.
Below is an output of CLion's logs:
2021-12-03 20:20:14,195 [387698107] INFO - makefile.io.MkEnvironmentAware - {LC_ALL=en_US.UTF-8, LANGUAGE=en_US.UTF-8} Running external process: "make --makefile=Makefile all-am"
2021-12-03 20:20:14,417 [387698329] INFO - ctest.CTestProjectTestsUpdater - No selected configuration
2021-12-03 20:20:14,678 [387698590] INFO - shake.ProcessHandshakeLauncher - Process [system]: pkexec /opt/clion/clion-2021.2.3/jbr/bin/java -cp /opt/clion/clion-2021.2.3/lib/platform-impl.jar:/opt/clion/clion-2021.2.3/lib/kotlin-stdlib-jdk8.jar:/opt/clion/clion-2021.2.3/lib/kotlinx-coroutines-jdk8.jar:/opt/clion/clion-2021.2.3/lib/3rd-party.jar:/opt/clion/clion-2021.2.3/lib/protobuf-java-3.15.8.jar:/opt/clion/clion-2021.2.3/lib/grpc-netty-shaded-1.34.1.jar:/opt/clion/clion-2021.2.3/lib/jna.jar com.intellij.execution.process.mediator.daemon.DaemonProcessMainKt --trampoline --daemonize --leader-pid=1118 --handshake-file=/tmp/edr5y5ec-bf9d-480f-9351-db15239171ec --token-encrypt-rsa=MIGfMA0XCCqGSIb3DQEBAQUAA4GNADCBiQFRnJCBl7rIyuaCx2NXAuxLRI8CjlTGl4Wkg66UBdwrgKe9OvXOBCLWXbuxAWvlPe0wCGlEjqlyQsA9wbiTjNL9p8rCvoQrvaaWj46wyCnnMWZxm1CHVKCiPBqwz/aD5FLCU9Fa19aPoX5OKHtWSlJ5w89Rm8Ut583nZv33P02MqeWAZAWLAQAB
2021-12-03 20:20:14,689 [387698601] INFO - shake.ProcessHandshakeLauncher - Process [stderr]: Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address
2021-12-03 20:20:14,691 [387698603] INFO - shake.ProcessHandshakeLauncher - Process terminated with exit code 127
2021-12-03 20:20:19,692 [387703604] WARN - shake.ProcessHandshakeLauncher - Reading handshake failed
2021-12-03 20:20:19,692 [387703604] WARN - shake.ProcessHandshakeLauncher - Process finished with exit code 127
2021-12-03 20:20:19,692 [387703604] WARN - shake.ProcessHandshakeLauncher - Process stderr:
Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address
2021-12-03 20:20:19,695 [387703607] INFO - xecution.runners.ExecutionUtil - Error running 'all-am':<br>Failed to launch elevation service using 'pkexec':
Process finished with exit code 127
com.intellij.execution.ExecutionException: Failed to launch elevation service using 'pkexec':
Process finished with exit code 127
at com.intellij.execution.process.elevation.ElevationDaemonProcessLauncher.handshakeFailed(ElevationDaemonProcessLauncher.kt:99)
at com.intellij.execution.process.elevation.ElevationDaemonProcessLauncher.handshakeFailed(ElevationDaemonProcessLauncher.kt:22)
at com.intellij.util.io.processHandshake.ProcessHandshakeLauncher.handshakeFailed(ProcessHandshakeLauncher.kt:129)
at com.intellij.util.io.processHandshake.ProcessHandshakeLauncher.access$handshakeFailed(ProcessHandshakeLauncher.kt:29)
at com.intellij.util.io.processHandshake.ProcessHandshakeLauncher$launch$2.invokeSuspend(ProcessHandshakeLauncher.kt:88)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.selects.SelectBuilderImpl.resumeWith(Select.kt:302)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Any help appreciated! Thanks!