Home/IT/Solaris/Interactive Installation/X11  

Solaris on VMware: Interactive Installation  

← Previous|Next →  

Local X11 Access

The support for graphics cards is very bad in Solaris 2.6 x86. Most cards can be be run in VGA mode only. In Solaris 8 and later one solution for this problem is the so called XFree86 Porting Kit. Solaris 10 comes with a recent version of Xorg which makes life much easier. However, in Solaris 2.6 the only way to get local X access is to install XFree86 (or Xorg).

To do so, you can download the latest XFree86 binaries for Solaris X86 you might be able to find. As an example, I will show here the installation of XFree86 4.6.0. Configuration instructions have been taken from Gregory A. Lazzaro's page about XFree86 on Solaris.

First, you must download the software to your virtual Solaris machine. You may do this directly in the VM by using ftp. However, it is not always possbile to use active ftp from within a virtual machine. You could also use the hotjava web browser to download the software via http. But you don't have a working X11 session right now. (Or temporary use the remote X11 server as descibed below). Another way is to download to the host and transfer it by ftp to the Solaris guest. However, create a temprary directory (such as /export/home/Xinstall) and move the files to it.

The XFree86 software is located here: http://ftp.xfree86.org/pub/XFree86/4.6.0/binaries/Solaris/

Here is what I do to install XFree86:

# mkdir /export/home/Xinstall
# cd /export/home/Xinstall
# cp /cdrom/cdrom/XFree86/4.6.0/* .
# sh Xinstall.sh
If you are installing a version different from 4.6.0, you
may need an updated version of this installer script.

Do you wish to continue? (y/n) [n] y

$DISPLAY is set, which may indicate that you are running this
installation from an X session.  It is recommended that X not be
running while doing the installation.

Do you wish to continue? (y/n) [n] y

... ...

No existing installation of X was found.  I hope you didn't just
move it, or you'll likely run into problems later.

Do you wish to continue? (y/n) [y] y

...

Extracting Xetc.tgz and Xrc.tgz into a temporary location ...
== Extracting /export/home/Xinstall/Xetc.tgz ==
== Extracting /export/home/Xinstall/Xrc.tgz ==

...

Installing the mandatory parts of the binary distribution

== Extracting /export/home/Xinstall/Xbin.tgz ==
== Extracting /export/home/Xinstall/Xlib.tgz ==
== Extracting /export/home/Xinstall/Xman.tgz ==
== Extracting /export/home/Xinstall/Xdoc.tgz ==
== Extracting /export/home/Xinstall/Xfnts.tgz ==
== Extracting /export/home/Xinstall/Xfenc.tgz ==
== Extracting /export/home/Xinstall/Xxserv.tgz ==
== Extracting /export/home/Xinstall/Xmod.tgz ==
Checking for post-release updates ...
Checking for optional components to install ...
Do you want to install Xfsrv.tgz (font server)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xfsrv.tgz ==
Do you want to install Xnest.tgz (Nested X server)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xnest.tgz ==
Do you want to install Xprog.tgz (programmer support)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xprog.tgz ==
Do you want to install Xprt.tgz (X print server)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xprt.tgz ==
Do you want to install Xvfb.tgz (Virtual framebuffer X server)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xvfb.tgz ==
Do you want to install Xf100.tgz (100dpi fonts)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xf100.tgz ==
Do you want to install Xfcyr.tgz (Cyrillic fonts)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xfcyr.tgz ==
Do you want to install Xfscl.tgz (Scaled fonts (Speedo, Type1 and TTF))? (y/n) [y] y

== Extracting /export/home/Xinstall/Xfscl.tgz ==
Do you want to install Xhtml.tgz (Docs in HTML)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xhtml.tgz ==
Do you want to install Xps.tgz (Docs in PostScript)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xps.tgz ==
Do you want to install Xpdf.tgz (Docs in PDF)? (y/n) [y] y

== Extracting /export/home/Xinstall/Xpdf.tgz ==

...

... A terminal type 'xterm-r6' is included
for compatibility with the standard X11R6 version of xterm.

Do you wish to continue? (y/n) [y] y

...

Do you wish to have the (new) links installed (y/n)? [n] n

...

If you are going to use rstart and /usr/X11R6/bin isn't in the
default path for commands run remotely via rsh, you will need
a link to rstartd installed in /usr/bin.

Do you wish to have this link installed (y/n)? [n] n

Installation complete.

# cd ..
# rm -rf Xinstall

Now the Xserver must be configured. You can do this by running /usr/X11R6/bin/xf86config or by simply downloading the following XF86Config sample and saving it as /etc/X11/XF86Config:

  • XF86Config_deConfig file for XFree86 4.6.0 Solaris/VMware. German keyboard layout.
  • XF86Config_usConfig file for XFree86 4.6.0 Solaris/VMware. US keyboard layout.

To test the XFree86 installation you can start an X session:

# PATH=$PATH:/usr/X11R6/bin ; export PATH
# startx
# cd /usr/X11R6/bin
# rm X

