The simplest way to do this is to use X11 forwarding. That will allow you to start xboard on a remote machine, display the user interface on your local machine, and run it as though it were local. But there are a couple of disadvantages. First, the UI startup time is large and it is not very responsive run in this way. Second, if you drop your connection to the remote box, the connection to ICS drops, too.
If you want to just fix the connection dropping problem, you can apparently use Xpra (http://xpra.org/) or Xvnc (http://www.hep.phy.cam.ac.uk/vnc_docs/xvnc.html), which will let you detach from the UI and then resume connection to it later if you want. But that still leaves the performance problem. (Iam told NX (http://www.nomachine.com/download.php) can make this better and support disconnected operation but haven't tried it).
My objective is actually simpler: just be able to start xboard on the remote system, leave it running (immune to disconnection from the session that started it), and be able to control the engine from another account using the ZIPPYPASSWORD feature. I don't need the UI from the original session at all. (I understand icsDrone can do this too, but it is specific to freechess.org and similar servers, and I know xboard is reliable and works with multiple servers, so I'd prefer to use that).
This can be done by running xboard in xvfb, a kind of dummy X server that just accepts display requests but doesn't actually display on a physical screen.
Most Amazon instance types have very minimal compute cycles. To make this work on the higher-end Amazon instances (Cluster Compute Instances), you need to install an X11 environment, because by default they are set up as servers and don't have X11.
The following steps will do this:
Launch instance creation wizard
select Ubuntu 12.04 cluster server type
set availability region (example: us-east-1b)
select a key pair you have previous constructed
select a security group (this should enable connection to port 22)
Now you can ssh to the remote instance, with a command like this:
ssh -i amazoneast2.pem ubuntu@ec2-184-73-29-249.compute-1.amazonaws.com
Now edit /etc/apt/sources.list (using sudo).
Add the following line to the file, then save and exit.
deb http://us.archive.ubuntu.com/ubuntu/ precise main
Then run these commands to install a desktop environment:
- Code: Select all
sudo apt-get update
sudo apt-get install ubuntu-desktop
sudo apt-get install texinfo
sudo apt-get install xorg-dev
sudo apt-get install xvfb
sudo apt-get install x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
Now download an xboard release and extract it. I used xboard-4.5.3a, which I happened to have around.
Cd to the source directory and type
./configure --enable-zippy --disable sigint
and then type "make" to build xboard.
Now finally you are ready to run.
Next step is to start Xvnc like this:
nohup Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &
and then run xboard as follows:
export DISPLAY=:1
export ZIPPYPASSSWORD=xxx
nohup x-terminal-emulator -e "./xboard -ics -icshost $host \
-zp -keepAlive 3 -debugMode true -zippyMaxGames 4 -ponder \
-xquiet -fcp \"/files/arasan-14.3.0/export/arasanx-64 -H 2G -c 4 -ics -t\" \
-icslogon logon.ini -xexit -autoflag" 2>&1 >xboard-log &
xboard has to be run under x-terminal-emulator, otherwise it will complain about having no keyboard input.
Replace the arasanx-64 line with your chess engine path. "logon.ini" should contain your chess server login and password, on separate lines. You can now disconnect your ssh session and xboard will just keep running. You can use the ZIPPYPASSWORD to control the engine from another account.
--Jon