Fix autostart in flatpak

This commit is contained in:
Bernd Schoolmann 2024-02-17 07:20:13 +01:00
parent f6c501f0d2
commit 592ff48148
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -30,7 +30,7 @@ def request_autostart():
'handle_token': GLib.Variant('s', f'com/quexten/Goldwarden/{token}'),
'reason': GLib.Variant('s', ('Autostart Goldwarden in the background.')),
'autostart': GLib.Variant('b', True),
'commandline': GLib.Variant('as', ['main.py', '--hidden']),
'commandline': GLib.Variant('as', ['goldwarden_ui_main.py', '--hidden']),
'dbus-activatable': GLib.Variant('b', False),
}

View File

@ -47,7 +47,8 @@ def main():
if is_flatpak:
# to autostart the appes
try:
subprocess.Popen(["python3", f'{source_path}/background.py'], start_new_session=True)
print("Enabling autostart...")
subprocess.Popen(["python3", "-m", "src.linux.background"], cwd=root_path, start_new_session=True)
except Exception as e:
pass