27.12.2012 Views

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

13.9.1 VNC Server<br />

When you have Linux installed on your workstation, a window manager is probably not<br />

enough. Here you want a full desktop environment with menus, icons, task bars etc such as<br />

Gnome and KDE. Installing GNOME or KDE on System z is discouraged as they are<br />

resource-intensive. Installing <strong>The</strong> X Window System is also not recommended.<br />

As mentioned earlier, the X server is run where the mouse, keyboard and monitor are located<br />

- on the workstation. In a nutshell, VNC Server provides virtual workstation with all this<br />

peripherals (virtual). <strong>The</strong> VNC server starts an embedded X server. <strong>The</strong>n any X-based<br />

application can send its output to this X server, regardless of if the applications is local or<br />

remote to X server.<br />

To interact with the X server, one uses VNC client on a workstation, as described in section<br />

3.2, “Setting up a VNC client” on page 23. <strong>The</strong> VNC server customization is described in<br />

section 8.2.4, “Configuring the VNC server” on page 140. In our experience this is all you<br />

need if you want to run X applications from time to time.<br />

One big advantage of VNC is that it is session oriented. If communication to VNC server is<br />

lost, a new connection is reestablished to the session as it was. Also, applications in a<br />

disconnected VNC session still continue to run.<br />

13.9.2 X Server on workstation<br />

If <strong>for</strong> some reason VNC is not acceptable, it is possible to use a standard X server on a<br />

workstation. Since Linux users usually know the X Window system, an X server running on<br />

Windows is described in this section.<br />

<strong>The</strong>re are many commercial and free X Window servers available <strong>for</strong> Windows. In the<br />

following examples XliveCD is used, which provides a free X server based on Cygwin. It can<br />

be run directly from a CD without requiring installation.<br />

http://xlivecd.indiana.edu/<br />

Any X application will send its output to an address defined with -display parameter or, if not<br />

provided, to an address specified in the DISPLAY environment variable. If neither is provided,<br />

the local computer is used <strong>for</strong> output. Following is an example that uses the xclock command<br />

(you may have to first install it with the command yum -y install xclock):<br />

gpok224:~ # xclock<br />

Error: Can't open display:<br />

<strong>The</strong>re is no display specified <strong>for</strong> xclock command and it will terminate.<br />

Display is specified by setting DISPLAY environment variable.<br />

gpok224:~ # export DISPLAY=9.145.177.158:0<br />

gpok224:~ # xclock<br />

No protocol specified<br />

Error: Can't open display: 9.145.177.158:0<br />

This command failed, because the XliveCD requires an explicit command to allow remote<br />

hosts to connect to it. When the command xhost + (plus means to add authorized hosts) is<br />

run, xclock can finally display on Windows as shown in Figure 13-2. Remember the program<br />

itself runs on a remote Linux.<br />

gpok224:~ # xclock &<br />

[1] 21915<br />

Chapter 13. Miscellaneous recipes 217

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!