Chapter 5
Getting Productive in Linux

We will be Covering ...

Productivity Software

Open Office

GNOME Office

File Association

Introduction to the Linux Terminal and Command Prompt

Basic Navigation

File System Hierarchy

Installing New Applications

RPM & the Add/Remove utility

OpenOffice.org --- Writer

This portion of the OpenOffice.org package is the equivalent to the popular Microsoft Word from the Microsoft Office package. Functionality wise, most of the features are similar to Word's abilities, with just a few minor differences between the two applications.

Productivity Software -OpenOffice

Productivity Software -OpenOffice

OpenOffice.org --- Calc

This portion of the OpenOffice.org package is the equivalent to the popular Microsoft Excel from the Microsoft Office package. Upon first glance, one would notice that the spreadsheet look and feel is all available; with saving to and from Excel files, with or without macros, this software is generally safe to run, free from Excel macro viruses. Having only one major difference in the sense that Excel supports 64,000 rows, while Ooo's Calc only does 32,000 – a change that will be implemented soon enough.

OpenOffice.org --- Draw

Draw is a simple line drawing application that generally has many of the same features Impress (your next topic) has. Some may say that Draw is the cousin to Microsoft's Visio, something that is not part of their Office offering.

Productivity Software -OpenOffice

OpenOffice.org --- Impress

Impress is what we'd describe as the PowerPoint killer. It may be missing out on templates by default, but if the power of the Internet is harnessed, all will be well in the world of Impress. Its presentation software with all the bells and whistles that any other package can offer you.

Productivity Software -OpenOffice

Productivity Software -GNOME Office

Gnome Office

Word Processing --- Abiword

Spreadsheet --- Gnumeric

Finance Management --- Gnucash

Productivity Software -GNOME Office

Gnome Office

Word Processing

Abiword

AbiWord is Gnome Office's word processing application. Hardware requirements can be as low as 486 with 16 MB. Among the features that stands out among the other work processor is its support for other languages. There are not as many feature as other work processors provide, however, Abiword still has most of the rudimentary features to get the job done.

Supports the more popular .doc, .rtf, .kwd and more.

Productivity Software -GNOME Office

Gnome Office

Spreadsheet

Gnumeric

GNUmeric is GNOME Office's spreadsheet application. The developer intend to make GNUmeric to comparable to other commercial spreadsheet application in the market. Users whom are familiar with Microsoft Excel should rapidly acquire familiarity with this application.

Supports .xml, .tex, xls, and more.

Productivity Software -GNOME Office

GnuCash

Financial Management

Gnumeric

Gnucash is GNOME Office's financial management application. The features of Gnucash does not only include accounting and financial tools, but also intends to be a financial browser for the web.

File Associations

File Associations are made by the file extensions.

Eg: abc.doc, test.sxw, slides.ppt and etc.

In Linux, not all applications required file an extention to open a file.

File extensions enable a user to identify a file type.

Introduction to the Linux Terminal and Command Prompt

Accessing the Virtual Terminals

Gnome Terminal

X Terminal

Switching between Terminals and X

Introduction to the Linux Terminal and Command Prompt

Basic Navigation

Changing Directories

Absolute Path

Relative Path

Auto completion of paths and commands

Introduction to the Linux Terminal and Command Prompt

Basic Navigation

Changing Directories

Absolute Path

Relative Path

Auto completion of paths and commands

Introduction to the Linux Terminal and Command Prompt

Basic Navigation

Changing Directories

Absolute Path

Relative Path

Auto completion of paths and commands

Basic Navigation -The Linux Filesystem Hierarchy

/ : the top most of the file system hierarchy

/bin : contains binaries accessible by users and root.

/boot : contains static files of the boot loader and kernel

/dev : contains device files

/etc: contains the system's configuration files and startup scripts

Basic Navigation -The Linux Filesystem Hierarchy

/home : contains user home directories

/lib : contains shared and static libraries, and kernel modules.

/mnt : contains the mount points for temporary partitions

/opt : reserved for the installation of add-on application software packages

/proc : contains the virtual file system

Basic Navigation -The Linux Filesystem Hierarchy

/root : home of root

/sbin : contains system binaries assessable only by root

/tmp : contains temporary files

/usr : contains files, programs, commands accessible by users

/usr/src: contains the source codes

/var : contains variable data

Installing New Applications -Add/Remove Applications Utility

Installing New Application

Using the “Add/Remove Applications” utility to install applications.

Tick the desired application to install in the categories and click “update” to install.

Un-tick the application to uninstall the application.

Installing New Applications - RPMs

To list all packages that are installed in the system,

Type: rpm -qa

To view information contained in a specific package:

Type: rpm -qi [package-name]

To list the files contained within a package

Type: rpm -qlp [package-filename]

Installing New Applications -RPMs

To install or upgrade the package,

