# The &konsole; Handbook

Jonathan
Singer

    jsinger@leeta.net

Stephan
Binner

    Stephan.Binner@gmx.de

Maintainer
Michael
McBride
Reviewer

    mmcbride@ematic.com

Lauri
Watts
Reviewer

    lauri@kde.org

John
Knight

    anarchist_tomato@herzeleid.net

KDE British Conversion
2000
2001
2002
Jonathan Singer
&FDLNotice;
2001-12-25
1.10.00

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

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

KDE
konsole
kdebase
command
line

## Introduction to &konsole;

### What is a 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

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

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

- hide/show the menubar, toolbar, scrollbar and/or frame

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

- change location of the scrollbar or hide the scrollbar

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.

After a decade, &konsole; is the first rewrite from the ground up. While xterm has definitely been hacked to death (its `README` starts with the words Abandon All Hope, Ye Who Enter Here), &konsole; offers a fresh start using contemporary technologies and understanding of X.

## 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

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 on start box.

### History

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

### Mouse Buttons

Left

  Clicking the left button is passed as an event to the application running in the emulation, if it is mouse-aware. If a program will react on mouse clicks, &konsole; indicates this by showing an arrow cursor. If not, an I-beam (bar) cursor is shown.

  Holding the left button down and dragging the mouse over the screen with a mouse-unaware application running will mark a region of the text. While dragging, the marked text is displayed reversed for visual feedback. When the button is released, the marked text is copied to the clipboard for further use within &konsole; or another application. The selected text can also be dragged and dropped into compatible applications. Click on the selected text and drag it to the desired location.

  Normally, new-line characters are inserted at the end of each line selected. This is best for cut and paste of source code, or the output of a particular command. For ordinary text, the line breaks are often not important. One might prefer, however, for the text to be a stream of characters that will be automatically re-formatted when pasted into another application. To select in text-stream mode, hold down the &Ctrl; key while selecting normally.

  If the upper or lower edge of the text area is touched while marking, &konsole; scrolls up or down, eventually exposing text within the history buffer. The scrolling stops when the mouse stops moving.

  After the mouse is released, &konsole; attempts to keep the text in the clipboard visible by holding the marked area reversed. The marked area reverts back to normal as soon as the contents of the clipboard change, the text within the marked area is altered or the left mouse button is clicked.

  To mark text on a mouse-aware application the &Shift; key has to be pressed when clicking.

Middle

  Pressing the middle button pastes text currently in the clipboard. Holding down the &Ctrl; key as you press the middle button pastes the text and sends it to &konsole;.

  If you have a mouse with only two buttons, pressing both the left and right buttons together emulates the middle button of a three button mouse.

Right

  The right button brings up a menu with the Show Menubar, Paste, Send Signal, Rename Session, Settings and Close Session menu items. The &Ctrl; right button brings up the Session menu.

### Menu Bar

The menubar is at the top of the &konsole; window. It can be hidden and restored by toggling Show Menubar in the Settings menu. When the menubar is hidden, Show Menubar can be reached by right clicking in the window or by &Alt;&Ctrl;M .

#### Session Menu

Session New Shell

  Opens a new session with a terminal shell. &Alt;&Ctrl;N can also be used, aas described in more detail below.

Session New Screen Session

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

Session New Root Console

  Opens 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.

Session New Midnight Commander

  Opens a new session with the Midnight Commander graphical file browser.

Session New Linux Console

  Opens 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.

Session New Root Midnight Commander

  Opens a new session with the Midnight Commander graphical 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.

Session Close Session

  Closes the current session.

Session Quit

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

You can also open a new session with a key shortcut. By default, &Alt;&Ctrl;N is used. You can also define your own key shortcut to launch a new terminal session. The files with a `*.keytab` extension in `$`KDEDIR`/share/apps/konsole` define keyboard shortcuts.

For instance, adding the definition: `key F12 + Shift : newSession` to the active keytab files causes a new shell to be launched upon hitting &Shift;F12. Use the Settings Keyboard menu command to choose a keytab file. The file `README.KeyTab` contains more information on defining shortcuts.

Finally, note that the session types can be modified, and new types created, by using the &kcontrolcenter; module System Konsole.

#### Edit Menu

Edit Paste

  Pastes text from the clipboard at the cursor location.

Edit Send Signal

  Send Signal - Sends 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

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

Edit Find in History

  Finds a word or string of text in the current history. Options allow case sensitive or backwards searches.

Edit Save History As

  Saves the current history as a text file.

Edit Clear History

  Clears the history for the current session.

Edit Clear All Histories

  Clears the history for all sessions.

#### View Menu

View Rename Session

  Opens a dialogue box allowing you to change the name of the current session. The name is displayed on the session tab. &Alt;&Ctrl;S can also be used.

View Monitor for Activity

  Flags 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.

View Monitor for Silence

  Flags 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.

View Send Input to All Sessions

  Flags 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.

View Move Session Left

  Moves the tab of the current session one tab to the left.

View Move Session Right

  Moves the tab of the current session one tab to the right.

  &Shift; Left and &Shift; Right can be also be used to move between sessions.

View Session icons...

  At the bottom of the menu is a list of the available sessions. Selecting one makes that session active.

  You can also use the &Shift;Left/&Shift;Right keys to cycle through the available sessions.

#### Settings Menu

Settings Show Menubar

  Shows or hides the menubar.

Settings Show Toolbar

  Shows or hides the toolbar.

Settings Scrollbar

  Controls location of scrollbar: none, left, or right.

Settings Fullscreen

  Toggles window between full-screen and normal size.

Settings Bell

  Sets the system bell to a &kde; System Notification or a visible flash, or turns it off.

Settings Font

  Sets font and font size

  Select the Custom option to use any combination of font, size and style. The `README.fonts` file in the &konsole; source package gives tips on which fonts will work well.

Settings Keyboard

  Chooses desired keymapping.

  The list of these keymappings is taken from `$KDEDIR/share/apps/konsole/*.keytab`. The file `$KDEDIR/share/apps/konsole/README.KeyTab` describes the keytab format in more detail. Add to or modify these files to match your needs.

Settings Schema

  Sets colours of text and background.

  The list of these schemata is taken from `$KDEDIR/share/apps/konsole/*.schema`. The file `$KDEDIR/share/apps/konsole/README.Schema` describes the schema format in more detail. Add to or modify these files to match your needs. You can also create custom schema from the &kcontrolcenter; module System Konsole.

Settings Size

  Sets size of text area (given in columns x rows).

Settings History...

  Opens a dialogue where you can configure the history. The Enable checkbox toggles saving of lines that have scrolled off the top of the window. You can enter the Number of lines to remember in the text field, or use the spinner buttons to increase or decrease the number in steps of 100 lines. The Defaults button will reset the history to 1000 lines. Setting this value to 0 will cause all history to be saved. Press OK to save your changes, or Cancel to close the dialogue without saving your settings. The Help button will open this manual, and display the text you're reading right now.

Settings Save Settings

  Saves the current settings as the new defaults.

Settings Configure &konsole;

  Opens the &kcontrolcenter; module, allowing many additional changes to the &konsole; interface.

#### Help Menu

F1 Help Konsole Handbook

  Opens the table of contents of this document.

Help Tip of the Day...

  Displays a helpful tip about the use of &konsole;. Check the Show on start box to display a tip each time &konsole; is started.

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

### Toolbar

The toolbar is at the bottom of the &konsole; window.

It can be hidden and restored by toggling Show Toolbar in the Settings menu or by clicking the textured handle at the side of the bar. The bar contains a New icon and icons for the current sessions. Clicking New opens a new Shell session.

Double-clicking a session tab opens a dialogue box enabling you to change the name of that session. &Alt;&Ctrl;S can also be used to rename the active session.

Clicking an existing session's icon makes that session active.

When the toolbar is hidden, &Shift; Left and &Shift; Right can be used to move between sessions.

### Command-line Options

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

`--help`

  List the various options

`--name` `name`

  Set the name that appears in the titlebar

`--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 realise you need it.)

`-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.

`--xwin`

  Ignored

`--nohist`

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

`--nomenubar`

  Start &konsole; without a menubar

`--notoolbar`

  Start &konsole; without a toolbar

`--noframe`

  Start &konsole; without a frame

`--noscrollbar`

  Start &konsole; without a scrollbar

`--noxft`

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

`--vt_sz` `CCxLL`

  Start a terminal window of CC Columns and LL lines

`--type` `type`

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

`--workdir` `dir`

  Open with `dir` as the working directory.

`-e` `command`

  Execute `command` instead of shell.

For instance:

    bash$
     konsole --vt_sz
      90x25 --nohist

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

&konsole; also accepts generic &Qt; and &kde; options:

`--help-qt`

  List Qt-specific options

`--help-kde`

  List KDE-specific options

`--help-all`

  List all options

`--author`

  Show the authors' names

`-v,--version`

  Show the version number

`--license`

  Show licence information

## Credits and Copyright

&konsole; is maintained by Stephan Binner Stephan.Binner@gmx.de

The application &konsole; copyright 1997-2000 Lars Doelle lars.doelle@on-line.de

This document was written by Jonathan Singer jsinger@leeta.net

Converted to DocBook SGML by Michael McBride mmcbride@ematic.com and Lauri Watts lauri@kde.org

KDE British Conversion John Knight anarchist_tomato@herzeleid.net

&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.

&documentation.index;