AIXServerX11

== How to install/start/restart the X11 server under AIX ==

Now, this one was pretty frustrating, especially with a DBA //**demanding**// X11 access to an AIX server so that he could install on it...

Here is how to do it:

==== 1. Check that the X11 server is installed ====

This can be done with the following command:

{{{ # lslpp -l | grep -i X11.Dt }}}

If X11 is installed on an AIX machine, the above command should return (more or less):

{{{ andre@galactus$ lslpp -l | grep -i x11.dt X11.Dt.ToolTalk? 5.3.0.60 COMMITTED AIX CDE ToolTalk? Support X11.Dt.bitmaps 5.3.0.0 COMMITTED AIX CDE Bitmaps X11.Dt.helpmin 5.3.0.0 COMMITTED AIX CDE Minimum Help Files X11.Dt.helprun 5.3.0.0 COMMITTED AIX CDE Runtime Help X11.Dt.lib 5.3.0.60 COMMITTED AIX CDE Runtime Libraries X11.Dt.rte 5.3.0.60 COMMITTED AIX Common Desktop Environment X11.Dt.ToolTalk? 5.3.0.60 COMMITTED AIX CDE ToolTalk? Support X11.Dt.bitmaps 5.3.0.0 COMMITTED AIX CDE Bitmaps X11.Dt.helpmin 5.3.0.0 COMMITTED AIX CDE Minimum Help Files X11.Dt.rte 5.3.0.60 COMMITTED AIX Common Desktop Environment }}}

If not, you need to install the X11 server. See below.

==== 2. Installing the X11 server on an AIX machine ====

The X11 packages are on the #2 AIX installation CD, in the {{{/installp/ppc/}}} directory.

To search for the proper package, once the CD has been installed in the CD-ROM drive of your AIX machine, you can issue the following commands:

{{{ # find /cdrom1 -name *dt* /cdrom1/installp/ppc/X11.adt /cdrom1/usr/sys/inst.images/X11.adt }}}

Here, of course, the CD-ROM drive is mounted under {{{/cdrom1}}}.

If we list this directory, here is the content:

{{{ # cd /cdrom1/installp/ppc/ # ls .toc X11.help.en_US csm.gui.dcem_1.6.0.10 Java14.license X11.loc.en_US invscout.websm Java14.sdk X11.man.en_US sysmgt.help.en_US Java5.sdk X11.motif sysmgt.help.msg.en_US X11.Dt X11.msg.en_US sysmgt.msg.en_US.sguide X11.Dt.other X11.samples sysmgt.msg.en_US.websm X11.adt X11.vfb sysmgt.sguide X11.apps X11.vsm sysmgt.websm X11.base bos.aixpert sysmgt.websm.diskarray X11.compat.X11R5 bos.ecc_client sysmgtlib.framework X11.compat.other bos.installers sysmgtlib.libraries X11.fnt csm.gui.dcem }}}

Now, to install with smitty, type {{{smitty}}} as root, and go to "Software installation > Install software".

Next, select your CD-ROM device, and check the following configuration is correct:

{{{ Install Software

Type or select values in entry fields. Press Enter AFTER making all desired changes.

[Entry Fields]

F1=Help F2=Refresh F3=Cancel F4=List F5=Reset F6=Command F7=Edit F8=Image F9=Shell F10=Exit Enter=Do }}}

In the {{{SOFTWARE to install}}}, press "F4" (=List) and select all the CDE packages, using the list of packages above as a guide.

Next, press ENTER and the installation should proceed correctly.

==== 3. How to start the X11 server ====

There are several possibilities here. Please keep in mind that I was trying to have a minimal X11 server, to allow one user to connect. I was not so much interested in correctness...

Two possibilities:

{{{ # /usr/dt/bin/dtlogin -daemon }}}

{{{ # /etc/rc.dt }}}

This script has the advantage of launching a full X11 environment, including a login prompt on the console.

In both cases, you can check the X11 server is running correctly with the following command:

{{{ andre@galactus$ ps -fe | grep -i dtlogin | grep -v grep root 94310 1 0 26 sep - 0:00 /usr/dt/bin/dtlogin -daemon root 147544 94310 0 26 sep - 0:00 dtlogin <:0> -daemon }}}

==== 4. Restart X11 in case of a crash or a misbehaving server ====

Please make sure you go through the entire list. This is a bit tedious, but it works very well, so make sure you go through all the steps and don't try to skip one...

{{{ # ps -fe | grep -i rc.bootx # kill -9 <rc.bootx PIDs> }}}

//**WARNING: **// If there are //**ANY**// "rc.bootx" processes, they //**MUST**// be stopped before anything else!

{{{ # ps -fe | grep -i dtlogin # kill -9 <dtlogin PIDs> }}}

//**WARNING: **// Make sure there are no processes attached to the "dtlogin" processes...

{{{ cd /var/dt rm Xerrors rm Xpid }}}

Sometimes, it could be interesting to keep a copy of the {{{Xerrors}}} file...

For instance:

{{{ -bash-3.00$ df -g /var /tmp Filesystem GB blocks Free %Used Iused %Iused Mounted on /dev/hd9var 1.02 0.29 72% 556 1% /var /dev/hd3 3.05 2.28 26% 1726 1% /tmp }}}

This space-checking stage is optional, but you never know... :-)

Do this with the following command:

{{{ $ lssrc -s dtsrc Subsystem Group PID Status dtsrc inoperative }}}

{{{ # /etc/rc.dt }}}

{{{ bash-2.05b$ ps -fe | grep -i dtlogin | grep -v grep root 65704 1 0 Sep 09 - 0:00 /usr/dt/bin/dtlogin -daemon root 74118 65704 0 Sep 09 - 0:00 dtlogin <:0> -daemon }}}

{{{ bash-2.05b$ lssrc -s dtsrc Subsystem Group PID Status dtsrc active }}}

== See Also: ==