# O Manual do &konsole;

&Jonathan.Singer; &Jonathan.Singer.mail;
&Kurt.Hindenburg; &Kurt.Hindenburg.mail;
&Kurt.Hindenburg; &Kurt.Hindenburg.mail;
&Waldo.Bastian; &Waldo.Bastian.mail;
&Mike.McBride; &Mike.McBride.mail;
José
Pires

    jncp@netcabo.pt

Tradução
2000
2001
2002
&Jonathan.Singer;
2005
&Kurt.Hindenburg;
&FDLNotice;
2006-08-16
1.6.2

This document is the user handbook for the &konsole; application.

&konsole; is an X terminal emulator for &kde;.

KDE
konsole
kdebase
comando
linha

## Introduction to &konsole;

### O que é um terminal?

&UNIX; operating systems were originally designed as text-only systems, controlled by keyboard commands -- what is known as a command-line interface (CLI). The &X-Window; and &kde; and other projects have since added the graphical interface you are now using. However, the underlying CLI system is still there, and is frequently the easiest, fastest and most powerful way to perform many tasks.

&konsole; is what is known as an X terminal emulator, often referred to as a terminal or a shell. It gives you the equivalent of an old-fashioned text screen on your desktop, but one which can easily share the screen with your graphical applications. &Windows; users may be familiar with the MS-DOS Prompt utility, which has the analogous function of offering a DOS command-line under &Windows;. (Although the &UNIX; CLIs offer far more power and ease of use than does DOS!)

Explaining the use of the &UNIX; CLI is beyond the scope of this document, as it would require a lengthy book. Fortunately, many such books are available in every language in any good bookstore or library. There are also tutorials available on the Internet. Enjoy &kde;, but don't be shy about learning to use the command-line! You will find that even learning just the basics will make your computer use much more efficient and enjoyable.

### What makes &konsole; special?

&konsole;'s advanced features include simple configuration and the ability to use multiple terminal shells in a single window, making for a less cluttered desktop.

Using &konsole;, a user can open:

- &Linux; console sessions

- Shell sessions

- Screen sessions

- Midnight Commander file manager sessions

- Root console sessions

- Root Midnight Commander sessions

- User created sessions

These sessions can be renamed to help you keep track of all your shells, or signaled (STOP, CONT, HUP, INT, TERM, KILL).

For more control over &konsole;, a user can:

- hide/show the menubar and/or frame

- select the size of a &konsole; window, fonts, color schemes, and key mapping

- change location of the scrollbar or hide the scrollbar

- change location of the tabbar or hide the tabbar

All chosen settings can be made the default for forthcoming sessions by saving them.

For those with a deep interest in the taxonomy of free X terminals, there are two others of this kind: xterm, the original, written even before X itself (a month or two), and xvt, a lightweight xterm clone, on which most other currently available derivatives (notably eterm) are based.

## Use of &konsole;

### Startup

When &konsole; is started, an application (typically a &UNIX; shell) runs in the window. Simply type at the prompt.

&konsole; Screen
&konsole; Screen

&konsole; with 4 terminal sessions open.

A Tip of the Day window may also appear on startup, offering hints on the use of &konsole;. If you do not wish to receive tips, uncheck the Show tips on startup box.

### History

As lines scroll off the top of the screen, they can be reviewed by moving the scroll bar upwards, scrolling with a mouse wheel or through the use of the &Shift;Page Up (to move back a page), &Shift;Page Down (to move forward a page), &Shift;Up Arrow (to move up a line) and &Shift;Down Arrow (to move down a line) keys (provided the History option is on).

In addition, &konsole; mimics the FreeBSD console when scroll lock is pressed. When scroll lock is on, ordinary in- and output from the shell is suspended, and you can scroll through the history with Page Up, Page Down, and Up Arrow and Down Arrow.

&konsole;'s history can be configured via Scrollback Scrollback Options... .

&konsole; provides a number of history related actions located in the Scrollback menu.

- Search Output...

- Find Next

- Find Previous

- Save Output...

- Scrollback Options...

- Clear Scrollback

- Clear Scrollback & reset

In &konsole;, references to history are to the text that is displayed in &konsole;'s window. The shell that is running in &konsole; (e.g. bash) also has a history which is unrelated to &konsole;'s history.

### Sessions

If you often have to log into remote machines, or always run a similar set of terminal applications, you can use &konsole;'s Session feature along with &kde;'s session management to automate a lot of this for you. Let's take the following example: You often have open an ssh session to the machine administration ready for generic administration tasks. You may have noticed the New Session button on &konsole;'s tab bar contains a menu if you click and hold on it, and you can choose new session types here. We are going to add new entries to this menu.