# echo '#!/bin/sh' >> X
# echo 'sleep 3' >> X
# echo 'exec /usr/X11R6/bin/XFree86 -a 1 $*' >> X

# chmod 755 X
# mkdir -p /etc/dt/config
# echo '* Local local@console /usr/X11R6/bin/X :0 -bpp 24' > /etc/dt/config/Xservers
# reboot

Remote Access via XDMCP

You can reach the graphical user interface remotely and display the Desktop Environment on an Xserver running on the VMware host. In a trusted network, such as your home LAN, you can use XDMCP, the X Display Manager Control Protocol, to contact the Solaris machine. The communication is not encrypted, so do not use this method in public networks.

If you have no plans to install XFree86 inside the guest (as described above), you should disable the unsuccessfull start of the local X server:

# mkdir -p /etc/dt/config
# touch /etc/dt/config/Xservers

XDMCP on VMware for Linux

If Linux is your host operating system, you must start an additional Xserver and advice that one to launch an XDMCP session to the Solaris PC. One X server is already running to display the Linux environment including VMware. That one is usually described by localhost:0.0.

To start the X server there are three opportunities: Native X Server, Nested X Server and VNC.

1: Natively

Log on the text console of your Linux machine (by pressing [CTRL][ALT][F1] simultaneously) and type:

linux$ X -query 192.168.4.63 -from 192.168.4.1 -fp tcp/192.168.4.63:7100 vt11 :1

This command will start a native Xserver which will ask the machine 192.168.4.63 (bob) for XDMCP access. It will be displayed on the virtual console 11. Instead of using the Linux fonts, the font server of the Solaris PC is contacted on port 7100. The DISPLAY variable will be set to vmwarehost:1.0, in my case 192.168.4.1:1.0. Note the -from option which will redirect X11 to the virtual network card vmnet8 instead of the real interface card eth0. This is important for security (I don't want unencrypted network traffic coming to my real network) and because gateway and nameserver might not have been configured in Solaris yet.

Now the Solaris machine will present the login prompt. You can switch between the Xservers by hitting [CTRL][ALT][F7] and [CTRL][ALT][F11]. The second Xserver can be killed as always in XFree86 by pressing [CTRL][ALT][Backspace].

2: Xnest

In case you are not permitted to start the X server natively you can try Xnest, the nested server that is part of XFree86 (But it might not be installed on your system).

linux$ xset +fp tcp/192.168.4.63:7100
linux$ Xnest -query 192.168.4.63 -from 192.168.4.1 -fp tcp/192.168.4.63:7100 :1

Login and CDE using the nested server (XNest).

 

One advantage of Xnest is that you can give strange geometry options at startup. So you are not limited to the usual 800x600 or 1024x768 resolution scheme (not even to a ratio of 4:3). For example, when your native X display is running in 1024x768 mode, you can start Xnest like that (and it will be almost full screen):

linux$ xset +fp tcp/192.168.4.63:7100
linux$ Xnest -query 192.168.4.63 -from 192.168.4.63 -fp tcp/192.168.4.63:7100 -geometry 933x700 :1

Do not forget to reset the font path afterwards:

linux$ xset fp default

3: VNC

You can start a VNC server that will do the XDMCP request. This way you are able to leave the X11 session unattended. However, you might not be able to log off the Solaris guest cleanly.

$ if [ -a $HOME/.vnc/xstartup ] ; then mv $HOME/.vnc/xstartup $HOME/.vnc/xstartup.ORIG ; fi
$ touch $HOME/.vnc/xstartup
$ chmod 755 $HOME/.vnc/xstartup
$ vncserver -query 192.168.4.63 -from 192.168.4.1 -fp tcp/192.168.4.63:7100 -geometry 1152x864

New 'colin:1 (jexss)' desktop is colin:1

Starting applications specified in /home/jexss/.vnc/xstartup
Log file is /home/jexss/.vnc/colin:1.log

$ xvncviewer -passwd $HOME/.vnc/passwd :1

Do not forget to kill the vncserver once you finished your Solaris session:

# vncserver -kill :1
# if [ -a $HOME/.vnc/xstartup.ORIG ] ; then mv $HOME/.vnc/xstartup.ORIG $HOME/.vnc/xstartup ; fi

XDMCP on VMware for Windows

Windows has no builtin support for X11. Therefore, it is not so easy to use the XDMCP feature, as you need to install an Xserver software to get access to the Solaris GUI. There are several expensive commercial Xservers, like Humingbird Exceed. For a start Cygwin with XFree86 or Xorg should be okay. It's for free while the installation procedure is not as easy as with other products.

In short, you must Install Cygwin (Standard + X11), run a Cygwin shell and type:

windows$ X -screen 0 1024 768 -query 192.168.4.63 -from 192.168.4.1 -fp tcp/192.168.4.63:7100

Solaris 2.6 in VMware Workstation 4 for Windows. The Xserver can not be run locally on the virtual machine in this Solaris release. Access to the graphical user interface is realized by an external Xserver (here: XFree86/Cygwin).

  Next →