Using Fedora or RHEL to Run Applications


Although operating systems are nice (and necessary), people use desktop computers to run application programs. There has been a common belief that although Fedora or RHEL can work well as a server, they are not ready to challenge Microsoft's dominance of the desktop arena. There are several reasons why, I believe, Fedora and RHEL can replace Microsoft Windows on the desktop, if you are committed to doing it:

  • Every category of desktop application now has an open source offering that will run in Linux. So, for example, although Adobe Photoshop doesn't run natively in Linux, you can use The GIMP or other applications to work with digital images in Linux.

  • Your Windows applications that you absolutely must have can usually be run without problems using Windows emulators or compatibilty programs, such as Qemu and WINE. Particular efforts have been made to get Windows games (Transgaming.com) and office productivity applications (Codeweavers.com) running in Linux.

  • With viruses and worms running rampant in Microsoft systems, many people now believe that Linux systems offer a more secure alternative, particularly if the desktop system is being used primarily for Web browsing and e-mail. With Linux, corporations that deploy dozens or hundreds desktop systems can exercise a great deal of control over the security and features in their employees ' systems.

    In the long run, as Linux systems become more profitable targets for viruses and malware, learning good practices in choosing software, using file ownership/permission, and monitoring system resources will become more important. However, such tools (including virus scanners like klamav and clamscan) are already available for any Linux system that chooses to include them. (For more information refer to www.clamav.net and http://klamav. sourceforge .net .)

  • A huge development community is working on open source applications to meet the needs of the Linux community. If you feel more secure having a company backing up your mission-critical applications, some strong commercial software offerings are available for Red Hat systems (see www.redhat.com/apps/isv_catalog ).

The bottom line is that it will take some effort for most people to discard their Microsoft Windows operating systems completely. However, if you are committed to making Fedora Core your sole application platform, there are several ways to ease that transition. Emulation programs let you run many programs that were created for other operating systems. Conversion programs can help you convert graphics and word processing data files from other formats to those supported by Linux applications.

Cross-Reference 

See Chapter 6 for information on importing and exporting word processing and graphics files.

If you are running Linux on a PC, chances are that you already paid for a Microsoft Windows 95, 98, ME, XP, NT, or 2000 operating system. You can either run Linux on a different PC than you use for Windows or have Windows and Linux on separate partitions of your hard disk on the same PC. The latter requires that you reboot each time you want to switch operating systems. (See Chapter 2 for information on setting up a Linux/Windows dual-boot system.)

The following section describes applications that run in Fedora that you can use to replace the Windows applications you are used to.

Finding Common Desktop Applications in Linux

If you are going to use Linux as a desktop computer system, you have to be able to write documents, work with graphics, and crunch numbers . You probably also have other favorite applications, like a music player, Web browser, and e-mail reader.

Note 

Using WINE technology, the people at Codeweavers, Inc. offer a CrossOver Office product that lets you install and run Microsoft Office in Linux. See the "Running Windows Applications with WINE" section later in this chapter.

To give you a snapshot of what desktop applications are available, Table 5-3 contains a list of popular Windows applications, equivalent Linux applications, and where you can find the Linux applications. Although many of these applications have not reached the level of sophistication of their Windows counterparts, they can be cost-effective alternatives.

Table 5-3: Windows-Equivalent Linux Applications
Open table as spreadsheet

Windows Applications

Linux Applications

Where to Get Linux Applications

Cost

Microsoft Office (office productivity suite)

OpenOffice.org ( openoffice.org )

Koffice

StarOffice

Included on Fedora Core DVD

Included on Fedora Core DVD

www.sun.com/staroffice

Free

Free

$69.95

Microsoft Word (word processor)

OpenOffice.org Writer

AbiWord

kword

Included on Fedora Core DVD

Included in Fedora Extras

Included in Fedora Extras

Free

Free

Free

Microsoft Excel (spreadsheet)

OpenOffice.org Calc

gnumeric

kspread

Included on Fedora Core DVD

Included in Fedora Extras

Included in Fedora Extras

Free

Free

Free

Microsoft PowerPoint (presentation)

OpenOffice.org Impress

kpresenter

Included on Fedora Core DVD

Included in Fedora Extras

Free

Free

Microsoft Internet Explorer

(Web browser)

mozilla

firefox

epiphany

konqueror

opera

Included on Fedora Core DVD

Included on Fedora Core DVD

Included in Fedora Extras

Included on Fedora Core DVD

www.opera.com

Free

Free

Free

Free

Free download

Microsoft Outlook (e-mail reader)

evolution

kmail

thunderbird

Mozilla Mail

Included on Fedora Core DVD

Included on Fedora Core DVD

Included on Fedora Core DVD

Included on Fedora Core DVD

Free

Free

Free

Free

Adobe Photoshop (image editor)

The Gimp (gimp)

Included on Fedora Core DVD

Free

Microsoft Front Page (HTML editor)

quanta

Included on Fedora Core DVD

Free

Quicken or Microsoft Money (personal finance)

gnucash

Included on Fedora Core DVD

Free

AutoCAD (computer-aided design)

LinuxCad

www.linuxcad.com

$89

The following sections describe how to find and work with application programs that are included or available specifically for Linux.

Investigating Your Desktop

More and more high-quality desktop applications are being packaged with or made available for Fedora Core and RHEL, many as part of the GNOME or KDE desktop environments. In other words, to start finding some excellent office applications, games, multimedia players, and communications tools, you don't have to look any further than the Applications menu button on your desktop panel.

So before you start hunting around the Internet for the software you need, see if you can use something already installed with Fedora or RHEL. The chapters that follow this one describe how to use publishing tools, play games, work with multimedia, and communicate over the Internet - all with programs that are either on the DVD that comes with this book or are easily attainable.

Using your Fedora or RHEL desktop to run applications is relatively easy. If you have used Microsoft Windows operating systems, you already know the most basic ways of running an application from a graphical desktop. X, however, provides a much more flexible environment for running native Linux applications.

Cross-Reference 

See Chapter 3 for information on setting up an X desktop.

Starting Applications from a Menu

To run applications on your own desktop, most X window managers provide a menu, similar to the Microsoft Start menu, to display and select X applications. Applications are usually organized in categories. From the GNOME or KDE desktops in Fedora Core, open the Applications menu, select the category, and then select the application to run. Figure 5-3 shows an example of the Applications menu and the Accessories submenu.

image from book
Figure 5-3: Starting X applications from the Applications menu.

Starting Applications from a Run Application Window

Not all installed applications appear on the menus provided with your window manager. For running other applications, some window managers provide a window, similar to the Run Application window, that lets you type in the name of the program you want to run.

To access the Run Application window:

  1. Right-click the panel and select Add to Panel.

  2. Select Run Application and click Add. The Run Application icon should appear on the panel.

  3. Click the Run Application button. The Run Application window appears.

  4. Click Show List of Known Applications, click the program you want, and then click Run.

    If the application you want isn't on the list, you can either type the command you want to run (along with any options) and click Run, or you can click Append File to browse through directories to select a program to run. If you are running a program that needs to run in a Terminal window, such as the vi command, click the Run in Terminal button before running the command. Figure 5-4 is an example of the Run Application window.

image from book
Figure 5-4: Select a program to run from the list in the Run Application window.

Starting Applications from a Terminal Window

I often prefer to run an X application, at least for the first time, from a Terminal window. There are several reasons why I prefer a Terminal window to selecting an application from a menu or Run Application window:

  • If there is a problem with the application, you see the error messages. Applications started from a menu or Run Application usually just fail silently.

  • Applications from menus run with set options. If you want to change those options, you have to change the configuration file that set up the menu and make the changes there.

  • If you want to try out a few different options with an application, a Terminal window is an easy way to start it, stop it, and change its options.

When you have found an application and figured out the options that you like, you can add it to a menu or a panel (if your window manager supports those features). In that way, you can run a program exactly as you want, instead of the way it is given to you on a menu.

Here is a procedure to run X applications from a Terminal window:

  1. Open a Terminal window from your desktop (look for a Terminal icon on your Panel or a Terminal selection on a menu.)

  2. Type

     $  echo $DISPLAY  

    The result should be something similar to the following:

     :0.0 

    This indicates that the Terminal window will, by default, direct any X application you run from this window to display 0.0 on your local system. (If you don't see a value when you type that command, type export DISPLAY=:0.0 to set the display value.)

  3. Type the following command:

     $  rhythmbox &  

    The rhythmbox program should appear on your desktop, ready to work with. You should note the following:

    • The rhythmbox command runs in the background of the Terminal window ( & ). This means that you can continue to use the Terminal window while rhythmbox is running.

    • I encountered no errors running rhythmbox on this occasion. With other applications, however, text sometimes appeared in the Terminal window after the command was run. The text may say that the command can't find certain information or that certain fonts or colors cannot be displayed. That information would have been lost if the command were run from a menu.

  4. If you want to know what options are available, type:

     $  rhythmbox --help  
  5. Try it with a few options. For example, if you want to begin by playing a file and you have a Ogg Vorbis audio file named file.ogg , you could type:

     $  rhythmbox file.ogg  
  6. When you are ready to close the rhythmbox window, you can either do so from the rhythmbox window (right-click on the rhythmbox window and select Exit) or you can kill the process in the Terminal window. Type jobs to see the job number of the process. If it was job number 2, for example, you would type kill %2 to kill the rhythmbox program. If instead you want to continue running rhythmbox in the background, press Ctrl+Z (to put it in the background) and bg (to continue running it in the background).

You should try running a few other X commands. A couple of old X commands you might try are xeyes or xcalc .

Running Remote X Applications

X lets you start an application from anywhere on the network and have it show up on your X display. Instead of being limited by the size of your hard disk and the power of your CPU and RAM, you can draw on resources from any computer that gives you access to those resources.

Think about the possibilities. You can work with applications launched from any other computer that can run an X application - from a small PC to a supercomputer. Given the proper permission, you can work with files, printers, backup devices, removable drives , other users, and any other resources on the remote computer as though you were on that computer.

With this power, however, comes responsibility. You need to protect the access to your display, especially in networks where the other machines and users are not known or trusted. For example, you wouldn't want to allow anyone to display a login screen on your display, encouraging you to inadvertently give some cracker your login and password.

Traditionally, to run remote X applications, you basically only need to know how to identify remote X displays and how to use whatever security measures are put in place to protect your network resources. Using ssh to launch X applications is even simpler and more secure than the traditional method. Those issues are described in the following sections.

Traditional Method to Run Remote X Applications

If there is an X application installed on another computer on your network and you want to use it from your desktop, follow these steps:

  • Open permissions to your X server so that the remote application can use your display.

  • Identify your X server display to the application when it starts up.

When you run an X client on your local system, your local display is often identified as :0 , which represents the first display on the local system. To identify that display to a remote system, however, you must add your computer's host name. For example, if your computer were named whatever , your display name would be:

 whatever:0 
Tip 

In most cases, the host name is the TCP/IP name. For the computers on your local network, the name may be in your /etc/ hosts file, or it may be determined using the Domain Name System (DNS) service. You could also use a full domain name, such as hatbox.handsonhistory.com . X does support other types of transport, although transports other than TCP/IP aren't used much anymore.

You will probably use the display name in this form most of the time you run a remote X application. In certain cases, however, the information may be different. If your computer had multiple X displays (keyboard, mouse, and monitor), you may have numbers other than :0 ( :1, :2 , and so on). It is also possible for one keyboard and mouse to be controlling more than one monitor, in which case you could add a screen number to the address, like this:

 whatever:0.1 

This address identifies the second screen ( .1 ) on the first display ( :0 ). The first screen is identified as .0 (which is the default because most displays only have one screen). Unless you have multiple physical screens, however, you can skip the screen identifier.

There are two ways to identify your display name to a remote X application:

  • DISPLAY shell variable - The DISPLAY shell variable can be set to the system name and number identifying your display. After this is done, the output from any X application run from that shell will appear on the display indicated. For example, to set the DISPLAY variable to the first display on whatever , type one of the following:

      export DISPLAY=whatever:0  

    or

      setenv DISPLAY whatever:0  
  • The first example shows how you would set the DISPLAY variable on a bash or ksh shell. The second example works for a csh shell.

  • - display option - Another way to identify a remote display is to add the -display option to the command line when you run the X application. This overrides the DISPLAY variable. For example, to open an xterm window on a remote system so that it appears on the first display on whatever , type the following:

      xterm -display whatever:0  

With this information, you should be able to run an X application from any computer that you can access from your local computer. The following sections describe how you may use this information to start a remote X application.

Launching a Remote X Application

Suppose you want to run an application from a computer named remote1 on your local area network (in your same domain). Your local computer is local1 , and the remote computer is remote1 . The following steps show how to run an X application from remote1 from your X display on local1 .

Caution 

This procedure assumes that no special security procedures are implemented. It is the default situation and is designed for sharing applications among trusted computers (usually single- user workstations) on a local network. This method is inherently insecure and requires that you trust all users on computers to which you allow access. If you require a more secure method, refer to the section "Using SSH to run remote X applications" later in this chapter.

  1. Open a Terminal window on the local computer.

  2. Allow access for the remote computer (for example, remote1 ) to the local X display by typing the following from the Terminal window:

      $ xhost +remote1  remote1 being added to access control list 
  3. Log in to the remote computer using any remote login command. For example:

     $  telnet -l  user  remote1  Password: 

    Replace user with the name of the user login that you have on the remote computer. You will be prompted for a password.

    Note 

    By default, the telnet service is not enabled in Fedora Core or RHEL. The server (in this example, remote1 ) must consider the security consequences of enabling remote login services.

  4. Type the password for the remote user login. (You are now logged in as the remote user in the Terminal window.)

  5. Set the DISPLAY variable on the remote computer to your local computer. For example, if your computer were named pine in the local domain, the command could appear as:

     $  export DISPLAY=pine:0  

    (If you are using a csh shell on the remote system, you may need to type setenv DISPLAY pine:0 .)

  6. At this point, any X application you run from the remote system from this shell will appear on the local display. For example, to run a remote Terminal window so that it appears locally, type:

     $  xterm  

    The Terminal window appears on the local display.

You need to remember some things about the remote application that appears on your display:

  • If you only use the login to run remote applications, you can add the line exporting the DISPLAY variable to a user configuration file on the remote system (such as .bashrc , if you use the bash shell). After that, any application that you run will be directed to your local display.

  • Even though the application looks as though it is running locally, all the work is being done on the remote system. For example, if you ran a word processing program remotely, it would use the remote CPU and when you save a file, it is saved to the remote file system.

Caution 

Don't forget when a remote shell or file editor is open on your desktop. Sometimes people forget that a window is remote and will edit some important configuration file on the remote system by mistake (such as the /etc/fstab file). You could damage the remote system with this type of mistake.

Using SSH to Run Remote X Applications

Not only does the ssh command provide a secure mechanism for logging in to a remote system, it also provides a way of securely running remote X applications. With X11 forwarding turned on, any X application you run from the remote location during your ssh session will appear on your local desktop.

After you log in to the remote computer using ssh , you can use that secure channel to forward X applications back to your local display. Here is an example:

  1. Type the following ssh command to log in to a remote computer (the -X option enables X11 forwarding):

     $  ssh -X jake@remote1  jake@remote1's password:  *******  
  2. Check that the display variable is set to forward any X applications you run through this ssh session to your local display:

     $  echo $DISPLAY  localhost:10.0 
  3. After you are logged in, type any X command and the window associated with that command appears on your local display. For example, to start the gedit command, type:

     $  gedit &  

For this to work, you don't need to open your local display (using xhost ). The reason this works is because the SSH daemon ( sshd ) on the remote system sets up a secure channel to your computer for X applications. So as not to interfere with any real display numbers, the SSH daemon (by default) uses the display name of localhost:10.0 .

This X forwarding feature is on by default in the latest version of Fedora Core (see the X11Forwarding yes value set in the /etc/ssh/sshd_config file). It is off in other systems, however, so you may need to change the X11Forwarding value on those systems.




Fedora 6 and Red Hat Enterprise Linux Bible
Fedora 6 and Red Hat Enterprise Linux Bible
ISBN: 047008278X
EAN: 2147483647
Year: 2007
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net