Answer the question
In order to leave comments, you need to log in
Why is my pkexec not working in ubuntu 18.04?
Hello.
I needed to run the script as root using .desktop
Symptoms: on startup it asks for a password and exits.
Anamnesis:
Ubuntu 18.04 system
.desktop file is standard, $path is set
Variable Exec=pkexec env display=$display xauthority=$xauthority myscript
The script is valid.
The script does not write logs, it seems that it does not reach its execution at all.
When trying to execute "pkexec env display=$display xauthority=$xauthority /full/path/myscript" in the console, it works normally.
Probyval to supplement $Exec by the full way - the symptom repeated.
Dear Jedi, direct my power. Thank you.
Answer the question
In order to leave comments, you need to log in
By the method of pre-sleep meditation, I suggested exporting the $DISPLAY variable in the script itself.
Registered in the script:
I hope it will be useful for beginners like me.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question