What the emergency licence tool is
Xi-Text ships a program, xt-emerglic, that writes a seven-day emergency licence into the product's licence file, /usr/libexec/xi/.xitext.lic. It exists for one situation: the machine's licence has been lost or damaged, the spooler will not start, and a permanent licence cannot be obtained in time to keep the site printing.
Every packaging format - RPM, Debian package and portable archive - installs the command on the PATH, in /usr/local/bin on a packaged system. There is no need to hunt for it in a distribution directory.
An emergency licence is a real licence record in the same format as any other. It is bound to the machine in the same way: the record is checksummed against the hardware address of the network interface carrying the most traffic. It cannot be copied to another machine, and it is superseded simply by installing a permanent licence over it.
When to use it
- The licence file was lost or damaged by a restore or a disc recovery, and the spooler will not start.
- Production must print now, and a permanent licence cannot be obtained and installed in time.
What it is not for. A new installation from an RPM or Debian package already carries a 30-day trial licence, installed automatically at install time; a portable-archive installation carries a 45-day trial. A test or development machine should be licensed the same way as any other machine. Use the emergency licence only to recover a system that has lost its licence, and replace it with a permanent licence as the first available action afterwards.
What it requires before it will run
The program checks three things and refuses on any of them.
- You must be root. The command is not installed set-user-id, so it needs a genuine root shell or sudo. Otherwise it prints You have to be superuser to run this and exits 10.
- The spooler must be stopped. Otherwise it prints It looks like the scheduler is running, please stop first and exits 10.
- The licence file must be readable, or absent. If it is absent the program creates it, so no previous licence is needed. If it exists but is too short to hold a complete licence record, the program prints Cannot read val code??? and exits 4 without writing anything.
A stopped spooler is detected by the absence of its request socket, not by looking for a process. After a crash or a SIGKILL the socket file can be left behind, and the program will then refuse even though nothing is running. Clear the leftover socket and shared memory with xt-ripc -d first, then run the command again.
Running it
Stop the product:
sstop -y
Write the emergency licence:
# Non-networked
xt-emerglic -L
# Networked
xt-emerglic -N
The command prints the period it has written:
Your copy is licensed from 12/08/2026 to 20/08/2026
With no option, the program guesses whether a network licence is needed and asks you to confirm. It answers "yes" only if /etc/xi/text-hosts exists and all four of the Xi-Text service entries - xitext, spq, xtnetsrv and xtapi - are present in the system services database. Any one missing and it defaults to "no".
xt-emerglic
Network licence required? [N]
If the existing licence is still valid, the program will not silently replace it. It asks, and the default answer is no:
Licence seems to be valid - continue? [N]
Answering N (or pressing return) leaves the licence untouched and exits 100.
Restart the product the way your system normally starts it. The shipped service unit runs:
spstart 2000 50
Options, exactly as the program accepts them
| Option | Meaning |
|---|---|
| -L | Local licence - no network use |
| -N | Network licence |
| none | Guess, and prompt for confirmation |
There are no other options. xt-emerglic accepts one argument only. A second argument produces Usage: xt-emerglic [-L/N] and exit 200.
That differs from the Xi-Batch command, which accepts a second argument and ignores it, so a command line copied from an Xi-Batch procedure will fail here rather than doing something unexpected. An argument that does not begin with a hyphen is ignored without comment, and you are prompted instead.
The period is exactly seven days, and cannot be varied
The end date is set seven days ahead of midday UTC on the day you run the command; the start date is set to midday UTC on the previous day, so a clock that is slightly out cannot leave the licence not yet valid. The seven days are compiled in. No option, environment variable or configuration setting changes them.
Verifying it
xt-checklic
A successful check prints, with the fields separated by tabs:
Licensed to: Emergency Licence of Xi-Text
Serial is: 4173
Start time: 11/08/2026
End time: 20/08/2026
Validated for networks
***Emergency licence***
The ***Emergency licence*** line is what identifies it. The site name is fixed text, and the serial number is generated locally and has no meaning outside the machine - it is not a serial you can quote to Xi Software. Validated for networks appears only if -N was used or the prompt was answered yes.
From four days before the end date, the check adds:
*** NOTE: Licence about to expire ***
What warns you, and what does not
The only warning the product displays is in the interactive queue manager, spq, and its X11 equivalent. It appears once when the program starts, and needs a keystroke to clear:
***WARNING - Your emergency licence will expire in 5 days***
Please call us as soon as possible to get a new licence!!!!!!
***************Please type any character to continue**************
It is shown only between 10:00 and 18:00 UTC, Monday to Friday - deliberately, so that it does not block an unattended overnight or weekend session. Nothing else warns: no message is written to the report file, no mail is sent, and jobs, printers and command-line programs run without comment. If nobody at your site uses spq during working hours, the expiry will arrive with no notice at all. Put the end date in a diary.
What happens if it expires
An expired licence is not a degraded mode. The licence check returns "expired", and the spooler exits instead of starting. A machine whose emergency licence has run out is a machine with no print spooling at all, from the next restart onwards, and a running spooler will not survive its next restart either.
Plan to have the permanent licence installed and verified with several days in hand.
Replacing it with a permanent licence
A permanent licence is issued against your serial number through the Xi Software customer portal, and installed with xt-vwrite. Installing it overwrites the emergency licence in the same file; there is nothing to remove first.
sstop -y
xt-vwrite
spstart 2000 50
xt-checklic
Check that the output of the verification step names your organisation rather than Emergency Licence of…, and that the ***Emergency licence*** line has gone.
Licence codes issued by the portal expire twelve hours after they are generated, so obtain the code at the time you intend to install it. xt-vwrite refuses to run while the product is up, and exits 10 if it finds the spooler running.
If the permanent licence has not arrived in time
The emergency licence is a bridge to a permanent licence, and it is not a licensing route in its own right. If the seven days are running out and the permanent licence is still not available, contact Xi Software and say so - the recovery is not finished until the machine holds the licence it is entitled to.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Emergency licence written |
| 4 | Existing licence file too short to read |
| 10 | Not root, spooler running, or the licence file could not be opened or created |
| 100 | Existing licence is valid and you declined to replace it |
| 200 | Too many arguments |
Common mistakes
Running it with the product still up. The command refuses and exits 10. Stop the product first.
# Refused
xt-emerglic -N
It looks like the scheduler is running, please stop first
# Correct
sstop -y
xt-emerglic -N
spstart 2000 50
Using the other product's command. On a machine running both products, xt-emerglic licences Xi-Text and xb-emerglic licences Xi-Batch. Running the wrong one leaves the product you meant to fix exactly as it was.
Forgetting to restart. The command writes a file; the licence is read when the spooler starts. Until you restart, nothing has changed for the running system.
Summary
- Stop the product - sstop -y.
- As root, run xt-emerglic, with -N for a networked machine or -L for a standalone one.
- Restart the product with spstart 2000 50, or however your system starts it.
- Confirm with xt-checklic and write down the end date.
- Contact Xi Software the same day and obtain a permanent licence.
- Install it with xt-vwrite with days in hand, and confirm the emergency line has gone.