From da51fda7cccdd86d103e503f95e60cd7f6906595 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Aug 21 2023 14:17:59 +0000 Subject: livesys-gnome: Neuter auth dialog when starting live installer anaconda is going to start using polkit instead of consolehelper to elevate the user to root. gnome-shell requires the user confirm any polkit connversations, even if they don't require authentication. That make sense for some use cases, but not here. This commit side steps that issue by creating a rule to skip the conversation entirely. --- diff --git a/libexec/livesys/sessions.d/livesys-gnome b/libexec/livesys/sessions.d/livesys-gnome index d6d6e10..5bc2f6e 100755 --- a/libexec/livesys/sessions.d/livesys-gnome +++ b/libexec/livesys/sessions.d/livesys-gnome @@ -92,3 +92,16 @@ fi if [ -f /etc/PackageKit/CommandNotFound.conf ]; then sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf fi + +# Don't require authentication for starting the installer +cat > /usr/share/polkit-1/rules.d/20-livesys-gnome.rules << FOE +polkit.addRule(function(action, subject) { + if (!subject.local) + return undefined; + if (subject.user !== 'liveuser') + return undefined; + if (action.id.indexOf('org.fedoraproject.pkexec.liveinst') !== 0) + return undefined; + return 'yes'; +}); +FOE