mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-10 08:52:21 +03:00
ahenk register and unregister configured for gnome user list
This commit is contained in:
parent
6fc6f7e88c
commit
8b565ccf69
1 changed files with 12 additions and 11 deletions
|
@ -366,22 +366,23 @@ class Registration:
|
||||||
self.util.delete_file(pardus_xfce_path)
|
self.util.delete_file(pardus_xfce_path)
|
||||||
|
|
||||||
if self.desktop_env == "gnome":
|
if self.desktop_env == "gnome":
|
||||||
pardus_gnome_path = "/etc/gdm3/greeter.dconf-default"
|
pardus_gnome_path = "/etc/gdm3/greeter.dconf-defaults"
|
||||||
if not self.util.is_exist(pardus_gnome_path):
|
if not self.util.is_exist(pardus_gnome_path):
|
||||||
self.logger.info("Pardus-gnome.conf does not exist.")
|
self.logger.info("Gnome conf doesn't exist")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.logger.info("Pardus-gnome.conf exists.")
|
reading_file = open(pardus_gnome_path, "r")
|
||||||
file_gmd3 = open(pardus_gnome_path,'r')
|
|
||||||
file_data = file_gmd3.read()
|
|
||||||
|
|
||||||
file_data = file_data.replace("disable-user-list=true", "# disable-user-list=true")
|
new_file_content = ""
|
||||||
|
for line in reading_file:
|
||||||
file_gdm3.close()
|
stripped_line = line.strip()
|
||||||
file_gdm3 = open(pardus_gnome_path, 'w')
|
new_line = stripped_line.replace("disable-user-list=true", "# disable-user-list=true")
|
||||||
file_gdm3.write(file_data)
|
new_file_content += new_line + "\n"
|
||||||
file_gdm3.close()
|
reading_file.close()
|
||||||
|
|
||||||
|
writing_file = open(pardus_gnome_path, "w")
|
||||||
|
writing_file.write(new_file_content)
|
||||||
|
writing_file.close()
|
||||||
self.logger.info("gdm.conf has been configured.")
|
self.logger.info("gdm.conf has been configured.")
|
||||||
|
|
||||||
Util.shutdown()
|
Util.shutdown()
|
||||||
|
|
Loading…
Reference in a new issue