SUMMARY Configuring a keyboard shortcut to execute a command in system settings does appear to not always execute the entire command as configured. For example, launching a new private window for Firefox from konsole via either `firefox --private-window` for the package version, or `flatpak run firefox --private-window` works as expected. However, when creating keyboard shortcuts of the same commands via system settings, it only works as expected for the package version, and not the flatpak version. The flatpak command launched from the system settings keyboard shortcut seemingly ignores the `--private-window` option and simply opens a normal new window. I do not use any other flatpaks with optional flags, so I can't tell if this problem is specific to the Firefox flatpak. I also do not know if there are other scenarios with tools other than flatpak, which might also exhibit similar behavior. STEPS TO REPRODUCE 1. install the Flatpak org.mozilla.firefox from Flathub (tested with v145.0.2) 2. create a keyboard shortcut in system settings to execute the command `flatpak run firefox --private-window` 3. apply the changes 4. press the configured shortcut OBSERVED RESULT Firefox opens a normal window. EXPECTED RESULT Firefox opens a private window. SOFTWARE/OS VERSIONS Operating System: Nobara Linux 43 KDE Plasma Version: 6.5.3 KDE Frameworks Version: 6.20.0 Qt Version: 6.10.0 ADDITIONAL INFORMATION - originally observed on Plasma 6.5.2, Frameworks 6.19.0 and Qt 6.9.3, but also never attempted on earlier versions - original thread about the issue: https://discuss.kde.org/t/kde-system-settings-keyboard-shortcuts-commands-not-behaving-as-expected/41912 - creating a .desktop file which run the same command, assigning a shortcut to the .desktop file via KDE Menu Editor and executing the shortcut opens a new private window as expected, giving the impression that the issue lies with how system settings parses or executes configured shortcut commands - it doesn't make a difference if the command is `flatpak run firefox --private-window` or `/usr/bin/flatpak run firefox --private-window`
> - creating a .desktop file which run the same command, assigning a shortcut to the .desktop file via KDE Menu Editor and executing the shortcut opens a new private window as expected, giving the impression that the issue lies with how system settings parses or executes configured shortcut commands This point turned out to be false. After looking into this more, it turned out I somehow had two non-default .desktop files with the same Name value in `~/.local/share/applications` and the one being executed was not the one with the "short" `flatpak run` command mentioned in this report. Attempting to launch `flatpak run firefox --private-window` or `/usr/bin/flatpak run firefox --private-window` through a .desktop file also does not work, it just shows the bouncing app icon for a bit and then nothing happens.
You installed firefox via flatpak flatpak run firefox will not work, flatpak expects the the full id of the flatpak. You should see this when you run the command in a terminal it should be something like flatpak run org.mozilla.firefox
(In reply to David Redondo from comment #2) > You installed firefox via flatpak > > flatpak run firefox will not work, flatpak expects the the full id of the > flatpak. You should see this when you run the command in a terminal > > it should be something like flatpak run org.mozilla.firefox Since I wrote this on a device not using the flatpak, I seem to have forgotten to add the rest of the flatpak id. However, this doesn't change anything else, it is just a mistake I made when writing the report, not when experiencing or reproducing the issue with 100% success rate. Just to confirm I didn't dream this, I repeated the reproduction steps again with the correct package id, and everything misbehaves as reported via system settings, while it works properly via the terminal.