Go Back   The macosxhints Forums > OS X Help Requests > UNIX - X11



Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 10-29-2007, 02:53 PM   #1
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
Apple's X11 and Leopard FAQs

*This is a closed thread. Please post questions and comments on threads about these topics on this forum, or start a new topic if none exists.


Apple's X11 Frequently Asked Questions in Leopard (Mac OS X 10.5)

Please go to the following link for the "Apple's X11 and Tiger FAQs"


Note:
Many of the issues in the FAQs have already been resolved in updates available on the open source Xquartz Project . Although these updates are not official Apple releases, they are a convenient way for users to stay up to date with progress made in the open source community (in which Apple is participating). Official Apple releases will come from Apple (most likely through Apple Update).

Your best bet for staying current with bugfixes is to install the latest X11 package (at the moment X11 2.3.0) released by the Xquartz project, which contains Xquartz-1.4.2-apple5, and includes many fixes outside of Xquartz. Afterwards, just install the latest binary versions of Xquartz released periodically as fixes are being made. To see the complete list of changes in release X11-2.3.0, please go here

As of 2.2.0, you do not need to have Leopard's X11 package installed (but it is alright if you do).

OS-X Requirements
OS-X 10.5.4 or later is required to install this package

Warning:
Users have reported problems with this release when using some (but not all) non-US keyboards as well as wacom tablets. If you are such a user, they recommend using the 2.2.3 version until these issues are resolved. Additionally, if you are someone experiencing such problems, please join the xquartz-dev mailing list since they apparently need more testers with these devices.

Mac OS-X Updates:
You will need to re-install this package after future OS and Security Updates delivered through Apple's Software Update.

Logout Notice:
Because they have changed the way launchd starts the server, you will need to logout after installation.


