<chapter id="using-Krusader">
<title>Using Krusader</title>

  <sect1 id="UI">
  <title>The User Interface</title>

    <sect2 id="mainwindow">
    <title>The main window</title>
    <screenshot><screeninfo>Krusader main window with all the different parts marked up</screeninfo><mediaobject>
      <imageobject><imagedata fileref="mainwindow.png" format="PNG"/></imageobject>
      <imageobject><imagedata fileref="mainwindow.eps" format="EPS"/></imageobject>
      <textobject><phrase>Krusader main window with all the different parts marked up</phrase></textobject>
    </mediaobject></screenshot>

    <para> This is Krusader's main window with all the different parts marked up.
    in the following sections we'll cover the basic functions of each part with the
    exception of the menu-bar that has a <link linkend="commands">chapter of its own</link>
    and the status-bar,which the only thing worth mentioning about it is that it
    shows the properties of the file currently under the mouse cursor. </para>
    </sect2>

    <sect2 id="toolbar">
    <title>The Toolbar</title>
    <screenshot><screeninfo>The Toolbar</screeninfo><mediaobject>
      <imageobject><imagedata fileref="toolbar.png" format="PNG"/></imageobject>
      <imageobject><imagedata fileref="toolbar.eps" format="EPS"/></imageobject>
      <textobject><phrase>The Toolbar</phrase></textobject>
    </mediaobject></screenshot>

    <para>There isn't a lot to say about the Krusader toolbar, its a standard KDE toolbar
    that can be dragged around the application or configured via a <keycap>right-click</keycap> menu.
    you can decide if you want to display it (or not) every time you start krusader
    in the <link linkend="konfig-startup">Konfigurator Startup page</link>, and you can toggle
    its use in the current session in the <link linkend="view-menu">view menu</link>.
    The toolbar contents can be configured from the "configure toolbars" in the
    <link linkend="settings-menu">options menu</link> or the "toolbar" tab in
    the <link linkend="konfig-lookNfeel">Konfigurator look and feel page</link>.
    since the various commands and option in krusader are not always available
    (ie: you can't disconnect from a FTP session if you're not connected), the icon of an
    un-available action will become grayed-out and you won't be able to click it.</para>
    </sect2>

    <sect2 id="panels">
    <title>The panels</title>
    <para>The Krusader panels are where most of the action takes place. Currently there are three types
    of panels: list panel (shown below), tree panel and quickview panel. Krusader is a twin-panel
    file manager so there are two panels the left panel and the right one, or a more important distinction,
    the active panel and the inactive panel. The active panel is the one that currently accept your mouse
    and keyboard input and if you'll choose a command from the menu-bar or toolbar then usually the command
    will act on the selected files/directories in the active panel and redirect the result to the inactive one.
    You can switch between panels using the <keycap>Tab</keycap> key or by clicking on the origin button.
    As not all combinations of panels are allowed, you can only choose from the following combinations:
    (list,list),(list,tree),(tree,list),(list,quickview),(quickview,list).
    As always startup settings can be modified with the <link linkend="konfig-startup">Konfigurator Startup page</link>,
    and you control the current session with the <link linkend="view-menu">view menu</link>.</para>
    <screenshot><screeninfo>List Panel</screeninfo><mediaobject>
      <imageobject><imagedata fileref="listpanel.png" format="PNG"/></imageobject>
      <imageobject><imagedata fileref="listpanel.eps" format="EPS"/></imageobject>
      <textobject><phrase>List Panel</phrase></textobject>
    </mediaobject></screenshot>

    <abstract><title>The List Panel</title><para>
    This is the default panel and the one you'll probably use most of the time. This panel shows the contents of one
    directory which can be local (part of your mounted file systems), remote (accessed via FTP or Samba)
    or inside an archive. The origin button will tell where the panel is currently pointing to.
    If the path the panel is pointing is too long it will be shorten and a ".." will replace
    the middle part. Also when entering archives the path will consist of the
    "archive path and name"+"#"+"the directory inside the archive".
    Below the origin tab you can see the current usage information of the browsed file system in the information label.
    The label will show how much free space is physically available on the file system,
    what is the file system capacity and where it is mounted. If the information is not available
    (most often in the case of remote file system) a message will be displayed with the reason instead of
    the information. Further down is the file list that display the files and directories in the browsed
    directory. The files are sorted by the column header you choose, and there is a quick search feature
    that allows you to search for files by typing their names. Pressing <keycap>Enter</keycap> or double
    clicking on a file will open/execute that file.
    You can mark/unmark files using the mouse ,the <keycap>Insert</keycap> key or by using
    the <link linkend="mark-menu">mark menu</link>. Marking or unmarking files will change the totals
    label at the bottom of the panel, which displays how many files you've selected (and much disk space they use)
    as well as the total file and disk usage of the current directory (as opposed to the information label
    that display information for the whole file system).</para></abstract>

    <note><para>There are several methods of using the mouse with Krusader, the default one should be
    familiar from other file managers and include the use of the <keycap>Shift</keycap> key or <keycap>Ctrl</keycap>
    key to select multiple files. However, notice that left clicking will mark the file under the
    cursor but will unmark all other files. Holding the right mouse button while dragging will mark all
    the files the mouse will pass over (and unmark the rest) and holding down the mouse button without
    moving it (<keycap>right-click</keycap>) will pop up the right-click menu.
    </para></note>

    <abstract><title>The Tree Panel</title>
    <para>This panel is used to quickly browse the local directory tree. The panel behaves like the
    list panel but only one directory may be selected at a time and double clicking or pressing
    <keycap>Enter</keycap> on a directory will open that directory in the other panel.</para>
    </abstract>

    <abstract><title>The Quick View Panel</title>
    <para>This panel displays the contents of the file under the cursor in the other panel, in case of an unreadable
    file, a default image is displayed. To save time the panel will show only the first 500 lines in each text file
    and no more then 200 characters per line.</para></abstract>
    <note><para>The quick view panel is not active most of the time, in fact when you switch to quick view mode
    the focus is transfered to the other panel. The view area itself does not change the active panel
    when you click on it, so make sure you click on the origin button before trying to exit quick view mode.
    </para></note>


    </sect2>

    <sect2 id="cmdline">
    <title>The command line / terminal emulator</title>

    <para>This part of the GUI (graphical user interface) can have two modes: </para>
    <screenshot><screeninfo>The command line</screeninfo><mediaobject>
      <imageobject><imagedata fileref="cmdline.png" format="PNG"/></imageobject>
      <imageobject><imagedata fileref="cmdline.eps" format="EPS"/></imageobject>
      <textobject><phrase>The Command Line</phrase></textobject>
    </mediaobject></screenshot>

    <para>The traditional command line mode offers a single line of input to enter you command,
    it also feature a "run in terminal mode" and a "commands history" via the two small buttons
    to the right of the input line. When you start typing your commands the command line auto completion
    feature will make its offers according to what you choose in the kde control center. if you want to
    change the way auto complete behave on the current Krusader session then <keycap>right click</keycap>
    on command line and change it. 
    To the left of the input line you can find the last local path that
    the active panel was pointing to, this path is where your command will be executed. The only way
    to change the execution path (other then changing the last local path of the active panel)
    is to type <userinput>cd "directory"</userinput> but this will also cause the active panel to
    point to this directory as well. You can use the <keycap>Up arrow</keycap> and <keycap>Down arrows</keycap>
    to scroll through previously typed commands or press and hold the "history" button.
    The <keycombo><keycap>Ctrl</keycap><keycap>Up arrow</keycap></keycombo>
    will take you back to the active panel and the
    <keycombo><keycap>Ctrl</keycap><keycap>Down arrow</keycap></keycombo>
    will take you from the panel to the command line.</para>

    <screenshot><screeninfo>The terminal emulator</screeninfo><mediaobject>
      <imageobject><imagedata fileref="terminalEmu.png" format="PNG"/></imageobject>
      <imageobject><imagedata fileref="terminalEmu.eps" format="EPS"/></imageobject>
      <textobject><phrase>The terminal emulator</phrase></textobject>
    </mediaobject></screenshot>
    <para>The terminal emulator mode is in fact a small konsole and acts just as one.
    You can change the active directory in the terminal by using the <userinput>cd</userinput> command.
    The terminal emulator does not follow the active panel directory
    but if you'll drag a file from the list view, you'll get to choose between pasting the file
    or changing the diretory. If you'll drag multiple files - they will be pasted automatically.
    You can close the emulator by typing <userinput>exit</userinput>.</para>

    <para>You can choose your mode of operation ( command line, emulator, both or none)
    either for krusader's startup with the
    <link linkend="konfig-startup">Konfigurator Startup page</link>, or for the current
    session with the <link linkend="view-menu">view menu</link>.</para>

    </sect2>

    <sect2 id="fnkeys">
    <title>The FN Keys Bar</title>
    <screenshot><screeninfo>The FN keys bar</screeninfo><mediaobject>
      <imageobject><imagedata fileref="fnkeys.png" format="PNG"/></imageobject>
      <imageobject><imagedata fileref="fnkeys.eps" format="EPS"/></imageobject>
      <textobject><phrase>The FN keys bar</phrase></textobject>
    </mediaobject>
    </screenshot>

    <para>This bar gets his name from the function (FN) keys it represent. For each button on this
    bar there is a corresponding function key that performs the same action. This bar is derived from the
    design of the first twin-panel file managers and the FN keys usually act the same with two changes:
    the <keycap>F2</keycap> key will open a terminal at the last local path that the active panel pointed to,
    and the <keycap>F9</keycap>
    key is used to rename files. You can choose to display (or not) the FN keys bar when starting up
    krusader via the <link linkend="konfig-startup">Konfigurator Startup page</link>, and you can toggle
    its use in the current session with the <link linkend="view-menu">view menu</link>. The actions performed
    by the function keys cannot be changed and they will remain active with or without the FN keys bar.
    </para>
    </sect2>

  </sect1>

  <sect1 id="controls">
  <title>Controls</title>

    <sect2 id="control-general">
    <title>General</title>
    <para>This a rather short but important section that will go into the details of controlling krusader.
    This section doesn't try to cover all the various key combinations for two reasons: one, there are just too
    many of them and two, most of krusader actions are
    <link linkend="konfig-lookNfeel">configurable</link>. Because of the second reason we will
    not mention keyboard shortcuts that are changeable but we'll cover the fixed ones as they are
    more important. If you find that you use a certain command a lot and want to know what is the
    shortcut for this command, or you want to change this command shortcut, we suggest you check
    out the "key-bindings" tab at the <link linkend="konfig-lookNfeel">Konfigurator look and feel tab</link>.
    </para>
    </sect2>

    <sect2 id="moving-around">
    <title>Moving around</title>
    <para>By moving around we mean the transfer of the keyboard and mouse focus between the different parts
    of the <link linkend="mainwindow">Krusader main window</link>. The focus can be in one of five places:
    the left or right panel, the menu bar, the command line or the terminal emulator.
    A panel that have the focus is called the active panel, an active panel will remain active
    until another panel receives the focus (ie: if the left panel was active and you clicked on
    the command line - the left panel remains the active panel). </para>

    <para>The most common way to transfer the focus to a specific part is to use the mouse to click on that part.
    But you should be aware to the following:
    <itemizedlist>
    <listitem><para>Clicking on the toolbar, the FN keys bar or the status bar does not change the focus.</para></listitem>
    <listitem><para>The display part of the quick view panel does not accept clicks so you better click on
                    the origin button of this panel if you want to give him the focus.</para></listitem>
    <listitem><para>The information and totals labels of the tree and list panels don't accept clicks as well.</para></listitem>
    <listitem><para>Pushing the "history" or "run in terminal" buttons in the command line will not transfer
                    the focus so you have click inside the input line.</para></listitem>
    <listitem><para>The menu bar get the focus by choosing a menu but it keeps the focus until you choose a
                    command and then the focus return to his previous owner.</para></listitem>
    </itemizedlist>
    </para>
    <para>There are of course ways to use the keyboard to transfer the focus
    <itemizedlist>
    <listitem><para>The <keycap>Tab</keycap> key will switch panel if one of the panel have the focus, or
                    rotate between all the command in a menu if the menu bar is active.</para></listitem>
    <listitem><para>The <keycombo><keycap>Ctrl</keycap><keycap>Down arrow</keycap></keycombo> will
                    take you from the active panel to the command line or terminal emulator, and the
                    <keycombo><keycap>Ctrl</keycap><keycap>UP arrow</keycap></keycombo> will take you
                    back from the command line to the active panel. </para></listitem>
    <listitem><para>The <keycap>Esc</keycap> key will make the menu bar loose the focus if it has it.</para></listitem>
    <listitem><para>If you happen to be inside the terminal emulator, the mouse is your only way out.</para></listitem>
    <listitem><para>Pressing <keycap>Alt</keycap> + one of the underlined letter in the menu bar will open
                    that menu (unless this key combination is already taken by one of krusader actions).</para></listitem>
    </itemizedlist>
    </para>
    </sect2>

    <sect2 id="marking-files">
    <title>Marking files</title>
    <para>Marking is a skill you need to master in order to make the most out of Krusader. Since you can't
    mark files in the quick view panel, and the tree panel let you mark only one directory at a time,
    this paragraph mainly deals with marking files in the list panel filelist.</para>
    <para>Moving the cursor is easy, and you don't need this manual to tell you that left-clicking on
    a file will mark it, but here are some usefull pointers: (assuming you're using the classic mouse
    selection mode)
    <itemizedlist>
    <listitem><para>The <keycap>Insert</keycap> key will toggle the marking of the file under the cursor without
                    effecting the other files .</para></listitem>
    <listitem><para>Left clicking on a file will mark a file but will not unmark it and will unmark
                    all previously marked files.</para></listitem>
    <listitem><para>The <keycombo><keycap>Ctrl</keycap><keycap>left clicking</keycap></keycombo> have
                    the same effect as the <keycap>Insert</keycap> key.</para></listitem>
    <listitem><para>The <keycombo><keycap>Shift</keycap><keycap>left clicking</keycap></keycombo> will
                    mark all the files between the previous cursor location and the new one.</para></listitem>
    <listitem><para>The <keycombo><keycap>Ctrl</keycap><keycap>Up arrow</keycap></keycombo>
                    or  <keycombo><keycap>Ctrl</keycap><keycap>Down arrow</keycap></keycombo>
                    toggle the mark state of the files under the cursor.</para></listitem>
    <listitem><para>Moving the mouse while holding the right mouse button will mark all the file
                    the cursor will move over, but will unmark all the rest.</para></listitem>
    <listitem><para>The ".." entry is un-markable.</para></listitem>
    <listitem><para>The <link linkend="mark-menu">mark menu</link> can offer more ways to mark your files.</para></listitem>
    <listitem><para><link linkend="konfig-lookNfeel">Konfigurator's look and feel page</link> can offer you
                    other ways of using your mouse to select files.</para></listitem>
    </itemizedlist>
    </para>
    </sect2>

    <sect2 id="executing">
    <title>Executing commands</title>
    <para>There isn't a lot to say here, all you need to do is mark some files (if you don't krusader will treat
    the current file under the cursor as marked), choose a <link linkend="commands">command</link>
    from the menu bar or use a keyboard shortcut (or the right click menu) and you're done.
    Oh and one more thing, pressing <keycap>Enter</keycap> or double clicking on a file will execute it...</para>
    </sect2>

  </sect1>

  <sect1 id="basic">
  <title>Basic File Management</title>

    <sect2 id="browsing">
    <title>Executing files</title>
    <para>You can execute files only in active list panels.
    To execute a file just double-click on it or press <keycap>Enter</keycap>
    when it's under the list cursor, Krusader will open it in the default application
    for this file type. if you want to use another application to open the file, then
    <keycap>right-click</keycap> on the file and go to the "open with" sub-menu that will offer
    more options. Krusader is compatible with KDE default file-manager for all file types
    except archives that will be opened inside the krusader panel and not in external application.
    See <link linkend="konfig-archives">the archives page in Konfigurator</link> for details.</para>
    </sect2>

    <sect2 id="copying">
    <title>Deleting, copying and moving files</title>
    <para>To copy or move files just mark the files/directories you want to copy/move
    and press <keycap>F5</keycap> to copy files or <keycap>F6</keycap> to move them.
    A dialog will appear and allow you to choose the operation destination, the default
    destination is the other-panel browsed directory. If you enter a partial URL Krusader will use
    the current panel directory as the URL base. Deleting files is done by marking them and
    pressing <keycap>F8</keycap> or <keycap>Delete.</keycap>A dialog will ask your confirmation and
    will warn you when deleting non-empty directories. Of course only operations that you are permitted to
    do will be performed - you will be notified otherwise.
    If you don't want to see the confirmation dialogs then you can disable them in the
		<link linkend="konfig-advanced">Konfigurator advanced tab</link>.</para>
    </sect2>

    <sect2 id="viewing">
    <title>Viewing and editing files</title>
		<para>To view files just put them under the cursor and press <keycap>F3</keycap>.
    Krusader's internal viewer is actually a Konqueror part, which can basically view every file type
    viewable by Konqueror. If the file type cannot be determined, the file will be treated as a text file.
    Editing is similar to viewing but with the <keycap>F4</keycap> key. All files are edited with the same editor,
    which you can choose in the <link linkend="konfig-general">Konfigurator general tab</link>.</para>
    </sect2>

    <sect2 id="renaming">
    <title>Renaming files, creating directories and link handling</title>
    <para>You can rename the file under the cursor with the <keycap>F9</keycap> key and
    create a new directory with the <keycap>F7</keycap> key. Right-clicking on a regular file
    will give you the option "new symlink". Clicking it will open a dialog which will prompt you to enter
    a symlink name. That name will point to the file/directory you right-clicked on.
    If the file you right-clicked on is a symlink you will also be presented with the "redirect link"
    option that will allow you change the link's target.</para>
    </sect2>

  </sect1>

  <sect1 id="archives">
  <title>Archive Handling</title>

    <sect2 id="browsing-archives">
    <title>Browsing archives</title>
    <para>Browsing archives is as easy as double-clicking on them. If the archive type is
    <link linkend="konfig-archives">supported</link> Krusader will let you browse the archive
    as if it was a directory - with few exceptions:
    <itemizedlist>
    <listitem><para>You can't bookmark your location in the archive.</para></listitem>
    <listitem><para>If you leave an archive the "go-back" action (back arrow) will not take you back inside
                    the archive but to the directory where it is located.</para></listitem>
    <listitem><para>Not all functions are supported by all archive types.
                    (ie: you can't delete files in ace or rar archives)</para></listitem>
    <listitem><para>The permissions you have inside the archive are the same as the permissions you have
                    for the archive.</para></listitem>
    <listitem><para>The command line (if visible) will not follow you inside the archive but will point
                    to the archive directory.</para></listitem>
    <listitem><para>Before any action is performed on files/directories inside the archive they
                    must be extracted. The archive will be repacked when you leave it or when Krusader
                    detects that extracted files have changed.</para></listitem>
    <listitem><para> packing and un-packing are blocking operations that display a progress dialog.</para></listitem>
    </itemizedlist>
    </para>
    </sect2>

    <sect2 id="unpacking-archives">
    <title>Unpack files</title>
    <para>There are 2 ways to extract files from archives:</para>
    <para>If you want to unpack a whole archive(s), browse to the archive location, mark the archive(s)
    and select <guimenu>File->Unpack</guimenu>. Krusader will ask you where to put the extracted
    files, the default location is the inactive panel directory. If you don't cancel the operation,
    Krusader will try to unpack all the selected files in the active panel. The archive type is detected
    using mimetype magic (or in plain English: automaticly) and if an unpacker can't be found an error
    message will be displayed.</para>
    <para>If you want to extract only part of the archive, then
    <link linkend="browsing-archives">browse</link> the archive and copy the files
    you want to extract to their new location just as you would copy "normal" files.</para>
    </sect2>

    <sect2 id="pack-archive">
    <title>Packing files</title>
    <para>If you want to create a new archive, then mark the files and directories you want to
    pack in the active panel and select <guimenu>File->Pack</guimenu>. A dialog will pop-up
    prompting you to select the archive name and location, you select the packer by selecting
    one of the <link linkend="konfig-archives">supported extentions</link>.</para>
    <para> To add files to an existing archives, open the archive and copy the files into the archive
    in the same ways you copy files into "normal" directory.</para>
    </sect2>

    <sect2 id="test-archive">
    <title>Testing archives</title>
    <para>Krusasder will not handle corrupted archives since it may result in data loss.
    If you got an error message when handling an archive or if you suspect that there something
    wrong with the archive you should test it. To test an archive browse to the archive location,
    mark the archive and select <guimenu>File->Test Archive</guimenu>. Krusader will inform you
    if the archive passed or failed the test.</para>
    </sect2>
  </sect1>


  <sect1 id="advanced">
  <title>Advanced Options</title>

    <sect2 id="compare-files">
    <title>Comparing files</title>
    <para>To find the difference between two files mark one in each panel and select
    <guimenu>File->Compare by content</guimenu>. Right now Krusader does not include a built-in
    graphical diff tool but supports two external applications:
    <ulink url="http://members.home.nl/bruggie/kdiff2">kdiff2</ulink> and 
    <ulink url="http://xxdiff.sourceforge.net">xxdiff</ulink>.
    If you have one of those installed the selected files will be compared, else you'll get
    an error message.</para>
    </sect2>

    <sect2 id="compare-dir">
    <title>Comparing directories</title>
    <para>Krusader offer a graphical directories compare mode. To activate it select
    <guimenu>View->Compare Mode</guimenu>. The differences are encoded as colored squares
    on the files/directories icons:
    <itemizedlist>
    <listitem><para>Green square: the file exist in both directories and this
    file is newer then the other.</para></listitem>
    <listitem><para>Red square: the file exist in both directories and this
    file is older then the other.</para></listitem>
    <listitem><para>Yellow square: the file exist in both directories and they are the same.</para></listitem>
    <listitem><para>Blue square: the file exist in this directory but not in the other.</para></listitem>
    </itemizedlist>
    <note><para>The files are not compared by content but by their names and dates only.</para></note>
    </para>
    <para>
    If you want to display only new and old files or any other combination, select
    <guimenu>View->Configure compare-mode</guimenu>. You can select which color(s) will appear
    in each panel but please note that all directories will be displayed regardless what you choose
    so you'll be able to continue and browse your file system.</para>
    </sect2>

    <sect2 id="calculate">
    <title>Calculate occupied space</title>
    <para>To calculate how much disk space is occupied by the selected files and directories
    in the active panel select <guimenu>File->Calculate Occupied Space</guimenu>.
    After a (hopefully) small delay a message will be displayed with total occupied space and
    the number of files and directories in the files/directories you selected.
    If the active panel is browsing an archive, the numbers will apply to the unpacked
    size of the selected files and directories. Note, however, that performing this operation on
    a very large filesystem (thousands of files) may be time consuming.</para>
    </sect2>

    <sect2 id="browse-remote">
    <title>Browse remote FTP/SMB servers</title>
    <para>There are three ways to browse a remote FTP/SMB server:
    <itemizedlist>
    	<listitem><para>Using the built-in
      <link linkend="remote-man">remote-connection manger</link>.</para></listitem>
      <listitem><para>Selecting <guimenu>Commands->FTP New Connection</guimenu> which
      will pop-up a dialog that will ask for the remote site details. Leaving the password
      and user name fields empty will try to log you in as annonymous.</para></listitem>
      <listitem><para>You can bookmark a directory on a remote host and return to this
      directory from the bookmark button on the top corner of your panel.</para></listitem>
    </itemizedlist></para>
    <para>After you log to the remote server you can browse it just like your local hard drive
    with the following exceptions:
    <itemizedlist>
    	<listitem><para>You can't execute files on remote servers.</para></listitem>
    	<listitem><para>Permissions can't always be calculated on remote servers so you might
    	get a "?" on the permissions columns for some files. </para></listitem>
	<listitem><para>Disk usage information is not availble for remote filesystems.</para></listitem>
    </itemizedlist></para>
    <para>To end the current active connection select
    <guimenu>Command->FTP Disconnect</guimenu>.</para>
    </sect2>

    <sect2 id="send-email">
    <title>Send files by e-mail</title>
    <para>If you have KDE 2.2 or higher (and you should..) then the right-click menu
    will offer you to <guilabel>Send by email</guilabel> the file under the mouse cursor.
    Selecting this option will open a new KMail mail window with the file already attached.
    Just fill in the subject and recipient(s) and send it.
    </para>
    </sect2>

    <sect2 id="shred">
    <title>Shred files</title>
    <para>When you delete files in your local system they are not completely erased and the
    information stored in them can be recovered using special software and hardware tools. If
    you want to erase a file without traces, <keycap>right-click</keycap> on it and select
    <guimenu>Shred</guimenu>.
    </para>
    </sect2>

	</sect1>

</chapter>

