SDB:Exporting the Graphical Output to a Remote Computer

Şuraya atla: kullan, ara

Version: 8.0 - 9.0


You want to display the graphical interface of your Linux system on a remote Linux machine.

The difference between this method and "desktop sharing" is that in the latter, several users access the same applications, whereas here, the applications started on the remote machine remain under the control of the user who started them.


Thanks to the X server's client/server architecture, the export of the graphical interface can be done very easily under Linux.
In this process, an X11 application from the machine whose graphical interface is going to be exported sends its data for output purposes to an X server in the machine where the output must be displayed. In the following lines, we will refer to the computer exporting the graphical interface as "server" and to the machine displaying the interface as "client".
There are several methods to export the graphical interface on a client:

1. Using an X server and window manager running on the client

One of the X servers already running on the client can be used to display the X applications. These applications are managed by the window manager running on the client.
For example, to start an X terminal on the server and output it on the client, enter the following command in a text console:

		ssh -X < server_name > xterm

Please note that this command requires the option X11Forwarding in the file /etc/ssh/sshd_config to be set to yes.

2. Starting a new X server on the client and using a window manager imported from the server

First, a new X server must be started on the client. Since an X server is likely to run already on the client, you can start a second X server on console 8 by executing the following command as root in a text console:

		X :1 &

The display will switch to console 8, where you can see a grey screen with an X as mouse pointer.
Switch back to the console where you have previously entered the command and enter now:

		xterm -display :1

Now press Ctrl+Alt+F8 to switch back to your X server, which should now display an X terminal. Enter the following command in this xterm:

		ssh -X < server_name > windowmaker

to start a window manager on the client from the server.

If the window manager you want to export is KDE, the KDE version installed on both client and server must be the same.

3. Exporting X displays by way of display managers (terminal servers)

Display managers such as xdm or kdm can also be used to export a complete desktop from the server to the client. As a result, the functionality of a terminal server will be reached.
For this purpose, the display manager on the server must be configured to allow remote access from another computer. From SuSE 8.0 on, this setting can be found in the file /etc/sysconfig/displaymanager:

		# Allow remote access to your display manager (kdm only for now)

In addition the file /opt/kde3/share/config/kdm/kdmrc must contain the following settings:

                # Whether KDM should listen to XDMCP requests. Default is true.
                # The UDP port KDM should listen on for XDMCP requests. Don't change the 177.

Because of the display manager's default configuration, an X server will be started on the local machine. This option is not desirable on the server, thus, this setting must be changed in /etc/sysconfig/displaymanager:

		# let the displaymanager start a local Xserver
		# set to "no" for remote-access only

In the case of the display manager kdm3, the settings in the file /etc/opt/kde3/share/config/kdm/Xservers must be disabled to prevent a local X server from being started.

If the display manager used is xdm, the following entry must be disabled in the file /etc/X11/xdm/xdm-config to allow a remote access.


After restarting xdm, the remote access will be possible on the default port 177 on the server. For further information on problems concerning the export of display managers, refer to the article:
[[SDB:Remote Login Does Not Work in SuSE Linux 8.1]

You can use the package xdmsc to configure the client. After installing the package, you will find the following configuration notes in the file /usr/share/doc/packages/xdmsc/README:

 Usage as an X terminal

   *  X should be installed.
   *  The X server suitable for the graphics card MUST be installed AND configured
      together with its help files and directories!
   *  The file /etc/inittab MUST contain the line:
      7:2:respawn:+/etc/init.d/rx tty7

      (under SuSE Linux, simply remove the comment sign).
      Attention: The number following `tty' is identical to the first number at the
      beginning of the line. The runlevel MUST have network and should not start any
      xdm (the corresponding runlevel under SuSE Linux is runlevel 2).
   *  The script rx reads /etc/sysconfig/xdmsc to use then the following
      shell variables:

          START_RX      if set to "yes", /etc/init.d/rx starts an X server.
                        if set to a different value, it issues a warning that should
 		       not be ignored.
          RX_XDMCP      Type of XDMCP request:
                         - "query"      asks an xdm server for a login window;
 				       RX_RHOST must be set.
                         - "indirect"   asks an xdm server for a chooser menu;
 				       RX_RHOST must be set.
                         - "broadcast"  asks all reachable xdm servers,
                                        first come...

          RX_RHOST      Full host name of an xdm server.
          RX_DSP        Optional: display (default :0).
          RX_BPP        Optional: color depth (default from /etc/X11/XF86Config)

   *  You can use your own resource class names to switch between entries xdm-config and
      your own scripts according to your requirements (see appendix at the end
      of xdm-config)