Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update askpass.py user interface #63

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion 3D Printing/FreeCAD.app/FreeCAD
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class LiteInstaller(object):

self.ext_process.finished.connect(self.onProcessFinished)
env = QtCore.QProcessEnvironment.systemEnvironment()
env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py")
env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass")
env.insert("SUDO_ASKPASS_TEXT",
"Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved))
self.ext_process.setProcessEnvironment(env)
self.ext_process.setProgram("sudo")
args = ["-A", "-E", "pkg", "install", "-y"] + self.packages
Expand Down
28 changes: 0 additions & 28 deletions 3D Printing/FreeCAD.app/Resources/askpass.py

This file was deleted.

4 changes: 3 additions & 1 deletion 3D Printing/PrusaSlicer.app/PrusaSlicer
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class LiteInstaller(object):

self.ext_process.finished.connect(self.onProcessFinished)
env = QtCore.QProcessEnvironment.systemEnvironment()
env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py")
env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass")
env.insert("SUDO_ASKPASS_TEXT",
"Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved))
self.ext_process.setProcessEnvironment(env)
self.ext_process.setProgram("sudo")
args = ["-A", "-E", "pkg", "install", "-y"] + self.packages
Expand Down
28 changes: 0 additions & 28 deletions 3D Printing/PrusaSlicer.app/Resources/askpass.py

This file was deleted.

28 changes: 0 additions & 28 deletions 3D Printing/Ultimaker Cura.app/Resources/askpass.py

This file was deleted.

4 changes: 3 additions & 1 deletion 3D Printing/Ultimaker Cura.app/Ultimaker Cura
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class LiteInstaller(object):

self.ext_process.finished.connect(self.onProcessFinished)
env = QtCore.QProcessEnvironment.systemEnvironment()
env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py")
env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass")
env.insert("SUDO_ASKPASS_TEXT",
"Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved))
self.ext_process.setProcessEnvironment(env)
self.ext_process.setProgram("sudo")
args = ["-A", "-E", "pkg", "install", "-y"] + self.packages
Expand Down
4 changes: 3 additions & 1 deletion Audio/Audacity.app/Audacity
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class LiteInstaller(object):

self.ext_process.finished.connect(self.onProcessFinished)
env = QtCore.QProcessEnvironment.systemEnvironment()
env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py")
env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass")
env.insert("SUDO_ASKPASS_TEXT",
"Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved))
self.ext_process.setProcessEnvironment(env)
self.ext_process.setProgram("sudo")
args = ["-A", "-E", "pkg", "install", "-y"] + self.packages
Expand Down
28 changes: 0 additions & 28 deletions Audio/Audacity.app/Resources/askpass.py

This file was deleted.

4 changes: 3 additions & 1 deletion Audio/LMMS.app/LMMS
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class LiteInstaller(object):

self.ext_process.finished.connect(self.onProcessFinished)
env = QtCore.QProcessEnvironment.systemEnvironment()
env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py")
env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass")
env.insert("SUDO_ASKPASS_TEXT",
"Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved))
self.ext_process.setProcessEnvironment(env)
self.ext_process.setProgram("sudo")
args = ["-A", "-E", "pkg", "install", "-y"] + self.packages
Expand Down
28 changes: 0 additions & 28 deletions Audio/LMMS.app/Resources/askpass.py

This file was deleted.

2 changes: 1 addition & 1 deletion Developer Preview/Disk First Aid.app/Disk First Aid
Original file line number Diff line number Diff line change
@@ -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" "$@"
28 changes: 0 additions & 28 deletions Developer Preview/Disk First Aid.app/Resources/askpass.py

This file was deleted.

2 changes: 1 addition & 1 deletion Developer Preview/Disk Utility.app/Disk Utility
Original file line number Diff line number Diff line change
@@ -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" "$@"
28 changes: 0 additions & 28 deletions Developer Preview/Disk Utility.app/Resources/askpass.py

This file was deleted.

2 changes: 1 addition & 1 deletion Developer Preview/Energy Saving.app/Energy Saving
Original file line number Diff line number Diff line change
@@ -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" "$@"
28 changes: 0 additions & 28 deletions Developer Preview/Energy Saving.app/Resources/askpass.py

This file was deleted.

28 changes: 0 additions & 28 deletions Developer Preview/Start Disk.app/Resources/askpass.py

This file was deleted.

4 changes: 2 additions & 2 deletions Developer Preview/Start Disk.app/Start Disk
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down Expand Up @@ -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", "")])
Expand Down
4 changes: 3 additions & 1 deletion Developer/LiteIDE.app/LiteIDE
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class LiteInstaller(object):

self.ext_process.finished.connect(self.onProcessFinished)
env = QtCore.QProcessEnvironment.systemEnvironment()
env.insert("SUDO_ASKPASS", os.path.dirname(self.file_symlink_resolved) + "/Resources/askpass.py")
env.insert("SUDO_ASKPASS", "/usr/local/bin/askpass")
env.insert("SUDO_ASKPASS_TEXT",
"Administrator privilege is required to install %s." % os.path.basename(self.file_symlink_resolved))
self.ext_process.setProcessEnvironment(env)
self.ext_process.setProgram("sudo")
args = ["-A", "-E", "pkg", "install", "-y"] + self.packages
Expand Down
28 changes: 0 additions & 28 deletions Developer/LiteIDE.app/Resources/askpass.py

This file was deleted.

Loading