From 79ca73016cfafb0b96e6ca6d373d38eb368c809d Mon Sep 17 00:00:00 2001 From: fredcw <58893963+fredcw@users.noreply.github.com> Date: Tue, 3 Feb 2026 17:29:15 +0000 Subject: [PATCH 1/2] mintinstall: add command line option "show" Add command line option `mintinstall show ` to open mintinstall on the details page of a specific package. This can be used e.g. in a menu applet to show information about a particular app. --- usr/bin/mintinstall | 3 ++- usr/lib/linuxmint/mintinstall/mintinstall.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/usr/bin/mintinstall b/usr/bin/mintinstall index 860a2c4c..24ad9667 100755 --- a/usr/bin/mintinstall +++ b/usr/bin/mintinstall @@ -2,6 +2,7 @@ import subprocess import os +import sys # Remove any obsolete configuration file obsolete_path = os.path.expanduser("~/.config/autostart/mintinstall-update-flatpak.desktop") @@ -11,4 +12,4 @@ if os.path.exists(obsolete_path): except: pass -subprocess.call("/usr/lib/linuxmint/mintinstall/mintinstall.py") +subprocess.call(["/usr/lib/linuxmint/mintinstall/mintinstall.py"] + sys.argv[1:]) diff --git a/usr/lib/linuxmint/mintinstall/mintinstall.py b/usr/lib/linuxmint/mintinstall/mintinstall.py index 044d0b9b..c00edfb0 100755 --- a/usr/lib/linuxmint/mintinstall/mintinstall.py +++ b/usr/lib/linuxmint/mintinstall/mintinstall.py @@ -647,6 +647,7 @@ def __init__(self): self.recursion_buster = False self.install_on_startup_file = None + self.show_on_startup_pkg = None self.review_cache = None self.current_pkginfo = None @@ -701,6 +702,10 @@ def do_command_line(self, command_line, data=None): sys.exit(self.export_listing(flatpak_only=False)) elif num > 1 and args[1] == "list-flatpak": sys.exit(self.export_listing(flatpak_only=True)) + elif num == 3 and args[1] == "show": + self.show_on_startup_pkg = args[2] + self.activate() + return 0 elif num == 3 and args[1] == "install": for try_method in (Gio.File.new_for_path, Gio.File.new_for_uri): file = try_method(args[2]) @@ -2176,6 +2181,15 @@ def finished_loading_packages(self): self.gui_ready = True self.update_conditional_widgets() + if self.show_on_startup_pkg is not None: + pkginfo = self.installer.find_pkginfo(self.show_on_startup_pkg, installer.PKG_TYPE_APT) + if not pkginfo: + pkginfo = self.installer.find_pkginfo(self.show_on_startup_pkg, installer.PKG_TYPE_FLATPAK) + if pkginfo: + self.show_package(pkginfo, self.PAGE_LANDING) + else: + print(f"MintInstall: Package {self.show_on_startup_pkg} not found.") + if self.install_on_startup_file is not None: self.handle_command_line_install(self.install_on_startup_file) From 8e7fb859b9ba5039cd6ccc62a48dc40fabfb733f Mon Sep 17 00:00:00 2001 From: fredcw <58893963+fredcw@users.noreply.github.com> Date: Tue, 3 Feb 2026 18:45:51 +0000 Subject: [PATCH 2/2] With command line option "show", set to details page even... ...if mintinstall window is already open --- usr/lib/linuxmint/mintinstall/mintinstall.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/usr/lib/linuxmint/mintinstall/mintinstall.py b/usr/lib/linuxmint/mintinstall/mintinstall.py index c00edfb0..c9414ca9 100755 --- a/usr/lib/linuxmint/mintinstall/mintinstall.py +++ b/usr/lib/linuxmint/mintinstall/mintinstall.py @@ -703,7 +703,19 @@ def do_command_line(self, command_line, data=None): elif num > 1 and args[1] == "list-flatpak": sys.exit(self.export_listing(flatpak_only=True)) elif num == 3 and args[1] == "show": - self.show_on_startup_pkg = args[2] + target_pkg = args[2] + if self.gui_ready: + pkginfo = self.installer.find_pkginfo(target_pkg, installer.PKG_TYPE_APT) + if not pkginfo: + pkginfo = self.installer.find_pkginfo(target_pkg, installer.PKG_TYPE_FLATPAK) + if pkginfo: + self.show_package(pkginfo, self.PAGE_LANDING) + self.main_window.present() + else: + print(f"MintInstall: Package {target_pkg} not found.") + else: + self.show_on_startup_pkg = target_pkg + self.activate() return 0 elif num == 3 and args[1] == "install": @@ -2189,6 +2201,7 @@ def finished_loading_packages(self): self.show_package(pkginfo, self.PAGE_LANDING) else: print(f"MintInstall: Package {self.show_on_startup_pkg} not found.") + self.show_on_startup_pkg = None if self.install_on_startup_file is not None: self.handle_command_line_install(self.install_on_startup_file)