1. Carregue no item do menu Configuração Gerir os Perfis...

2. Click on the button New Profile.

3. Preencha o primeiro campo com um nome. Este é o nome que aparecerá no menu, e será o texto por omissão em vez de Linha de Comandos quando você iniciar uma sessão deste tipo.

4. Indique um comando tal e qual você faria, se abrisse uma nova linha de comandos e invocasse esse comando. Para o nosso primeiro exemplo, você poderia escrever ``ssh` administracao`.

5. Nas outras páginas da janela, configure a aparência desta sessão. Você poderá ter um tipo de letra diferente, bem como um esquema de cores e um tipo $`TERM` para cada sessão.

6. Press the OK button. The new session is now available in the Manage Profiles dialog.

7. Press OK.

You should now be able to press and hold the New Session button on the tab bar, and select your new session type from the list. A new shell session will open within the &konsole; window, with the result of your executed command. In our example, you will be at an ssh passphrase prompt, and when you provide your passphrase, you will be logged into the remote machine. You can avoid this step also, by using ssh-agent, but that is a topic for another goodie. Perhaps you want to remotely tail your http error logs on a webserver, you could use a commandline something like ``ssh` `-f` webserver `tail` `-f` `/var/log/httpd-error.log``.

You can use this to execute local commands as well. Try creating a session where the command is ``tail` `-f` `/var/log/messages``. In this case, exiting the running application will close the shell session as well.

One really nice use of this feature is if you find you always have the same set of open sessions, &kde; can open them all for you automatically when you start a new &kde; session. Simply have them open as you like when you exit &kde;, and they will be saved with your &kde; session, and restored just like any other application when you restart &kde;.

You can assign shortcuts to any session.

### Botões do Rato

Esta secção entra em detalhe com a utilização dos botões do rato para os botões de um rato destro. Para a ordem de um rato esquerdino, troque a esquerda e a direita no texto abaixo.

