howto - running maxima as a server on *nix



Hi,

In case someone would like to run maxima as a server on a *nix box where you
can connect with your favorite terminal to compute things, here's how i do
it.

Since we can't separate the "backend" from maxima, we just have to pipe
stdin/stdout on a socket by using inetd or xinetd.

1) install xinetd.
archlinux: pacman -S xinetd
debian base: apt-get install xinetd (?)

2) configure the maxima service
add "maxima      12345/tcp           # maxima" to /etc/services
create the file "/etc/xinetd.d/maxima" with the content:
 service maxima
 {
     socket_type     = stream
     wait            = no
     user            = root
     server          = /usr/bin/maxima
     server_args     = --quiet
 }

Feel free to read the xinetd.conf manual (man xinetd.conf)

3) Give permission to connect on that service to localhost only (you can
change that)
Add "maxima: 127.0.0.1" in "/etc/hosts.allow"

4) Start xinetd
archlinux: /etc/rc.d/xinetd start
debian: /etc/init.d/xinetd start (?)

5) Connect to maxima
You can use a tool like "netcat" to connect to maxima:

$ netcat 127.0.0.1 12345

or

$ telnet 127.0.0.1 12345
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

I think telnet client could work to.

If you have any questions, do not hesitate.

-- 
Benjamin Vanheuverzwijn

Google Talk/Jabber - bvanheu at gmail.com
http://vanheu.ca