How to run Mathematica hosted on Linux/UNIX server on Windows machines using an X-emulator
The idea presented in this write up is also valid for running other applications hosted on UNIX servers like MATLAB, SAS, FLUENT apart from Mathematica.
Mathematica is installed in the
Computer Centre on a Linux/Unix server. All Linux machines throughout the campus
can freely use it without any problem.
To run software hosted on
Linux/UNIX based servers, Windows users need to install and configure an
X-emulator. There are 3 well known X-emulators available for Windows:
Hummingbird Exceed (not
free but probably the best one) Xming (free, yet good and
powerful enough) Cygwin-X (this is a free
suite of many linux utilities and applications, takes a long time to
install. It is worth having if you want to run linux based commands and
utilities/applications (huge list) on your windows machine. It is not worth
installing if you are only interested in X-emulator) This write-up discusses
installing and configuring Xming so as to be able to run Mathematica, hosted on
a Linux/UNIX server, on your windows PC. Step 1: Download Xming Internal site (will work from
inside campus only):
http://download.cc.iitk.ac.in/msdown/ [see the latest uploads section or
search for Xming] URL of the homepage of Xming:
http://sourceforge.net/projects/xming/ Step 2: Install Xming Installation is easy. Run the
file downloaded in step 1 and follow the screenshots with selections shown and
press the "Next button" every time.
Click "Run" and go the next
screen
Click on Install and let the
installation finish.
Uncheck the "Launch Xming"
check box and click finish Step 3: Do the initial
configuration setup From Start->All Programs locate
the Xming group and click "XLaunch".Follow the screenshots below making
your choices as shown. Keep pressing "Next" everytime after making the choices
Please do not forget to
check No Access Control
Press "Save Configuration" and
save it as "config.xlaunch" on your Desktop. Then press "Finish"
Step 4: Get ready to connect
to UNIX/Linux server from your windows desktop If you are not having some type
of ssh client for Windows, you must install one of these: 1. Putty:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html 2. SSH Secure Shell:
http://download.cc.iitk.ac.in/msdown/ (search for ssh) The installation is simple and
self explanatory and is not covered here. Step 5: Start X server Double click the "config.xlaunch"
icon which you saved in Step 3 above. Observe that an “X” shaped item will
be placed in your system tray (where your system clock is running). If you hover
your mouse on the icon it will read “Xming Server:0.0” This indicates that the X
server is running. Step 6: Connect to server using one of the ssh tools
connect to server "mathserver.cc.iitk.ac.in" Step 7: Find out your IP
address Open a command prompt on your
windows machine (Start->Run type "cmd" and press return Give the command "ipconfig" and
from the output note down your IP address Step 8:On the prompt in your
ssh session to "matlab" server, type the command: #matlab.cc.iitk.ac.in->/users/cc/ce/gopesh$export
DISPLAY=<your IP address you noted in step7>:0.0 [Press return] Please note that you have to
type only the command which is shown in bold. The prompt (shown in non bold)will
vary from user to user. Example: export
DISPLAY=172.26.28.54:0.0 #matlab.cc.iitk.ac.in->/users/cc/ce/gopesh$mathematica
[Press return] You should get the following
screen (on Windows machine) indicating unavailability of fonts:
If you press the red cross
button, you can continue to use Mathematica. But you will not be able to see
proper text and formulae because of unavailability of fonts. Step 9: Final Step. Copy the
Mathematica (or other application) fonts You need to copy fonts from
Mathematica /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Fonts/Type1 to your local desktop/laptop: C:\Program Files\Xming\fonts\Type1 I have made it simpler. Just
download fonts.zip from
ftp://ftp.cc.iitk.ac.in/pub/windows/RequestedDownloads/fonts.zip and extract
it to "C:\Program Files\Xming" Make sure NOT to extract it to "C:\Program Files\Xming\Fonts"
as it will create its own fonts directory. Confirm that you get the following
directory structure: C:\Program Files\Xming\fonts\Type1
... Now revisit Step8 above,
connect to "matlab", export DISPLAY and run Mathematica. Mathematica should
run without showing any errors/warnings That's it.
/usr/local/Wolfram/Mathematica/7.0/SystemFiles/Fonts/AFM
/usr/local/Wolfram/Mathematica/7.0/SystemFiles/Fonts/BDF
C:\Program Files\Xming\fonts\AFM
C:\Program Files\Xming\fonts\BDF
C:\Program Files\Xming\fonts\AFM
C:\Program Files\Xming\fonts\BDF