| 1 |
#!/usr/bin/python3 |
| 2 |
|
| 3 |
DOMAIN = "lightdm-settings" |
| 4 |
PATH = "/usr/share/locale" |
| 5 |
|
| 6 |
import os, gettext |
| 7 |
from mintcommon import additionalfiles |
| 8 |
|
| 9 |
os.environ['LANGUAGE'] = "en_US.UTF-8" |
| 10 |
gettext.install(DOMAIN, PATH) |
| 11 |
|
| 12 |
prefix = """[Desktop Entry] |
| 13 |
Encoding=UTF-8 |
| 14 |
""" |
| 15 |
|
| 16 |
suffix = """Exec=pkexec lightdm-settings |
| 17 |
Icon=lightdm-settings |
| 18 |
StartupNotify=true |
| 19 |
Terminal=false |
| 20 |
Type=Application |
| 21 |
Categories=GNOME;GTK;Settings;System;XFCE;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; |
| 22 |
X-KDE-SubstituteUID=true |
| 23 |
""" |
| 24 |
|
| 25 |
additionalfiles.generate(DOMAIN, PATH, "usr/share/applications/lightdm-settings.desktop", prefix, _("Login Window"), _("Configure the login window"), suffix) |
| 26 |
|
| 27 |
prefix="""<?xml version="1.0" encoding="UTF-8"?> |
| 28 |
<!DOCTYPE policyconfig PUBLIC |
| 29 |
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" |
| 30 |
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> |
| 31 |
<policyconfig> |
| 32 |
|
| 33 |
<vendor>Linux Mint</vendor> |
| 34 |
<vendor_url>https://linuxmint.com/</vendor_url> |
| 35 |
|
| 36 |
<action id="org.x.lightdm-settings"> |
| 37 |
""" |
| 38 |
|
| 39 |
suffix=""" |
| 40 |
<icon_name>preferences-system-login</icon_name> |
| 41 |
<defaults> |
| 42 |
<allow_any>auth_admin_keep</allow_any> |
| 43 |
<allow_inactive>auth_admin_keep</allow_inactive> |
| 44 |
<allow_active>auth_admin_keep</allow_active> |
| 45 |
</defaults> |
| 46 |
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/lightdm-settings</annotate> |
| 47 |
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> |
| 48 |
</action> |
| 49 |
|
| 50 |
</policyconfig>""" |
| 51 |
|
| 52 |
additionalfiles.generate_polkit_policy(DOMAIN, PATH, "usr/share/polkit-1/actions/org.x.lightdm-settings.policy", prefix, _("Login Window"), suffix) |