` --noclose` breaks `konsole -e`. Why?

rokejulianlockhart@RQN6C6:~> konsole -e "sudo hwinfo --short"
kf.xmlgui: Shortcut for action  "" "Show Quick Commands" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
kf.xmlgui: Shortcut for action  "" "Show SSH Manager" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.

creates


whereas

rokejulianlockhart@RQN6C6:~> konsole -e "sudo hwinfo --short" --noclose
kf.xmlgui: Shortcut for action  "" "Show Quick Commands" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
kf.xmlgui: Shortcut for action  "" "Show SSH Manager" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.

creates an empty windows that closes without displaying the command nor prompting the user for authentication.

This makes neither option useful, because I can’t see the results of the command in the spawned window.

rokejulianlockhart@RQN6C6:~> konsole -v
konsole 22.12.3

You have to use the -e option as the last one. In other words, put --noclose before it. As the Konsole help says:

Command to execute. This option will catch all following arguments, so use it as the last option.

3 Likes