# Getting Started

Help for one of the toughest riddles in The 7th Guest

Using only what you see, can you get from A to B?

So far, you may be thinking that &kde; is little more than another window manager. Relax, and read this chapter, and we'll introduce you to some features that will assure you that &kde; is very much more than a window manager — it's a full fledged environment.

## Editing Files

Since you do not only have &kde; applications installed on your system, you probably know the mess of editing ASCII style configuration files. But in fact, there are a lot of other file types that need to be edited this way. For example, the raw &XML; source for this guide was written ASCII style, as was the source code for the &kde; programs themselves. We will now show you how you can use the &kwrite; facility in &kde; to edit ASCII files of your own.

### Opening a Window Containing Your Home Folder

Click on the &kicon; button and choose Home (Personal Files). A window showing the contents of your home folder will pop up. To see a more detailed listing of files in your home folder, select Show Hidden Files from the View menu.

On the left hand of the window, a tree view of your file system structure should appear, while on the right hand side, you can see icons for each file in your Home folder, including any hidden files — files or folders beginning with a period.

### The File Manager Screen

We tried to make the File Manager as easy as possible to use, and if you know other window managers (including those built into other Operating Systems) with integrated file management, many of the following concepts should be familiar to you.

On the top, there is a Location menu which contains functions to open and close file manager windows. You can also print the current contents.

Want to visit the Internet? There are several paths you can take. You could choose Location Open Location (or press &Ctrl;O) and enter a &URL;.

The simplest way however, is to simply type in the address you want to go to in the location bar itself.

For example, if you want to visit the &kde; homepage, enter `http://www.kde.org`. You can also quickly transfer files over &FTP; using this method. &kde; is Internet ready, which means that you can load and save files not only on your local hard disk, but also on remote &FTP; and other remote servers that you have write access to. While other operating systems and desktops make a distinction between local and remote file systems, &kde; does not.

The Edit menu offers functions to select, copy and move files. We will use them later. Already having used the View menu, you have probably seen that you can view the content in many different ways. Just play around a bit and see what happens.

You will undoubtedly find the Bookmarks to be extremely useful: Now you can remember virtually any link, be it on the local machine or somewhere on the Internet. &kde;'s network transparency works both ways, allowing you to treat files and folders on your hard drive as if they were Internet bookmarks.

The Tools menu helps you find the notorious file-that-I-put-somewhere-I-do-not-remember-anymore.

### Navigating Through Folders

We will now pick one of your configuration files and edit it. First, we must change the folder in the File Manager.

&konqueror; started with your home folder as the top of the tree. For most day-to-day purposes, this is where you are likely to be working, so it is a practical default. Sometimes you need to see the broader picture though, so the rest of your file system is not far away.

You can quickly display the `/` or root folder several ways: click the small folder icon beside the navigation pane to switch to a full filesystem tree, use the Up arrow on the toolbar above to go to the top of your filesystem in the right hand pane, or type in `/` in the location bar.

For the purpose of following this guide, press the small blue folder icon beside the navigation pane, so that the navigation pane switches to a full filesystem view. Notice that part of the tree is expanded, and your home folder is still selected. Now you can see how your home folder fits into the whole hierarchy, and your home folder files are still visible in the right hand pane.

Scroll down the navigation pane on the left side of the window until you find the folder `/etc`. Double-click on `etc`. You will see a long list of files in the right window.

### Opening A File

Some of the files you see here are at the heart of your operating system, so making permanent changes to them require you to be the `root` or superuser. We are going to practice on a file that will not hurt anything if a mistake is made, called `motd`.

Scroll down until you find the file `motd` and click on it with the right mouse button. In the context menu, select Open With. A new menu will pop up. Choose &kwrite;. Voila!

There are many ways to open a file, and this is just one of them. &kwrite; is an editor with a simple and probably familiar interface. You could also have navigated down the small tree in the popup dialogue to the Editors section, and chosen another editor, or simply double click the file to open it in the default editor.

In the meantime, you have the file `/etc/motd` open in &kwrite; and we're ready to do some editing.

### The Editor Screen

The more you work with &kde;, the more you will notice that most screens and applications look and feel the same. The &kwrite; File menu is a great example of this. Almost every other &kde; program has the same menu, allowing you to create new files, open existing files from your local file system or (coming soon) even the web, save them (soon even on the web, too!), print it or mail it to somebody else.

The Edit menu can also be found in most &kde; applications, allowing you to cut and paste information between programs. You can also search and replace text. Using the Settings Menu, you can customise the editor in many different ways. For example, you can increase the font size to suit your monitor resolution — and your eyes. Of course, as in any other &kde; application, you find a Help Menu, offering you on-line help whenever you need it.

### Using the Editor

Most `motd` files contain useless stuff like Do not forget to back up your data or Do not annoy the system manager. Boring. Let's change the text so that users logging in get the really important information. You can navigate through the text using the arrow keys, and mark sections of text with &Shift;Arrows or by using the mouse with the left button pressed. Use the Edit Menu to cut and paste text. Enter whatever you want, or use the following (great) example:

    Welcome!

    This machine now has KDE installed, providing you with a great,
    easy-to-use interface and a consistent Look-and-Feel for all your
    applications. For more information on how to get KDE running on your
    account, please email the administrator.

### Saving Your Work

Now that you have changed the `motd` file, it is time to save the file, putting the changes into effect. To do this, you can use either the File Menu, or you can use the Save Icon on the toolbar.

