Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to launch a KDE konsole with multiple tabs running various progs?

Tags:

I know how to start a Konsole with one executable running in it, and leave the Konsole open after the program ends. I can do this using a .desktop file and change some options in it.

But I would like one step further, to launch a KDE konsole with multiple tabs open, each running a particular program, and that when the program finishes it stays open and give you a prompt.

There's no man page for Konsole so I don't even know what options it can take. Or some d-bus calls? Thanks

like image 514
dargaud Avatar asked Sep 25 '15 09:09

dargaud


People also ask

How do I switch between tabs in Konsole?

Ctrl + Tab can be used to switch between all views including in other tabs.

How do I customize Konsole in KDE?

As with any other KDE application, you can choose the type of notifications for Konsole. You'll find the dialog under Settings > Configure Notifications. Aside from tracking the output of a command, Konsole can also save it as a text or HTML file, and print it to PDF or paper. Both options are in the File menu.

How do I open console in KDE?

KDE finally has an on-by-default easy way global shortcut for launching the Konsole terminal application. Beginning with KDE Applications 18.08 due out next month, Ctrl + Alt + T will launch the Konsole.


1 Answers

Who ever sees beauty in the accepted solution is hopefully not in software development : ) This must be a one liner or a bug report must be submitted. Every other common terminal has this option. I did some research and the "almost one liner solution" is this:

  1. Create a file configuring your tabulators like so and name it let's say "tabs":
   title: %n;; command: /usr/bin/htop
   title: %n;; command: /usr/bin/ncmpcpp

(The full documentation is at https://docs.kde.org/stable5/en/konsole/konsole/command-line-options.html. The called command binaries are examples. The "%n" will name the tab exactly like the command)

  1. Execute it like so:

    konsole --tabs-from-file path_to_tabs_file/tabs

Result: A new konsole window with 3 tabs, running defined binaries and one empty prompt. I couldn't get a bash script to run. But I did just a few minutes of testing.

like image 121
CaptainCrunch Avatar answered Sep 20 '22 18:09

CaptainCrunch