Skip to content
Merged
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
8 changes: 4 additions & 4 deletions leads_vec/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
L as _L, load_config as _load_config, register_config as _register_config, reset as _reset
from leads.data_persistence import Dataset as _Dataset
from leads_gui import Config as _Config
from leads_gui.system import get_system_kernel as _get_system_platform
from leads_gui.system import get_system_kernel as _get_system_kernel

if __name__ == "__main__":
_filterwarnings("ignore")
Expand Down Expand Up @@ -49,7 +49,7 @@
except _PackageNotFoundError:
_L.warn("Failed to retrieve package version (did you install through pip?)")
_L.info(f"LEADS VeC",
f"System Platform: {_get_system_platform()}",
f"System Kernel: {_get_system_kernel().upper()}",
f"Python Version: {_version}",
f"`frpc` Available: {_frpc_exists()}",
f"Module Path: {_MODULE_PATH}",
Expand All @@ -58,7 +58,7 @@
sep="\n")
_exit()
if args.register == "systemd":
if _get_system_platform() != "linux":
if _get_system_kernel() != "linux":
_exit("Error: Unsupported operating system")
if not _exists("/usr/local/leads/config.json"):
_L.info("Config file not found. Creating \"/usr/local/leads/config.json\"...")
Expand Down Expand Up @@ -94,7 +94,7 @@
config.auto_magnify_font_sizes()
_register_config(config)
if args.xws:
if _get_system_platform() != "linux":
if _get_system_kernel() != "linux":
_exit("Error: Unsupported operating system")
from os import getuid as _getuid
from pwd import getpwuid as _getpwuid
Expand Down
5 changes: 2 additions & 3 deletions leads_vec/_bootloader/systemd.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from os import chmod as _chmod, getuid as _getuid
from os import chmod as _chmod, getlogin as _get_login
from os.path import abspath as _abspath
from pwd import getpwuid as _getpwuid


def create_service() -> None:
Expand All @@ -13,7 +12,7 @@ def create_service() -> None:
"Requires=display-manager.service\n"
"[Service]\n"
"Type=simple\n"
f"User={(user := _getpwuid(_getuid()).pw_name)}\n"
f"User={(user := _get_login())}\n"
"Environment=\"DISPLAY=:0\"\n"
f"Environment=\"XAUTHORITY=/home/{user}/.Xauthority\"\n"
f"ExecStart=/bin/sh {script}\n"
Expand Down