Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

This section describes two methods to run graphical applications on the HP-UX guest system by using an X-Server installed on the emulator host system or a remote system:

  • Xsession started via ssh
  • Xsession started via XCMCP

The following points are discussed in more detail:

X-Servers

To apply the two methods described, the remote system needs to run an X-Server. For the examples in this section two free applications are used:

  • Linux: Xephyr, a nested X-Server able to run on an existing graphical desktop.
  • Microsoft Windows: Xming.

There are several other free and commercial X-Servers. To describe all of them is outside the scope of this document.


Install Xephyr on Linux

Xephyr is available in the standard repositories of the supported Linux distributions. If it has not already been installed, install it using the following command on an RPM-based system:

# yum install xorg-x11-server-Xephyr


Install Xming on Microsoft Windows

There are several commercial products. However, there are also free X-server packages, for example the X-server integrated in Cygwin, VcXsrv, or Xming. The following examples use Xming.

The installer for Xming and more product information are available on http://www.straightrunning.com/XmingNotes/.


Running an X-Session via SSH on Linux

(warning) Any firewall between the HP-UX and the X-Server system must allow the SSH connection between the two systems.

Advantages compared to using XDMCP:

  • encrypted communication between the guest HP-UX system and the X-Server,
  • no font problems.

Disadvantages compared to using XDMCP:

  • more complicated handling,
  • does not use the general CDE login mechanism.


Perform the following steps to start an Xsession via SSH.


StepCommand
1Start Xephyr.

$ Xephyr :20 -ac -screen 950x540

Parameters:

  • :20 - the DISPLAY variable is set to :20
  • -ac - no access control to the X-Server
  • -screen - the dimensions of the X-display (example only)

For more information refer to the man-pages of your Linux system.

2Start an xterm inside Xephyr and create a SSH connection to HP-UX.

$ xterm -display :20  \
   -e ssh -Yf <user@hp-ux-ip-address> /usr/dt/bin/Xsession

3Wait for the password prompt inside the xterm window and enter the password for the HP-UX user.
4An X-Session for the user will open in the Xephyr window.


Using XDMCP

Before using the X-server, XDMCP must be enabled on the guest system. XDMCP allows the HP-UX dtlogin screen to be displayed on remote X-Servers upon request of the X-Server.

(warning) Any intermediate firewall must allow access to UDP port 177 on HP-UX, and to TCP ports 6000~60xx from the remote host to your PC (depending on the X-Server settings).

Enabling XDMCP

Perform the following steps to enable XDMCP on HP-UX:


StepDescription
1Create a system-specific copy of the Xconfig file# cp /usr/dt/config/Xconfig /etc/dt/config/Xconfig
2Enable XDMCP.

Edit the file:

# vi /etc/dt/config/Xconfig

Locate the following line and insert a comment character, '#', at the beginning of the line.
        Dtlogin.requestPort: 0

Save the file.

3Restart the X-server.

# /sbin/init.d/dtlogin.rc stop
# /sbin/init.d/dtlogin.rc start

(If there is no dtlogin.rc file in /sbin/init.d, you first have to run
        /usr/dt/bin/dtconfig -e )



Font Considerations

Often, the system running the X-Server does not have all the necessary fonts to run HP-UX X-applications. In such cases, the graphical applications will not start. You can check if this is the case by monitoring the log file /usr/dt/Xerrors on the HP-UX guest system.

If fonts are missing, there are two ways to overcome the problem:

  • Configure and activate the fontserver on HP-UX and include it in the fontpath on the system running the X-Server. This is the preferred solution.
  • Copy the missing fonts to the system running the X-Server and include them in the local fontpath.

Configuring HP-UX as a Fontserver

To configure and activate the fontserver on HP-UX, perform the following steps:


StepCommand
1Include the CDE fonts in the fontserver's catalog.

Use a text editor to open the file

/etc/X11/fs/config

If not already there, append

,/usr/dt/config/xfonts/C

to the end of the line beginning with

catalogue =

2Enable the automatic start of the fontserver at boot.

