Issue #3 January 2005

Tips & Tricks

Red Hat's customer service team receives technical support questions from users all over the world. As they are received, Red Hat technicians add the questions and answers to the Red Hat Knowledgebase on a daily basis. Individuals with a redhat.com login are granted limited access. Red Hat Enterprise Linux subscribers are granted full access — with expanded categories and advanced search capabilities. Every month, Red Hat Magazine offers a preview into the Red Hat Knowledgebase by highlighting some of the most recent entries.

This month's Tips & Tricks include information about the new Firefox Web browser. For more information about Firefox, read the article Return of the browser war.

Tips from RHCEs

What command line spelling tools are available?

Red Hat Enterprise Linux has some simple tools for performing spell checks on the command line. The main commands are aspell and look.

The aspell command, from the aspell package is designed to spell check files. This package also provides the command spell, ispell, and run-with-aspell which call aspell in different ways.

For example, to check if the word "compatible" is correct, execute the command:

echo compatible|aspell -a

The output should be similar to:

@(#) International Ispell Version 3.1.20
*

This output shows that "compatible" is spelled correctly.

However, if you try to check the word "compatable," the output would be:

@(#) International Ispell Version 3.1.20
& compatable 5 0: compatible, computable, comparable,

This output shows that "compatable" is incorrect. Correctly spelled alternatives are listed as suggestions.

The spell command can be used to check for misspelled words in a file:

$ spell example.txt
thr

This shows that the word "thr" is misspelled in the file.

The look command, from the util-linux package, lets you check a word on the command line against a list of correctly spelled words. By default, look references the list of words in /usr/share/dict/words from the words package.

For example, to check if "compatable" is spelled correctly:

look compatable

This returns no output, so "compatable" is not a correctly spelled word.

How do I install Firefox 1.0 on Red Hat Enterprise Linux 3?

The following steps will take you through a quick installation of Firefox 1.0 on a Red Hat Enterprise Linux 3 AS machine. Included are a couple of helpful hints to hopefully make this easy installation even easier. These instructions assume that you have already downloaded Firefox 1.0 for Linux i686 (firefox-1.0.installer.tar.gz) from mozilla.org and that you are using a graphical environment such as GNOME, which is used in this example.

1. Change directories to where the Firefox installation file was downloaded.

2. Uncompress and untar the file with the following command:
tar xvfz firefox-1.0.installer.tar.gz
You should see output similar to the following:
 
firefox-installer/
firefox-installer/xpi/
firefox-installer/xpi/adt.xpi
firefox-installer/xpi/browser.xpi
firefox-installer/xpi/en-US.xpi
firefox-installer/xpi/help.xpi
firefox-installer/xpi/talkback.xpi
firefox-installer/xpi/xpcom.xpi
firefox-installer/config.ini
firefox-installer/header.png
firefox-installer/install.ini
firefox-installer/license.txt
firefox-installer/watermark.png
firefox-installer/firefox-installer
firefox-installer/firefox-installer-bin

Note: The Firefox installation files will be extracted in your current working directory.

3. Change directories to one containing the extracted files, firefox-installer:
cd firefox-installer/
4. Execute the installation script to install Firefox:
 
./firefox-installer

The graphical installer will appear. Complete the steps necessary to install the browser. The default installation will install Firefox in your current working directory.

Hint: Do you want to install the Firefox browser system wide? During the Firefox graphical installation, choose a location that all users can execute from. For example, change the locate to /usr/local/firefox/.

5. To start Firefox after the initial installation, change directories to the one containing the installed files and execute the Firefox script:
 
./firefox &

Note: The ampersand (&) allows you to continue to use the command prompt.

How do I add a Firefox 1.0 icon to the GNOME panel in Red Hat Enterprise Linux 3?

To add an icon to the GNOME panel, you need to know where your Firefox installation was installed on your system, for example /usr/local/firefox/.

Hint: Need to find where the installation of Firefox is? Try the following sequence if you just installed Firefox and do not know the installation path. You can omit the updatedb command if your cron.daily tasks have completed. updatedb is run by default in a 04:00 am daily cronjob. From the command line:

 
updatedb
locate firefox-bin

The updatedb command updates the database that keeps track of all your system files; it may take a few minutes to complete. The output of the locate command shows the installation path.

To add a Firefox icon to your GNOME panel, use the following steps:

  1. Right click on a blank (available) area on your panel. A menu will appear with options like: Add to Panel, Properties, New Panel, Help, About Panels, and About GNOME.
  2. Select the Add to Panel option, then choose Launcher... — a Create Launcher window pops up.
  3. There are 2 important pieces to fill in, the Name and the Command. Use Firefox for the name, and use the location of the Firefox installation directory followed by the firefox command such as /usr/local/firefox/firefox for the command.
  4. The Type should be defaulted to Application in the drop-down menu. If not, change this to Application.
  5. To add an icon image, click on the No Icon box. The default location of /usr/share/pixmaps appears. To use the Firefox icon, select the Browse... button and browse to /usr/bin/firefox/icons. Choose the file icons/mozicon50.xpm from the Firefox installation directory.
  6. Click OK after you have completed the information in the Launcher Window. A new icon should appear on your GNOME panel.
  7. Test the Firefox icon by single clicking with the left mouse button.

Hint: To change the location of the icon on the GNOME panel, right click on the Firefox launcher icon and select Move. Move the icon to a desirable location on the panel and then left single click to release.

Troubleshooting: Did the launcher not work? Right click on the Firefox launcher and select Properties. Verify that the spelling of the command is correct. Make sure that Firefox can be started from the command line first.

Mozilla will not open. How do I open Mozilla if Firefox is already running on my system?

This tip assumes you have Firefox 1.0 and a version of Mozilla installed on your Red Hat Enterprise Linux 3 system. If you have the Firefox application open, and you attempt to open Mozilla, another Firefox browser appears. Mozilla will not open via a panel icon or the command line, you keep getting new Firefox browsers instead.

This appears to be caused by a bug in Firefox. If you close all the Firefox browser windows that are open and then open Mozilla, you should have success. This is caused by Mozilla/Firefox being unable to fork a process after Firefox is already running. You should be able to open and use Firefox normally after you open Mozilla first.

How do I view the contents of a .iso file?

ISO files are whole disk images. They are single image files that are used for burning to a CD or DVD. Red Hat provides Update releases of Red Hat Enterprise Linux as ISO files. The Updates of Red Hat Enterprise Linux can be downloaded from Red Hat Network (RHN).

For example, if you have downloaded a file from RHN it will look similar to rhel-3-U3-i386-as-disc1.iso. To view the contents of a .iso file you need to mount the file as a loopback device with the following command:

mount -o loop /path/to/rhel-3-U3-i386-as-disc1.iso /mount/point

Now you can browse to /mount/point to view the contents of the rhel-3-U3-i386-as-disc1.iso file.

An example of where this can be useful could be when setting up an installation server. Download the required .iso files from RHN, mount them as loopback, copy all the files to a central repository, and perform an NFS installation.

For further information on loopback devices and how to download .iso files from RHN please see additional articles in the Knowledgebase.

How do I check who is currently logged in on my server?

To quickly check who is currently log in on the server and the programs they are currently running, run the w command. Sample output:


 16:27:46  up 35 days,  7:08,  4 users,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
root     :0       -                15Dec04   ?     0.00s  3.38s  /usr/bin/gnome-session
root     pts/0    :0.0             15Dec04 13days  0.49s  0.29s  vim httpd.conf
root     pts/1    tavarua.example.  4:27pm  0.00s  0.05s  0.00s  w
root     pts/2    :0.0             15Dec04  6days  0.24s 14.87s  /usr/bin/gnome-terminal

This command also show how they are logged in, if they logged in remotely, the current time, and how long the their login session has lasted.

Alternatively, you can use the who command. Sample output:


root     :0           Dec 15 14:32
root     pts/0        Dec 15 14:33 (:0.0)
root     pts/1        Dec 29 16:27 (tavarua.example.com)
root     pts/2        Dec 15 16:22 (:0.0)

Refer to the man pages for more information, man w and man who, respectively.

How do I install Flash plugins on my Mozilla browser using Red Hat Network (RHN)?

If your Red Hat Enterprise Linux 3 x86 system is registered with Red Hat Network (RHN), the easiest way to add Flash plugins to your Mozilla browser would be to run the following command:

up2date  flash-plugin

Note: The Flash plugins are only available in the x86 RHN channels at the time of this writing.

Example output from the command would like similar to the following:

Fetching Obsoletes list for channel: rhel-i386-as-3...
########################################
 
Fetching Obsoletes list for channel: rhel-i386-as-3-extras...
########################################

Fetching rpm headers...
########################################
 
Name             Version        Rel
-------------------------------------------------------
flash-plugin     7.0.25         2.EL              i386
 
 
Testing package set / solving RPM inter-dependencies...
########################################
flash-plugin-7.0.25-2.EL.i3 ########################## Done.
Preparing              ########################################### [100%]
 
Installing...
   1:flash-plugin      ########################################### [100%]

Verify the Flash plugins were installed on your browser by typing the following at the URL section of your browser:

about:plugins

You would see something similar to the following:

Shockwave Flash

    File name: libflashplayer.so
    Shockwave Flash 7.0 r25

MIME Type                 Description     Suffixes Enabled
application/x-shockwave-flash Shockwave Flash      swf Yes
application/futuresplash FutureSplash Player  spl  Yes

This article is protected by the Open Publication License, V1.0 or later. Copyright © 2004 by Red Hat, Inc.


>>>>>>> 1.3