Esquerdo

  Se carregar com o &LMB;, esse evento será passado à aplicação a correr na emulação, se esta souber lidar com o rato. Se um programa reagir aos 'clicks' do rato, o &konsole; irá indicar isso ao mostrar um cursor em forma de seta. Caso contrário, é mostrado um cursor em I (barra).

  Se mantiver o &LMB; carregado e arrastar o rato pelo ecrã numa aplicação que não lide com o rato a correr, isso irá marcar uma região de texto. Enquanto arrasta, o texto marcado é mostrado com as cores invertidas para algum 'feedback' visual. Seleccione o Copiar do menu Editar para copiar o texto marcado na área de transferência, de modo a usá-lo posteriormente no &konsole; ou noutra aplicação. O texto seleccionado também poderá ser arrastado e largado noutras aplicações compatíveis. Carregue no texto seleccionado e arraste-o para a localização desejada. (Dependendo da sua configuração do &kde;, você poderá ter de manter a tecla &Ctrl; carregada enquanto arrasta.

  Normalmente, os caracteres de mudança de linha são inseridos no fim de cada linha seleccionada. Isto é melhor para o corte e colagem de código-fonte, ou para o resultado de um comando qualquer. Para o texto normal, as quebras de linha não são normalmente importantes. Uma pessoa poderá preferir, de qualquer forma, que o texto seja uma sequência contínua de caracteres que será formatada de novo automaticamente ao ser colada noutra aplicação. Para seleccionar o texto em modo de sequência, mantenha a tecla &Ctrl; carregada enquanto selecciona normalmente.

  Se carregar com as teclas &Ctrl; e &Alt;, em conjunto com o &LMB;, irá seleccionar uma coluna de texto.

  Faça duplo-click com o &LMB;, para seleccionar uma palavra, e triplo-click para seleccionar uma linha inteira.

  Se o limite superior ou inferior da área de texto for alterado enquanto é feita a marcação, o &konsole; deslocar-se-á para cima ou para baixo, eventualmente expondo algum texto no 'buffer' do histórico. A deslocação pára quando o rato parar de se mexer.

  Depois de o rato ser largado, o &konsole; tenta manter o texto na área de transferência visível mantendo a área marcada invertida. A área marcada voltará ao normal, a partir do momento que o conteúdo da área de transferência se altere, o texto da área marcada se modifique ou o &LMB; seja carregado.

  Para marcar o texto numa aplicação que lide com o rato (como por exemplo, o Midnight Commander), a tecla &Shift; tem de ser pressionada enquanto carrega.

Meio

  Se carregar com o &MMB;, irá colar o texto que se encontra de momento na área de transferências. Se mantiver carregada a tecla &Ctrl; à medida que carrega no &MMB; irá colar o texto e enviá-lo para o &konsole;.

  Se você tiver um rato com apenas dois botões, basta carregar tanto no &LMB; como no &RMB; em conjunto para emular o &MMB; de um rato de três botões.

  If you have a wheel as the middle button, rolling it in a mouse-unaware program will move &konsole;'s scrollbar.

Direito

  The items that appear in the menu when the &RMB; is pressed depend on whether the menubar is visible.

  Menubar is visible: Set Selection End, Copy, Paste, Send Signal, Detach Session, Rename Session..., Bookmarks and Close Session menu items.

  Menubar is hidden: Show Menubar, Set Selection End, Copy, Paste, Send Signal, New Session, Detach Session, Rename Session..., Bookmarks, Settings and Close Session menu items.

  In a mouse-aware application, press the &Shift; key along with the &RMB; to get the pop-up menu.

  Pressing the &Ctrl; key and &RMB; brings up the Session menu.

### Menu Bar

The menubar is at the top of the &konsole; window. The menubar can be activated and deactivated by the &Alt; key.

Settings Hide Menubar allows the menubar to be hidden. When the menubar is hidden, Show Menubar can be reached by right clicking in the window or by &Alt;&Ctrl;M, which is the default shortcut for activating the menubar. The menubar can also be toggled by assigning it a shortcut.

#### O Menu Ficheiro

Ficheiro Linha de Comandos

  Open a new session with a terminal shell. &Ctrl;&Shift;N can also be used, as described in more detail below.

File New Window

  Open a new &konsole; window. &Ctrl;&Shift;M can also be used to open a new &konsole; window.

File New Linux Console

  Open a new session emulating a text-only &Linux; system.

  See the file `README.linux.console` in the &konsole; source package for detailed information on how the &Linux; console differs from a typical &UNIX; console. If this doesn't mean anything to you, you almost certainly don't need to worry about it.

File New Midnight Commander

  Open a new session with the Midnight Commander file browser.

  This menu entry will only be visible if Midnight Commander (`mc`) is installed on your system.

File New Root Midnight Commander

  Open a new session with the Midnight Commander file browser, as the root user.

  After being prompted for the root password, the # prompt appears under the browser window, indicating that the user is working with root privileges. Again, working as root is frequently necessary but care should be taken to avoid accidental damage.

  This menu entry will only be visible if Midnight Commander (`mc`) is installed on your system.

File New Root Shell

  Open a new session with a terminal shell, as the root user.

  After being prompted for the root password, the # prompt appears, indicating that the user is working with root privileges. This is frequently necessary for installing new software and other system maintenance, but care should be taken to avoid accidental damage.

File New Screen Session

  Open a new session with the Screen virtual terminal manager. See ``man` `screen`` for more information.

  This menu entry will only be visible if Screen (`screen`) is installed on your system.

File Close Tab

  Close the current tab and the session within.

File Quit

  Quit &konsole;, closing all sessions and any applications launched from them.

You can also open a new session with a key shortcut. By default, &Ctrl;&Shift;N is used. You can also define your own key shortcuts through the Settings Configure Shortcuts... menu command.

The list of available sessions will reflect what programs are installed along with any user defined sessions. The session list will be alphabetized for quick viewing.

Finally, note that the session types can be modified, and new types created, by using the configuration dialog, reached from the Settings Manage Profiles... menu entry.

#### O Menu Editar

Edit Copy

  Copy the selected text to the clipboard.

&Ctrl;&Shift;V Editar Colar

  Paste text from the clipboard at the cursor location.

&Ctrl;&Alt;S Ver Mudar o Nome da Página...

  Open a dialog box allowing you to change the name of the current session. The name is displayed on the session tab.

Edit Send Input to All

  Flag the current session so any commands entered into it will be sent to all sessions. The session will have a small icon in its tab to remind you to be careful of what you enter! ``rm` `-rf *``, for instance, is probably not a good idea.

Edit Send Signal

  Send Signal - Send the specified signal to the shell process, or other process, that was launched when the new session was started.

  Currently available signals are:

  STOP | to stop process
  CONT | continue if stopped
  HUP | hangup detected on controlling terminal, or death of controlling process
  INT | interrupt from keyboard
  TERM | termination signal
  KILL | kill signal
  USR1 | user signal 1
  USR2 | user signal 2

  Refer to your system manual pages for further details by giving the command ``man` `7 signal``.

&Alt;&Ctrl;U Edit ZModem Upload...

  Send a file via ZModem.

Editar Limpar o Ecrã

  Clear all text from the session window.

Editar Limpar & Reiniciar

  Reset and clear the session window.

#### O Menu Ver

View Detach View

  Open the current session in a separate window. The name of the session is displayed on the titlebar of the new window.

View Hide Menu Bar

  Hide the menubar.

&Ctrl;&Shift;F11 Ver Modo de Ecrã Completo

  Toggles Full Screen Mode.

View Monitor for Silence

  Flag the current session so it will show an alert if no activity occurs for 10 seconds. An icon of a dark light bulb will appear in the session's tab. Use this to alert you if a task stops while you are working in another session. The time before an alert can be modified in the &konsole; preferences.

View Monitor for Activity

  Flag the current session so it will show an alert if activity occurs. An icon of a lit light bulb will appear in the session's tab. Use this to alert you if something happens while you are working in another session. The time before an alert can be modified in the &konsole; preferences.

Ver Mudar a Codificação

  Select character encoding for current session.

#### O Menu Posicionamento

Scrollback Search Output

  Find a word or string of text in the current history. Options allow case sensitive or backwards searches, and the use of regular expressions in searches.

Scrollback Find Next

  Move to the next instance of the text for which you are searching.

Scrollback Find Previous

  Move to the previous instance of the text for which you are searching.

Posicionamento Gravar o Resultado...

  Save the current history as a text file.

Posicionamento Opções de Posicionamento...

  Opens the Scrollback Options dialog where you can to configure how many lines of history should be kept.

Posicionamento Limpar o Posicionamento

  Clear the history for the current session.

Scrollback Clear Scrollback & Reset

  Clear the history the current session and reset the terminal.

#### O Menu Favoritos

Bookmarks Add Bookmark

  Add the current location to the bookmark list.

Favoritos Marcar as Páginas como uma Pasta de Favoritos...

  Add all tabs as bookmark folder. This will open a dialog where you can type the name for the new bookmark folder.

Favoritos Nova Pasta de Favoritos...

  Add a new folder to the bookmark list.

Favoritos Editar os Favoritos

  Edit the bookmark list.

The bookmark list is displayed at the bottom of the menu. Select a bookmark to change to that location.

You can use the bookmark editor to manually add URLs like ssh://user@host or telnet://host to open remote connections.

#### O Menu Configuração

Configuração Mudar o Perfil

  Change profile for current session.

Settings Edit Current Profile

  Edit profile settings for current session.

Settings Manage Profiles

  Open a dialog for managing session profiles. You can add new, remove and edit profiles. Also lets you choose your default profile.

Configuração Configurar os Atalhos...

  Customize keyboard shortcuts for &konsole; commands.

Configuração Configurar as Notificações...

  Customize notifications for &konsole;.

#### O Menu Ajuda

Help Konsole Handbook

  Open the table of contents of this document.

Help Report Bug...

  Submit a bug report or a feature request for &konsole;.

Help About Konsole

  Information about &konsole;'s author

Help About KDE

  Information about the &kde; project

### Tab Bar

The tabbar allows multiple terminal sessions to be attached to a single &konsole; window.

Tabbar Image
Tabbar Image

&konsole; with 4 terminal sessions open with the tabbar on the bottom.

The Settings Edit Current Profile...Tabs menu item allows the tabbar to be displayed Above Terminal displays or Below Terminal displays. The tabbar can also be hidden by selecting Always hide tab bar or automatically shown by selecting Show tab bar when needed.

On the left side of the tabbar is a button which allows for a multitude of actions.

- Click on the button to start a new default session.

- Clicking and holding on the button will popup a list of sessions to select.

- Right-clicking on the button (or any empty space on the tabbar) will popup up a menu to set certain options:

  - Tab Bar: Hide, Top, Bottom.

  - Tab Options: Text & Icons, Text Only, Icons Only.

  - Dynamic Hide will hide the tabbar when there is only one session opened.

  - Auto Resize Tabs will automatically resize the tabs to the width of the tabbar.

On the right side of the tabbar is a button that closes the current session. This button will be disabled when there is only one session running.

Right-clicking on any tab will popup another menu:

- Detach Session

- Rename Session...

- Monitor for Activity

- Monitor for Silence

- Send Input to All Sessions

- Select Tab Color...

- Switch to Tab...

- Close Session

### Opções da Linha de Comandos

When &konsole; is started from the command-line, various options can be specified to modify its behavior.

`--help`

  Mostra as várias opções.

`-e` `comando`

  Executa o `comando` em vez da linha de comandos normal.

  Todos os argumentos a seguir ao `comando` serão passados ao `comando`, não ao &konsole;.

`--keytab` `file`

  Start &konsole; using a specified .keytab file to customize key bindings.

`--keytabs`

  List all of the available keytabs.

`--ls`

  Start with a login shell environment. What that does varies depending on your system, but generally it means that files such as `~/.profile` or `~/.bash_profile` will be read. (If that doesn't mean anything to you, don't worry about it, but keep in the back of your mind for when you realize you need it.)

`--name` `name`

  Set the name that appears in the titlebar.

`--noclose`

  Prevent &konsole; from closing when an ``exit`` command is issued in the only session window.

`--noframe`

  Start &konsole; without a frame.

`--nohist`

  Disable the saving of lines that scroll off the top of the window.

`--nomenubar`

  Start &konsole; with the menubar hidden.

`--noresize`

  Disable the resizing of the terminal window.

`--noscrollbar`

  Start &konsole; with the scrollbar hidden.

`--notabbar`

  Start &konsole; with the tabbar hidden.

`--noxft`

  Start &konsole; without Xft antialiasing. Antialiasing of a small font may be difficult to read.

`--profile` `ficheiro`

  Start &konsole; using a saved set of sessions.

`--profiles`

  List all of the available profiles.

`--schema` `name` | `file`

  Start &konsole; using schema 'name' or specified in 'file' to customize appearance.

`--schemata`

  List all of the available schemata.

`--script`

  Enable extended &DCOP; &Qt; functions.

`-T` `title`

  Set the window title.

`--tn` `terminal`

  Sets the environment variable TERM to the specified value. Read ``man` `xterm`` for more information on TERM.

`--type` `type`

  Start a session of the given type rather than the default.

`--types`

  List all of the available session types.

`--vt_sz` `CCxLL`

  Start a terminal window of CC Columns and LL lines.

`--workdir` `directoria`

  Open with `dir` as the working folder.

Exemplos:

    &percnt; konsole --vt_sz 90x25 --nohist

Starts a &konsole; window with 90 columns and 25 rows, with no history

    &percnt; konsole --noclose -e echo_args Hello, thanks for using &konsole;!

Starts a &konsole; window with the text printed 'Hello, thanks for using &konsole;!'

The `echo_args` is a simple Bash script:

    #!/bin/bash
    echo $*

O &konsole; também aceita as opções genéricas do &Qt; e do &kde;:

`--help-qt`

  Mostra as opções específicas do &Qt;

As seguintes opções do &Qt; não fazem efeito no &konsole;:

`--fn`, `--font` `tipo_letra`

  Define o tipo de letra da aplicação

`--bg`, `--background` `cor`

  Altera a cor de fundo por omissão

`--fg`, `--foreground` `cor`

  Altera a cor do texto por omissão

`--btn`, `--button` `cor`

  Altera a cor dos botões por omissão

`--help-kde`

  Mostra as opções específicas do &kde;

`--help-all`

  Mostra todas as opções

`--author`

  Mostra os nomes dos autores

`-v,--version`

  Mostra o número da versão

`--license`

  Mostra informações sobre a licença

### &DCOP;

For an introduction to &DCOP; and using `dcop` please look at the User Guide entry on &DCOP;.

## Créditos e Direitos de Cópia

As of &kde; 3.4, &konsole; is maintained by &Kurt.Hindenburg; &Kurt.Hindenburg.mail;

Previously, &konsole; was maintained by &Waldo.Bastian; &Waldo.Bastian.mail;

The application &konsole; Copyright © 1997-2005 &Lars.Doelle; &Lars.Doelle.mail;

Este documento foi escrito pelo &Jonathan.Singer; &Jonathan.Singer.mail;

Este documento foi actualizado para o &kde; 3.4 pelo &Kurt.Hindenburg; &Kurt.Hindenburg.mail;

Foi convertido originalmente para SGML de DocBook por &Mike.McBride; e &Lauri.Watts;

Tradução de José Nuno Pires jncp@netcabo.pt

&underFDL; &underGPL;

## &konsole; on non-&Linux; platforms

Information on building &konsole; on platforms other than &Linux; is available in the `README.ports` file in the &konsole; source package. It provides a list of experts for certain platforms (Tru64, &Solaris;, OpenBSD) and requests volunteers from other &UNIX; platforms.

For more infomation please visit these websites:

- &kde; em FreeBSD

- &kde; em &Solaris;

&documentation.index;