File slimbookface-howdy.patch of Package slimbookface
diff --git a/source/bin/disable_login.sh b/source/bin/disable_login.sh
index 8103040..5926c6e 100644
--- a/source/bin/disable_login.sh
+++ b/source/bin/disable_login.sh
@@ -1,40 +1,40 @@
#!/bin/bash
if test "$1" = "disable"; then
- sed -i '/howdy/ c#auth [success=2 default=ignore] pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/common-auth
+ sed -i '/howdy/ c#auth [success=2 default=ignore] pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/common-auth
if grep -q howdy "/etc/pam.d/sudo"; then
- sed -i '/howdy/ cauth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/sudo
+ sed -i '/howdy/ cauth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/sudo
else
- sed -i '/%PAM-1.0/ c#%PAM-1.0\nauth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/sudo
+ sed -i '/%PAM-1.0/ c#%PAM-1.0\nauth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/sudo
fi
if grep -q howdy "/etc/pam.d/polkit-1"; then
- sed -i '/howdy/ cauth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/polkit-1
+ sed -i '/howdy/ cauth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/polkit-1
else
- sed -i '/%PAM-1.0/ c#%PAM-1.0\nauth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/polkit-1
+ sed -i '/%PAM-1.0/ c#%PAM-1.0\nauth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/polkit-1
fi
elif test "$1" = "enable"; then
- sed -i '/howdy/ cauth [success=2 default=ignore] pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/common-auth
+ sed -i '/howdy/ cauth [success=2 default=ignore] pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/common-auth
if grep -q howdy "/etc/pam.d/sudo"; then
- sed -i '/howdy/ c#auth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/sudo
+ sed -i '/howdy/ c#auth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/sudo
else
- sed -i '/%PAM-1.0/ c#%PAM-1.0\n#auth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/sudo
+ sed -i '/%PAM-1.0/ c#%PAM-1.0\n#auth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/sudo
fi
if grep -q howdy "/etc/pam.d/polkit-1"; then
- sed -i '/howdy/ c#auth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/polkit-1
+ sed -i '/howdy/ c#auth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/polkit-1
else
- sed -i '/%PAM-1.0/ c#%PAM-1.0\n#auth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/polkit-1
+ sed -i '/%PAM-1.0/ c#%PAM-1.0\n#auth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/polkit-1
fi
else
- sed -i '/howdy/ c#auth [success=2 default=ignore] pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/common-auth
+ sed -i '/howdy/ c#auth [success=2 default=ignore] pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/common-auth
if grep -q howdy "/etc/pam.d/sudo"; then
- sed -i '/howdy/ cauth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/sudo
+ sed -i '/howdy/ cauth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/sudo
else
- sed -i '/%PAM-1.0/ c#%PAM-1.0\nauth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/sudo
+ sed -i '/%PAM-1.0/ c#%PAM-1.0\nauth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/sudo
fi
if grep -q howdy "/etc/pam.d/polkit-1"; then
- sed -i '/howdy/ cauth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/polkit-1
+ sed -i '/howdy/ cauth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/polkit-1
else
- sed -i '/%PAM-1.0/ c#%PAM-1.0\nauth sufficient pam_python.so /lib/security/howdy/pam.py' /etc/pam.d/polkit-1
+ sed -i '/%PAM-1.0/ c#%PAM-1.0\nauth sufficient pam_python3.so /lib64/security/howdy/pam.py' /etc/pam.d/polkit-1
fi
reboot
fi
diff --git a/source/src/slimbookface-howdy.py b/source/src/slimbookface-howdy.py
index 392b7ec..a948177 100644
--- a/source/src/slimbookface-howdy.py
+++ b/source/src/slimbookface-howdy.py
@@ -13,10 +13,10 @@ from gi.repository import Gtk
# insert at 1, 0 is the script path (or '' in REPL)
-sys.path.insert(1, '/lib/security/howdy/recorders')
+sys.path.insert(1, '/lib64/security/howdy/recorders')
def get_value(variable):
- config_file = '/lib/security/howdy/config.ini'
+ config_file = '/lib64/security/howdy/config.ini'
call = subprocess.getstatusoutput("cat "+config_file)[1]
patron = variable+".*=[ ](.*)"
patron_res = re.compile(patron)
@@ -60,7 +60,7 @@ def main(accion, arg2):
#print(str(variable))
- config_file = '/lib/security/howdy/config.ini'
+ config_file = '/lib64/security/howdy/config.ini'
patron = variable + ".*=.*"
#print("sudo sed -i 's|"+patron+"|"+variable+" = "+value+"|g' "+config_file)
@@ -73,4 +73,4 @@ def main(accion, arg2):
if __name__ == "__main__":
#Se obtiene las variables que se le pasa desde el archivo /usr/share/slimbookface/slimbookface
- main(sys.argv[1], sys.argv[2])
\ No newline at end of file
+ main(sys.argv[1], sys.argv[2])
diff --git a/source/src/slimbookface.py b/source/src/slimbookface.py
index d65b0c2..eeb93d6 100644
--- a/source/src/slimbookface.py
+++ b/source/src/slimbookface.py
@@ -27,18 +27,17 @@ userpath = expanduser("~")
user = getpass.getuser()
print(user)
currpath = os.path.dirname(os.path.realpath(__file__))
-models_path = '/lib/security/howdy/models/'+ user +'.dat'
+models_path = '/lib64/security/howdy/models/'+ user +'.dat'
try:
entorno_usu = locale.getlocale()[0]
- if entorno_usu.find("en") >= 0 or entorno_usu.find("es") >= 0:
+ if entorno_usu.find("en") >= 0 or entorno_usu.find("it") >= 0 or entorno_usu.find("es") >= 0:
idiomas = [entorno_usu]
else:
idiomas = ['en']
except:
idiomas = ['en']
-
t = gettext.translation('slimbookface',
currpath+'/locale',
languages=idiomas,
@@ -156,7 +155,7 @@ class SlimbookFace(Gtk.Window):
evnt_activate.connect("button_press_event", self._btnActivate_clicked, iconActivate, lbl_activate)
# Loading state
- if os.system('cat /lib/security/howdy/config.ini | grep disabled | grep false') == 0:
+ if os.system('cat /lib64/security/howdy/config.ini | grep disabled | grep false') == 0:
iconActivate.set_name("clicked")
else:
@@ -182,7 +181,7 @@ class SlimbookFace(Gtk.Window):
# Loading state
- if os.path.isfile('/lib/security/howdy/config.ini'):
+ if os.path.isfile('/lib64/security/howdy/config.ini'):
if subprocess.getstatusoutput('cat /etc/pam.d/common-auth | grep howdy | grep "#"')[0] == 0:
iconLogin.set_name("released")
@@ -296,7 +295,7 @@ class SlimbookFace(Gtk.Window):
rb_box.set_name("radios")
try:
- config_file = '/lib/security/howdy/config.ini'
+ config_file = '/lib64/security/howdy/config.ini'
call = subprocess.getstatusoutput("cat "+config_file)[1]
patron = "certainty.*=[ ](.*)"
patron_res = re.compile(patron)
@@ -556,7 +555,7 @@ class SlimbookFace(Gtk.Window):
def installDriver(self):
try:
subprocess.Popen(
- ["x-terminal-emulator --new-tab --hold -e $SHELL -c '"+
+ ["konsole --new-tab --hold -e $SHELL -c '"+
"echo \033[34m---SLIMBOOK FACE---\033[0m;"+
"echo $SHELL;"+
"echo \033[91m"+ (_('strterminalfollowsteps')) +"\033[0m;"+
@@ -593,16 +592,16 @@ class SlimbookFace(Gtk.Window):
if subprocess.getstatusoutput('which howdy')[0] == 0:
- if os.path.isfile('/lib/security/howdy/config.ini'):
+ if os.path.isfile('/lib64/security/howdy/config.ini'):
# If howdy is DISabled
- if os.system('cat /lib/security/howdy/config.ini | grep disabled | grep true') == 0:
+ if os.system('cat /lib64/security/howdy/config.ini | grep disabled | grep true') == 0:
# If command enable works
cmd = 'pkexec slimbookface-howdy-pkexec enable none'
try:
subprocess.Popen(
- ["x-terminal-emulator --new-tab -e $SHELL -c '"+
+ ["konsole --new-tab -e $SHELL -c '"+
cmd+"; "+
"exit 0'"], shell=True, stdin=None, stdout=None, stderr=None, close_fds=True)
@@ -623,7 +622,7 @@ class SlimbookFace(Gtk.Window):
try:
subprocess.Popen(
- ["x-terminal-emulator --new-tab -e $SHELL -c '"+
+ ["konsole --new-tab -e $SHELL -c '"+
cmd+"; "+
"exit 0'"], shell=True, stdin=None, stdout=None, stderr=None, close_fds=True)
@@ -646,7 +645,7 @@ class SlimbookFace(Gtk.Window):
#print("Login clicked")
if subprocess.getstatusoutput('which howdy')[0] == 0:
- if os.path.isfile('/lib/security/howdy/config.ini'):
+ if os.path.isfile('/lib64/security/howdy/config.ini'):
if subprocess.getstatusoutput('cat /etc/pam.d/common-auth | grep howdy | grep "#"')[0] == 0: #if disabled
@@ -698,7 +697,7 @@ class SlimbookFace(Gtk.Window):
#Saving datetime of file modification
try:
- dtBefore = os.path.getmtime('/lib/security/howdy/models/'+ user +'.dat')
+ dtBefore = os.path.getmtime('/lib64/security/howdy/models/'+ user +'.dat')
lastModModelFileBefore = datetime.fromtimestamp(dtBefore)
except:
lastModModelFileBefore = ""
@@ -713,7 +712,7 @@ class SlimbookFace(Gtk.Window):
addFace_dialog.destroy()
#Saving again datetime of file modification to check if it has been saved
- #dtAfter = os.path.getmtime('/lib/security/howdy/models/'+ user +'.dat')
+ #dtAfter = os.path.getmtime('/lib64/security/howdy/models/'+ user +'.dat')
#lastModModelFileAfter = datetime.fromtimestamp(dtAfter)
os.system("sleep 5")
@@ -794,7 +793,7 @@ class SlimbookFace(Gtk.Window):
try:
subprocess.Popen(
- ["x-terminal-emulator --new-tab -e $SHELL -c '"+
+ ["konsole --new-tab -e $SHELL -c '"+
cmd+"; "+
"exit 0'"], shell=True, stdin=None, stdout=None, stderr=None, close_fds=True)
@@ -882,7 +881,7 @@ class SlimbookFace(Gtk.Window):
if self.update_config_file("certainty", str(cert)) == 0:
print("Updated to "+radiobutton.get_name())
- config_file = '/lib/security/howdy/config.ini'
+ config_file = '/lib64/security/howdy/config.ini'
call = subprocess.getstatusoutput("cat "+config_file)[1]
patron = "certainty.*=[ ](.*)"
patron_res = re.compile(patron)
@@ -901,7 +900,7 @@ class SlimbookFace(Gtk.Window):
try:
subprocess.Popen(
- ["x-terminal-emulator --new-tab -e $SHELL -c '"+
+ ["konsole --new-tab -e $SHELL -c '"+
cmd+"; "+
"exit 0'"], shell=True, stdin=None, stdout=None, stderr=None, close_fds=True)
@@ -912,7 +911,7 @@ class SlimbookFace(Gtk.Window):
def get_value(self, variable):
- config_file = '/lib/security/howdy/config.ini'
+ config_file = '/lib64/security/howdy/config.ini'
call = subprocess.getstatusoutput("cat "+config_file)[1]
patron = variable+".*=[ ](.*)"
patron_res = re.compile(patron)
@@ -1085,7 +1084,7 @@ class AddFaceDialog(Gtk.Dialog):
subprocess.Popen(
- ["x-terminal-emulator -e $SHELL -c '"+
+ ["konsole -e $SHELL -c '"+
cmd+"; "+
"exit 0'"], shell=True, stdin=None, stdout=None, stderr=None, close_fds=True)
@@ -1118,7 +1117,7 @@ class AddFaceDialog(Gtk.Dialog):
try:
subprocess.Popen(
- ["x-terminal-emulator --new-tab -e $SHELL -c '"+
+ ["konsole --new-tab -e $SHELL -c '"+
cmd+"; "+
"exit 0'"], shell=True, stdin=None, stdout=None, stderr=None, close_fds=True)