Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A collection of tips for Apple's X11 implementation UNIX
Probably you have a hundred of these. Check the OSXHints forums for any extra things to consider. However here's a tip sheet I've been posting around.
  1. If you had a pre-existing XDarwin or Fink installation you must delete ~/.xinitrc or change the window manager in it to "exec quartz-wm" If you don't it will start up with an xterm with no boundary that is partially under the menu bar.

  2. If executing applications from Terminal instead of xterm you have to type "open-x11 program" instead of just the program name. If you are used to Fink and XDarwin this wasn't necessary. To get it back to the way things used to work, add "setenv DISPLAY :0.0" to your .tcshrc file.

  3. Check you paths in xterm. They sometimes may not be reading /sw depending upon how you set your .tchsrc. Also notice that Apple's installed XWindows apps are in /usr/X11R6/bin.

  4. You can start up kde under Apple's X11 by typing "open-x11 startkde &" although the mix of interfaces is kind of goofy.

  5. XDarwin isn't gone so you can still run the regular gnome or kde if you need.

  6. If you want X11 apps to try, go download Fink. Fink has many X11 applications. A few to try are AbiWord, Gnumeric, and of course Gimp.

  7. The version of OpenOffice released a few days ago is incompatible with Apple's X11. It works fine with XDarwin though. If you have the slightly earlier version, you can run OpenOffice by typing:
     % Applications/OpenOffice.org1.0.1/program/soffice"
  8. Note that with Apple's X11 app you can cut and copy between OSX applications and X11 applications. Very nice.
