From ba63c08e5b0fe7f3994e03b2084d5dc4c151fcaa Mon Sep 17 00:00:00 2001 From: Pila Date: Sat, 12 Sep 2026 10:16:02 +0200 Subject: [PATCH] Launcher : do not launch mintUpdate if process already running to prevent hiding the window when the user started mintUpdate before the launcher. Closes #997 --- debian/control | 1 + usr/bin/mintupdate-launcher | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/debian/control b/debian/control index 229774e7..23ee817d 100644 --- a/debian/control +++ b/debian/control @@ -17,6 +17,7 @@ Depends: aptkit, distro-info-data, psmisc, + procps, python3-apt, python3-multiprocess, python3-pycurl, diff --git a/usr/bin/mintupdate-launcher b/usr/bin/mintupdate-launcher index 331efa41..600b2a37 100755 --- a/usr/bin/mintupdate-launcher +++ b/usr/bin/mintupdate-launcher @@ -9,5 +9,12 @@ if __name__ == "__main__": print("Error: Do not run this as root") exit(1) + if subprocess.run( + ["pgrep", "-x", "mintUpdate"], + stdout=subprocess.DEVNULL, + ).returncode == 0: + print("mintupdate already running") + exit(0) + if ((not xapp.os.is_live_session()) and (not xapp.os.is_guest_session())): subprocess.Popen(["/usr/lib/linuxmint/mintUpdate/mintUpdate.py"])