diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2022-08-18 14:16:08 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2022-08-18 14:17:07 +0200 |
commit | d1e9a4244b781f0f91edc71f48f98cd24084dfbf (patch) | |
tree | 04c19a06af893802e18b17340f9b87989c0caf0a /docs | |
parent | tpm-util: use trial session where appropriate (diff) | |
download | systemd-d1e9a4244b781f0f91edc71f48f98cd24084dfbf.tar.xz systemd-d1e9a4244b781f0f91edc71f48f98cd24084dfbf.zip |
docs: Recommend pkexec over using an askpass program with sudo
Less configuration required than downloading and configuring an
askpass program.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/HACKING.md | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/docs/HACKING.md b/docs/HACKING.md index 4b93741f3a..1a90e7b395 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -217,7 +217,7 @@ $(pwd)/mkosi.installdir=/root/dest\\ --header-insertion=never EOF chmod +x mkosi-clangd.build -exec sudo mkosi --source-file-transfer=mount --incremental --skip-final-phase --build-script mkosi-clangd.build build +exec pkexec mkosi --source-file-transfer=mount --incremental --skip-final-phase --build-script mkosi-clangd.build build ``` Next, mark the script as executable and point your editor plugin to use this script to start clangd. For @@ -252,12 +252,9 @@ some bundle clangd in the clang package. Because mkosi needs to run as root, we also need to make sure we can enter the root password when the editor plugin tries to run the mkosi-clangd.sh script. To be able to enter the root password in non-interactive -scripts, we use an askpass provider. This is a program that sudo will launch if it detects it's being -executed from a non-interactive shell so that the root password can still be entered. There are multiple -implementations such as gnome askpass and KDE askpass. Install one of the askpass packages your distro -provides and set the `SUDO_ASKPASS` environment variable to the path of the askpass binary you want to use. -If configured correctly, a window will appear when your editor plugin tries to run the mkosi-clangd.sh script -allowing you to enter the root password. +scripts, we use pkexec instead of sudo. pkexec will launch a graphical interface to let the user enter their +password, so that the password can be entered by the user even when pkexec is executed from a non-interactive +shell. Due to a bug in btrfs, it's currently impossible to mount two mkosi btrfs images at the same time. Because of this, trying to do a regular build while the clangd image is running will fail. To circumvent this, use ext4 |