diff --git a/3D Printing/FreeCAD.app/FreeCAD b/3D Printing/FreeCAD.app/FreeCAD index cff548ab..c3931487 100755 --- a/3D Printing/FreeCAD.app/FreeCAD +++ b/3D Printing/FreeCAD.app/FreeCAD @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/3D Printing/FreeCAD.app/Resources/askpass.py b/3D Printing/FreeCAD.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/3D Printing/FreeCAD.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/3D Printing/PrusaSlicer.app/PrusaSlicer b/3D Printing/PrusaSlicer.app/PrusaSlicer index cff548ab..c3931487 100755 --- a/3D Printing/PrusaSlicer.app/PrusaSlicer +++ b/3D Printing/PrusaSlicer.app/PrusaSlicer @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/3D Printing/PrusaSlicer.app/Resources/askpass.py b/3D Printing/PrusaSlicer.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/3D Printing/PrusaSlicer.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/3D Printing/Ultimaker Cura.app/Resources/askpass.py b/3D Printing/Ultimaker Cura.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/3D Printing/Ultimaker Cura.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/3D Printing/Ultimaker Cura.app/Ultimaker Cura b/3D Printing/Ultimaker Cura.app/Ultimaker Cura index cff548ab..c3931487 100755 --- a/3D Printing/Ultimaker Cura.app/Ultimaker Cura +++ b/3D Printing/Ultimaker Cura.app/Ultimaker Cura @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Audio/Audacity.app/Audacity b/Audio/Audacity.app/Audacity index cff548ab..c3931487 100755 --- a/Audio/Audacity.app/Audacity +++ b/Audio/Audacity.app/Audacity @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Audio/Audacity.app/Resources/askpass.py b/Audio/Audacity.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Audio/Audacity.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Audio/LMMS.app/LMMS b/Audio/LMMS.app/LMMS index cff548ab..c3931487 100755 --- a/Audio/LMMS.app/LMMS +++ b/Audio/LMMS.app/LMMS @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Audio/LMMS.app/Resources/askpass.py b/Audio/LMMS.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Audio/LMMS.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Developer Preview/Disk First Aid.app/Disk First Aid b/Developer Preview/Disk First Aid.app/Disk First Aid index c6f3c9dd..8350dcea 100755 --- a/Developer Preview/Disk First Aid.app/Disk First Aid +++ b/Developer Preview/Disk First Aid.app/Disk First Aid @@ -1,3 +1,3 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec "${HERE}/Resources/disk-first-aid.py" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec "${HERE}/Resources/disk-first-aid.py" "$@" diff --git a/Developer Preview/Disk First Aid.app/Resources/askpass.py b/Developer Preview/Disk First Aid.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Developer Preview/Disk First Aid.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Developer Preview/Disk Utility.app/Disk Utility b/Developer Preview/Disk Utility.app/Disk Utility index 1d7018fc..806829dc 100755 --- a/Developer Preview/Disk Utility.app/Disk Utility +++ b/Developer Preview/Disk Utility.app/Disk Utility @@ -1,4 +1,4 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" # SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec sudo -A -E "${HERE}/Resources/main.py" "$@" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec "${HERE}/Resources/main.py" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec "${HERE}/Resources/main.py" "$@" diff --git a/Developer Preview/Disk Utility.app/Resources/askpass.py b/Developer Preview/Disk Utility.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Developer Preview/Disk Utility.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Developer Preview/Energy Saving.app/Energy Saving b/Developer Preview/Energy Saving.app/Energy Saving index 5a4506db..5fe30868 100755 --- a/Developer Preview/Energy Saving.app/Energy Saving +++ b/Developer Preview/Energy Saving.app/Energy Saving @@ -1,3 +1,3 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec "${HERE}/Resources/energy-saving.py" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec "${HERE}/Resources/energy-saving.py" "$@" diff --git a/Developer Preview/Energy Saving.app/Resources/askpass.py b/Developer Preview/Energy Saving.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Developer Preview/Energy Saving.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Developer Preview/Start Disk.app/Resources/askpass.py b/Developer Preview/Start Disk.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Developer Preview/Start Disk.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Developer Preview/Start Disk.app/Start Disk b/Developer Preview/Start Disk.app/Start Disk index ffcd2a1d..00576a91 100755 --- a/Developer Preview/Start Disk.app/Start Disk +++ b/Developer Preview/Start Disk.app/Start Disk @@ -67,7 +67,7 @@ class KeyboardSwitcher(QtWidgets.QMainWindow): self.list_widget.clear() p = QtCore.QProcess() env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(__file__) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") p.setProcessEnvironment(env) p.setProgram("sudo") p.setArguments(["-A", "-E", "efibootmgr", "-v"]) @@ -159,7 +159,7 @@ class KeyboardSwitcher(QtWidgets.QMainWindow): p = QtCore.QProcess() env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(__file__) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") p.setProcessEnvironment(env) p.setProgram("sudo") p.setArguments(["-A", "-E", "efibootmgr", "-o", selected_entry.replace("Boot", "")]) diff --git a/Developer/LiteIDE.app/LiteIDE b/Developer/LiteIDE.app/LiteIDE index cff548ab..c3931487 100755 --- a/Developer/LiteIDE.app/LiteIDE +++ b/Developer/LiteIDE.app/LiteIDE @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Developer/LiteIDE.app/Resources/askpass.py b/Developer/LiteIDE.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Developer/LiteIDE.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Developer/PyCharm CE.app/PyCharm CE b/Developer/PyCharm CE.app/PyCharm CE index cff548ab..c3931487 100755 --- a/Developer/PyCharm CE.app/PyCharm CE +++ b/Developer/PyCharm CE.app/PyCharm CE @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Developer/PyCharm CE.app/Resources/askpass.py b/Developer/PyCharm CE.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Developer/PyCharm CE.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Developer/Qt Creator.app/Qt Creator b/Developer/Qt Creator.app/Qt Creator index cff548ab..c3931487 100755 --- a/Developer/Qt Creator.app/Qt Creator +++ b/Developer/Qt Creator.app/Qt Creator @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Developer/Qt Creator.app/Resources/askpass.py b/Developer/Qt Creator.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Developer/Qt Creator.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Developer/Zeal.app/Resources/askpass.py b/Developer/Zeal.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Developer/Zeal.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Developer/Zeal.app/Zeal b/Developer/Zeal.app/Zeal index cff548ab..428e698e 100755 --- a/Developer/Zeal.app/Zeal +++ b/Developer/Zeal.app/Zeal @@ -99,6 +99,8 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Falkon.app/Falkon b/Falkon.app/Falkon index cff548ab..c3931487 100755 --- a/Falkon.app/Falkon +++ b/Falkon.app/Falkon @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Falkon.app/Resources/askpass.py b/Falkon.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Falkon.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Graphics/Blender.app/Blender b/Graphics/Blender.app/Blender index cff548ab..c3931487 100755 --- a/Graphics/Blender.app/Blender +++ b/Graphics/Blender.app/Blender @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Graphics/Blender.app/Resources/askpass.py b/Graphics/Blender.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Graphics/Blender.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Graphics/GIMP.app/GIMP b/Graphics/GIMP.app/GIMP index cff548ab..c3931487 100755 --- a/Graphics/GIMP.app/GIMP +++ b/Graphics/GIMP.app/GIMP @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Graphics/GIMP.app/Resources/askpass.py b/Graphics/GIMP.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Graphics/GIMP.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Graphics/Inkscape.app/Inkscape b/Graphics/Inkscape.app/Inkscape index cff548ab..c3931487 100755 --- a/Graphics/Inkscape.app/Inkscape +++ b/Graphics/Inkscape.app/Inkscape @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Graphics/Inkscape.app/Resources/askpass.py b/Graphics/Inkscape.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Graphics/Inkscape.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Graphics/Krita.app/Krita b/Graphics/Krita.app/Krita index cff548ab..c3931487 100755 --- a/Graphics/Krita.app/Krita +++ b/Graphics/Krita.app/Krita @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Graphics/Krita.app/Resources/askpass.py b/Graphics/Krita.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Graphics/Krita.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Graphics/Scribus.app/Resources/askpass.py b/Graphics/Scribus.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Graphics/Scribus.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Graphics/Scribus.app/Scribus b/Graphics/Scribus.app/Scribus index cff548ab..c3931487 100755 --- a/Graphics/Scribus.app/Scribus +++ b/Graphics/Scribus.app/Scribus @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Graphics/Skanlite.app/Resources/askpass.py b/Graphics/Skanlite.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Graphics/Skanlite.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Graphics/Skanlite.app/Skanlite b/Graphics/Skanlite.app/Skanlite index c4d1618e..be029ea9 100755 --- a/Graphics/Skanlite.app/Skanlite +++ b/Graphics/Skanlite.app/Skanlite @@ -98,7 +98,7 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Office/LibreOffice.app/LibreOffice b/Office/LibreOffice.app/LibreOffice index cff548ab..c3931487 100755 --- a/Office/LibreOffice.app/LibreOffice +++ b/Office/LibreOffice.app/LibreOffice @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Office/LibreOffice.app/Resources/askpass.py b/Office/LibreOffice.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Office/LibreOffice.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Preferences/Boot Environments.app/Boot Environments b/Preferences/Boot Environments.app/Boot Environments index de782b83..494f1e23 100755 --- a/Preferences/Boot Environments.app/Boot Environments +++ b/Preferences/Boot Environments.app/Boot Environments @@ -1,4 +1,4 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" # SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec sudo -A -E "${HERE}/Resources/boot-environments.py" "$@" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec "${HERE}/Resources/boot-environments.py" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec "${HERE}/Resources/boot-environments.py" "$@" diff --git a/Preferences/Boot Environments.app/Resources/askpass.py b/Preferences/Boot Environments.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Preferences/Boot Environments.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Preferences/Keyboard.app/Keyboard b/Preferences/Keyboard.app/Keyboard index 42ab2b91..e6b83e11 100755 --- a/Preferences/Keyboard.app/Keyboard +++ b/Preferences/Keyboard.app/Keyboard @@ -392,7 +392,7 @@ EndSection""" f.close() # Run a helper tool as root that puts the config file into the system-wide Xorg configuration and/or writes the information to EFI - os.environ["SUDO_ASKPASS"] = os.path.dirname(__file__) + "/Resources/askpass.py" + os.environ["SUDO_ASKPASS"] = "/usr/local/bin/askpass" # TODO: Implement error handling with an error dialog proc = subprocess.Popen(["/usr/local/bin/sudo", "-A", "-E", os.path.dirname(__file__) + "/Resources/save.py"], stdout=subprocess.PIPE, env=os.environ) for line in io.TextIOWrapper(proc.stdout, encoding="utf-8"): diff --git a/Preferences/Keyboard.app/Resources/askpass.py b/Preferences/Keyboard.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Preferences/Keyboard.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Preferences/Sharing.app/Resources/askpass.py b/Preferences/Sharing.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Preferences/Sharing.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Preferences/Sharing.app/Sharing b/Preferences/Sharing.app/Sharing index ad1f9ca2..9def1e35 100755 --- a/Preferences/Sharing.app/Sharing +++ b/Preferences/Sharing.app/Sharing @@ -1,3 +1,3 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec sudo -A -E "${HERE}/Resources/sharing.py" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec sudo -A -E "${HERE}/Resources/sharing.py" "$@" diff --git a/Preferences/Users.app/Resources/askpass.py b/Preferences/Users.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Preferences/Users.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Preferences/Users.app/Users b/Preferences/Users.app/Users index 3cd5fde3..1417bb1d 100755 --- a/Preferences/Users.app/Users +++ b/Preferences/Users.app/Users @@ -1,4 +1,4 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" # SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec sudo -A -E "${HERE}/Resources/adduser.py" "$@" -exec "${HERE}/Resources/adduser.py" "$@" +exec "/usr/local/bin/askpass" "$@" diff --git a/Preferences/Wireless Networks.app/Resources/askpass.py b/Preferences/Wireless Networks.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Preferences/Wireless Networks.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Preferences/Wireless Networks.app/Wireless Networks b/Preferences/Wireless Networks.app/Wireless Networks index c63ebf25..3b9e8f2c 100755 --- a/Preferences/Wireless Networks.app/Wireless Networks +++ b/Preferences/Wireless Networks.app/Wireless Networks @@ -1,4 +1,4 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec sudo -E "${HERE}/Resources/wireless-networks" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec sudo -E "${HERE}/Resources/wireless-networks" "$@" diff --git a/Utilities/Android File Transfer (MTP).app/Android File Transfer (MTP) b/Utilities/Android File Transfer (MTP).app/Android File Transfer (MTP) index 284607c3..d9bb5125 100755 --- a/Utilities/Android File Transfer (MTP).app/Android File Transfer (MTP) +++ b/Utilities/Android File Transfer (MTP).app/Android File Transfer (MTP) @@ -1,4 +1,4 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec sudo -A -E "android-file-transfer" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec sudo -A -E "android-file-transfer" "$@" diff --git a/Utilities/Android File Transfer (MTP).app/Resources/askpass.py b/Utilities/Android File Transfer (MTP).app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Utilities/Android File Transfer (MTP).app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Utilities/Create Live Media.app/Create Live Media b/Utilities/Create Live Media.app/Create Live Media index 051ba1a9..11632b6d 100755 --- a/Utilities/Create Live Media.app/Create Live Media +++ b/Utilities/Create Live Media.app/Create Live Media @@ -1,3 +1,3 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec sudo -A -E "${HERE}/Resources/create-livemedia.py" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec sudo -A -E "${HERE}/Resources/create-livemedia.py" "$@" diff --git a/Utilities/Create Live Media.app/Resources/askpass.py b/Utilities/Create Live Media.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Utilities/Create Live Media.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Utilities/Hardware Probe.app/Hardware Probe b/Utilities/Hardware Probe.app/Hardware Probe index 55e8ae3a..c6bd3c5f 100755 --- a/Utilities/Hardware Probe.app/Hardware Probe +++ b/Utilities/Hardware Probe.app/Hardware Probe @@ -1,4 +1,4 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec "${HERE}/Resources/hardware-probe.py" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec "${HERE}/Resources/hardware-probe.py" "$@" # SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec sudo -A -E "${HERE}/Resources/hardware-probe.py" "$@" diff --git a/Utilities/Hardware Probe.app/Resources/askpass.py b/Utilities/Hardware Probe.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Utilities/Hardware Probe.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Utilities/Install FreeBSD.app/Install FreeBSD b/Utilities/Install FreeBSD.app/Install FreeBSD index 0e55dab6..e694688e 100755 --- a/Utilities/Install FreeBSD.app/Install FreeBSD +++ b/Utilities/Install FreeBSD.app/Install FreeBSD @@ -1,3 +1,3 @@ #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" -SUDO_ASKPASS="${HERE}/Resources/askpass.py" exec sudo -A -E "${HERE}/Resources/freebsd-install.py" "$@" +SUDO_ASKPASS="/usr/local/bin/askpass" exec sudo -A -E "${HERE}/Resources/freebsd-install.py" "$@" diff --git a/Utilities/Install FreeBSD.app/Resources/askpass.py b/Utilities/Install FreeBSD.app/Resources/askpass.py deleted file mode 100755 index f75737fc..00000000 --- a/Utilities/Install FreeBSD.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Video/OBS Studio.app/OBS Studio b/Video/OBS Studio.app/OBS Studio index cff548ab..c3931487 100755 --- a/Video/OBS Studio.app/OBS Studio +++ b/Video/OBS Studio.app/OBS Studio @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages diff --git a/Video/OBS Studio.app/Resources/askpass.py b/Video/OBS Studio.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Video/OBS Studio.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Video/Shotcut.app/Resources/askpass.py b/Video/Shotcut.app/Resources/askpass.py deleted file mode 100755 index 2d168799..00000000 --- a/Video/Shotcut.app/Resources/askpass.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3.7 - - -# man sudo(8) -# -A, --askpass -# Normally, if sudo requires a password, it will read it from -# the user's terminal. If the -A (askpass) option is -# specified, a (possibly graphical) helper program is executed -# to read the user's password and output the password to the -# standard output. If the SUDO_ASKPASS environment variable is -# set, it specifies the path to the helper program. Otherwise, -# if sudo.conf(5) contains a line specifying the askpass -# program, that value will be used. For example: -# -# # Path to askpass helper program -# Path askpass /usr/X11R6/bin/ssh-askpass -# -# If no askpass program is available, sudo will exit with an -# error. - - -from PyQt5 import QtWidgets - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) \ No newline at end of file diff --git a/Video/Shotcut.app/Shotcut b/Video/Shotcut.app/Shotcut index cff548ab..c3931487 100755 --- a/Video/Shotcut.app/Shotcut +++ b/Video/Shotcut.app/Shotcut @@ -98,7 +98,9 @@ class LiteInstaller(object): self.ext_process.finished.connect(self.onProcessFinished) env = QtCore.QProcessEnvironment.systemEnvironment() - env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py") + env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass") + env.insert("SUDO_ASKPASS_TEXT", + "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) self.ext_process.setProgram("sudo") args = ["-A", "-E", "pkg", "install", "-y"] + self.packages