Konsole/zh-cn: Difference between revisions

From KDE Wiki Sandbox
(Created page with "=== 配置文件管理 ===")
(Updating to match new version of source page)
 
(22 intermediate revisions by 3 users not shown)
Line 5: Line 5:
== 特性综述 ==
== 特性综述 ==


* X Terminal emulator
<div class="mw-translate-fuzzy">
* Makes using the command line easier
* X 终端模拟器
* Use different profiles for different tasks
* 便于命令操作
* Set scrollback limit and save contents to file
* 针对不同任务使用不同的配置。
* Click on links to open in user's default web browser
* 支持设定会滚限制和保存输出内容到文件。
* Open current path in user's file manager
* 能用默认网页浏览器打开链接。
* Translucent background available when desktop effects are enabled
* 能用文件管理器打开当前路径。
* 开启桌面特效后支持半透明背景。
</div>


'''Konsole''' is an ''X terminal emulator'' for the KDE platform, allowing users to have a convenient way to use the command line. Aside from providing a way to use a powerful shell, '''Konsole''' also offers features that make it easier or more pleasurable to work in the command line, such as profile management, scrollback, and color schemes, including translucency for effects.
Konsole 是KDE平台上的X终端模拟器,便于用户使用命令行。除了提供使用强大shell的方法外,Konsole同样提供很多能让命令行操作便利和愉快的功能,比如配置文件管理,回滚和配色方案,以及半透明效果。