INDEX OF TOPICS (listed by post # in thread).

General Info

-1- Leopard X11 Information.
-2- Installing X11 in Leopard.


Bugs, Tips and Troubleshooting

-3- "Fullscreen" support is broken.
-4- No middle button emulation (even though X11 Preferences say so).
-5- launchd support for X11.
-6- Do not start X11.app from the Dock.
-7- The interaction of Spaces and X11 doesn't work properly.
-8- Two ways to open an xterm without starting X11.app first.
-9- Fink initial support for Mac OS X 10.5.
10- The cursor color bug on Intel Macs is still there on Leopard.
11- Multiple Displays Problem.
12- X11.app Applications menu Problem.
13- Bringing All Windows to Front.
14- Incorrect characters on Japanese keyboards.
15- About xinitrc.
16- Top Twenty Bug Reports sent to Apple about Leopard X11.
17- To run another window manager.
18- ssh X forwarding.
19- Vim.
20- "X11R6 1" directory in /usr.
21- Weird issue with X11 via launchd.
22- Updated binaries at X.Org Wiki - XDarwin. Many bugs already fixed!
23- Sluggishness of redrawing windows in Leopard X11
24- "How to bring back Tiger's X11 to Leopard"
25- To connect to a remote linux station having X-forwarding properly set up.
26- To write Platypus droplets in Leopard.
27- To change the settings of the xterm that X11 displays at startup.
28- Sources.
29. Fonts.
30- X11 and TypeIt4Me in Leopard.
31- Expose Focus Bug.
32- Updated libX11 binary -- Gimp crash fix.
33- Xnest, Xvfb and Xephyr binaries.
34- Keyboard input when starting an XDMCP session.
35- To get rid of the inital xterm.
36- Troubleshooting checklist to see if DISPLAY is set.
37- Fake fullscreen support or Fake 8-bit color mode with Xephyr.
38- MATLAB R2007a, Leopard and X11.
39- Known issues and workarounds after the binary release of Xquartz 1.2a9.
40- To disable launchd support for launching X11.
41- Apple Installer Bug.
42- Last.fm focus stealing bug
43- What to do after you messed up your X11 installation?
44- X11.app/xterm does not launch
45- If you get the error "failed to bind to surface"
46- Font size in GnuCash, Inkscape, and Gimp
47- Running MATLAB from remote machine
48- Change the default X server DPI setting

.

Last edited by sao; 08-07-2008 at 12:06 PM.
sao is offline  
Old 10-31-2007, 09:55 AM   #2
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
1- Leopard X11 Information

X11 in Leopard syncs up with Xorg 7.2. The developers switched from the XFree86 codebase (based on, IIRC, X11R6.8) to the X.org codebase (X11R7.2).

Although it temporary adds many painful bugs, it's based on a much more modern codebase and the result in the long term once the bugs are ironed out, will make X11 in Leopard great to use (porting will become easier, we will see a more "Mac-like" behaviour, a better window manager, and a more up-to-date code base).

At the X11-users mailing list, Ben Byer (CoreOS / BSD Technology Group, XDarwin maintainer) wrote a brief "history of Apple's X11.app" and a casual "Leopard X11 release notes"

.......
Extracted from a post by Apple's "Jordan K. Hubbard" at Apple's "X11-users" Mailing list:

".....Those who are somewhat preemptively demanding that "Apple should do even more" are losing sight of both that fact and an even more important one: *X.org is the keeper and primary owner of these bits, not Apple.

Anyone wishing to inspect, build and hopefully improve X.org's support for MacOSX, or any other platform X.org supports, are always more than free (nay, outright encouraged) to go to X.org's git repository and check them out. *Ben (Byer) has even helpfully checked the Leopard support in on a branch as well as merging that same support into Top Of Tree, where it is*currently and*unfortunately somewhat less than functional due to other changes the X.org developers have made there. * Version skew is an engineering fact of life so there's not even any implicit blame in that statement, it's merely a statement of fact. * It's also a tacit reinforcement of my earlier statement that Apple does not own or exert significant control over the X.org bits and I doubt that anyone would wish to change that fact, least of all Apple. *It does, however, mean that you're all far more in control of your own "x11 destinies" than you might think and equating X11 to something like, say, Quartz in terms of setting support expectations would just be silly. *Apple bundles X11, Apple contributes what engineering resources it can to the X.org project, that's the long and short of it.

I also realize that this is a mailing list devoted to users of X11 and users by almost categorical definition are somewhat demanding. *That's fine. *We're all used to that and, as engineers of any stripe, are genuinely happy to see users using our stuff (without which there wouldn't be much point to it). * I only hope that those developers also lurking on this list will get the not-at-all-subtle point I'm trying to make about how to really advance the cause of X11 on MacOSX or any other platform for that matter. * X.org has some lofty goals, the loftiest of which may be X12 (see*http://www.x.org/wiki/Development/X12), and they're not going to get there on MacOSX or any other platform without significant community involvement. *That's you. :-)"

- Jordan

...................................


To all developers out there, please get involved, be brave and start submitting the first patches!
(Note from sao)


.

Last edited by sao; 11-02-2007 at 08:31 AM.
sao is offline  
Old 10-31-2007, 09:56 AM   #3
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
2- Installing X11 in Leopard

Apple's X11 in Leopard now installs by default. You can choose not to install it by clicking customize during the Leopard installation process and deselect it before installing.
sao is offline  
Old 10-31-2007, 09:58 AM   #4
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
3- "Fullscreen" support is broken

At the moment "fullscreen" support in Leopard's X11 is broken.

------------------------
Extracted from a post by Apple's "Ben Byer" at Apple's "X11-users" Mailing list:

..."Put bluntly: Fullscreen mode won't happen if I'm the one that has to write the code. Why?

X11 is a complicated beast. The people who wrote the fullscreen and rootless code in the Tiger X11.app had years of experience in graphics- related coding -- I had very little before I started working on Xquartz a year ago. My team focuses more on things like perl, tcl, top, apache, launchd, etc. However, we have more experience with dealing with the open-source community, so my team agreed to take on responsibility for most of X11.app so that we could try to integrate back with X.org and get where we are today. (BTW, that did not include quartz-wm and libXplugin.)

I spent at least a month trying to hack fullscreen support back into the X.org codebase, and a couple of my teammates tried, too. We failed. If I hadn't spent that time on fullscreen, I probably would have been able to fix most of the issues I've fixed in these patches over the past three days, but hindsight is 20/20 and it seemed like a higher priority, since that was the most common complaint we received during Leopard's development.

Given another six months, I could probably learn enough to make this work. Maybe. On the other hand, the people who are really into "this graphics stuff" would probably be able to get something working with a weekend of work. Those people are out there -- I know some of them are even reading this, right now, and they know who they are. This message is partially to them.

To the rest of you who would like to help -- dive in! The only difference between me and the other developers here, in terms of ability to contribute to X11 on the Mac, is that I've spent slightly more time banging my head against the wall, and I've gotten paid for it -- but that doesn't automatically translate into our ability to fix every bug.

I'd rather spend my time doing things that only I can do -- merging patches to X.org git. Trying to push patches out in Software Updates. Lobbying for better interfaces. Sorting through Radar bug reports. Coordinating efforts to improve integration. Meeting with the Spaces folks to figure out those bugs."

Ben Byer
CoreOS / BSD Technology Group, XDarwin maintainer

------------------------

If you really need this functionality Apple developers let us know that we should be able to use in Leopard the X11 package from Tiger instead.

If you have a copy of Tiger's X11 (you can download Tiger's X11 Update 2006 from here ), please read:

"Bring Back Tiger's X11 to Leopard in 3 Steps"
or
easier instructions to install Tiger's X11.app

---------------------

For the moment, another possibility would be to fake fullscreen support with Xephyr. Please read:
#37- Fake fullscreen support or Fake 8-bit color mode with Xephyr.

---------------------

.

Last edited by sao; 11-12-2007 at 09:20 AM.
sao is offline  
Old 10-31-2007, 10:02 AM   #5
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
4- No middle button emulation (even though X11 Preferences say so)

No middle button emulation (and no tablet support yet). If it's any consolation we can say that it does work with a 3-button mouse.

Already fixed in the updated Xquartz binaries 1.2a3.
"fake mouse button support" -- e.g. Option-click to middle-click

.

Last edited by sao; 11-07-2007 at 09:19 AM.
sao is offline  
Old 10-31-2007, 10:06 AM   #6
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
5- launchd support for X11

(Thanks to Ben Byer)

"New launch-on-demand support, courtesy of launchd. If you start a program that tries to open your X $DISPLAY, launchd will check to see if X11.app is running. If not, it will automatically start it for you.

The only situation where you should need to manually start X11.app is if you are only running remote X11 applications. So on Leopard, just run a command like xterm or start an application that needs X11, and X11 will start up automatically".

"In brief, don't run X11.app from the Dock. Or, at all, manually. Ensure that you are not explicitly setting $DISPLAY in any configuration files, verify that 'echo $DISPLAY' in Terminal.app reports something that starts with '/tmp/launchd', and then just run 'xterm &' from Terminal. This will work with any X11 client application that links with the standard libX11.dylib."

.

Last edited by sao; 11-11-2007 at 06:54 AM.
sao is offline  
Old 10-31-2007, 10:08 AM   #7
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
6- Do not start X11.app from the Dock.

It will do strange things, like a weird double X11 icon with one bouncing endlessly and eventually ending up with Application not Responding.

The strange behavior with X11 and the dock in Leopard is a known issue by Apple. The workaround is to not put X11.app in the dock. In Leopard, X11.app will automatically launch whenever you try to open an X11 application, so just directly run your application.

The /Application/Utilities/X11.app on Leopard is in reality just a little wrapper around the command:

/usr/bin/login -fp $USER /usr/X11/bin/xterm

Starting xterm then triggers the startup of the the real server, which is now located at /usr/X11/X11.app.
sao is offline  
Old 10-31-2007, 10:10 AM   #8
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
7- The interaction of Spaces and X11 doesn't work properly.

Getting xterm windows to spread over several Spaces buffers makes you cross-eyed at best.

X11 windows don't focus, freeze up, start frozen.

If you have an xterm on each of your 4 Spaces desktops, then when you go to Desktop 2, 3 or 4 and click in the xterm found there in order to try to get focus, instead of getting focus it switches you back to desktop 1.

One way that works to place focus safely is by selecting the right window with <cmd>+arrow key.

-----------------------

Fixes in the updated Xquartz binaries 1.2a7:
The "offset-pointer"/"ghost window" bug with Spaces has been resolved correctly. This means you can now use the F8 function to zoom out and drag a window from one Space to another with your mouse. Unfortunately, due to a known issue in Spaces itself, you can not drag X11 windows to the edge of the screen to move them to the next screen.

-----------------------

Last edited by sao; 11-07-2007 at 09:46 AM.
sao is offline  
Old 10-31-2007, 10:12 AM   #9
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
8- Two ways to open an xterm without starting X11.app first

(Thanks to Martin Costabel)

a. Open a Terminal.app window and type "xterm" at the command prompt.
b. Open /usr/X11/bin in the Finder and double-click on the xterm icon.
sao is offline  
Old 10-31-2007, 10:14 AM   #10
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
9- Fink initial support for Mac OS X 10.5

If you're using Fink, you will be happy to know that the Fink Project announced their initial support for Mac OS X 10.5.

To update Fink from 10.4 to 10.5 or to do a fresh Fink install in Leopard, follow the instructions at the "Fink Homepage"

Fink users who want to update their Leopard "X11" installation can download and install the "X11-2.1.2 package" released by the Xquartz Project. Those users who previously have applied the X11-2.1.0.1.pkg and/or the patched "Xquartz-1.3.0-apple-fink" file from the Xquartz Project, should upgrade to the "X11-2.1.1 package" or greater for Fink to work properly. This release supercedes all previous releases, including the fink-specific Xquartz.

.

Last edited by sao; 04-21-2008 at 12:47 PM.
sao is offline  
Old 10-31-2007, 10:16 AM   #11
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
10- The cursor color bug on Intel Macs is still there on Leopard

.
The "fix" that worked in Tiger doesn't work in Leopard, as the patch was inadvertently lost when changing codebase.


**Already solved in the new binary and source releases available at the:

Xquartz Project

(Note: if by mistake you installed the Tiger fix in Leopard, installing the new XQuartz will solve the problem)

.

Last edited by sao; 05-07-2008 at 12:42 PM.
sao is offline  
Old 10-31-2007, 10:17 AM   #12
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
11- Multiple Displays Problem

Cannot drag any X11 app from a primary display to the secondary display.
It seems the window itself is able to cross the boundary, but the mouse pointer is not.

One way that works is by going to System Preferences|Displays and moving the menu bar to the display on which you want X11 apps to appear.

Last edited by sao; 11-02-2007 at 11:44 AM.
sao is offline  
Old 10-31-2007, 10:19 AM   #13
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
12- X11.app Applications menu Problem.

Customizations in the Applications menu are no longer working.
(The best solution is to directly run your commands from Terminal.app; X11.app will automatically be launched)


Already fixed in the updated Xquartz binaries 1.2a3.
Custom entries in the Applications menu now work.

.

Last edited by sao; 11-07-2007 at 09:24 AM.
sao is offline  
Old 10-31-2007, 10:20 AM   #14
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
13- Bringing All Windows to Front

The new Leopard X11 doesn't bring all the X windows to the front when switching to the X11 application, either by clicking on the icon on the Dock or by command-tab switching.

Same bug happened when Tiger first came out, it was introduced in 10.4.0 and then fixed in 10.4.3 but it seems to be back in 10.5.

Try clicking on the X11 icon twice.
sao is offline  
Old 10-31-2007, 10:21 AM   #15
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
14- Incorrect characters on Japanese keyboards.

Can't type special signs like +, =, @, with the keyboard in a X11 application. It outputs something else.

Already fixed in the updated Xquartz binaries 1.2a7.. JIS (Japanese) keyboards are now correctly detected by X11.

.

Last edited by sao; 11-07-2007 at 09:17 AM.
sao is offline  
Old 10-31-2007, 02:48 PM   #16
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
15- About xinitrc

Extracted from a post by Ben Byer to Apple Discussions (Topic: X11 and Terminal.app)

"The location of the system xinitrc was changed (to match other X.org distributions on other platforms), and we removed xterm from that file. (Explanation below)

Because the X11.app in /Applications/Utilities is "fake" -- it's a "launcher", and by default it launches xterm. Why?

The biggest user-visible change in X11.app is the new launch-on-demand support, courtesy of launchd. If you start a program that tries to open your X $DISPLAY, launchd will check to see if X11.app is running. If not, it will automatically start it for you.

I understand this is quite different from the way it worked in Tiger. If you have become accustomed to launching X11.app at the start of your day so that you can then later run X apps, just simply don't do that. You now can just run X apps like you would any other app.

Unfortunately, this has some ... "quirky" side effects.

1. /usr/X11/lib/X11/xinit/xinitrc (or ~/.xinitrc) will be run when X11.app is started -- which is to say, immediately after you run your first X app. If we'd left the xterm invocation in there, then you would have had an extra xterm start every time you tried to run another X app.

2. The launch-on-demand functionality only works correctly if X11.app is launched on demand. On a stock, non-customized Tiger system, if you double-clicked on /Apps/Utils/X11.app, you'd get an xterm. The same happens on Leopard, but it happens because it just runs xterm itself, which causes X11.app to be launched indirectly. You can change which app is run by editing that org.x.X11_launcher.plist, but if you have a specific setup you like to have, you'd be best off just writing a script that ran the individual X apps, and let the system take care of the rest."

---------------------------------

You should be able to just run /usr/X11/X11.app instead of /Apps/Utils/ X11.app. It's hidden away because if you launch it manually, the launch-on-demand functionality won't work -- but if that doesn't bother you, that's the way to go.

---------------------------------

Last edited by sao; 11-06-2007 at 04:34 AM.
sao is offline  
Old 11-01-2007, 02:06 AM   #17
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
16- Top Twenty Bug Reports sent to Apple about Leopard X11

Ben Byer, posted at the X11-users mailing list the top twenty bug reports about X11 received by Apple so far:

Note:
Most of the following bugs have already been fixed
in the updated "X11-2.3.0 package" released by the Xquartz Project.
To download and see the list of changes in release X11-2.3.0, please go here .
(Mac OS X 10.5.4 or later is required to install the X11-2.3.0 package)

------------------------------------------------------------------

---"Just for fun, here are the top twenty bug reports we've received about X11:

#reports Radar # regression? fix id'd? title
15 5197292 yes yes I can't drag X11 windows between displays
15 5235232 yes no Launching X11.app from dock results in two X11 dock entries
11 4893425 yes no X11 fullscreen mode doesn't work
10 5266072 yes partial Can't paste into an xterm with emulated buttons
9 5299179 yes yes X11 windows can be dragged under MenuBar
8 5405131 yes yes X11.app: customized commands (with args) in Applications menu don't work
7 4145630 no no Cut and paste in X11 is unreliable
7 4377346 no no GLX: X11 server not reporting pbuffer support
6 3584951 maybe? no X11 does not support international keyboards
5 5513687 yes no X11 window does not come to top on activation
4 5564069 yes yes Yellow cursor on Intel Macs under X11.app 2.0 - X.org X11R7.2.
3 4768279 no no GLX: Missing multisampled visuals in X11 server
3 5289578 yes no X11 menu bar uncoupled from X11 application's windows
3 5296794 no no X11.app: Items in Customize... window messy when resized
3 5564366 n/a no Clicking on X11 window takes me to wrong Space
2 5517966 n/a no Spaces does not take me to correct desktop when I click on X11 icon
2 5564271 n/a no Cannot drag X11 windows to other spaces (via edge of screen)
2 5517854 Spaces: pointer offset is wrong after dragging X windows between spaces
2 5567479 yes no JIS keyboard mapping is not recognized in X11
2 4732016 n/a no implement tablet pressure support in XDarwin/XInput
2 5289553 yes no X11 menu bar doesn't appear immediately up launching X11 application

Just because a bug is here doesn't mean you shouldn't report it if it is bothering you, although if you reference the Radar # above ("This might be a duplicate of Radar #xxxx") it will save me a little bit of time.

This should hopefully go without saying, but these are the bugs that are *unresolved*, and also only the bugs that concern the X11 server (Xquartz) proper." ---

Ben Byer
CoreOS / BSD Technology Group, XDarwin maintainer

------------------------------------------------------------------

Note added by sao:
The more bugs reports that Apple receives on the same issue will make Apple give higher priority to fix that particular bug. You will get a note back saying this is a duplicate of a known issue, but your vote will be counted.

Please send your bug reports to "bugreport.apple.com"

------

Last edited by sao; 08-04-2008 at 11:36 AM.
sao is offline  
Old 11-01-2007, 05:45 AM   #18
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
17- To run another window manager

Replace the call to quartz-wm in /usr/X11/lib/X11/xinit/xinitrc to change this for all users, or set up a custom ~/.xinitrc.
sao is offline  
Old 11-01-2007, 05:47 AM   #19
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
18- ssh X forwarding

If you're using ssh X forwarding, you shouldn't need to run "xhost +" first. If you just run ssh -X ... from Terminal

You don't need to set DISPLAY variable in dot-rc file or Environment.plist (setting DISPLAY in your environment will throw away the location of the launchd socket that X clients need to know how to use).

And "ssh -Y" works well between Macs running Leopard or Tiger either way, or from a Mac/Leopard to Linux. No difference to Tiger, except that "you don't need to set DISPLAY (your DISPLAY will automatically be set on the remote host) nor start X11.app."

.

Last edited by sao; 11-06-2007 at 04:40 AM.
sao is offline  
Old 11-01-2007, 06:11 AM   #20
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
19- Vim

If you don't want X11 to launch whenever you start Vim in a terminal: either alias "vim" to "vim -X" or remove vim and install a version built without X. If you use Fink, you can install the package vim-nox.
sao is offline  
Closed Thread

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 12:08 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.