Certification Objective 14.04-Running Remote X Applications


One of the most powerful features of the X Window System is its networking support. The X Window System was designed to run in a networked environment. If you are a system administrator responsible for a number of RHEL systems, you don't have to run to the server room every time you want to run a GUI administration tool. With the X Window System, you can connect to any number of systems and redirect the output from X clients running on those systems back to the X server running on your desktop.

One method for running remote X applications was described in Chapter 13. It required appropriate configuration of SSH on the remote X client system, permission on the firewall, and appropriate login (with the ssh -X or ssh -Y command, followed by login@remotepc).

Exercise 14-4: Starting a Display from a Remote Client

image from book

In this exercise, examine the steps required to run a display from a remote client. This assumes a basic knowledge of the Secure Shell and its associated command, ssh. For more information on running the ssh command, see Chapter 13. You'll need two computers running Linux. While RHEL is not required on both computers, you will need the Secure Shell installed on both. The Secure Shell service, sshd, should be running on the remote computer. You'll also need the root password for both computers. In my example, the local computer is named Enterprise, and the remote computer is named cosmicc (which is short for Cosmic Charlie, my favorite Grateful Dead teddy bear). Substitute the names (or IP addresses) of your computers accordingly.

  1. On the Enterprise computer, start the X Window. If it isn't already open, use the startx command.

  2. When the Linux GUI is open, access a new terminal. In GNOME, click Applications | Accessories | Terminal. (In KDE, click Main Menu | System | Terminal.)

  3. Log into the remote computer using the Secure Shell. To log in as root, use the following command. Enter the root password on the remote computer when prompted. If you're asked if you want to set up a encryption key, type yes. This should log you into the remote computer.

     # ssh -X root@cosmicc root@cosmicc's password: 

  4. Now you can start the GUI applications of your choice. Start with some easy X clients, such as xterm, xclock, and xeyes. Where do you see these clients displayed? If you have the GUI open on the remote computer, you can walk over there and check the other computer for yourself. Close whatever X clients you open.

  5. You should be able to run most of the Red Hat GUI utilities from the remote computer. Try some with commands such as system-config-network, system-config-samba, and system-config-securitylevel. You can now edit the configuration on the remote computer. Remember to close the GUI utilities that you open.

  6. If you run any remote GUI configuration utilities, check the results in the appropriate configuration file.

image from book

Troubleshooting

The X Window System is very robust and stable, but occasionally problems can arise. You can try several things when you troubleshoot X Window problems:

  • Session managers create log files in your home directory such as ~/.xsession-errors. Check these log files as well as /var/log/messages and /var/log/Xorg.0.log for error messages from your X server.

  • Check the DISPLAY environment variable to make sure it is set correctly. If you are running X clients locally, they still use this variable. You can set it with one of the following commands:

     export DISPLAY=localhost:0.0 

    or

     export DISPLAY=:0.0 

  • Check for underlying system problems or network problems that could be causing problems with the X Window System.

  • Even if your X server is not responding or you can't read the display, don't forget that you can switch to a text console to gain access to the system.

  • If you are troubleshooting X server problems on a remote system, try starting an X client from your workstation using the remote X server's display. Note that you will need to have logged into the remote system with the ssh -X username@remotesys command.



RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302)
Linux Patch Management: Keeping Linux Systems Up To Date
ISBN: 0132366754
EAN: 2147483647
Year: 2004
Pages: 227
Authors: Michael Jang

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