Use a text editor to open the file

/etc/rc.config.d/xfs

If not already set, set the following variable to 1:

RUN_X_FONT_SERVER=1

3(Re)start the fontserver.

# /sbin/init.d/xfs stop

# /sbin/init.d/xfs start

4Test if the fontserver responds to queries.

Enter the following command on the system running the X-Server:

$ fslsfonts -server <font-server-ip>:7000 -fn '-dt*' | head

This should produce output similar to the following:

-dt-application-bold-i-normal-sans-10-100-75-75-p-60-hp-roman8
-dt-application-bold-i-normal-sans-10-100-75-75-p-60-iso8859-1

(warning) By default, the fontserver runs on port 7000. This port must be allowed through any intermediate firewalls.

Once the fontserver responds to queries, it should be possible to add it to the fontpath of the X-Server (see below in the operating system specific sections).



Copying Missing Fonts to a Linux X-Server

(warning) This should only be attempted, if the use of a fontserver is not possible for some reason.

To add HP-UX fonts to the Linux system running the X-Server perform the following steps:


StepCommand
1Create a directory to store the additional fonts. 

For example:

# mkdir /usr/share/fonts/fonts1

# mkdir /usr/share/fonts/fonts2

2Copy the missing fonts from the HP-UX guest to the new directory. 

Example using the most likely missing fonts:

# cd /usr/share/fonts/fonts1

# scp <hp-ux-ip>:/usr/lib/X11/fonts/hp_roman8/75dpi/* .

# cd /usr/share/fonts/fonts2

# scp <hp-ux-ip>:/usr/dt/config/xfonts/C/* .

3Create an updated fonts.dir file.

For each newly created fonts directory execute the following command:

# cd <directory containing the fonts>

# mkfontdir

4Check if fontpath can be added to X-Server.

Assuming you run a graphical user session on Linux, use the following command to add a new font directory to your server (until next restart):

# xset fp+ <directory containing the fonts>

To display the fontpath of the currently used X-Server, use the following command:

# xset q

5Refresh the font cache.

Run the following command to refresh the font cache:

# fc-cache -fv

6Verify whether your X-Server finds the fonts.

Assuming you run a graphical user session on Linux, use the following command to query the X-Server for known fonts (using HP-UX fontnames as an example):

# xlsfonts -fn '-dt*' | head



Connect to HP-UX from Linux

This section shows how to use Xephyr to connect to a HP-UX guest system using XDMCP. 

Perform the following steps to start an Xsession via XDMCP.


StepCommand
1Start Xephyr.

Use local font directories:

$ Xephyr :20 -ac -screen 950x540 -query <hp-ux-guest-ip> \
  -fp <new-font-directory1>, <new-font-directory2>,...

Use fontserver:

$ Xephyr :20 -ac -screen 950x540 -query <hp-ux-guest-ip> \
  -fp tcp/
<hp-ux-guest-ip>:7000/all

Parameters:

  • :20 - the DISPLAY variable is set to :20
  • -ac - no access control to the X-Server
  • -screen - the dimensions of the X-display (example only)
  • -query - requests an XDMCP session from the HP-UX guest
  • -fp - add the local fontpath for the required fonts or a fontserver

For more information refer to the man-pages of your Linux system.

2A CDE login window will appear in the Xephyr window.



Connect to HP-UX from Windows

This section shows how to use Xming to connect to a HP-UX guest system using XDMCP. 


StepDescription
1

Start XLaunch from the Xming section in the Start menu.

Make sure that Xming is not already running before you start

2
  • Select the option One Window. This is one of the options supporting XDMCP.
  • Press Next to continue

3
  • Select XDMCP for the session.
  • Press Next to continue.

4
  • Enter the IP address or hostname of the virtual HP-UX system.
  • Press Next to continue.

5Finish the setup by continuing through the remainder of the sections (for this example all the defaults were accepted) and press Finish on the last configuration screen of XLaunch.
6The HP-UX graphical login screen is displayed and after logging in, you will see the graphical desktop.



  • No labels