Type: rpm -Uvh [package-filename]

To uninstall a package,

Type: rpm -e [package-name]

Thank You!

Colin Charles, Nah Soo Hoe, William Wong

byte@aeon.com.my, nsh@pop.jaring.my,

wengyeew@yahoo.com.sg

http://training.bytebot.net/linux/

Exercises

1.Open up Writer.sxw in the OOo folder.

2.Change the background color of the whole table to a color of your choice. Do not save the file yet.

3.Save the file as Writer-myedit.sxw. Now continue editing.

4.Change the font color of the whole table to a color of your choice.

5.Use Search and Replace the string “Microsoft ®” with “Microsoft®” (notice that there's no space between the two). Also make sure that the ® is super-script, and aligned similarly to the others.

6.In the MSOffice folder, open up the Writer.doc. Compare the two files – are there any significant differences?

7.Go over to the Alternatives folder and check out Writer.rtf. Now compare the three documents, and check to see if you notice any difference.

Exercises

1.Open up Calc.sxw from the OOo folder. We will be playing with a semi-actual sheet that we use to check on OSS-101 trainers!

2.In cell C5, there is a sum of 24 in the total. To achieve this sum, the results from cell's B6 to G6 should be computed. For sanity checking, this should go till B18 to G18. Create the total sum of students in column H. Save the file as Calc-mystuff.sxc. Now continue editing.

3.Now that you know the total number of students is correct, let's do a little bit with the median. In column I, create the median value of the response on a per response basis. If you notice in cell B26, there's a formula there. Cell B27 doesn't quite have it, neither does cell's B33-37 have it. Create an appropriate formula that basically sums up what it's meant to. Don't forget to make them percentages. (Hint: look at what C33-37 have, and so on!)

4.Add a table border to the entire spreadsheet – so all rows and columns have bold lines in between them. Next, go to the MSOffice folder and open up the Calc.xls file. Do you notice its similarities?

5.Save the Calc-mystuff.sxc file (the one you've just been doing) as an Excel document and later (most likely when you're home), see how it would open up in Excel. Go to the Alternatives folder and notice the Calc.csv file? Thats a standard among all spreadsheet applications to use – comma separated values.

Exercises

1.Open up Draw.sxd from the OOo folder.

2.Things are divided into layers in Draw. Get to the layer view, copy the picture of the penguin, and paste it in the document again. You should now see two penguins.

3.Save the file as Draw-mystuff.sxd and continue with this exercise.

4.Add some text to the document. (Hint: The text insert button is on the left pane)

5.Change the properties of the existing object – the big yellow bubble.

Exercises

1.Open up Impress.sxi from the OOo folder.

2.You'll notice a simple presentation that doesn't quite need much changes. Let's change the background color of all the slides.

3.Save your file as Impress-mystuff.sxi.

4.Change the color of the headings from Slide 2 onwards (its currently a tinge of red).

5.Re-label the Slides from Slide 1 – 5, to an appropriate name (the title could be placed here, so its easier to find which slide has what content from the tab itself).

6.On the last slide, with the Thank You notice, change the slide format, so the “Click to add outline” is not displayed anymore.

7.Go to the MSOffice folder and notice the Impress.ppt – thats the PowerPoint equivalent to the file.

File Association

File extensions in Linux are not as important as they are on a Microsoft platform. However, there are some programs that rely on file extensions to determine the file type. In a Linux desktop, a user needs to be able to click on a file and the appropriate application associated with the file should be started and the contents displayed. Applications that are installed may not automatically create these associations, hence, in the following section, the user will learn to make these association manually.

To create a file association:

From KDE/GNOME/KDE, access the “Control Center” of the desktop. If “Control Center” is not found look for a folder in the application starter labeled as “Preferences” or “Document Handlers”. A program utility called “File Types and Programs” should be found.

In the “File Types and Programs” screen, click “Add a New MIME Type” or “Add a File Type...”.

In the “Add MIME/File Type” screen, enter the MIME or file type and a description.

Next, add a file extension which an application may associate with.

Finally, select an application to associate with this file type in the “Default Action” box. If a custom action is desired, an application path can be entered.

Introduction to Linux Terminal and Command Prompt

Linux Terminal

Most distributions use the graphical login as default. Hence, the user does not sees the underlaying command prompt which is running all operations in the background. When a problem arises, it is possible to switch to a command prompt to troubleshoot the problem. In most Linux distributions, switching to a command prompt is done by pressing CTRL-ALT-F1. Switching to the Linux console enables a user to use any command prompt tools to troubleshoot problems, install software, conduct system administration tasks, and even shutting down the system. There are usually six consoles available from F1 to F6. To switch back to GUI from a console, pressing ALT-F7 will return the user back to the desktop.

Accessing a Pseudo Terminal from the Desktop

A pseudo terminal is an emulated terminal which simulates the console environment. The user does not need to press CTRL-ALT-F1 every time a command prompt is needed. Pseudo terminals such as Kterm, Xterm, gnome-terminal and etc are all used in the GUI environment to provide access to the command prompt. These pseudo terminals are usually located on the panel itself or in the application starter menu under “System Tools”.

Getting Comfortable in the Command Prompt

Moving around the File System Hierarchy

Tutorial

1.Start up a pseudo terminal.

2.To move around a file system hierarchy, the command “cd” is used.

•Usage: cd [path]

•Example: cd /home

There are two kinds of path. An absolute path will always starts with a “/” which will take a user to anywhere on the file system. A directory is added at the end of the“/” as the directory goes lower into the subdirectories.

•Example: If the current directory is /home. When a user William enters into William's home directory, the absolute path of William's home directory will be /home/william. The user William will also be able to go to this location from any where on the file system when an absolute path is used.

•The users needs tto ype this to get to the William's home directory:

•#cd /home/william (An absolute path)

A relative path will only work if the file or directory is under the current directory.

•Example: If the user is in “/” and wishes to go to /usr/local/src using relative path.

The user needs to type:

•# cd usr (A relative path)

•# cd local

•# cd src

3.To go one or several directories up, type:

•# cd .. (For one directory up)

•# cd ../.. (For two directory up)

•#cd ../../.. (For three directory up)

4.From any where on the file system, type only “cd” to return to the user's home directory.

5.To access previously executed commands, use the arrow up and down keys to navigate through the command histories.

6.The auto completion at the command prompt works only for commands found in the system's search path.. To auto complete a command, type the first few characters of the command and hit the “TAB” key to complete the command. If pressing “TAB” does not complete the command, either the command is not found on the path or there are more than one matches. Press “TAB” twice rapidly to view the possible matches. It works the same for directories.

•To auto complete the command “redhat-config-xfree86”.

•#Type: redh (press tab once)

•#Completes: redhat- (press tab twice to view possible matches)

•#Type: redhat-conf (press tab once)

•#Completes: redhat-config-

•#Type: redhat-config-x (press tab once)

•Completes: redhat-config-xfree86

7.The list below shows the Linux to DOS equivalent commands to some of the common commands.

•dir ---> ls [ path]

•cls ---> clear

•del ---> rm [file name]

•copy ---> cp [source] [destination]

•move/rename ---> mv [source] [destination]

•type ---> cat [path of text file]

•cd ---> cd [path]

•cd ---> mkdir [newdirectory]

•rd ---> rmdir [olddirecroty]

•win ---> startx

Installing New Applications

Installing new packages in Linux usually involves going to the command prompt to perform the installation. However, nowadays, new tools and utilities is available to make the process more user friendly and hassle free. An utility worthy of note is Fedora's utility called “Add/Remove Applications”. This utility installs and resolves dependencies for the user in Red Hat.

The location of the “Packages” utility is in: Red Hat >> System Settings>> Add/Remove	Applications

Installation Procedure:

1. Access the Red Hat “Add/Remove Applications” utility in the above mentioned location.

2. In the “Add/Remove Applications” screen, click on the tick box for the desired categories or application to install. Un-tick on the tick box to uninstall an application.

3. Click “Update” when the choices have been made. The system will take a while to resolves the dependencies and determine the packages that will be installed or uninstalled.

4. After the dependencies has been resolved, a window summarizing packages to be install or uninstall will be displayed. Click “Continue” to proceed with the installation.

5. Follow the instructions when prompted to change disks.

RPM Package Format

The Red Hat Package, or “.rpm” format is fairly popular in Linux. Many distros such as Red Hat and Mandrake uses this file format to package its applications. The Fedora rpms are located in /mnt/cdrom/RedHat/RPMS on the Red Hat installation disks.

To install a RPM package (.rpm)

# rpm -Uvh <package file name>.rpm

Example:

# rpm -Uvh xinetd-2.3.4-0.8.i386.rpm

Note:

-U: The “U” switch is actually meant for upgrade. If the system has an older application “-U” will replace the older application. If the application does not exist, it will install it.

-vh: This switch basically instructs the installation to be verbose and display a progress bar while it installs.

To uninstall a RPM package

# rpm -e “<the package name>”

Example:

# rpm -e xinetd

-e: This switch tells the utility to uninstall the package.

To query whether a package is installe:

# rpm -q <package name>

Example:

# rpm -q xinetd

-q: This switch tells the utility to query its database for a specified package.

Note: Take note that in <package name> only the package name is needed. A package file name contains the package name, version, architecture, and its extension. To uninstalled a package, include only the package name.

Place to download RPMs:

•www.freshmeat.net

•www.sourceforge.net

•Linux.tucows.com

•software.linux.com

•rpmfind.net

2004-03-23T23:55:08