From 14debf9c23b31bc1ab2b150eac1f2c9f71e1b8d7 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Mon, 1 Aug 2016 02:18:55 -0500 Subject: [PATCH] new hotfix for starting cnchi with polkit --- dist/antergos-iso | 21 ++++++++++++++++----- iso-hotfix-utility | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/dist/antergos-iso b/dist/antergos-iso index 76780a6..66a841f 100644 --- a/dist/antergos-iso +++ b/dist/antergos-iso @@ -107,16 +107,17 @@ font_patch() { stop_cnchi() { - sudo killall -w /usr/bin/cnchi cnchi python && sudo rm /tmp/.setup-running > /dev/null 2>&1 - sudo systemctl stop pamac > /dev/null 2>&1 - sudo rm /var/lib/pacman/db.lck > /dev/null 2>&1 + { sudo killall -w /usr/bin/cnchi cnchi python + sudo rm /tmp/.setup-running + sudo systemctl stop pamac + sudo rm /var/lib/pacman/db.lck; } > /dev/null 2>&1 return 0 } start_cnchi() { - stop_cnchi && sudo -E cnchi -d -v -s bugsnag & + stop_cnchi && /usr/bin/cnchi -s bugsnag & return 0; } @@ -161,7 +162,15 @@ hotfix_maybe_update() { _hotfix_ckbcomp_script_file_permissions() { - chmod +x /usr/share/cnchi/scripts/ckbcomp + local _file + _file='/usr/share/cnchi/scripts/ckbcomp' + [[ -x "${_file}" ]] || { _2log '_file is not executable! fixing...'; sudo chmod +x "${_file}"; } +} + + +_hotfix_cnchi_polkit_policy() { + sudo systemctl restart polkit + sudo sed -r -i 's|\/usr.+\.py|pkexec cnchi|g' '/usr/bin/cnchi' } @@ -185,6 +194,8 @@ hotfix_run_when_connected() { notify_no_updates fi + _hotfix_cnchi_polkit_policy + [[ -f /tmp/.setup-running ]] || start_cnchi notify-send.sh -s "${LAST_SENT}" } diff --git a/iso-hotfix-utility b/iso-hotfix-utility index b7b88d6..a1e8ac2 100644 --- a/iso-hotfix-utility +++ b/iso-hotfix-utility @@ -88,7 +88,7 @@ _notify_user() { [[ -f /tmp/.last_sent ]] && read -r LAST_SENT < /tmp/.last_sent if [[ "${LAST_SENT}" != '' ]]; then - LAST_SENT=$(notify-send.sh -a "${APP_NAME}" -i "${APP_ICON}" -u "${LEVEL}" -p -r "${LAST_SENT}" "$1" "$2") + LAST_SENT=$(notify-send.sh -a "${APP_NAME}" -i "${APP_ICON}" -u "${LEVEL}" -r "${LAST_SENT}" -p "$1" "$2") else LAST_SENT=$(notify-send.sh -a "${APP_NAME}" -i "${APP_ICON}" -u "${LEVEL}" -p "$1" "$2") fi