At this point, reality hits us. You need to have `root` permission to save the changes to this file. &kde; handles this by asking you for the `root` password.

You probably don't really want to save this file, so you can press Cancel in the password dialogue and Cancel again in the save dialogue.

Finally, finish your work by closing the editor and file manager window. You can do this by clicking the X button on the top left of the window, by using the window menu of the title bar, or by choosing File Quit. Simple and elegant, isn't it?

### Creating New Files

As with everything in &kde;, there are several ways to create a new file. You could open up the file manager, right click on an empty space in a folder you own, and choose Create New File Text File.... A new empty file will appear, which you can open just like any other. You can even do this right on the desktop itself.

More often you are already in an application and want to start a new file. Most &kde; applications offer a File New menu item, and an icon on the toolbar to complement it. A new empty document will appear that you can immediately begin working in.

Both these approaches have advantages, so use the one that is most practical at the time.

## Moving Files With Drag and Drop

As you have seen in the previous section, working with files is as easy as 1-2-3. However, when you want to copy and move files, the whole copy-and-paste business can get annoying. Don't worry — a procedure called drag and drop allows you to copy and move files more quickly and easily.

### Opening Two File Manager Windows

Before you can start, you will need to open two file manager windows. The simplest way to open a new window is to press the gear wheel button on the right of the icon bar. If you do not see the tree view in the new window, activate it (Window Navigation Panel or press F9).

### Dragging a File From One Window To Another

In the first window, open the `/etc` folder and scroll until you see the `motd` file we modified in the previous section.

In the second window, open your home folder.

Click on the `motd` file. Hold your left mouse button and drag your file into your home folder. Release the left mouse button (this is called dropping the file). You will be presented up to four options: Copy Here, Move Here, Link Here and Cancel. In this example, since you are not `root`, you cannot move the file, so this option is not presented. Link Here will create a symbolic link to the file, while Copy Here and Move Here do exactly what they say. Select Copy Here. You should now have a copy of the `motd` file in your home folder.

## Using Command Line And Terminals

So far, you have only worked with the tools and programs &kde; provides. Undoubtedly, you will want to use other &UNIX; programs as well. There are two ways of running them: The quick command line and the terminal.

### Quick Command Line

Pressing &Alt; F2 pops up a small window where you can enter a command to run. Please note that you will not see any text output generated from a program started in this manner! This method is only recommended for starting &X-Window; based programs or for running tools where you do not need to see or type anything. For other programs, you will still need to use the terminal.

### The &UNIX; Terminal Emulator

From the application menu, choose System Terminal . A terminal window will open. Here you can use regular &UNIX; shell commands: `ls`, `cat`, `less`, and so forth. Using the Settings menu, you can customise the terminal emulator to suit your needs.

## Finding Your Lost Files

Everyone has undoubtedly encountered the following problem: You start `ftp`, log into a great site like ftp.kde.org and start downloading files. It is late in the evening and you shut down your machine after completing the transfer. The next morning, you are at the keyboard again, and you start wondering into which folder you placed the recently transferred files. Using &kde;'s &kfind; utility makes finding those lost files a snap.

### Starting &kfind;

Starting &kfind; is simple: Choose Find Files in the &kmenu;. &kfind; uses an interface part you probably have not yet met in &kde;: tabs. When &kfind; starts, you see that Name/Location is selected. When you click on Date Range, the tab content changes. Since you have never run a search before, most of the icons on the toolbar and most of the menu entries are disabled. We will change this now.

### Finding a File by Knowing Parts of Its Name

As long as you know a bit of the file name, searching is easy. Select the Name/Location tab, and enter the file name in the Named field. Wildcards may be used as needed. As a test, type `*.tar.gz`. By default, the search begins in your home folder, but you can select any starting folder you wish by clicking on the Look in or Browse.... To start searching, press the Find button. After a moment, a list of files will appear in the search results window. If they do not appear, you started the search in the wrong folder, made a spelling mistake in the Named field, or no files ending with a `.tar.gz` extension are located on your machine.

### Finding a File by More Complex Criteria

There are many categories you can use to make your search more precise. The more you know about the file, the better are your chances of finding it.

Date Range

- Here, you can specify that you only want to see files which were last touched in a given period of time. You can also specify that you only want to see files that were touched since a specified number of months or days ago.

File Type in the Contents tab.

- If you know that the file was of a special type (⪚, a tar/gzip archive or a jpeg picture), you can tell &kfind; to find only this type of file.

Containing text in the Advanced tab

- You can specify text that the file must contain.

File size is, in the Properties tab

- If you know the file size, you can limit your search in this regard, as well.

&kfind; has many more options to refine searches, explore them all!

## Using Multiple Desktops

Using multiple desktops helps you organise your work. You can place your programs on different desktops, and name the desktops so you know what you do there. This increases and optimises your workspace. It also helps you when you are surfing the net instead of doing your work and your boss comes in. But, of course, this is rare — at least in the office where I work.

You can switch between desktops by clicking the desktop buttons on the &kicker; panel. If you want to rename them, you can do so by double-clicking on them.

You can use windows on multiple desktops. If you want to have a window present everywhere, just click the sticky button on the top-left of the window. To send a window to another desktop, click on the title bar with the right mouse button, choose To Desktop, and select the desktop where you would like the window moved.

## Quitting &kde;

To quit working with &kde;, you can use the Logout entry in the &kmenu;. You will be asked if you really want to quit &kde;. Quitting will close all windows and return you to your console or display manager. For information on how programs can save your work during logout, please read the notes for logging out.