P
P
protasovmikhail2019-06-04 22:27:58
linux
protasovmikhail, 2019-06-04 22:27:58

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

1 answer(s)
P
protasovmikhail, 2019-06-05
@protasovmikhail

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 question

Ask a Question

731 491 924 answers to any question