Posted by: sureshamrita | January 14, 2010

How to display mathematica on a local linux machine

When I first ran mathematica, I got the following errors in the server machine.
xset: bad font path element (#23), possible causes are:
Directory does not exist or has wrong permissions
Directory missing fonts.dir
Incorrect font server address or syntax

This problem can be solved very easily by doing the following in your local linux machine. This is what I did.

  1. Download and install mathematica fonts from
    here on your local machine.
  2. execute the following commands in local machine.
    xset fp+ /your_mathematica_fonts_directory/Fonts/Type1
    xset fp rehash
  3. ssh to your mathematica server using -X option and type mathematica at the command prompt.
  4. You can stop reading this blog at this point, because this is enough for you to go. However some interesting stuff is available below.
  5. Steps 2 and 3 must be executed every time you want to run mathematica.
  6. May be, you would prefer to write a script to do all this so that in one click you get into the server. My script (which I have named mathematica) is given below
  7. #!/bin/bash
    xset fp+ /your_fonts_directory/Fonts/Type1
    xset fp rehash
    ssh loginid@mathematica_server -X mathematica
  8. You may be wondering that you will need to type the server account password every time. You need not do that. If you follow the instructions in this link, you can set up an rsa public key and avoid typing password.
  9. Thus with the above steps, with a single command or click you can run mathematica on your ubuntu desktop !
  10. Enjoy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Categories

%d bloggers like this: