Put in remaining pages and wiki contents.
[ikiwiki.git] / docs / handbook / handbook-linuxemu-mathematica.mdwn
1 \r
2 \r
3 ## 22.3 Installing Mathematica® \r
4 \r
5 ***Updated for Mathematica 4.X by Murray Stokely. ******Merged with work by Bojan Bistrovic. ***\r
6 \r
7 This document describes the process of installing the Linux version of  **Mathematica® 4.X**  onto a DragonFly system.\r
8 \r
9  **Warning:** This description applies to FreeBSD, for which it was originally written. This may or may not apply to DragonFly at this point; while FreeBSD 4.x features usually translate over to DragonFly well, your mileage may vary.\r
10 \r
11 The Linux version of  **Mathematica**  runs perfectly under DragonFly however the binaries shipped by Wolfram need to be branded so that DragonFly knows to use the Linux ABI to execute them.\r
12 \r
13 The Linux version of  **Mathematica**  or  **Mathematica for Students**  can be ordered directly from Wolfram at http://www.wolfram.com/.\r
14 \r
15 ### 22.3.1 Branding the Linux Binaries \r
16 \r
17 The Linux binaries are located in the `Unix` directory of the  **Mathematica**  CDROM distributed by Wolfram. You need to copy this directory tree to your local hard drive so that you can brand the Linux binaries with [brandelf(1)](http://leaf.dragonflybsd.org/cgi/web-man?command#brandelf&section1) before running the installer:\r
18 \r
19     \r
20     # mount /cdrom\r
21     # cp -rp /cdrom/Unix/ /localdir/\r
22     # brandelf -t Linux /localdir/Files/SystemFiles/Kernel/Binaries/Linux/*\r
23     # brandelf -t Linux /localdir/Files/SystemFiles/FrontEnd/Binaries/Linux/*\r
24     # brandelf -t Linux /localdir/Files/SystemFiles/Installation/Binaries/Linux/*\r
25     # brandelf -t Linux /localdir/Files/SystemFiles/Graphics/Binaries/Linux/*\r
26     # brandelf -t Linux /localdir/Files/SystemFiles/Converters/Binaries/Linux/*\r
27     # brandelf -t Linux /localdir/Files/SystemFiles/LicenseManager/Binaries/Linux/mathlm\r
28     # cd /localdir/Installers/Linux/\r
29     # ./MathInstaller\r
30 \r
31 \r
32 Alternatively, you can simply set the default ELF brand to Linux for all unbranded binaries with the command:\r
33 \r
34     \r
35     # sysctl kern.fallback_elf_brand=3\r
36 \r
37 \r
38 This will make DragonFly assume that unbranded ELF binaries use the Linux ABI and so you should be able to run the installer straight from the CDROM.\r
39 \r
40 ### 22.3.2 Obtaining Your Mathematica Password \r
41 \r
42 Before you can run  **Mathematica**  you will have to obtain a password from Wolfram that corresponds to your ***machine ID***.\r
43 \r
44 Once you have installed the Linux compatibility runtime libraries and unpacked  **Mathematica**  you can obtain the ***machine ID*** by running the program `mathinfo` in the installation directory. This machine ID is based solely on the MAC address of your first Ethernet card.\r
45 \r
46     \r
47     # cd /localdir/Files/SystemFiles/Installation/Binaries/Linux\r
48     # mathinfo\r
49     disco.example.com 7115-70839-20412\r
50 \r
51 \r
52 When you register with Wolfram, either by email, phone or fax, you will give them the ***machine ID*** and they will respond with a corresponding password consisting of groups of numbers. You can then enter this information when you attempt to run  **Mathematica**  for the first time exactly as you would for any other  **Mathematica**  platform.\r
53 \r
54 ### 22.3.3 Running the Mathematica Frontend over a Network \r
55 \r
56  **Mathematica**  uses some special fonts to display characters not present in any of the standard font sets (integrals, sums, Greek letters, etc.). The X protocol requires these fonts to be install ***locally***. This means you will have to copy these fonts from the CDROM or from a host with  **Mathematica**  installed to your local machine. These fonts are normally stored in `/cdrom/Unix/Files/SystemFiles/Fonts` on the CDROM, or `/usr/local/mathematica/SystemFiles/Fonts` on your hard drive. The actual fonts are in the subdirectories `Type1` and `X`. There are several ways to use them, as described below.\r
57 \r
58 The first way is to copy them into one of the existing font directories in `/usr/X11R6/lib/X11/fonts`. This will require editing the `fonts.dir` file, adding the font names to it, and changing the number of fonts on the first line. Alternatively, you should also just be able to run [mkfontdir(1)](http://leaf.dragonflybsd.org/cgi/web-man?command#mkfontdir&section1&manpath=XFree86+4.3.0) in the directory you have copied them to.\r
59 \r
60 The second way to do this is to copy the directories to `/usr/X11R6/lib/X11/fonts`:\r
61 \r
62     \r
63     # cd /usr/X11R6/lib/X11/fonts\r
64     # mkdir X\r
65     # mkdir MathType1\r
66     # cd /cdrom/Unix/Files/SystemFiles/Fonts\r
67     # cp X/* /usr/X11R6/lib/X11/fonts/X\r
68     # cp Type1/* /usr/X11R6/lib/X11/fonts/MathType1\r
69     # cd /usr/X11R6/lib/X11/fonts/X\r
70     # mkfontdir\r
71     # cd ../MathType1\r
72     # mkfontdir\r
73 \r
74 \r
75 Now add the new font directories to your font path:\r
76 \r
77     \r
78     # xset fp+ /usr/X11R6/lib/X11/fonts/X\r
79     # xset fp+ /usr/X11R6/lib/X11/fonts/MathType1\r
80     # xset fp rehash\r
81 \r
82 \r
83 If you are using the  **XFree86™**  server, you can have these font directories loaded automatically by adding them to your `XF86Config` file.\r
84 \r
85 If you ***do not*** already have a directory called `/usr/X11R6/lib/X11/fonts/Type1`, you can change the name of the `MathType1` directory in the example above to `Type1`.\r
86 \r
87 \r
88 \r
89 CategoryHandbook\r
90 CategoryHandbook-linuxcompatibility\r