Play Zork and Other Zmachine Files on Linux.

Introduction: Play Zork and Other Zmachine Files on Linux.

About: Bytesize articles instead of a trilogy in one post.

Sort of miss the old text adventures where you were allowed to use your imagination. This instructable uses what is known as the zmachine. There are a ton of zmachine games out there. Just use your web search engine to find them.  In this case I will at least get you a zork starter file.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Get the Zmachine Source Code and Games:

You need to go to and download the source code.
To get some games go to .


Step 2: Compiling the Code.

You need to install the c development system for your version of Linux. It varies from distro to distro.

Extract the files.

$ tar zxvf  xzip182.tar.Z

change to the source directory

$ cd xzip

Edit Makefile

$ nano Makefile

You will need to uncomment three lines.  Scroll down to where you see your linux distro.


Uncomment the last two lines for your version of linux (i used redhat for fedora).

Save your work and exit.

Now we need to compile the code.

$ make

The we need to install it.

$ sudo make install

$ sudo install -s xzip /usr/local/bin

$ sudo install xzip.1 /usr/local/man/man1

That should be it if all went well.

Step 3:

If you want to avoid all the compiling you could just check your repo to seeif it has frotz or xzip.

Debian based:
frotz - interpreter of Z-code story-files
gargoyle-free - graphical player for Interactive Fiction games
xzip - Interpreter of Infocom-format story-files

$ sudo apt-get install frotz

Fedora based:
frotz.i686 : Interpreter for Infocom and other Z-machine games

$ sudo yum install frotz

FROTZ V2.43    curses interface.
An interpreter for all Infocom and other Z-Machine games.
Complies with standard 1.0 of Graham Nelson's specification.

Syntax: frotz [options] story-file
  -a   watch attribute setting       -O   watch object locating
  -A   watch attribute testing       -p   plain ASCII output only
  -b # background color              -P   alter piracy opcode
  -c # context lines                 -r # right margin
  -d   disable color                 -q   quiet (disable sound effects)
  -e   enable sound                  -Q   use old-style save format
  -f # foreground color              -s # random number seed value
  -F   Force color mode              -S # transscript width
  -h # screen height                 -t   set Tandy bit
  -i   ignore fatal errors           -u # slots for multiple undo
  -l # left margin                   -w # screen width
  -o   watch object movement         -x   expand abbreviations g/x/z
    -Z # error checking mode (default = 1)
         0 = don't report errors   1 = report first error
         2 = report all errors     3 = exit after any error

Step 4: Running From the Command Line.

usage: xzip [options...] story-file

You can get help with:

$ xzip -help
usage: xzip [options...] story-file

XZip - a Z-machine interpreter.
Version 1.8.2 by Andrew Plotkin (
Based on ZIP Version 2.0 by Mark Howell.
Plays Z-machine files of versions 1-5 and version 8.

    -help: display full list of options

    (for XXX in n, r, b, rb, i, ri, bi, rbi, f, rf, bf, rbf, if, rif, bif, rbif)

Step 5: Making a Gui Loader.

You will need to create a shell file called
szAnswer=$(zenity --file-selection --title="Select a file to run")
xzip $szAnswer

Then, you need to copy the file to the desktop if you are running lxde, otherwise you need  to make an applet.

To start the program double click the applet and choose the file to run.

That's it!

Step 6: Other Zmachine Files.

Be the First to Share


    • Cardboard Speed Challenge

      Cardboard Speed Challenge
    • Indoor Plants Challenge

      Indoor Plants Challenge
    • Trash to Treasure Contest

      Trash to Treasure Contest