Skip to content
Xi Software

Installing Xi-Text and Xi-Batch Without Answering Questions

What the INSTALL script does and does not automate, and how to script an installation from the packages

Both productsXi-BatchXi-Textinstallationlicensingpackaging

The INSTALL script in a current Xi-Text or Xi-Batch distribution reads no command-line options, so a tarball installation is interactive throughout. The unattended route is the RPM or Debian package. This article covers what each route does and what is left to script afterwards.

The INSTALL script reads no options

Older multi-product Xi distributions shipped a set of shell INSTALL scripts that accepted command-line options, so that an installation could be driven from a script without answering questions. Current distributions do not work that way.

Neither the Xi-Text nor the Xi-Batch INSTALL script reads any command-line arguments. The wrapper runs exec perl INSTALL.pl without passing anything through, and INSTALL.pl never examines its argument list, so any options you type are silently discarded and the full interactive installation runs regardless. The options documented in the Administration manual (-q, -C, -f, -d, -s, -l, -n, -L, -x, -S, -N, -b, -u, -a and -h) are accepted by no INSTALL script in any current distribution.

Package installation asks no questions, and the only step left to script afterwards is the licence.

What each distribution form contains

Tarball distribution
one product per tarball, named for the product, blend, version and platform it was built for, for example xitext-\-1.25.2+1.1782476231-x86_64-linux-debian13.tar.gz, where \ stands for the build variant named in your own file. Unpack it and it produces a single directory containing INSTALL, INSTALL.pl, README and RELEASE. Run ./INSTALL as root from inside that directory. There is one INSTALL and it installs one product.

RPM and Debian packages
no INSTALL script is shipped at all. Everything the interactive installer would do - creating the system user, creating the spool directories, writing the master configuration, adding the services entries, seeding the hosts file, setting a trial licence and installing and enabling the systemd unit - is done by the package scriptlets.

The three-level arrangement described in the Administration manual, with a distribution directory at /usr/spool/xi_distrib and per-product subdirectories under it, belonged to the retired multi-product distribution. No current distribution creates it.

How much of each route can be automated

Tarball
nothing. The installer puts the terminal into raw mode to read single keystrokes, so it requires a real terminal and cannot be fed from a pipe or a here-document.

Packages
everything except the full licence. A package install is non-interactive by construction and leaves the product running under a trial licence.

What the installer asks

Xi-Text

The installer asks, in order: whether you want a full licence; whether to try to download the codes; whether you need a network licence; whether to change any of the installation directories (user path, shared library path, include path, and the main directories either based on one common directory or set individually); then it summarises and asks you to confirm. Later it asks whether to make you a Xi-Text super-user, whether to set up CUPSPY, whether to stop CUPS, whether to set up printers, and about lp replacement.

Xi-Batch

The same licence, network and directory questions, and the super-user question. Xi-Batch has no printer, CUPS or lp questions.

Installing

From a tarball:

gunzip -c xitext-<variant>-1.25.2+1.1782476231-x86_64-linux-debian13.tar.gz | tar xf -
cd xitext-<variant>-1.25.2
sudo ./INSTALL

Answer the questions. The installer starts the product itself when it finishes. Decompression is a separate step because the tarball is the only distribution form on Solaris, AIX and HP-UX, and their tar has no -z option; on Linux tar xzf does the same thing.

From a package:

# RPM
sudo rpm -i xitext-<variant>-1.25.2+1.1782476231-x86_64-linux-rockylinux9.rpm

# Debian
sudo dpkg -i xitext-<variant>-1.25.2+1.1782476231-x86_64-linux-debian13.deb

Nothing is asked. The service is enabled and started, with a trial licence.

What the installation does

Tarball
the installer checks that Perl 5 or later is present, checks that you are root, checks whether the product is already running, creates /etc/xi if needed, creates or adopts the system user, asks the licence and directory questions, writes the master configuration file, creates the directories, copies the programs and help files into place, sets the licence, starts the product, and installs a system start routine.

Package
the pre-install scriptlet creates the group and the system user and the spool directories; the post-install scriptlet writes the master configuration, adds the services entries, seeds the hosts file, sets a trial licence, writes the systemd unit and enables and starts it.

Choosing between the tarball and the package

Run ./INSTALL from an unpacked tarball for a first installation on a machine that will not be managed by the package manager, and again from a newer tarball to upgrade. There is no separate distribution-level or product-level script to choose between.

Where the platform has RPM or dpkg, prefer the package: it is the only form that installs unattended, and it is the form the upgrade and removal paths are built around.

The system user accounts

Xi-Text runs as the user spooler and Xi-Batch as the user batch. Both names are fixed at build time and both default as given.

Tarball
if the user is absent the installer says it needs to create it and asks permission - this question cannot be skipped. It then picks the first free user id from 50 for Xi-Text or 51 for Xi-Batch, uses the first of the groups daemon, bin or root that exists, and runs useradd with a home directory of /usr/spool. If there is no useradd it stops and asks you to create the user yourself. No Installuser script is shipped with either product.

Package
the same identifier search runs in the pre-install scriptlet, without asking, with a home directory of /var/spool. The package also creates the daemon group first if the image lacks it.

Create the user beforehand if you need specific identifiers. These are the Linux forms:

# Xi-Text
useradd -r -g daemon -d /var/spool -c 'Xi-Text Spooler' spooler

# Xi-Batch
useradd -r -g daemon -d /var/spool -c 'Xi-Batch batch processing' batch

The -r option, which asks for a system account below the range used for people, is a Linux one. Solaris and HP-UX have useradd without it, so choose the identifier yourself with -u; AIX creates accounts with mkuser instead.

An existing account is adopted as it stands, with no check on its identifiers or its group. The products do not set or rely on a login shell for these accounts.

