Rootless X Server on Mac OS X
Pages: 1, 2
It installed over my old copy of XFree86 4.1.0 without any problems. Aside from taking a long time, the process was very painless.
After it installed, I thought I would click the XDarwin icon to see if anything different happened. I was greeted with a menu that asked if I wanted to start XFree86 in full-screen mode or rootless.

I clicked on Rootless and it proceeded to load X right on top of all my windows. I hadn't configured anything yet, so it loaded twm as the window manager. The default configuration loads three xterm windows and an xclock. It appears the default settings are optimized to work with a screen resolution of 1024 x 768 or higher. Because my iBook is only capable of 800 x 600, my desktop looked like the image below.

The first thing I noticed was that the top menu bar was covering the uppermost part of the window preventing me from grabbing and moving it. The window was also cut off at the bottom so I couldn't resize it. By pressing command+option+a, I was able to toggle the menu bar on and off. The bottom dock also disappeared at the same time. That let me get to my window and move it, but the entire process was somewhat annoying.
I then created a .xinitrc file in my home directory.
vi ~/.xinitrc
xterm &
xterm &
twm
I added the commands to start the window manager, twm, plus a couple of xterm windows.
When I restarted X this time, it didn't appear as though anything happened. However, when I pressed command+option+a, it revealed that the xterms had started minimized and were hidden under the menu bar.
You can pass parameters to xterm that tell it how to look when it starts. So I changed the xterm line to read:
xterm -geometry 80x20+94-50 &
Now I get a much more reasonable sized window when I start X.
The next thing I changed was the XDarwin preferences. The preferences allow you to set the startup default to rootless, change the toggle key sequence, and tweak a few other knobs. I set mine to start rootless by default, without being prompted every time.
Here are a few other handy tips I picked up.
To quit X, just select it from the menu item. You can also click and hold on the dock icon and select quit from there.
If you highlight something in an X window, it immediately becomes available to the buffer so that you can paste it into an Aqua window using command+v. If you want to paste in an X window, use command+click.
If you close all your xterm windows, you can start one from a terminal window. Actually, you can start any X program from a terminal window. However, it won't be able to open the display unless you set the display environment variable or implicitly tell it which display to "connect to." The display number is 0 (zero) and is configurable in the XDarwin preferences. To start an xterm from an Aqua terminal try this:
xterm -geometry 80x20+94-50 -display :0.0
That should be enough to get you going with rootless X on X. I really dislike the default window manager and will be experimenting with others. If you know of a good window manager for rootless X on X, let me know and I will review a few of them in my next article.
After writing this article, I found that the X on X project has released a binary patch for XFree86 4.1.0 that will allow a rootless X server. The patch is based on a CVS checkout from about the same time I was compiling my copy, so you should get the same results.
Chris Coleman is the Open Source Editor for the O'Reilly Network and is actively involved with community projects such as OpenPackages.org and Daemon News.
Read more Mac Dev News Roundup columns.
Return to the Mac DevCenter.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 9 of 9.
-
Anyone working on 10.1?
2001-10-11 18:48:42 rugbymouth [Reply | View]
-
Anyone working on 10.1?
2002-02-11 16:23:24 macvienna [Reply | View]
Used the binary installer from XonX.
It had warnings:
cannot compile shortcuts.
Opens on clicking icon (choice rootless or full-screen) but I have not yet managed to open it from the terminal.
I am looking for an easy way to install Gimp.
Peter
-
Works OK with WindowMaker
2001-09-06 00:59:01 maximus [Reply | View]
and it is nice too in that you may set WM up so that it is totally unobtrusive.
WM is by default set up so that hitting 'F12' shows the Application menu. The preference settings are versatile and accessed via a well conceived GUI.
-
I get a warning
2001-08-29 02:08:59 umben [Reply | View]
A couple of things don't seem right with my attempt at getting X Windows rootless. First of all, my XDarwin icon doesn't start anything. I have to type "/usr/X11R6/bin/XDarwinStartup -quartz" to get XDarwin up and running. I also get the warning "Warning: locale not supported by C library, locale unchanged" when I open an xterm with the the following command "xterm -geometry 80x20x80-50 -display :0.0". Any help will be appreciated.
-
I get a warning
2001-09-06 00:56:20 maximus [Reply | View]
it means that the program will use the default English messages, date formats, etc.
This should go away with OS X 10.1 in that internationalization is supposed to be fully supported.
It might go away if in your .cshrc you put something like:
unsetenv LANG
Note that this will also turn internationalization off in programs that actually support it (via gettext/libintl).
-
Works with WindowMaker, and BlackBox.
2001-08-18 08:12:56 rayleyva [Reply | View]
WindowMaker 0.65 seems to work exceedingly well on an iBook(Ice/White),384MB,10GB. I'm using the fink package system, and almost all packages are installing w/o problems. I'm specially happy with the python installation!
-
Works nice with enlightenment
2001-08-17 23:10:14 sbeam [Reply | View]
hi - I just loaded the binary patch over my XFree86 4.1, XDarwin version. I did this somewhat cautiously from the contents of the tar file, after making appropriate backups.
cp -r ./usr/X11R6/bin/* /usr/usr/X11R6/bin
cp -r ./usr/X11R6/lib/* /usr/usr/X11R6/lib
cp -r ./Applications/XDarwin.app/* /Applications
I clicked on the old XDarwin icon in the doc and the X intro screen came up as described in the article.
I then launched into the enlightenment window manager. It looks very nice and is very well behaved, including the multiple desktop support. It looks really great, and I even ran an OpenGL app from an SGI at work displaying on my home mac in X. BTW, the patch seems to include openGL libraries that were not present in the original 4.1 distribution.
Comments:
- I can't seem to get to the control menus in rootless mode (too bad but not essential)
- I have two monitors, but I can't move a window onto the second monitor.
- The first time I launched enlightenment placed a large root window on the second monitor. This did not occur on subsequent launches.
So I'd suggest enlightenment as a rootless X window manager.
Steve
-
Note for Powerbook G4 users
2001-08-16 13:51:38 ryan_jamison_evans [Reply | View]
The first thing you need to do is go into the XDarwin preferences and select the 'Load From File' option. You shouldn't have a need to change the file listed. If you don't do this, you won't be able to type...
Have fun!
--RYan






/usr/include/time.h:100: header file 'machine/limits.h' not found
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[2]: *** [imake.o] Error 1
make[1]: *** [imake.proto] Error 2
make: *** [World] Error 2
Would love to get X installed on my system if anyone can help out!
I downloaded the source code from CVS on October 11, 2001.
Thanks,
-Kevin