X11 Forwarding

From Amahi Wiki
Revision as of 15:15, 4 September 2010 by Allanon09 (talk | contribs) (Added section and commands for users who install via express CD. Changed ssh_config to sshd_config)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

X11 Forwarding

Prerequisites for remotely displaying applications

For X11 Forwarding to work it will require your Amahi server to have a X server installed.

If you installed Amahi via the express CD you can install the X server with the following commands:

Commands For Installing X Server on Express Installation

Become root:

  su -

Enter your password for the root user

  yum -y install Xorg

Configuring X11Forward on Amahi Server

Second is the ability to receive ssh connections (configured by default). Finally, ssh must be configured to allow X11 forwarding. Check /etc/ssh/ssh_config and make sure the directive is set:


   X11Forward yes


Once this is configured you are ready to forward application windows.

From the client machine, where you want the application to be displayed, you ssh into the remote system so you have a command prompt. The can attained using the ssh command. When using the ssh command we need to use the -X flag, this tells ssh that we plan to tunnel x traffic through the tunnel:


   ssh -X user@hda


Enter your password at the login prompt. You should see the prompt change into [user@localhost ~]$ Once logged in, run the following command to see a file window:


   nautilus


This should open a gnome file window as if on the server locally.

Trusted X11 Forwarding

If the /etc/ssh/sshd_config file on the Amahi server contains the following line (set by default):


   ForwardX11Trusted yes


Then it's possible to use trusted X11 forwarding. Trusted X11 forwarding is slightly faster than untrusted because it doesn't engage the X11 security controls. The -Y flag is used when using trusted X11 forwarding:


   ssh -Y user@hda


Compressed X11 Forwarding

When using slower links, X11 data can be compressed using the -C flag:


   ssh -Y -C user@hda