From 8454e54caf79cc8cc77c9070568453e6710a269b Mon Sep 17 00:00:00 2001 From: William Kent Date: Wed, 19 May 2021 19:21:24 -0400 Subject: [PATCH 1/5] Batch update askpass.py --- 3D Printing/FreeCAD.app/Resources/askpass.py | 14 +++++++++++--- 3D Printing/PrusaSlicer.app/Resources/askpass.py | 14 +++++++++++--- .../Ultimaker Cura.app/Resources/askpass.py | 14 +++++++++++--- Audio/Audacity.app/Resources/askpass.py | 14 +++++++++++--- Audio/LMMS.app/Resources/askpass.py | 14 +++++++++++--- .../Disk First Aid.app/Resources/askpass.py | 16 ++++++++++++---- .../Disk Utility.app/Resources/askpass.py | 16 ++++++++++++---- .../Energy Saving.app/Resources/askpass.py | 16 ++++++++++++---- .../Start Disk.app/Resources/askpass.py | 16 ++++++++++++---- Developer/LiteIDE.app/Resources/askpass.py | 14 +++++++++++--- Developer/PyCharm CE.app/Resources/askpass.py | 14 +++++++++++--- Developer/Qt Creator.app/Resources/askpass.py | 14 +++++++++++--- Developer/Zeal.app/Resources/askpass.py | 14 +++++++++++--- Falkon.app/Resources/askpass.py | 14 +++++++++++--- Graphics/Blender.app/Resources/askpass.py | 14 +++++++++++--- Graphics/GIMP.app/Resources/askpass.py | 14 +++++++++++--- Graphics/Inkscape.app/Resources/askpass.py | 14 +++++++++++--- Graphics/Krita.app/Resources/askpass.py | 14 +++++++++++--- Graphics/Scribus.app/Resources/askpass.py | 14 +++++++++++--- Graphics/Skanlite.app/Resources/askpass.py | 14 +++++++++++--- Office/LibreOffice.app/Resources/askpass.py | 14 +++++++++++--- .../Boot Environments.app/Resources/askpass.py | 16 ++++++++++++---- Preferences/Keyboard.app/Resources/askpass.py | 14 +++++++++++--- Preferences/Sharing.app/Resources/askpass.py | 16 ++++++++++++---- Preferences/Users.app/Resources/askpass.py | 14 +++++++++++--- .../Wireless Networks.app/Resources/askpass.py | 16 ++++++++++++---- .../Resources/askpass.py | 16 ++++++++++++---- .../Create Live Media.app/Resources/askpass.py | 16 ++++++++++++---- .../Hardware Probe.app/Resources/askpass.py | 16 ++++++++++++---- .../Install FreeBSD.app/Resources/askpass.py | 16 ++++++++++++---- Video/OBS Studio.app/Resources/askpass.py | 14 +++++++++++--- Video/Shotcut.app/Resources/askpass.py | 14 +++++++++++--- 32 files changed, 363 insertions(+), 107 deletions(-) diff --git a/3D Printing/FreeCAD.app/Resources/askpass.py b/3D Printing/FreeCAD.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/3D Printing/FreeCAD.app/Resources/askpass.py +++ b/3D Printing/FreeCAD.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/3D Printing/PrusaSlicer.app/Resources/askpass.py b/3D Printing/PrusaSlicer.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/3D Printing/PrusaSlicer.app/Resources/askpass.py +++ b/3D Printing/PrusaSlicer.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/3D Printing/Ultimaker Cura.app/Resources/askpass.py b/3D Printing/Ultimaker Cura.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/3D Printing/Ultimaker Cura.app/Resources/askpass.py +++ b/3D Printing/Ultimaker Cura.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Audio/Audacity.app/Resources/askpass.py b/Audio/Audacity.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Audio/Audacity.app/Resources/askpass.py +++ b/Audio/Audacity.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Audio/LMMS.app/Resources/askpass.py b/Audio/LMMS.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Audio/LMMS.app/Resources/askpass.py +++ b/Audio/LMMS.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Developer Preview/Disk First Aid.app/Resources/askpass.py b/Developer Preview/Disk First Aid.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Developer Preview/Disk First Aid.app/Resources/askpass.py +++ b/Developer Preview/Disk First Aid.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Developer Preview/Disk Utility.app/Resources/askpass.py b/Developer Preview/Disk Utility.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Developer Preview/Disk Utility.app/Resources/askpass.py +++ b/Developer Preview/Disk Utility.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Developer Preview/Energy Saving.app/Resources/askpass.py b/Developer Preview/Energy Saving.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Developer Preview/Energy Saving.app/Resources/askpass.py +++ b/Developer Preview/Energy Saving.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Developer Preview/Start Disk.app/Resources/askpass.py b/Developer Preview/Start Disk.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Developer Preview/Start Disk.app/Resources/askpass.py +++ b/Developer Preview/Start Disk.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Developer/LiteIDE.app/Resources/askpass.py b/Developer/LiteIDE.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Developer/LiteIDE.app/Resources/askpass.py +++ b/Developer/LiteIDE.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Developer/PyCharm CE.app/Resources/askpass.py b/Developer/PyCharm CE.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Developer/PyCharm CE.app/Resources/askpass.py +++ b/Developer/PyCharm CE.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Developer/Qt Creator.app/Resources/askpass.py b/Developer/Qt Creator.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Developer/Qt Creator.app/Resources/askpass.py +++ b/Developer/Qt Creator.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Developer/Zeal.app/Resources/askpass.py b/Developer/Zeal.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Developer/Zeal.app/Resources/askpass.py +++ b/Developer/Zeal.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Falkon.app/Resources/askpass.py b/Falkon.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Falkon.app/Resources/askpass.py +++ b/Falkon.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Graphics/Blender.app/Resources/askpass.py b/Graphics/Blender.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Graphics/Blender.app/Resources/askpass.py +++ b/Graphics/Blender.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Graphics/GIMP.app/Resources/askpass.py b/Graphics/GIMP.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Graphics/GIMP.app/Resources/askpass.py +++ b/Graphics/GIMP.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Graphics/Inkscape.app/Resources/askpass.py b/Graphics/Inkscape.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Graphics/Inkscape.app/Resources/askpass.py +++ b/Graphics/Inkscape.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Graphics/Krita.app/Resources/askpass.py b/Graphics/Krita.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Graphics/Krita.app/Resources/askpass.py +++ b/Graphics/Krita.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Graphics/Scribus.app/Resources/askpass.py b/Graphics/Scribus.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Graphics/Scribus.app/Resources/askpass.py +++ b/Graphics/Scribus.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Graphics/Skanlite.app/Resources/askpass.py b/Graphics/Skanlite.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Graphics/Skanlite.app/Resources/askpass.py +++ b/Graphics/Skanlite.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Office/LibreOffice.app/Resources/askpass.py b/Office/LibreOffice.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Office/LibreOffice.app/Resources/askpass.py +++ b/Office/LibreOffice.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Preferences/Boot Environments.app/Resources/askpass.py b/Preferences/Boot Environments.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Preferences/Boot Environments.app/Resources/askpass.py +++ b/Preferences/Boot Environments.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Preferences/Keyboard.app/Resources/askpass.py b/Preferences/Keyboard.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Preferences/Keyboard.app/Resources/askpass.py +++ b/Preferences/Keyboard.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Preferences/Sharing.app/Resources/askpass.py b/Preferences/Sharing.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Preferences/Sharing.app/Resources/askpass.py +++ b/Preferences/Sharing.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Preferences/Users.app/Resources/askpass.py b/Preferences/Users.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Preferences/Users.app/Resources/askpass.py +++ b/Preferences/Users.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Preferences/Wireless Networks.app/Resources/askpass.py b/Preferences/Wireless Networks.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Preferences/Wireless Networks.app/Resources/askpass.py +++ b/Preferences/Wireless Networks.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Utilities/Android File Transfer (MTP).app/Resources/askpass.py b/Utilities/Android File Transfer (MTP).app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Utilities/Android File Transfer (MTP).app/Resources/askpass.py +++ b/Utilities/Android File Transfer (MTP).app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Utilities/Create Live Media.app/Resources/askpass.py b/Utilities/Create Live Media.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Utilities/Create Live Media.app/Resources/askpass.py +++ b/Utilities/Create Live Media.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Utilities/Hardware Probe.app/Resources/askpass.py b/Utilities/Hardware Probe.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Utilities/Hardware Probe.app/Resources/askpass.py +++ b/Utilities/Hardware Probe.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Utilities/Install FreeBSD.app/Resources/askpass.py b/Utilities/Install FreeBSD.app/Resources/askpass.py index f75737fc..726eff4f 100755 --- a/Utilities/Install FreeBSD.app/Resources/askpass.py +++ b/Utilities/Install FreeBSD.app/Resources/askpass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.7 # man sudo(8) @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Video/OBS Studio.app/Resources/askpass.py b/Video/OBS Studio.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Video/OBS Studio.app/Resources/askpass.py +++ b/Video/OBS Studio.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) diff --git a/Video/Shotcut.app/Resources/askpass.py b/Video/Shotcut.app/Resources/askpass.py index 2d168799..726eff4f 100755 --- a/Video/Shotcut.app/Resources/askpass.py +++ b/Video/Shotcut.app/Resources/askpass.py @@ -18,11 +18,19 @@ # If no askpass program is available, sudo will exit with an # error. - +import os from PyQt5 import QtWidgets +text = "Password" + +# SUDO_ASKPASS_TEXT is a non-standard environment variable. +# If it is set, we show its value in the dialog as a way for the program +# requesting root rights to let the user know the reason for doing so. +if os.environ.get('SUDO_ASKPASS_TEXT') is not None: + text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text + app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Password) +password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) if ok: print(password) -app.exit(0) \ No newline at end of file +app.exit(0) From 5d2aa09b1f30c69173fd1a5053b4481b67d4c55b Mon Sep 17 00:00:00 2001 From: William Kent Date: Wed, 19 May 2021 19:33:09 -0400 Subject: [PATCH 2/5] Batch add SUDO_ASKPASS_TEXT to downloader stubs --- 3D Printing/FreeCAD.app/FreeCAD | 2 ++ 3D Printing/PrusaSlicer.app/PrusaSlicer | 2 ++ 3D Printing/Ultimaker Cura.app/Ultimaker Cura | 2 ++ Audio/Audacity.app/Audacity | 2 ++ Audio/LMMS.app/LMMS | 2 ++ Developer/LiteIDE.app/LiteIDE | 2 ++ Developer/PyCharm CE.app/PyCharm CE | 2 ++ Developer/Qt Creator.app/Qt Creator | 2 ++ Developer/Zeal.app/Zeal | 2 ++ Falkon.app/Falkon | 2 ++ Graphics/Blender.app/Blender | 2 ++ Graphics/GIMP.app/GIMP | 2 ++ Graphics/Inkscape.app/Inkscape | 2 ++ Graphics/Krita.app/Krita | 2 ++ Graphics/Scribus.app/Scribus | 2 ++ Office/LibreOffice.app/LibreOffice | 2 ++ Video/OBS Studio.app/OBS Studio | 2 ++ Video/Shotcut.app/Shotcut | 2 ++ 18 files changed, 36 insertions(+) diff --git a/3D Printing/FreeCAD.app/FreeCAD b/3D Printing/FreeCAD.app/FreeCAD index cff548ab..428e698e 100755 --- a/3D Printing/FreeCAD.app/FreeCAD +++ b/3D Printing/FreeCAD.app/FreeCAD @@ -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/3D Printing/PrusaSlicer.app/PrusaSlicer b/3D Printing/PrusaSlicer.app/PrusaSlicer index cff548ab..428e698e 100755 --- a/3D Printing/PrusaSlicer.app/PrusaSlicer +++ b/3D Printing/PrusaSlicer.app/PrusaSlicer @@ -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/3D Printing/Ultimaker Cura.app/Ultimaker Cura b/3D Printing/Ultimaker Cura.app/Ultimaker Cura index cff548ab..428e698e 100755 --- a/3D Printing/Ultimaker Cura.app/Ultimaker Cura +++ b/3D Printing/Ultimaker Cura.app/Ultimaker Cura @@ -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/Audio/Audacity.app/Audacity b/Audio/Audacity.app/Audacity index cff548ab..428e698e 100755 --- a/Audio/Audacity.app/Audacity +++ b/Audio/Audacity.app/Audacity @@ -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/Audio/LMMS.app/LMMS b/Audio/LMMS.app/LMMS index cff548ab..428e698e 100755 --- a/Audio/LMMS.app/LMMS +++ b/Audio/LMMS.app/LMMS @@ -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/Developer/LiteIDE.app/LiteIDE b/Developer/LiteIDE.app/LiteIDE index cff548ab..428e698e 100755 --- a/Developer/LiteIDE.app/LiteIDE +++ b/Developer/LiteIDE.app/LiteIDE @@ -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/Developer/PyCharm CE.app/PyCharm CE b/Developer/PyCharm CE.app/PyCharm CE index cff548ab..428e698e 100755 --- a/Developer/PyCharm CE.app/PyCharm CE +++ b/Developer/PyCharm CE.app/PyCharm CE @@ -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/Developer/Qt Creator.app/Qt Creator b/Developer/Qt Creator.app/Qt Creator index cff548ab..428e698e 100755 --- a/Developer/Qt Creator.app/Qt Creator +++ b/Developer/Qt Creator.app/Qt Creator @@ -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/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..428e698e 100755 --- a/Falkon.app/Falkon +++ b/Falkon.app/Falkon @@ -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/Graphics/Blender.app/Blender b/Graphics/Blender.app/Blender index cff548ab..428e698e 100755 --- a/Graphics/Blender.app/Blender +++ b/Graphics/Blender.app/Blender @@ -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/Graphics/GIMP.app/GIMP b/Graphics/GIMP.app/GIMP index cff548ab..428e698e 100755 --- a/Graphics/GIMP.app/GIMP +++ b/Graphics/GIMP.app/GIMP @@ -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/Graphics/Inkscape.app/Inkscape b/Graphics/Inkscape.app/Inkscape index cff548ab..428e698e 100755 --- a/Graphics/Inkscape.app/Inkscape +++ b/Graphics/Inkscape.app/Inkscape @@ -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/Graphics/Krita.app/Krita b/Graphics/Krita.app/Krita index cff548ab..428e698e 100755 --- a/Graphics/Krita.app/Krita +++ b/Graphics/Krita.app/Krita @@ -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/Graphics/Scribus.app/Scribus b/Graphics/Scribus.app/Scribus index cff548ab..428e698e 100755 --- a/Graphics/Scribus.app/Scribus +++ b/Graphics/Scribus.app/Scribus @@ -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/Office/LibreOffice.app/LibreOffice b/Office/LibreOffice.app/LibreOffice index cff548ab..428e698e 100755 --- a/Office/LibreOffice.app/LibreOffice +++ b/Office/LibreOffice.app/LibreOffice @@ -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/Video/OBS Studio.app/OBS Studio b/Video/OBS Studio.app/OBS Studio index cff548ab..428e698e 100755 --- a/Video/OBS Studio.app/OBS Studio +++ b/Video/OBS Studio.app/OBS Studio @@ -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/Video/Shotcut.app/Shotcut b/Video/Shotcut.app/Shotcut index cff548ab..428e698e 100755 --- a/Video/Shotcut.app/Shotcut +++ b/Video/Shotcut.app/Shotcut @@ -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 From e7c4b3cf1f7cb80394aba44f5b7b4ac617c64bf9 Mon Sep 17 00:00:00 2001 From: William Kent Date: Wed, 19 May 2021 19:33:50 -0400 Subject: [PATCH 3/5] Batch add colon to askpass.py --- 3D Printing/FreeCAD.app/Resources/askpass.py | 2 +- 3D Printing/PrusaSlicer.app/Resources/askpass.py | 2 +- 3D Printing/Ultimaker Cura.app/Resources/askpass.py | 2 +- Audio/Audacity.app/Resources/askpass.py | 2 +- Audio/LMMS.app/Resources/askpass.py | 2 +- Developer Preview/Disk First Aid.app/Resources/askpass.py | 2 +- Developer Preview/Disk Utility.app/Resources/askpass.py | 2 +- Developer Preview/Energy Saving.app/Resources/askpass.py | 2 +- Developer Preview/Start Disk.app/Resources/askpass.py | 2 +- Developer/LiteIDE.app/Resources/askpass.py | 2 +- Developer/PyCharm CE.app/Resources/askpass.py | 2 +- Developer/Qt Creator.app/Resources/askpass.py | 2 +- Developer/Zeal.app/Resources/askpass.py | 2 +- Falkon.app/Resources/askpass.py | 2 +- Graphics/Blender.app/Resources/askpass.py | 2 +- Graphics/GIMP.app/Resources/askpass.py | 2 +- Graphics/Inkscape.app/Resources/askpass.py | 2 +- Graphics/Krita.app/Resources/askpass.py | 2 +- Graphics/Scribus.app/Resources/askpass.py | 2 +- Graphics/Skanlite.app/Resources/askpass.py | 2 +- Office/LibreOffice.app/Resources/askpass.py | 2 +- Preferences/Boot Environments.app/Resources/askpass.py | 2 +- Preferences/Keyboard.app/Resources/askpass.py | 2 +- Preferences/Sharing.app/Resources/askpass.py | 2 +- Preferences/Users.app/Resources/askpass.py | 2 +- Preferences/Wireless Networks.app/Resources/askpass.py | 2 +- Utilities/Android File Transfer (MTP).app/Resources/askpass.py | 2 +- Utilities/Create Live Media.app/Resources/askpass.py | 2 +- Utilities/Hardware Probe.app/Resources/askpass.py | 2 +- Utilities/Install FreeBSD.app/Resources/askpass.py | 2 +- Video/OBS Studio.app/Resources/askpass.py | 2 +- Video/Shotcut.app/Resources/askpass.py | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/3D Printing/FreeCAD.app/Resources/askpass.py b/3D Printing/FreeCAD.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/3D Printing/FreeCAD.app/Resources/askpass.py +++ b/3D Printing/FreeCAD.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/3D Printing/PrusaSlicer.app/Resources/askpass.py b/3D Printing/PrusaSlicer.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/3D Printing/PrusaSlicer.app/Resources/askpass.py +++ b/3D Printing/PrusaSlicer.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/3D Printing/Ultimaker Cura.app/Resources/askpass.py b/3D Printing/Ultimaker Cura.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/3D Printing/Ultimaker Cura.app/Resources/askpass.py +++ b/3D Printing/Ultimaker Cura.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Audio/Audacity.app/Resources/askpass.py b/Audio/Audacity.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Audio/Audacity.app/Resources/askpass.py +++ b/Audio/Audacity.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Audio/LMMS.app/Resources/askpass.py b/Audio/LMMS.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Audio/LMMS.app/Resources/askpass.py +++ b/Audio/LMMS.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Developer Preview/Disk First Aid.app/Resources/askpass.py b/Developer Preview/Disk First Aid.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Developer Preview/Disk First Aid.app/Resources/askpass.py +++ b/Developer Preview/Disk First Aid.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Developer Preview/Disk Utility.app/Resources/askpass.py b/Developer Preview/Disk Utility.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Developer Preview/Disk Utility.app/Resources/askpass.py +++ b/Developer Preview/Disk Utility.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Developer Preview/Energy Saving.app/Resources/askpass.py b/Developer Preview/Energy Saving.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Developer Preview/Energy Saving.app/Resources/askpass.py +++ b/Developer Preview/Energy Saving.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Developer Preview/Start Disk.app/Resources/askpass.py b/Developer Preview/Start Disk.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Developer Preview/Start Disk.app/Resources/askpass.py +++ b/Developer Preview/Start Disk.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Developer/LiteIDE.app/Resources/askpass.py b/Developer/LiteIDE.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Developer/LiteIDE.app/Resources/askpass.py +++ b/Developer/LiteIDE.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Developer/PyCharm CE.app/Resources/askpass.py b/Developer/PyCharm CE.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Developer/PyCharm CE.app/Resources/askpass.py +++ b/Developer/PyCharm CE.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Developer/Qt Creator.app/Resources/askpass.py b/Developer/Qt Creator.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Developer/Qt Creator.app/Resources/askpass.py +++ b/Developer/Qt Creator.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Developer/Zeal.app/Resources/askpass.py b/Developer/Zeal.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Developer/Zeal.app/Resources/askpass.py +++ b/Developer/Zeal.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Falkon.app/Resources/askpass.py b/Falkon.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Falkon.app/Resources/askpass.py +++ b/Falkon.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Graphics/Blender.app/Resources/askpass.py b/Graphics/Blender.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Graphics/Blender.app/Resources/askpass.py +++ b/Graphics/Blender.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Graphics/GIMP.app/Resources/askpass.py b/Graphics/GIMP.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Graphics/GIMP.app/Resources/askpass.py +++ b/Graphics/GIMP.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Graphics/Inkscape.app/Resources/askpass.py b/Graphics/Inkscape.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Graphics/Inkscape.app/Resources/askpass.py +++ b/Graphics/Inkscape.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Graphics/Krita.app/Resources/askpass.py b/Graphics/Krita.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Graphics/Krita.app/Resources/askpass.py +++ b/Graphics/Krita.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Graphics/Scribus.app/Resources/askpass.py b/Graphics/Scribus.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Graphics/Scribus.app/Resources/askpass.py +++ b/Graphics/Scribus.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Graphics/Skanlite.app/Resources/askpass.py b/Graphics/Skanlite.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Graphics/Skanlite.app/Resources/askpass.py +++ b/Graphics/Skanlite.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Office/LibreOffice.app/Resources/askpass.py b/Office/LibreOffice.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Office/LibreOffice.app/Resources/askpass.py +++ b/Office/LibreOffice.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Preferences/Boot Environments.app/Resources/askpass.py b/Preferences/Boot Environments.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Preferences/Boot Environments.app/Resources/askpass.py +++ b/Preferences/Boot Environments.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Preferences/Keyboard.app/Resources/askpass.py b/Preferences/Keyboard.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Preferences/Keyboard.app/Resources/askpass.py +++ b/Preferences/Keyboard.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Preferences/Sharing.app/Resources/askpass.py b/Preferences/Sharing.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Preferences/Sharing.app/Resources/askpass.py +++ b/Preferences/Sharing.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Preferences/Users.app/Resources/askpass.py b/Preferences/Users.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Preferences/Users.app/Resources/askpass.py +++ b/Preferences/Users.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Preferences/Wireless Networks.app/Resources/askpass.py b/Preferences/Wireless Networks.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Preferences/Wireless Networks.app/Resources/askpass.py +++ b/Preferences/Wireless Networks.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Utilities/Android File Transfer (MTP).app/Resources/askpass.py b/Utilities/Android File Transfer (MTP).app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Utilities/Android File Transfer (MTP).app/Resources/askpass.py +++ b/Utilities/Android File Transfer (MTP).app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Utilities/Create Live Media.app/Resources/askpass.py b/Utilities/Create Live Media.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Utilities/Create Live Media.app/Resources/askpass.py +++ b/Utilities/Create Live Media.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Utilities/Hardware Probe.app/Resources/askpass.py b/Utilities/Hardware Probe.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Utilities/Hardware Probe.app/Resources/askpass.py +++ b/Utilities/Hardware Probe.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Utilities/Install FreeBSD.app/Resources/askpass.py b/Utilities/Install FreeBSD.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Utilities/Install FreeBSD.app/Resources/askpass.py +++ b/Utilities/Install FreeBSD.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Video/OBS Studio.app/Resources/askpass.py b/Video/OBS Studio.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Video/OBS Studio.app/Resources/askpass.py +++ b/Video/OBS Studio.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program diff --git a/Video/Shotcut.app/Resources/askpass.py b/Video/Shotcut.app/Resources/askpass.py index 726eff4f..30acba09 100755 --- a/Video/Shotcut.app/Resources/askpass.py +++ b/Video/Shotcut.app/Resources/askpass.py @@ -21,7 +21,7 @@ import os from PyQt5 import QtWidgets -text = "Password" +text = "Password:" # SUDO_ASKPASS_TEXT is a non-standard environment variable. # If it is set, we show its value in the dialog as a way for the program From ea3f41938d99be960cabb74b2678ef95e58f39e1 Mon Sep 17 00:00:00 2001 From: William Kent Date: Fri, 21 May 2021 16:47:50 -0400 Subject: [PATCH 4/5] Remove local copies of askpass.py --- 3D Printing/FreeCAD.app/Resources/askpass.py | 36 ------------------- .../PrusaSlicer.app/Resources/askpass.py | 36 ------------------- .../Ultimaker Cura.app/Resources/askpass.py | 36 ------------------- Audio/Audacity.app/Resources/askpass.py | 36 ------------------- Audio/LMMS.app/Resources/askpass.py | 36 ------------------- .../Disk First Aid.app/Resources/askpass.py | 36 ------------------- .../Disk Utility.app/Resources/askpass.py | 36 ------------------- .../Energy Saving.app/Resources/askpass.py | 36 ------------------- .../Start Disk.app/Resources/askpass.py | 36 ------------------- Developer/LiteIDE.app/Resources/askpass.py | 36 ------------------- Developer/PyCharm CE.app/Resources/askpass.py | 36 ------------------- Developer/Qt Creator.app/Resources/askpass.py | 36 ------------------- Developer/Zeal.app/Resources/askpass.py | 36 ------------------- Falkon.app/Resources/askpass.py | 36 ------------------- Graphics/Blender.app/Resources/askpass.py | 36 ------------------- Graphics/GIMP.app/Resources/askpass.py | 36 ------------------- Graphics/Inkscape.app/Resources/askpass.py | 36 ------------------- Graphics/Krita.app/Resources/askpass.py | 36 ------------------- Graphics/Scribus.app/Resources/askpass.py | 36 ------------------- Graphics/Skanlite.app/Resources/askpass.py | 36 ------------------- Office/LibreOffice.app/Resources/askpass.py | 36 ------------------- .../Resources/askpass.py | 36 ------------------- Preferences/Keyboard.app/Resources/askpass.py | 36 ------------------- Preferences/Sharing.app/Resources/askpass.py | 36 ------------------- Preferences/Users.app/Resources/askpass.py | 36 ------------------- .../Resources/askpass.py | 36 ------------------- .../Resources/askpass.py | 36 ------------------- .../Resources/askpass.py | 36 ------------------- .../Hardware Probe.app/Resources/askpass.py | 36 ------------------- .../Install FreeBSD.app/Resources/askpass.py | 36 ------------------- Video/OBS Studio.app/Resources/askpass.py | 36 ------------------- Video/Shotcut.app/Resources/askpass.py | 36 ------------------- 32 files changed, 1152 deletions(-) delete mode 100755 3D Printing/FreeCAD.app/Resources/askpass.py delete mode 100755 3D Printing/PrusaSlicer.app/Resources/askpass.py delete mode 100755 3D Printing/Ultimaker Cura.app/Resources/askpass.py delete mode 100755 Audio/Audacity.app/Resources/askpass.py delete mode 100755 Audio/LMMS.app/Resources/askpass.py delete mode 100755 Developer Preview/Disk First Aid.app/Resources/askpass.py delete mode 100755 Developer Preview/Disk Utility.app/Resources/askpass.py delete mode 100755 Developer Preview/Energy Saving.app/Resources/askpass.py delete mode 100755 Developer Preview/Start Disk.app/Resources/askpass.py delete mode 100755 Developer/LiteIDE.app/Resources/askpass.py delete mode 100755 Developer/PyCharm CE.app/Resources/askpass.py delete mode 100755 Developer/Qt Creator.app/Resources/askpass.py delete mode 100755 Developer/Zeal.app/Resources/askpass.py delete mode 100755 Falkon.app/Resources/askpass.py delete mode 100755 Graphics/Blender.app/Resources/askpass.py delete mode 100755 Graphics/GIMP.app/Resources/askpass.py delete mode 100755 Graphics/Inkscape.app/Resources/askpass.py delete mode 100755 Graphics/Krita.app/Resources/askpass.py delete mode 100755 Graphics/Scribus.app/Resources/askpass.py delete mode 100755 Graphics/Skanlite.app/Resources/askpass.py delete mode 100755 Office/LibreOffice.app/Resources/askpass.py delete mode 100755 Preferences/Boot Environments.app/Resources/askpass.py delete mode 100755 Preferences/Keyboard.app/Resources/askpass.py delete mode 100755 Preferences/Sharing.app/Resources/askpass.py delete mode 100755 Preferences/Users.app/Resources/askpass.py delete mode 100755 Preferences/Wireless Networks.app/Resources/askpass.py delete mode 100755 Utilities/Android File Transfer (MTP).app/Resources/askpass.py delete mode 100755 Utilities/Create Live Media.app/Resources/askpass.py delete mode 100755 Utilities/Hardware Probe.app/Resources/askpass.py delete mode 100755 Utilities/Install FreeBSD.app/Resources/askpass.py delete mode 100755 Video/OBS Studio.app/Resources/askpass.py delete mode 100755 Video/Shotcut.app/Resources/askpass.py diff --git a/3D Printing/FreeCAD.app/Resources/askpass.py b/3D Printing/FreeCAD.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/3D Printing/FreeCAD.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/3D Printing/PrusaSlicer.app/Resources/askpass.py b/3D Printing/PrusaSlicer.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/3D Printing/PrusaSlicer.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) 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 30acba09..00000000 --- a/3D Printing/Ultimaker Cura.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Audio/Audacity.app/Resources/askpass.py b/Audio/Audacity.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Audio/Audacity.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Audio/LMMS.app/Resources/askpass.py b/Audio/LMMS.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Audio/LMMS.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) 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 30acba09..00000000 --- a/Developer Preview/Disk First Aid.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) 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 30acba09..00000000 --- a/Developer Preview/Disk Utility.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) 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 30acba09..00000000 --- a/Developer Preview/Energy Saving.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) 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 30acba09..00000000 --- a/Developer Preview/Start Disk.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Developer/LiteIDE.app/Resources/askpass.py b/Developer/LiteIDE.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Developer/LiteIDE.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Developer/PyCharm CE.app/Resources/askpass.py b/Developer/PyCharm CE.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Developer/PyCharm CE.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Developer/Qt Creator.app/Resources/askpass.py b/Developer/Qt Creator.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Developer/Qt Creator.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Developer/Zeal.app/Resources/askpass.py b/Developer/Zeal.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Developer/Zeal.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Falkon.app/Resources/askpass.py b/Falkon.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Falkon.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Graphics/Blender.app/Resources/askpass.py b/Graphics/Blender.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Graphics/Blender.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Graphics/GIMP.app/Resources/askpass.py b/Graphics/GIMP.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Graphics/GIMP.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Graphics/Inkscape.app/Resources/askpass.py b/Graphics/Inkscape.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Graphics/Inkscape.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Graphics/Krita.app/Resources/askpass.py b/Graphics/Krita.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Graphics/Krita.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Graphics/Scribus.app/Resources/askpass.py b/Graphics/Scribus.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Graphics/Scribus.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Graphics/Skanlite.app/Resources/askpass.py b/Graphics/Skanlite.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Graphics/Skanlite.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Office/LibreOffice.app/Resources/askpass.py b/Office/LibreOffice.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Office/LibreOffice.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Preferences/Boot Environments.app/Resources/askpass.py b/Preferences/Boot Environments.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Preferences/Boot Environments.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Preferences/Keyboard.app/Resources/askpass.py b/Preferences/Keyboard.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Preferences/Keyboard.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Preferences/Sharing.app/Resources/askpass.py b/Preferences/Sharing.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Preferences/Sharing.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Preferences/Users.app/Resources/askpass.py b/Preferences/Users.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Preferences/Users.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Preferences/Wireless Networks.app/Resources/askpass.py b/Preferences/Wireless Networks.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Preferences/Wireless Networks.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) 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 30acba09..00000000 --- a/Utilities/Android File Transfer (MTP).app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) 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 30acba09..00000000 --- a/Utilities/Create Live Media.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Utilities/Hardware Probe.app/Resources/askpass.py b/Utilities/Hardware Probe.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Utilities/Hardware Probe.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Utilities/Install FreeBSD.app/Resources/askpass.py b/Utilities/Install FreeBSD.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Utilities/Install FreeBSD.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Video/OBS Studio.app/Resources/askpass.py b/Video/OBS Studio.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Video/OBS Studio.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) diff --git a/Video/Shotcut.app/Resources/askpass.py b/Video/Shotcut.app/Resources/askpass.py deleted file mode 100755 index 30acba09..00000000 --- a/Video/Shotcut.app/Resources/askpass.py +++ /dev/null @@ -1,36 +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. - -import os -from PyQt5 import QtWidgets - -text = "Password:" - -# SUDO_ASKPASS_TEXT is a non-standard environment variable. -# If it is set, we show its value in the dialog as a way for the program -# requesting root rights to let the user know the reason for doing so. -if os.environ.get('SUDO_ASKPASS_TEXT') is not None: - text = os.environ.get('SUDO_ASKPASS_TEXT') + "\n\n" + text - -app = QtWidgets.QApplication([]) -password, ok = QtWidgets.QInputDialog.getText(None, "sudo", text, QtWidgets.QLineEdit.Password) -if ok: - print(password) -app.exit(0) From 5e631d26e3752e3358c925dcbc7d6bdbf0f02802 Mon Sep 17 00:00:00 2001 From: William Kent Date: Fri, 21 May 2021 16:58:01 -0400 Subject: [PATCH 5/5] Use system copy of askpass script --- 3D Printing/FreeCAD.app/FreeCAD | 2 +- 3D Printing/PrusaSlicer.app/PrusaSlicer | 2 +- 3D Printing/Ultimaker Cura.app/Ultimaker Cura | 2 +- Audio/Audacity.app/Audacity | 2 +- Audio/LMMS.app/LMMS | 2 +- Developer Preview/Disk First Aid.app/Disk First Aid | 2 +- Developer Preview/Disk Utility.app/Disk Utility | 2 +- Developer Preview/Energy Saving.app/Energy Saving | 2 +- Developer Preview/Start Disk.app/Start Disk | 4 ++-- Developer/LiteIDE.app/LiteIDE | 2 +- Developer/PyCharm CE.app/PyCharm CE | 2 +- Developer/Qt Creator.app/Qt Creator | 2 +- Falkon.app/Falkon | 2 +- Graphics/Blender.app/Blender | 2 +- Graphics/GIMP.app/GIMP | 2 +- Graphics/Inkscape.app/Inkscape | 2 +- Graphics/Krita.app/Krita | 2 +- Graphics/Scribus.app/Scribus | 2 +- Graphics/Skanlite.app/Skanlite | 2 +- Office/LibreOffice.app/LibreOffice | 2 +- Preferences/Boot Environments.app/Boot Environments | 2 +- Preferences/Keyboard.app/Keyboard | 2 +- Preferences/Sharing.app/Sharing | 2 +- Preferences/Users.app/Users | 2 +- Preferences/Wireless Networks.app/Wireless Networks | 2 +- .../Android File Transfer (MTP) | 2 +- Utilities/Create Live Media.app/Create Live Media | 2 +- Utilities/Hardware Probe.app/Hardware Probe | 2 +- Utilities/Install FreeBSD.app/Install FreeBSD | 2 +- Video/OBS Studio.app/OBS Studio | 2 +- Video/Shotcut.app/Shotcut | 2 +- 31 files changed, 32 insertions(+), 32 deletions(-) diff --git a/3D Printing/FreeCAD.app/FreeCAD b/3D Printing/FreeCAD.app/FreeCAD index 428e698e..c3931487 100755 --- a/3D Printing/FreeCAD.app/FreeCAD +++ b/3D Printing/FreeCAD.app/FreeCAD @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/3D Printing/PrusaSlicer.app/PrusaSlicer b/3D Printing/PrusaSlicer.app/PrusaSlicer index 428e698e..c3931487 100755 --- a/3D Printing/PrusaSlicer.app/PrusaSlicer +++ b/3D Printing/PrusaSlicer.app/PrusaSlicer @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/3D Printing/Ultimaker Cura.app/Ultimaker Cura b/3D Printing/Ultimaker Cura.app/Ultimaker Cura index 428e698e..c3931487 100755 --- a/3D Printing/Ultimaker Cura.app/Ultimaker Cura +++ b/3D Printing/Ultimaker Cura.app/Ultimaker Cura @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Audio/Audacity.app/Audacity b/Audio/Audacity.app/Audacity index 428e698e..c3931487 100755 --- a/Audio/Audacity.app/Audacity +++ b/Audio/Audacity.app/Audacity @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Audio/LMMS.app/LMMS b/Audio/LMMS.app/LMMS index 428e698e..c3931487 100755 --- a/Audio/LMMS.app/LMMS +++ b/Audio/LMMS.app/LMMS @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) 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 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/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/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 428e698e..c3931487 100755 --- a/Developer/LiteIDE.app/LiteIDE +++ b/Developer/LiteIDE.app/LiteIDE @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Developer/PyCharm CE.app/PyCharm CE b/Developer/PyCharm CE.app/PyCharm CE index 428e698e..c3931487 100755 --- a/Developer/PyCharm CE.app/PyCharm CE +++ b/Developer/PyCharm CE.app/PyCharm CE @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Developer/Qt Creator.app/Qt Creator b/Developer/Qt Creator.app/Qt Creator index 428e698e..c3931487 100755 --- a/Developer/Qt Creator.app/Qt Creator +++ b/Developer/Qt Creator.app/Qt Creator @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Falkon.app/Falkon b/Falkon.app/Falkon index 428e698e..c3931487 100755 --- a/Falkon.app/Falkon +++ b/Falkon.app/Falkon @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Graphics/Blender.app/Blender b/Graphics/Blender.app/Blender index 428e698e..c3931487 100755 --- a/Graphics/Blender.app/Blender +++ b/Graphics/Blender.app/Blender @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Graphics/GIMP.app/GIMP b/Graphics/GIMP.app/GIMP index 428e698e..c3931487 100755 --- a/Graphics/GIMP.app/GIMP +++ b/Graphics/GIMP.app/GIMP @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Graphics/Inkscape.app/Inkscape b/Graphics/Inkscape.app/Inkscape index 428e698e..c3931487 100755 --- a/Graphics/Inkscape.app/Inkscape +++ b/Graphics/Inkscape.app/Inkscape @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Graphics/Krita.app/Krita b/Graphics/Krita.app/Krita index 428e698e..c3931487 100755 --- a/Graphics/Krita.app/Krita +++ b/Graphics/Krita.app/Krita @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Graphics/Scribus.app/Scribus b/Graphics/Scribus.app/Scribus index 428e698e..c3931487 100755 --- a/Graphics/Scribus.app/Scribus +++ b/Graphics/Scribus.app/Scribus @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) 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 428e698e..c3931487 100755 --- a/Office/LibreOffice.app/LibreOffice +++ b/Office/LibreOffice.app/LibreOffice @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) 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/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/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/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/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/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/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/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/Video/OBS Studio.app/OBS Studio b/Video/OBS Studio.app/OBS Studio index 428e698e..c3931487 100755 --- a/Video/OBS Studio.app/OBS Studio +++ b/Video/OBS Studio.app/OBS Studio @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env) diff --git a/Video/Shotcut.app/Shotcut b/Video/Shotcut.app/Shotcut index 428e698e..c3931487 100755 --- a/Video/Shotcut.app/Shotcut +++ b/Video/Shotcut.app/Shotcut @@ -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") env.insert("SUDO_ASKPASS_TEXT", "Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved)) self.ext_process.setProcessEnvironment(env)