[konsole] [Bug 436950] New: Konsole --tabs-from-file command behavior is opaque and hard to debug

skierpage bugzilla_noreply at kde.org
Wed May 12 03:20:02 BST 2021


https://bugs.kde.org/show_bug.cgi?id=436950

            Bug ID: 436950
           Summary: Konsole --tabs-from-file command behavior is opaque
                    and hard to debug
           Product: konsole
           Version: 20.12.2
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: konsole-devel at kde.org
          Reporter: skierpage at gmail.com
  Target Milestone: ---

SUMMARY
I've been fighting konsole --tabs-from-file for an hour just trying to make it
run some commands in a tab that sticks around.

STEPS TO REPRODUCE
1. Add the following to ~/konsole_tabs file:
title: Echo %d : %n;; command: echo 123456
title: Echo background;; command: echo Did anything happen &
title: Cat;; command: cat -
title: Bad;; command: badprogramname

2. Run `konsole --tabs-from-file ~/konsole_tabs

3. Run `konsole --hold --tabs-from-file ~/konsole_tabs


OBSERVED RESULT
The echo command completes; but without --hold the tab goes away.
The echo background tab goes away; with --hold you get a red error message
> Warning: Could not find 'echo Did anything happen &',...

The cat command echoes input, but when you press Ctrl-D, the tab goes away.
The bad tab helpfully tells you in red
>  Warning: Could not find 'badprogramname', starting (your shell)...

In the terminal where you ran this, konsole displays
>  [18::30:59.234] unknown: "Could not find binary: " ""
>  [18::30:59.301] unknown: "Could not find binary: " "badprogramname"

EXPECTED RESULT
This need not be so prone to error and confusion.

(A) The number one thing that would help is to change
https://docs.kde.org/stable5/en/konsole/konsole/command-line-options.html to
say "Use the --hold command-line option with --tabs-from-file, it can help
debug any problems."

(B) The next thing is for the documentation to explain how the heck
> command: a command to run

actually works. Is "command" interpreted by a shell? (No, I think). Can it have
arguments (yes, I think). Are any environment variables available? (I don't
know). Can you have more than one command? (I don't think so.) Is it possible
to have more than one command? (I Googled for hours and tried dozens of command
lines). Can you have the shell stick around, remaining interactive? (I don't
think so, though surely this is a common desire!)

(C) The console output should be much more helpful. Instead of:
> [18::36:1.771] unknown: "Could not find binary: " ""
It should say something more useful, like
  konsole --tabs-from-file option had problem with tab titled "Echo sleep"
executing command `echo Did anything happen &`, error is 'Could not find binary
" "'.

(D) It should be easier to have the tab run one or more commands and then
become a normal interactive shell, either by modifying Konsole's behavior or
documenting how to do this. The behavior when you ask Konsole to run
`badprogramname` and it tells you it had a problem then runs your shell seems
generally useful; in the case of success it could print a similar message in
green then run your shell.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version:5.21.5
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2 Wayland

ADDITIONAL INFORMATION
Examples of the hair-pulling this causes:
* https://forum.kde.org/viewtopic.php?f=227&t=152305
* https://forum.kde.org/viewtopic.php?f=227&t=160124
*
https://stackoverflow.com/questions/32779281/how-to-launch-a-kde-konsole-with-multiple-tabs-running-various-progs

Konsole is demonstrably difficult to automate, but thanks for a great terminal
program!

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list