'''Konsole''' also provides an embedded [[Special:myLanguage/KPart|KPart]] terminal which is used by apps such as [[Special:myLanguage/Yakuake|Yakuake]], [[Special:myLanguage/Dolphin|Dolphin]], and [[Special:myLanguage/Kate|Kate]], giving users a consistent and familiar interface when working in the command line.
Konsole 同时提供一个嵌入式的[[Special:myLanguage/Glossary#KPart|KPart]]终端,他被整合到[[Special:myLanguage/Yakuake|Yakuake]][[Special:myLanguage/Dolphin|Dolphin]][[Special:myLanguage/Kate|Kate]]等程序中,在用户操作命令行时提供给用户一个统一相似的界面。


== 教程和提示 ==
== 教程和提示 ==
Line 21: Line 23:
=== 语言 ===
=== 语言 ===


With '''Konsole''' you can change the language to plain English (to see bugs info for example) by command:
<div class="mw-translate-fuzzy">
'''Konsole''' 里,你能切换语言到纯英语环境(比如为了查看某些bug信息),输入下列命令:
{{Input|1=export LANG=C}}
{{Input|1=export LANG=C}}
</div>


=== 快捷键 ===
=== 快捷键 ===


* ''Switch tab:'' <keycap>Shift + Left</keycap>, <keycap>Shift + Right</keycap> (not like '''X-Chat''', '''Firefox''', '''Quanta''', '''Kdevelop''').
<div class="mw-translate-fuzzy">
:{{Note|1='''Quanta''' and '''Kdevelop''' use <keycap>Alt + Left</keycap>, <keycap>Alt + Right</keycap>. However, '''Shift + ''Direction''''' has the advantage of being reachable with one hand on virtually all keyboard layouts, while <keycap>Alt</keycap> keys are sometimes only on the left of the keyboard (e.g. in Germany).}}
* 切换标签: SHIFT+, SHIFT+(不像X-Chat, Firefox, Quanta, Kdevelop)
* ''New tab:'' <keycap>Shift + Ctrl + T</keycap>.
:{{Note|1=Quanta和Kdevelop用的是ALT+, ALT+右。但是,SHIFT+方向键好处是能在几乎所有键盘布局上单手搞定,因为有时候某些键盘上只在左侧有ALT按键(比如德文键盘)}}
* 新建标签: SHIFT+CRTL+N.
</div>


===Label your Tabs===
===标签的配置===


[[Image:Konsole4_Rename_Tab.png|thumb|center|330px|Double Click to Rename Tab]]
[[Image:Konsole4_Rename_Tab.png|thumb|center|330px|双击重命名标签页]]


If you regularly use a lot of tabs, you'll sometimes find it convenient to label them.  Just double-click on the tab and you'll get a re-name dialogue.
要是你长期都是用一堆标签,会发现标签的命名很容易,双击就能改名。


=== 配置文件管理 ===
=== 配置文件管理 ===


* To add a new profile go to <menuchoice>Settings -> Profile Management -> New Profile</menuchoice>
<div class="mw-translate-fuzzy">
* On the <menuchoice>General</menuchoice> tab, enter the new profile name and change the icon if desired.
* 新建新的配置文件 '''设置 > 管理配置文件 > 新建配置文件
* If this is to be a ''root konsole'', enter the command <div style="margin-right:80px">{{Input|1=/bin/su -}}</div> :{{Tip|1=This command will not work on any distro that uses sudo (like Ubuntu). On such distributions use: {{Input|1=sudo su}}or just prepend all your commands that requires superuser privileges with sudo.}}
* 在常规标签页,随你喜欢可以输入新的配置文件名和修改图标。
* 如果要成为root用户的konsole,键入命令<div style="margin-right:80px">{{Input|1=/bin/su -}}</div>:{{Tip|1=
''上面的命令在 root 账号没有启用的情况下<!--采用sudo的发行版上-->是无效的<--(比如Ubuntu)。在那些发行版,-->此时请使用:''
{{Input|1=sudo su}}
''或只要预先在所有需要超级用户权限的命令前加sudo。''}}
* 在外观标签页能改变字体大小.
[[Image:ZhcnKonsole4profile.png|thumb|240px|center|编辑一个配置文件]]
* 在管理配置文件对话框,你能添加或删除一个勾,这决定配置文件是否在文件菜单中显示。
</div>
 
{{Tip|1=This command will not work on any distro that uses sudo (like Ubuntu). On such distributions use: <br /><code>sudo su</code><br /> or just prepend all your commands that requires superuser privileges with sudo.}}
* Font size can also be changed on the <menuchoice>Appearance</menuchoice> tab.
* Font size can also be changed on the <menuchoice>Appearance</menuchoice> tab.
  [[Image:Konsole4profile.png|thumb|center|330px|Editing a profile]]
 
 
  [[Image:Konsole4profile.png|thumb|center|330px|Editing a profile]]  
* On the <menuchoice>Manage Profiles</menuchoice> screen you can add or remove a star, which controls whether that profile is to be offered on the File menu.
* On the <menuchoice>Manage Profiles</menuchoice> screen you can add or remove a star, which controls whether that profile is to be offered on the File menu.
=== Padding ===
You can change the padding between the border and the contents of Konsole (the "margin" or "gutters" between window border and text) by editing your profile file in {{Path|.local/share/konsole/[name of profile]}} and adding:
{{Input|1=TerminalMargin=7}}
The number after "TerminalMargin" can be edited to whatever size you prefer. After that you need to log out and then log in to show the changes.
=== Per Konsole tab Bash history ===
If you want each Konsole tab to remember its own individual bash history, and restore it with the session after a reboot or log out/in, add the following line in your {{Path|~/.bashrc}}:
{{Input|1=HISTFILE="$HOME/.bash_history.${KONSOLE_DBUS_SESSION##*/}"}}


== 相关网站 ==
== 相关网站 ==


<div class="mw-translate-fuzzy">
* [http://konsole.kde.org/ Konsole 主页]
* [http://konsole.kde.org/ Konsole 主页]
* [http://docs.kde.org/stable/en/kdebase-apps/konsole/index.html Konsole 手册]
* [http://forum.kde.org/viewforum.php?f=227 论坛]
* [http://docs.kde.org/stable/en/kde-baseapps/konsole/index.html Konsole 手册]
</div>


<div class="mw-translate-fuzzy">
== 帮助开发 ==
== 帮助开发 ==
您如果有兴趣帮助开发 Konsole,请参阅如何[[Special:myLanguage/KonsoleDevelopment|帮助 Konsole 团队]]。
您如果有兴趣帮助开发 Konsole,请参阅如何[[Special:myLanguage/KonsoleDevelopment|帮助 Konsole 团队]]。
</div>
If you are interested in helping with Konsole's development, check out how to [[Special:myLanguage/KonsoleDevelopment|help the Konsole team]].


== 关键词 ==
== 关键词 ==

Latest revision as of 11:46, 4 August 2019

Konsole
Konsole 是 KDE 平台的终端模拟器

特性综述

  • X 终端模拟器
  • 便于命令操作
  • 针对不同任务使用不同的配置。
  • 支持设定会滚限制和保存输出内容到文件。
  • 能用默认网页浏览器打开链接。
  • 能用文件管理器打开当前路径。
  • 开启桌面特效后支持半透明背景。

Konsole 是KDE平台上的X终端模拟器,便于用户使用命令行。除了提供使用强大shell的方法外,Konsole同样提供很多能让命令行操作便利和愉快的功能,比如配置文件管理,回滚和配色方案,以及半透明效果。

Konsole 同时提供一个嵌入式的KPart终端,他被整合到YakuakeDolphinKate等程序中,在用户操作命令行时提供给用户一个统一相似的界面。

教程和提示

语言

Konsole 里,你能切换语言到纯英语环境(比如为了查看某些bug信息),输入下列命令:

export LANG=C

快捷键

  • 切换标签: SHIFT+左, SHIFT+右 (不像X-Chat, Firefox, Quanta, Kdevelop)。
Note
Quanta和Kdevelop用的是ALT+左, ALT+右。但是,SHIFT+方向键好处是能在几乎所有键盘布局上单手搞定,因为有时候某些键盘上只在左侧有ALT按键(比如德文键盘)
  • 新建标签: SHIFT+CRTL+N.

标签的配置

双击重命名标签页

要是你长期都是用一堆标签,会发现标签的命名很容易,双击就能改名。

配置文件管理

  • 新建新的配置文件 设置 > 管理配置文件 > 新建配置文件
  • 在常规标签页,随你喜欢可以输入新的配置文件名和修改图标。
  • 如果要成为root用户的konsole,键入命令
    /bin/su -
    :
Tip
上面的命令在 root 账号没有启用的情况下是无效的<--(比如Ubuntu)。在那些发行版,-->此时请使用:
sudo su
或只要预先在所有需要超级用户权限的命令前加sudo。
  • 在外观标签页能改变字体大小.
编辑一个配置文件
  • 在管理配置文件对话框,你能添加或删除一个勾,这决定配置文件是否在文件菜单中显示。
Tip
This command will not work on any distro that uses sudo (like Ubuntu). On such distributions use:
sudo su
or just prepend all your commands that requires superuser privileges with sudo.
  • Font size can also be changed on the Appearance tab.


Editing a profile
  • On the Manage Profiles screen you can add or remove a star, which controls whether that profile is to be offered on the File menu.

Padding

You can change the padding between the border and the contents of Konsole (the "margin" or "gutters" between window border and text) by editing your profile file in .local/share/konsole/[name of profile] and adding:

TerminalMargin=7

The number after "TerminalMargin" can be edited to whatever size you prefer. After that you need to log out and then log in to show the changes.

Per Konsole tab Bash history

If you want each Konsole tab to remember its own individual bash history, and restore it with the session after a reboot or log out/in, add the following line in your ~/.bashrc:

HISTFILE="$HOME/.bash_history.${KONSOLE_DBUS_SESSION##*/}"

相关网站

帮助开发

您如果有兴趣帮助开发 Konsole,请参阅如何帮助 Konsole 团队

If you are interested in helping with Konsole's development, check out how to help the Konsole team.

关键词

终端模拟器,命令行,CLI,shell