Installing XFree86 on Mac OS X
Pages: 1, 2
Running Xinstall
Your current directory is your home directory, /Users/youraliasname. To run the Xinstall script, you need to be in the tmp_build directory you downloaded your files into earlier. If you created the directory as a top-level directory in your hard drive, as I did, you need to change directories in the following manner,
[localhost:~] youraliasname% cd /
[localhost:/] youraliasname% cd tmp_build
[localhost:/tmp_build] youraliasname%
A quick sanity check
Before you embark on running the Xinstall script, you should make a quick check of the files downloaded in the tmp_build directory. This will determine if the correct binaries are there. Invoke the command (remember as sudo) sh Xinstall.sh –check.
[localhost:/tmp_build] youraliasname% sh Xinstall.sh
–check
uname reports 'Darwin' version '1.3.7', architecture
'Power Macintosh'.
Binary distribution name is 'Darwin-ppc'
[localhost:/tmp_build] youraliasname%
If you get a clean bill of health from the simple sanity check, you're ready for the XFree86 installation. Go ahead and install the XFree86 binaries.
[localhost:/tmp_build] youraliasname% sh Xinstall.sh
This may take a moment or two to execute. Once completed, you're ready to execute the X Window environment.
A note before we move on...
If the XFree86 install failed, it may be because you didn't have root user privileges. A good indication of this is a message referring to directories, such as /usr/X11R6, "not found." Go back and make sure you are granted root privileges with the sudo command.
Running XFree86
At this point in the installation, your Xinstall.sh script has executed properly and you're ready to run XFree86. There are a few housekeeping items we need to take care of first. Let's go ahead and set the environment variables for the X Window environment.
The .tcshrc file
Mac OS X's Darwin kernel uses the tcsh interactive login shell as default for user login. You will need to create a resource file to provide the proper path and environment settings for XFree86.
[localhost:~] youraliasname% echo $SHELL
/bin/tcsh
[localhost:~] youraliasname%
Using your vi editor, create a .tcshrc resource file for your account login. The file must be created in your user home directory.
[localhost:~] youraliasname% cd
[localhost:~] youraliasname% vi .tcshrc
set path=($path /usr/X11R6/bin)
~
~
~
:wq
[localhost:~] youraliasname%
To invoke the changes to your .tcshrc file, you will need to source the file.
[localhost:~] youraliasname% source .tcshrc
Environment variables using the X documentation
Torrey's web page, XonX, recommends that you add a path file in the ~/Library/init/tcsh directory. If you created a .tcshrc file, you don't need to do this. However, if you're a pragmatic and want to stick to specs, you will need to create the directories, /init/tcsh under your ~/Library directory.
[localhost:~] youraliasname% cd ~/Library
[localhost:~/Library] youraliasname% mkdir init
[localhost:~/Library] youraliasname% cd init
[localhost:~/Library/init] youraliasname% mkdir tcsh
[localhost:~/Library/init] youraliasname% cd tcsh
[localhost:~/Library/init/tcsh] youraliasname%
Create the file named path using vi (or any other editor you can muster up).
[localhost:~/Library/init/tcsh] youraliasname% vi path
setenv PATH "${PATH}:/usr/X11R6/bin"
The moment you've been waiting for
Veteran XFree86 installers will probably have a desire to run Xconfigurator. This is not required on Mac OS X and Darwin. All this information is passed in from the IOKit.
Okay, you've waited long enough. Fire up the X Windows!
[localhost:~] youraliasname% startx
Doesn't that bring tears to your eyes? Isn't that a beautiful sight? The X Window environment running native on a Macintosh!
|
Related article: X on X -- Because Mac OS X is based on Darwin, it's possible to shut down Core Graphics and install XFree86 to access your X11-based programs. Here's one BSD user's experience. |
Caveats of XFree86 4.1.0 and Mac OS X
The X Window environment for Mac OS X is still leaning on the side of bleeding-edge technology, and there are a few caveats. A primary issue at the moment is that X doesn't shut down gracefully on Mac OS X. There is a workaround at the present time and that is to exit all the open windows and terminals before shutting down X. You will then see the spinning, psychedelic beach ball. Although there is no command line for this, type the command logout. You will then be returned immediately to the Mac OS X login window.
Running X on X
For the grand finale, we're going to run the X Window System side-by-side with Mac OS X. Yes, you read correctly! Under the Mac OS X environment, open your Applications folder. You will see that the Xinstall.sh script left you a little present. Do you see the XDarwin application? It's the one with the big, red, gleaming X icon.
|
Double-click the XDarwin.app icon to launch the X Window environment.
|
Now is that a beautiful sight or what? The X Window environment and Mac OS X running side-by-side. You can toggle between environments using the Command-Option-A key sequence.
X unleashed!
If you're just as excited as I am about this new technology, I recommend you check out a few sites on the Net.
You should start with the Darwinfo ports web page. This URL will provide you with Mosaic, AfterStep, and Doom ports. If you're looking for that special X utility, stepwise.com is also a good place to start your search. Who knows? Before long we'll probably have software distribution CDs for OS X crammed with X goodies.
Michael J. Norton is a software engineer at Cisco Systems.
Return to the Mac DevCenter.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 12 of 12.
-
Superuser command
2002-11-29 19:41:03 anonymous2 [Reply | View]
The command should be "su", not "sudo" - and the word "root" is not necessary. Sudo will let you execute one command as root - useful for editing a file through sudo vi or similar. Su will practically login as root, opening a new shell (tcsh, normally) that can be closed as root. Su <username> will change to username's account.
-
Fatal server error
2001-11-12 10:30:52 rengelmann [Reply | View]
I got this after a painless install:
----------------------------------------------
[localhost:~] blablabla% startx
XFree86 Version 4.1.0 / X Window System
(protocol Version 11, revision 0, vendor release 6510)
Release Date: 2 June 2001
If the server is older than 6-12 months, or if your hardware is
newer than the above date, look for a newer version before
reporting problems. (See http://www.XFree86.Org/FAQ)
Operating System: Darwin
Display mode: IOKit
Fatal server error:
Failed to connect as window server!
Quit the Mac OS X window server or use the -quartz option.
OsVendorFatalError
AbortDDX
Quitting XDarwin...
-----------------------------------------------------------
Starting the X-App gives a black full scree for a few seconds, then I'm back in OSX.
What's wrong ?
Running actualized OSX 10.0.1, no betas underlying.
Greetings
Rainer E.
-
Fatal server error
2001-12-12 13:34:26 b2ee [Reply | View]
I received the same error after installing first from source, then from binary. My $path was set correctly as well. I found a clue on the following page http://fink.sourceforge.net/doc/x11/trouble.php . In the end, it worked when I started it like such: % startx -- -quartz.
Note the two dashes before -quartz. That did the trick for me.
-
Keyboard input not recognized
2001-08-10 02:12:04 tirien [Reply | View]
After I demo'd the install procedure (but not really executed it) to a friend, I went back into OS-X. Clicked the X-icon and switched to X. But the keyboard input was not accepted. The mouse worked, but not the keyboard.
It seems that after you have booted into Darwin (via ">console") you need to run "startx" before you exit and log in into OS-X again. After I did this, it worked fine.
TiRien.
And oh yes, the second time the work around worked.
-
superuser problems
2001-07-22 08:09:56 fbozenhardt [Reply | View]
Hi there!
When I try to install the package with 'sudo root', I do not gain access to the 'X11R6' directory. When I specify my standard user's password to 'sudo', it complains 'sudo: root: unknown command' which is intrinsically correct, since 'root' is in fact no command. Being a newbie to UNIX, I can't see through the whole thing.
When I log in as root user, the installation succeeds so far, however, I'm not able to create the '.tcshrc' file in my standard user's home directory then.
A little help would be great!
-
superuser problems
2001-07-23 04:04:08 tirien [Reply | View]
Hi,
I also used "root" to install the thing. I logged in under my normal ID, then used "su" to change to root, did the install, then went back to my own ID with "exit". Then made the .tcshrc file.
Good luck,
TiRien -
superuser problems
2001-08-06 22:44:23 espinoza [Reply | View]
Hi...
This may come a little late but.. after loggin in using the administrator account try opening a new shell as root (this is what I did)
>sudo tcsh
and use your administrator password. You should be logged as root after this and be able to start the installation.
Exit the session to go back to the admin. account and create the .tcshrc file.
It worked for me...
BTW I didn't have trouble closing the session... got the spinning beach ball and everything.
Good luck,
Mr. E.
-
RE: Xmod.tgz and Xvar.tgz not needed?
2001-07-20 10:01:22 proclus [Reply | View]
Xdarwin, as I understand it, Xdarwin does not use conventional XFree86 drivers and modules. Instead, it hooks into Darwin's Core Graphics and IOKit. The nice thing about that is that it works fairly well automatically with any hardware that is supported by Apple. This is now especially true since Torrey became a "Darwin Developer". BTW, he looks great in that khaki Hexley shirt ;-}.
Torrey and the XonX crew have done a supurb job with this port, and I can vouch that any files which are not included are also not required.
If you have more questions about this, you should contact XonX
http://mrcla.com/XonX/
Regards,
proclus
http://www.gun-darwin.org/ -
RE: Xmod.tgz and Xvar.tgz not needed? - No!
2001-07-23 03:59:53 tirien [Reply | View]
Thanks Proclus,
I went ahead with the install, and it just worked fine. Except the last bit, it did not shutdown graciously as mentioned, but the work-around also failed. I had to use the reset button to recover. (Which is a pain as I always need to reset the current date and time after a reset).
Thanks again,
TiRien







