From the KnowledgeBase

Mathematica: Serious Startup Error, Bad Fonts Error, or BadWindow error messages
Use the instructions below to resolve error messages in Mathematica.

Load the Mathematica fonts into your local X server, and use the -Y option with the ssh command.

Problem: Serious Startup Error, or Bad Fonts Error
When the 'Serious Startup Error' occurs, this message shows up in the Windows Taskbar button, while the Mathematica splash screen is displayed, and Mathematica then hangs. To avoid the 'Serious Startup Error' or "Bad Fonts" error, you will need to execute the following on your local machine in an xterm window before running Mathematica.

If you are running an X server on your personal computer, you will need to do some specific configuration of that program to set up the fonts for Mathematica. Copy the font directories for the appropriate version of Mathematica to your local hard drive and configure your X server to recognize the new font directories. Run the following commands once from an xterm command window on your local workstation (either using sudo or with root privileges) to copy the fonts. If your local workstation is a Windows system, then you will need to execute these commands using Cygwin or some other Unix environment emulator:

  • mkdir -p /usr/licensed/Mathematica-7.0.1/SystemFiles/Fonts/Type1
  • cd /usr/licensed/Mathematica-7.0.1/SystemFiles/Fonts/Type1
  • ssh nobel "cd /usr/licensed/Mathematica-7.0.1/SystemFiles/Fonts/Type1; tar -cf - ." | tar -xvf -
  • mkdir -p /usr/licensed/Mathematica-7.0.1/SystemFiles/Fonts/BDF
  • cd /usr/licensed/Mathematica-7.0.1/SystemFiles/Fonts/BDF
  • ssh nobel "cd /usr/licensed/Mathematica-7.0.1/SystemFiles/Fonts/BDF; tar -cf - ." | tar -xvf -

Then, each time you start up your X server and want to run Mathematica, execute the following commands from an xterm command window on your local workstation:

  • xset fp+ /usr/licensed/Mathematica-7.0.1/SystemFiles/Fonts/Type1
  • xset fp+ /usr/licensed/Mathematica-7.0.1/SystemFiles/Fonts/BDF
  • ssh -Y nobel /usr/licensed/bin/mathematica-7.0.1

You can replace '7.0.1' in all the above commands with the Mathematica version desired, if necessary.

NOTE: This procedure will not work if you are using Hummingbird Exceed as your X server.

Problem: BadWindow errors in Mathematica
The problem is that v3.8+ of OpenSSH has different X11-Forwarding behavior, and only uses untrusted cookies for X11-Forwarding. Some X11 applications, including Mathematica, need full access to the X11 server, or they will give the BadWindow errors. There are two ways to get around this:

Method A
Use the -Y option instead of -X

  • ssh -Y nobel /usr/licensed/bin/mathematica

Method B
From a command prompt on your machine, edit /etc/ssh_config, and add the following two lines to it:

  • ForwardX11 yes
  • ForwardX11Trusted yes

The -X option is equivalent to the first line. The -Y option is equivalent to both. Then type:

  • ssh nobel /usr/licensed/bin/mathematica
Last Updated:
July 23, 2012

Solution ID: