问题描述
我知道如何在其中运行一个可执行文件的情况下启动Konsole,并在程序结束后保持Konsole处于打开状态。我可以使用 .desktop
文件并在其中进行一些更改。
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.
但是我想一步此外,要启动一个KDE konsole并打开多个选项卡,每个选项卡运行一个特定的程序,并且在程序完成时,它保持打开状态并提示您。
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.
Konsole的手册页,所以我什至不知道它可以采取什么选择。还是一些d-bus通话?
谢谢
There's no man page for Konsole so I don't even know what options it can take. Or some d-bus calls?Thanks
推荐答案
谁曾在公认的解决方案中看到美,希望不在软件开发中:)这个必须是一个衬里,否则必须提交错误报告。其他所有公共终端都有此选项。我做了一些研究,几乎一个线性解决方案是这样的:
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:
-
创建一个文件,配置制表符,例如:我们说标签:
Create a file configuring your tabulators like so and name it let's say "tabs":
title:%n ;;命令:/ usr / bin / htop
title: %n;; command: /usr/bin/htop
title:%n ;;命令:/ usr / bin / ncmpcpp
title: %n;; command: /usr/bin/ncmpcpp
(此处是完整的文档:
称为命令二进制文件的示例,%n的名称与命令的名称完全相同。
(Here's the full documentation:https://docs.kde.org/stable5/en/applications/konsole/command-line-options.htmlThe called command binaries are examples. The "%n" will name the tab exactly like the command)
-
像这样执行它:
Execute it like so:
konsole --tabs-from-file path_to_tabs_file / tabs
konsole --tabs-from-file path_to_tabs_file/tabs
结果:一个新的konsole窗口,带有3个选项卡,运行定义的二进制文件和一个空提示。我无法运行bash脚本。但是我只做了几分钟的测试。
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.
这篇关于如何启动带有运行各种程序的多个选项卡的KDE konsole?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!