GENESIS: Documentation

Related Documentation:

Unix and the Linux Graphical Desktop

After you have logged in, you will be presented with a desktop showing several icons and a panel that is similar to the Windows taskbar. It is usually located at the bottom of the screen, but could also be located at the top, or even one of the sides. Linux and its graphical interface, the X window system, give a lot of choices and configuration options for the desktop environment. The most commonly used desktops are the KDE desktop and the GNOME desktop.

For KDE, the panel may look something like this


PIC


or with GNOME, it might look like this


PIC


Some of the more important icons that you can click on are the

PIC Red Hat main menu
PIC KDE main menu
PIC GNOME main menu
Like the MS Windows start menu, these may be used to logout or to select programs to run (some of which are in sub-menus). They are usually located at the left end of the control panel (see the GNOME and KDE panel figures above).

PIC KDE Terminal window
PIC UNIX Terminal window

This is a console window that allows you to type commands to the UNIX shell. It is one of the most important applications in UNIX and Linux. Once you get used to it, you will find that after learning a few cryptic two-letter UNIX/Linux commands, you will get things done much faster than going through many levels of sub-menus with a GUI. You will create and run GENESIS simulations by giving commands in a terminal window.

Note that if your taskbar doesn’t have an icon for a terminal window, look for it in the System Tools sub-menu of the Main Menu.

PIC Web browser (often Mozilla).
The bookmark feature of the browser can be used to set bookmarks for GENESIS and other documentation.

PIC Konqueror.
A fast and light-weight web browser provided wth KDE that is good for reading documentation.

PIC KDE help center
Provides links to information about the KDE desktop environment, KDE applications on the KDE start menu, the UNIX manual (man) pages, and GNU “info” documentation.

PIC KDE control center
Used for changing the configuration of the KDE desktop environment.

PIC Desktops display
Most Linux desktop environments allow you to switch between multiple desktops, so that your screen doesn’t become too cluttered with applications and terminal windows. For example, you could be running a GENESIS simulation on one desktop, have a couple of browser windows open on another, and be editing two or three files on a third. Here, the taskbar has been configured to let you switch between four desktops by clicking on one with the mouse.

Getting around in UNIX and Linux

The commands that you type within a terminal window are interpreted by a UNIX shell. Your account will have been set up to use a particular default shell. The most common shell used with Linux is bash, a variation of the Bourne shell sh. Some prefer to use tcsh, a variation of the Berkeley C shell csh. All of these shells recognize the same common commands described below for creating, navigating, or copying files between directories (in Mac/Windows-speak, folders).

When you first bring up a terminal window, you are placed in your home directory. A few default configuration files with names starting with “.” have been set up for you, but otherwise your directory is empty (as file names starting with “.” are not visible in a file manager GUI–but see below). You can get a listing of the current directory by using the ls command (short for “list”). This is like the DOS dir command, but you need to specify some options (followed by a dash) to get details. To get a more detailed listing (including the otherwise invisible “dot files”), type “ls -lags”.

To traverse to another directory you use the cd (change directory) command. This command takes an argument of the directory you wish to change to. Either an absolute or relative path argument can be specified. Absolute paths begin at the “root” of the UNIX file system (/). Relative paths begin from the currect working directory. For example, if you are in your home directory, you can get to a next lower directory, e.g. genesis, by typing “cd genesis”. Typing “cd” by itself changes you directly to your home directory. The following shorthand symbols can be used to refer to commonly used directories:

~ Your home directory.

. The directory that you are currently in (current working directory).

.. The directory immmediately above the current working directory.

To create a directory, use the mkdir command, e.g. “mkdir myScripts”. Note that file and directory names in UNIX are case-sensitive so “mkdir myScripts” is not the same as “mkdir myscripts”.

To print the name of the current working directory you can use the pwd (print working directory) command.

You can examine text files (such as all of our README files) using the more command. This command will display a screenful of lines at a time. Pressing the space bar on your keyboard displays the next screen full of lines, and pressing “b” takes you back one screenful. Pressing “Enter” displays one additional line. Pressing “ ’ ” (apostrophe) returns you to the top of the file and “q” will exit the more command. For example, “more tutorial1.g” will display the contents of the file tutorial1.g’ if it exists in the current working directory. The “pipe” symbol “ ” can be used to send the output of one command into another. For example, try the command “ls -lags ~ | more”.

Other useful commands are rm, meaning remove or delete, as in “rm junk.mail”, and cp to copy one file into another, as in “cp tutorial3.g ~/myScripts/tutorials”. The “-r” option lets you recursively copy a directory with its contents, including any subdirectories. For example, if GENESIS is installed in “/usr/local/genesis”, to make your copy of the genesis/Scripts/tutorials directory, you would type

  cd /usr/local/genesis/Scripts  
  cp -r tutorials ~/myScripts  
 

The mv command is used to rename a file or move it to a different directory, instead of copying it.

The two most common text editors for UNIX are vi and emacs. If you are not familiar with either editor, you may find it easier to learn emacs. For an even simpler text editor with built-in help, try nano if it is installed. If you are using Linux with the KDE or GNOME desktop, try kedit or gedit.

Documentation for most UNIX commands can be obtained with the man command. For example “man ls” will tell you about all the options for the ls command.

The main source for Linux information is The Linux Documentation Project.

If most of this is new to you, now would be a good time to open a terminal window and try out some of the commands described above.