Installing XFree86/XDarwin for MacOSX
[Note: these instructions worked for me on 10/8/2001 with MacOS
10.1 installed. There's no guarantee they'll work if any of the files
I downloaded get changed, so you may want to look at the pages I link
to for more recent information. And it's possible that there are other
things that could go wrong, too...]
There are two things that need to be installed in order to be able to
use X-Windows on MacOSX. XFree86 is an X-Window system for which there
is a MacOSX version that can be downloaded for free. XDarwin is an
application that provides a graphical user interface that lets you
start X from within the MacOSX (Aqua) environment, and that'll make it
possible for the X-Windows to appear on your screen without X taking
over the whole screen. It can also be downloaded for free. There is
also another X system
from Tenon for MacOSX, but it isn't free and I haven't tried it.
First you should become root:
- open a Terminal window [Terminal.app can be found in
the Utilities folder in the Applications folder - you'll probably want
to put it in the dock!]
- su [and type in your root password]
- If this is the first time you tried this and it doesn't work,
first do:
- sudo /bin/tcsh
- [enter your user password]
- passwd root
- [enter password you want for root]
Note: this will only work if you are an "administrator", which is
always the case if you're the only user of the computer.
Then you need to install XFree86
- From ftp://ftp.xfree86.org/pub/XFree86/4.1.0/binaries/Darwin-ppc/
get these binaries:
Xinstall.sh, extract.exe, Xbin.tgz, Xlib.tgz,
Xman.tgz, Xdoc.tgz, Xfnts.tgz, Xfenc.tgz, Xetc.tgz, Xxserv.tgz
[for more information e.g. about optional files to download see
http://www.xfree86.org/4.1.0/Install2.html#2
I downloaded the optional files Xprt.tgz, Xfscl.tgz, Xhtml.tgz]
[Note: I have had one report that for a freshly installed copy of
MacOS 10.1 one also has to get Xquartz.tgz. This was not necessary for
my copy of MacOS 10.1 upgraded from 10.0.4, so I have not tried this
out myself. However, I have heard from one other person that the instructions
on this page work for a fresh copy of MacOS 10.1 by just getting this
additional file.]
-
cd ~YOURUSERNAME/Desktop [If you're using Internet
Explorer 5.1 for MacOSX the downloaded files probably ended up in the Desktop
folder in your home directory. If not, find them with Sherlock and cd
to wherever they are. Note that the installation script below will not work
if the pathname contains a space, e.g. "Macintosh HD". If your download
folder has such a pathname move the files elsewhere, e.g. into a
subdirectory of /tmp or change the Location of the "Download Folder"
in Internet Explorer's "Download Options" before you download.]
-
run: sh Xinstall.sh [say "yes" to the questions]
Now you can get XDarwin1.0.4.1.tgz
Download it from http://prdownloads.sourceforge.net/xonx/XDarwin1.0.4.1.tgz
cd ~YOURUSERNAME/Desktop [or wherever your browser puts downloaded files]
cp XDarwin1.0.4.1.tgz /
cd /
tar zxvf XDarwin1.0.4.1.tgz
rm XDarwin1.0.4.1.tgz
For more details see http://mrcla.com/XonX/
Now configure a few things
Create a file /usr/share/init/tcsh/path and put these
lines in it:
setenv PATH "${PATH}:/usr/X11R6/bin"
setenv MANPATH "${MANPATH}:/usr/X11R6/man"
Put these lines at the end of /etc/ssh_config (or
uncomment and edit the relevant lines) to get xforwarding/xauth working
(i.e. when you ssh to a remote computer the DISPLAY variable will be set
automatically, and xauth cookies will be made and used on the fly.)
Host *
ForwardX11 yes
Protocol 2,1
If you want to have your own .Xresources file, e.g. in order to add
scrollbars, and you don't have the developer tools installed, you will
not have /usr/bin/cpp, so you need to add -nocpp in these two lines in
/usr/X11R6/lib/X11/xinit/xinitrc:
xrdb -nocpp -merge $sysresources
xrdb -nocpp -merge $userresources
You may also want to change the size of the console in
/usr/X11R6/lib/X11/xinit/xinitrc:
exec xterm -geometry 80x12+0+0 -name login
And if you're experiencing problems with your @ character,
add the following line to
/usr/X11R6/lib/X11/xinit/xinitrc
just before the line that starts the window manager, usually "twm &":
xmodmap -e "keycode 27=2 at currency currency"
Type "exit" to get out of the root login.
Logged on as yourself, configure .Xresources
Make a ~/.Xresources file to get scrollbars:
*ScrollBar: true
*Thickness: 16
*Scrollbar.foreground: LightGray
*Scrollbar.background: DarkGray
Starting XDarwin
To start just click on XDarwin in /Applications (you'll probably want
to put this in the dock) and select "rootless mode".
Use the XDarwin Preferences to enable mouse button emulation (with
option and command keys) and to select "rootless mode" (in which X doesn't
take over your whole screen) as your default mode.
You'll also want to remove all the stuff that got downloaded into your
Desktop directory.
Here are instructions about a few other MacOSX things.
Last modified: October 8, 2001
Susanne Riehemann
(sr@csli.stanford.edu)