[Editor's note: Make sure you take a look at the /usr/X11R6/bin directory, too, as there are some interesting apps in there. glxgears is a quickie little OpenGL demo/test program, and x11perf is a more extensive set of benchmarks. Many of these programs have "man" pages as well, so try "man command" (or "command --help") to get more information before running them.]
    •    
  • Currently 3.50 / 5
  You rated: 4 / 5 (4 votes cast)
 
[35,356 views]  

A collection of tips for Apple's X11 implementation | 35 comments | Create New Account
Click here to return to the 'A collection of tips for Apple's X11 implementation' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Broken link and SDK confusion.
Authored by: gerwitz on Jan 10, '03 10:35:03AM

The Fink link in this comment is missing a colon.

Somehow I ended up downloading the X11 SDK rather than the software installer when following the "obvious links" from a press release somewhere. This caused more confusion than it should have, as I searched for binaries that didn't exist. In case anyone else is as clueless as I, here's the place you should have ended up: http://www.apple.com/macosx/x11/download/



[ Reply to This | # ]
Link fixed..
Authored by: robg on Jan 10, '03 11:36:09AM

Sorry about that; doubled up the "http://" bit...

-rob.



[ Reply to This | # ]
AquaX11 Cut/Paste
Authored by: iMMersE on Jan 10, '03 11:55:16AM

As far as I've worked out, it's the quartz-wm which provides the Aqua<>X11 cut/pasting ability. I'm running blackbox and I can't cut and paste between Aqua and X11.

Anyone got any ideas about getting it working with blackbox?



[ Reply to This | # ]
AquaX11 Cut/Paste
Authored by: jg on Jan 10, '03 12:58:35PM

In order to have Cut/Paste when using a different window manager (i.e. balckbox or oroborosx) you need to use xcutsel. It should be installed by default with X, and will either be on /usr/X11R6/bin or, if Fink was used, under /sw somewhere. Sorry, but I don't use Fink, so cannot be more precise.



[ Reply to This | # ]
AquaX11 Cut/Paste
Authored by: paddlefoot on Jan 10, '03 02:19:40PM

Does cut and paste work with text only, or does it work with graphics images too?



[ Reply to This | # ]
AquaX11 Cut/Paste
Authored by: evildrbob on Jan 10, '03 02:23:39PM

I've only gotten cut/paste to work with text - very frustrating, as I do a lot more image than text work lately.



[ Reply to This | # ]
AquaX11 Cut/Paste
Authored by: paddlefoot on Jan 10, '03 02:38:48PM

That's been my experience too. I run the R statistical package under X-Windows and it would be nice to be able to cut and paste graphics into documents running under OS X (there are other ways to do what I want of course, just not as easy as cut and paste).



[ Reply to This | # ]
AquaX11 Cut/Paste
Authored by: mccabem on Mar 30, '06 04:03:34PM
From the related Apple "Technical Q & A" at this URL: http://developer.apple.com/qa/qa2001/qa1232.html

Q: How do I make copy and paste work with other window managers?

A: Running quartz-wm --only-proxy will activate the selection proxying features, but none of the window management code.


[ Reply to This | # ]
Openoffice on Apple's X11
Authored by: pnarzem on Jan 10, '03 11:57:22AM

I don't know about you but Openoffice did work with Apple's X11. I ran it from the command line according to the instructions and it was alot faster than the provided AppleScript. The AppleScript asked where my XDarwin was. since I deleted it I pointed it to X11 and it eventually came up.

I built my own bourne shell script and ran openoffice and it came up in seconds. I then added the script to the application in the quartz window manager and now I click away to bring up the apps.



[ Reply to This | # ]
Openoffice on Apple's X11
Authored by: lamon on Jan 10, '03 12:24:13PM

For me, The latest OpenOffice seems to work (or al least launch without any problem).

Just one thing, if you are using an international keyboard, Sing Ouroboros/XDarwin manages a correct keymap, you can do

xmodmap -pke > ~/.Xmodmap

while in XDarwin
and add

xmodmap .Xmodmap
exec quartz-wm

in your .xinitrc to have your (French in my case) keyboard back.



[ Reply to This | # ]
Openoffice on Apple's X11
Authored by: ClarkGoble on Jan 10, '03 05:34:07PM

I think they may have fixed it. There were problems with the final beta of OpenOffice. I had a version from a few weeks earlier that worked fine as well. I believe that the problem was primarily with the auto launcher. The way of starting it I mentioned should work with all versions.

To get the fonts to work properly you have to run the Fondu utility. (I just submitted a hint on doing that)



[ Reply to This | # ]
Openoffice on Apple's X11
Authored by: shawny on Jan 10, '03 07:11:44PM

Actually, no. I'm running the final beta and it works just fine with X11.



[ Reply to This | # ]
Clarifications
Authored by: MasterUltan on Jan 10, '03 12:13:23PM

Apple's X11 will check your .xinitrc file and behave exactly as it should. For example, if you have WindowMaker installed, and put 'exec wmaker' in .xinitrc, it will start up with WindowMaker as the window manager instead of quartz-wm. All of the standard files from X11 with the exception of documentation have been included. In particular, twm, a ghastly window manager. It's behavior doesn't vibe well with the finder at all, so an 'exec twm' won't show much (not even the borderless window you described).

XDarwin is not included in Apple's installation. You must've installed Apple's X11 over a previous installation of XDarwin. Be careful, some Fink packages won't compile.(Emacs)



[ Reply to This | # ]
.initrc question (was
Authored by: evildrbob on Jan 10, '03 02:25:46PM

So how can I tell where my .initrc file is? I've searched using the Finder "Find" but no .initrc file turns up - where should it be?

Yah, I'm a newbie... :)



[ Reply to This | # ]
.initrc question (was
Authored by: ClarkGoble on Jan 10, '03 05:37:13PM

It is in your home directory. And it is .xinitrc not .initrc.

Open a terminal. Type the following:

cat ~/.xinitrc

That will list what is in it. The other important file is .tcshrc and you can do pretty much the same thing to see what is in it.



[ Reply to This | # ]
.initrc question (was
Authored by: terceiro on Jan 11, '03 03:37:21AM

Yeah, but if you've installed apple's X11 as the first-ever X11R6 on your machine, you won't have an .xinitrc file in your home directory. Nor any that I can find anywhere else. So how does quartz-wm do it? Am I missing something?



[ Reply to This | # ]
.initrc question (was
Authored by: MasterUltan on Jan 13, '03 11:29:02PM

Ordinarily, an installation of X11 will check your home directory for a file called ".xinitrc" which it will then execute. Failing to find this, it will use the default version in /etc/X11/xinit/xinitrc. Apple's X11 does the first, but not the second. If it doesn't find a .xinitrc, it seems that it launches quartz-wm and an xterm, as if your .xinitrc read:

xterm &
exec quartz-wm



[ Reply to This | # ]
.initrc question
Authored by: tcwatson on Feb 19, '03 01:14:50PM

There is a default xinitrc file on this path
/usr/X11R6/lib/X11/xinit/xinitrc
This seems to be the one that is used if there is no .xinitrc in the home directory.



[ Reply to This | # ]
Apple's X11 and OpenOffice
Authored by: PeterPan on Jan 10, '03 12:34:05PM

I have to report that I have had no problems with OpenOffice.org's Lastest (final) beta, and it is especially nice to add to the Applications menu:

Name: OpenOffice
Command: sh /Applications/OpenOffice1.0.1/program/soffice

The Apple impementation is significantly faster than XDarwin and Ororborus on a G4 533.



[ Reply to This | # ]
Apple's X11 and OpenOffice
Authored by: janpeeters on Jan 10, '03 01:19:05PM

With me the latest beta for OpenOffice installs in Applications in a folder called 'OpenOffice.org1.0.1' so you might need to delete the characters .org from the installed foldername or add them to the shellcommand to get the above tip working.



[ Reply to This | # ]
No Pre-existing X11 Install
Authored by: SonicMcTails on Jan 10, '03 03:40:54PM

I removed X11 with dpkg (dpkg --remove --force-all xfree86-system xfree86-rootles) and then tryed to use this. It works, and installs, but I can't get XDarwin working (I had reinstalled manually), nor can I call up XWindows from console using xinit or startx. Anyone know a fix short of reinstall Fink's copy of X11 ?



[ Reply to This | # ]
How to reconcile Apple's X11 and fink
Authored by: urcindalo on Jan 10, '03 05:28:24PM

Why reinvent the wheel? Just take a look here:
http://fink.sourceforge.net/doc/x11/inst-xfree86.php#apple-binary

Or, if you can read spanish, I explain everything here:
http://www.macuarium.com/foro/index.php?act=ST&f=8&t=29819&s=ed3a8529c1fa1dd1e21252897174900d



[ Reply to This | # ]
Re: No Pre-existing X11 Install
Authored by: sardu_mac on Jan 10, '03 08:19:58PM
Is /usr/X11R6/bin in your $PATH ? or $path (for tcsh) startx is definitely in X11User.pkg: % lsbom -s /Library/Receipts/X11User.pkg/Contents/Archive.bom | grep -i startx ./usr/X11R6/bin/startx ./usr/X11R6/lib/X11/doc/html/startx.1.html ./usr/X11R6/man/man1/startx.1 Try typing the full path and see if that works: /usr/X11R6/bin/startx

[ Reply to This | # ]
OpenOffice Works fine
Authored by: seven5 on Jan 10, '03 06:53:40PM

OpenOffice works wonderfully for me under apples X11 distro. The final beta as well as what came out before that. The final beta runs wonderfully, and with apples x11 being so stable, its actually usable. with launching both apps you can have OpenOffice running in a matter of about 30 seconds. That was on a 733mhz g4 powermac



[ Reply to This | # ]
Commands in x11 application menu
Authored by: thespis on Jan 11, '03 01:06:22AM

With X11, I can start KDE from xterm, but cannot get it to start when I configure the Applications menu by issuing the command "/sw/bin/startkde" or anything else at this juncture. I did a default installation awhile ago of KDE via Fink, but obviously am issing the wrong command somehow or other. Any ideas here? Thanks.



[ Reply to This | # ]
Commands in x11 application menu
Authored by: ClarkGoble on Jan 12, '03 02:39:29AM

KDE is somewhat unstable under x11.app. For instance the menu across the top of the screen tends to crash when you use it. Further all the panes have Aqua menu bars whether they really ought to or not. (i.e. the KDE version fo the dock and its menu bar)

Still if you install an Aqua theme to KDE it is usable with x11.app.



[ Reply to This | # ]
Commands in x11 application menu
Authored by: LWB on Feb 20, '03 09:57:34AM

There is a 'dirty' trick to stopping the apple menu from obscuring the KDE buttons.

Simply enable the use file menu in the control panel and the file menu will appear under the apple menu bar, effectively occupying the space and allowing the KDE buttons to be used unobscured.

=)



[ Reply to This | # ]
.xinitrc and launching apps
Authored by: gsdali on Jan 11, '03 06:25:08AM
With my OroborOSX setup I set my .xinitrc so that two rxvt windows were launched with large scroll buffers. However now I've got X11 running and launching the quartz-wm fine but x11 doesn't seem to read on in the .xinitrc file. exec quartz-wm & rxvt -sl 60000 & rxvt -sl 60000 &

[ Reply to This | # ]
.xinitrc and launching apps
Authored by: MasterUltan on Jan 13, '03 11:31:54PM

The "exec" line should be last and does not need a trailing "&". The exec command essentially hands the process over to the command being "exec"-ed. Control is returned when that process finishes. In this case, your shells don't start up until AFTER the window manager is killed or quit.



[ Reply to This | # ]
Funky xserver perms and shell paths
Authored by: winsomelosesome on Jan 11, '03 09:01:29AM

OK... I have a very cludgie work-around. But first my probs.
1) opening x11 apps as a different user fails. Certain apps (like ethereal) need to run as root. In XTerm, if I su then attempt to run the app, I get an error message saying that it can not open display 0, connection refused by server.
2) This problem exists after my work-around: paths are all screwed up, my home directory maps to /var/root.

Work around:
In a terminal, I su to root, and start X11. The interesting thing is that the shell in xterm defaults back to my logged in user account (with messed up paths). to correct this, I su to myself and it corrects.

So, anybody got a real fix to enable me to launch X11 as my logged in user and be able to open apps to run as root?



[ Reply to This | # ]
SOLVED: Funky xserver perms and shell paths
Authored by: nick on Feb 11, '03 03:49:37AM

execute "xhost + localhost" before su-ing



[ Reply to This | # ]
Funky xserver perms and shell paths
Authored by: DrGraefy on Feb 20, '03 12:12:08AM

I have also noticed that X11 won't run after a different user has previously used it on the same boot, but the error has something to do with files in /tmp. if you su to root and clean out the /tmp directory, X11 will start fine. I have yet to figure out why X11 is leaving things from other users behind in /tmp.



[ Reply to This | # ]
What is X11 good for?
Authored by: MtnBiker on Jan 12, '03 09:57:45PM

From the other posts, many seem to know, but as a Mac user, but not much of a UNIX user, I'm in the dark about what X11 is and what it provides. Obviously some good things or people wouldn't be so exited about this capablility.

I hope this isn't too bad a place to post this and thanks for your patience.



[ Reply to This | # ]
What is X11 good for?
Authored by: soufle on Feb 06, '03 07:48:49PM

This is not a good place for this but since you asked ...

If I understand correctly ...

X11 is a window server which has been used on UNIX for years. Many open source apps were built on this window system (check out http://www.sourceforge.net and http://www.freshmeat.net or http://www.gnu.org). In other words, there are now MANY open source apps available to the Mac that were not available in the past since we now have BSD (UNIX?) and X11 available on a Mac.

While some of these were ported to MacOS in the past, here are some examples Gimp (Photoshop like), Ghostview (Postscript viewer), Gnuplot (data visualization), Emacs (text editor), Awk (pattern-directed scanning and processing language) and many more.

For more recent Mac porting efforts one should check out http://fink.sourceforge.net.

Some other terms you hear like tvtwm twm, mwm are window managers (control the way windows look and, to some extent, work in X11). Even more terms like Gnome or KDE are desktop environments all of which run on X windows.

Hope this helps and does not annoy the "experienced" users.



[ Reply to This | # ]
What is X11 good for?
Authored by: jackAlbright on Mar 18, '03 02:47:05PM

I don't see any reason why the guy can't ask a question here. There are all levels of users who come to this site, some with alot of unix experience, some with none. Its really not that hard to refrain from the snide comments, is it? If you don't want to answer his question, then don't. If you do, why not do it graciously?



[ Reply to This | # ]