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.
- Download and install mathematica fonts from
here on your local machine. - execute the following commands in local machine.
xset fp+ /your_mathematica_fonts_directory/Fonts/Type1
xset fp rehash - ssh to your mathematica server using -X option and type mathematica at the command prompt.
- You can stop reading this blog at this point, because this is enough for you to go. However some interesting stuff is available below.
- Steps 2 and 3 must be executed every time you want to run mathematica.
- 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
- 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.
- Thus with the above steps, with a single command or click you can run mathematica on your ubuntu desktop !
- Enjoy
#!/bin/bash xset fp+ /your_fonts_directory/Fonts/Type1 xset fp rehash ssh loginid@mathematica_server -X mathematica
Leave a Reply