diff --git a/src/vorta/__main__.py b/src/vorta/__main__.py index 9437c9e4..25168460 100644 --- a/src/vorta/__main__.py +++ b/src/vorta/__main__.py @@ -17,7 +17,7 @@ def main(): frozen_binary = getattr(sys, 'frozen', False) want_version = getattr(args, 'version', False) - want_foreground = getattr(args, 'foreground', False) + want_foreground = getattr(args, 'foreground', False) and not getattr(args, 'daemonize', False) if want_version: print(f"Vorta {__version__}") diff --git a/src/vorta/application.py b/src/vorta/application.py index 66575623..2196be89 100644 --- a/src/vorta/application.py +++ b/src/vorta/application.py @@ -54,7 +54,7 @@ class VortaApp(QtSingleApplication): self.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5()) args = parse_args() - if not (hasattr(args, 'background') and args.background): + if not (hasattr(args, 'daemonize') and args.daemonize): if (hasattr(args, 'foreground') and args.foreground) or SettingsModel.get(key='foreground').value: self.open_main_window_action() diff --git a/src/vorta/autostart.py b/src/vorta/autostart.py index c1d6f33f..1f7094f9 100644 --- a/src/vorta/autostart.py +++ b/src/vorta/autostart.py @@ -5,7 +5,7 @@ LINUX_STARTUP_FILE = """\ [Desktop Entry] Name=Vorta GenericName=Backup Software -Exec={} --background +Exec={} --daemonize Terminal=false Icon=com.borgbase.Vorta Categories=Utility diff --git a/src/vorta/utils.py b/src/vorta/utils.py index 6edc3af7..ee3a2221 100644 --- a/src/vorta/utils.py +++ b/src/vorta/utils.py @@ -182,9 +182,9 @@ def parse_args(): action='store_true', help="Don't fork into background and open main window on startup.") if sys.platform.startswith("linux"): - parser.add_argument('--background', '-b', + parser.add_argument('--daemonize', '-d', action='store_true', - help="Fork into background. This option takes precedence over other settings.") + help="Daemonize and don't open window on startup.") return parser.parse_known_args()[0]