Service and hosts entries

From a tarball, the services and hosts files are touched only if you answer yes to Do you need a network licence. A package install always does both.

  1. Service entries are appended to /etc/services - for Xi-Text: xitext 2000/tcp and 2000/udp, spq 2100/tcp, xtnetsrv 2200/tcp and 2200/udp, xtapi 2210/tcp and 2210/udp; for Xi-Batch: xibatch 2050/tcp and 2050/udp, btq 2150/tcp, xbnetsrv 2250/tcp and 2250/udp, xbapi 2260/tcp and 2260/udp.
  2. A hosts file is created if it does not exist - /etc/xi/text-hosts or /etc/xi/batch-hosts - containing a single localaddress line taken from hostname -I.
  3. Xi-Text additionally creates /etc/Xitext-extern if it is absent.

No host editor is launched. Remote hosts are added afterwards by editing the hosts file. The network daemons are xtnetserv for Xi-Text and xbnetserv for Xi-Batch.

Checking the installation

Verify the licence:

# For Xi-Text
xt-checklic

# For Xi-Batch
xb-checklic

Verify the product is running:

# For Xi-Text
splist

# For Xi-Batch
btjlist -H

On a packaged install the service is already running under systemd, so use systemctl status xitext or systemctl status xibatch. On a tarball install the installer starts the product itself; spstart and btstart are the commands to start it by hand afterwards.

Check version:

# Packaged
rpm -qa | grep -Ei 'xitext|xibatch'
dpkg -l | grep -Ei 'xitext|xibatch'

# Tarball
cat RELEASE

The RELEASE file sits at the top of the unpacked distribution directory and names the platform, product, version and build. The installer prints it as its first action.

Review the scheduler report file:

# For Xi-Text
tail /var/spool/xi/spd/spshed_reps

# For Xi-Batch
tail /var/spool/xi/batch/btsched_reps

Those are the default spool directories. The report file is always written in the configured spool directory, so if SPOOLDIR was changed, read it from /etc/xi/textconfig or /etc/xi/batchconfig and look there instead.

Licences

A new installation always starts on a trial licence. The tarball installer sets one when you decline a full licence; the packages set one unconditionally. The trial runs for 45 days from a tarball or RPM installation and for 30 days from a Debian package.

Full licence codes come from the Xi customer portal. Sign in with your account reference, open the serial-number panel for the entitlement, register the system if it is not registered already, wait for Xi to confirm it, then choose Generate licence codes. The codes can be shown on screen or emailed to you.

Apply the codes with xt-vwrite (Xi-Text) or xb-vwrite (Xi-Batch), as root, with the product stopped - vwrite and triallic both refuse to run while the scheduler is up. Run vwrite with no arguments and it prompts for your organisation name, serial number and codes.

Given outbound access to the licence service on TCP port 1999, the codes can be fetched instead of typed:

# Xi-Text, non-interactive
sstop -y
xt-vwrite -q -I -s 52210000 -o 'Acme Ltd'

# Xi-Batch, non-interactive
btquit -y
xb-vwrite -q -I -s 52210000 -o 'Acme Ltd'

With -q all three of -I, -s and -o are required; the command exits 20, 21 or 22 if any is missing. Add -N to force a networked licence or -L to force a standalone one; without either, the product decides from the machine's own network configuration.

What goes wrong

The options I passed to INSTALL had no effect
they were discarded. The INSTALL wrapper execs the Perl installer without passing its arguments on, and the Perl installer does not read them. Use the packages if you need an unattended installation.

Installation stops immediately
the installer exits with status 101 unless it is run as root, and with status 100 or 101 if Perl 5 is missing.

"It looks like Xi-Text is running"
the installer asks whether to stop it, defaulting to no. Answering no ends the installation with status 200. Stop the product first with sstop -y or btquit -y.

Licence download hangs
the fetch opens a TCP connection to the licence service on port 1999. Behind a firewall that drops rather than rejects, it will wait. Decline the download and enter the codes from the portal by hand.

Service entries not created
the entries are appended only when the product's own service name cannot already be resolved. An existing entry - including a wrong one left by an earlier installation - suppresses the whole block. Check /etc/services by hand before concluding the step failed.

Scripting a package installation

Script the package installation and the licence step; there is nothing else to script.

#!/bin/sh
# deploy-xitext.sh
set -e

SERIAL=52210000
ORG='Acme Ltd'

# Install. Non-interactive: the scriptlets create the spooler user,
# the spool directories, the configuration and a trial licence, then
# enable and start the service.
rpm -i /var/tmp/xitext-<variant>-1.25.2+1.1782476231-x86_64-linux-rockylinux9.rpm

# Replace the trial with the full licence.
sstop -y
xt-vwrite -q -I -s "$SERIAL" -o "$ORG"
spstart

# Verify.
xt-checklic
splist

Substitute dpkg -i for rpm -i on Debian and Ubuntu. On a host with no outbound access to the licence service, drop the -I and supply the codes another way - vwrite prompts for them, which is the point at which the run stops being unattended.

Register the system in the portal before the trial expires: registration is confirmed by Xi as a separate step, so allow time for it. A tarball installation can be based anywhere, and the resulting paths live in /etc/xi/textconfig or /etc/xi/batchconfig.

Build Blends - What They Change and Which One You Are Running

A release variant that installs into different directories: what changes, and how to tell which one you are running

Choosing a Distribution Format - RPM, Debian Package or Tarball

What each format gives you, which platforms have which, and what an upgrade or removal does to your queue and licence

Downloading Xi Software from the Customer Portal

Signing in with a one-time code, what the portal offers for each registered system, and why a download may be withheld

All articles · Release notes · Contact support