If you enable X11 forwarding over SSH you will be able to run a graphical application on one machine and make the application's windows appear on another. In this example, we use two machines named "Desktop" and "Server." Desktop is the machine on your desk and Server is the machine in the server room you administer using SSH.
For X11 forwarding to work, Desktop will need to be running in graphical mode. To enable X11 forwarding on Server, SSH to Server, log in as root and edit the file called
/etc/ssh/sshd_config. Find the line that contains
X11Forwarding and change the line to read
Then save the file and issue this command to restart the SSH service on Server:
# service sshd restart
To complete the setup, log out and log back in again via SSH to receive the new settings.
Now that X11 forwarding is enabled, if you type the command for a graphical application in your SSH session, the application will run on Server but appear on Desktop. If you're unsure what command runs a particular application, you can find out by logging in at the local console of Server. In the Red Hat menu, right-click on the icon for the application and select "Properties." In the "Launcher Properties" window that appears look for the "Command" field. If you type the contents of the command field at a prompt it will run that application. Copy that command down and run it in your SSH session when you're back at Desktop. The graphical screen you saw at the local console of Server will appear on the local console of Desktop.
If you want to have several graphical applications open simultaneously, add a space and the "&" character to the end of each command, like in this example for the
up2date command:
# up2date &
The "&" causes the application to run in the background, giving you access to the prompt as soon as the command runs. If you don't use the "&", you won't be able to type anything else at the prompt until you close the application you just launched.