Fink & Apple's X11

      / X11 v0.3 FAQs /


- The Macosxhints Forums -


Apple's X11 v0.3
Frequently Asked Questions


This page was written while testing Apple's X11 Beta version.

Contents

Download Apple's X11 Public Beta v0.3
What's New in X11 Public Beta 3
Apple's FAQs for X11 Public Beta v0.3
Fink and Apple's X11 v.03
KDE 3.1 in Fink Stable and Apple's X11
Pseudocolor (8-bit) visual plane support
xman from Apple's X11 v.03
Howto: Seamless Postscript printing
Trouble launching OOo with Apple's X11
OpenOffice + Fink + dlcompat libraries
To get xterm to support scrollback while in "screen"
If you are using Fink installed KDE and Apple's X11
Installing Matlab on Mac OS X With Apple's X11
To start OOo with Apple's X11
To activate the "font menu" in xterm
Application to launch gv in Finder
To download and compile X11-wwdc(v1.0) source code
Latest Apple Developer Tools update and Fink
To install OpenOffice with Apple's X11 and Fink installed







Download Apple's X11 Public Beta v0.3 and SDK

1- You can download Apple's third public beta for X11 (41.7MB) at:

Get X11 for Mac OS X Public Beta 3

"This third beta is available as a free download for anyone using Mac OS X 10.2.x. It contains a wide range of bug fixes and feature enhancements"


2- Install the X11 for Mac OS X Public Beta "SDK" (4.0MB)

"The optional software developer's kit contains headers and other support files for X11 Beta 3, enabling you to compile your own X11 applications. All SDK users should upgrade to this new version".

The download link is at the bottom-right of the same page as above:

Get X11 for Mac OS X Public Beta "SDK"





What's New in X11 Public Beta 3

Changes in Beta 3:

Added Pseudocolor (8-bit) visual plane support so applications requiring 8 bit support should find the visuals by default. You can also add " -depth 8 " (see Xquartz man page) when starting the X Server if you want to run it only in 8 bit mode, which is unrecommended as OpenGL support is not available in 8 bit mode.

Added an option to quit X11 without presenting warning dialog:
" defaults write com.apple.x11 no_quit_alert true "
See man page for Xquartz for more details.

Added Command-Q keyboard shortcut to quit X11. Can be disabled from preferences.

Added Command-, to bring up preferences dialog. Can be disabled from preferences.

Added customization of fake buttons while emulating mouse. See man page for Xquartz for more details.

Fixed problems with dead keys on certain keyboard mappings.

OpenGL: Fixed problem with linking against libGL resulting in multiple definitions of glGetColorTableEXT.

Fixed problem where non-admin users could not start X11 because lock files were being left behind in /tmp.

Fixed problem where quartz-wm lost ConfigureNotify events.

Fixed problem so that windows can be resized by user to any size and not be limited by the Dock's height.

Fixed window focus problem when un-minimizing X11 windows from the Dock.

Fixed a crash that could occur when dragging remotely hosted windows.

Dialog windows can now be resized.

Fixed a problem with hardware accelerated scrolling in 16 bit mode.

Fixed a bug where emulated middle-button-raise fails when Alt/option is not Mode_Switch.

Fixed a bug where cursor would jump on multiple monitor systems if application tried to manage the cursor's position.

Fixed a bug that crashes the X Server if application tried to retrieve data back from the framebuffer using XGetImage.

Fixed a bug when quitting from the Dock that would result in the Quit Dialog being presented behind the current application.

Fixed a bug where windows are created offscreen if (0,0) maps to an offscreen location.

Fixed a bug with undecorated and modal windows having a titlebar because the window manager hints were not being interpreted correctly.





Apple's FAQs for X11 Public Beta v0.3

The official "Apple's X11 for MacOS X PB v0.3 FAQs" are here:

Official FAQs for Apple's X11 PB v3





Fink and Apple's X11 v.03

At the Fink site they recommend that all Fink users who are using Apple X11 upgrade to version 0.3. After installing Apple's X11 beta v0.3 you need to install with Fink system-xfree86-4.2-11 or higher.

"It fixes a number of bugs including a few that can cause problems with building Fink packages. It is recommended that all Fink users who are using Apple X11 upgrade. A new version of the system-xfree86 package has been released that takes the new Apple X11 v0.3 into account".

The Fink package system-xfree86-4.2-11 has been committed to stable, so you should be able to do a:

sudo apt-get update
sudo apt-get install system-xfree86


Or, if you have the December 2002 Apple Developer Tools installed you can run:

fink selfupdate-cvs
fink install system-xfree86






KDE 3.1 in Fink Stable and Apple's X11

KDE 3.1 is now in Fink stable.

"Improvements over 3.1 beta1 include an updated audio driver, faster startup times, cleaned up fink package info, support for Apple X11's window manager, and manybugfixes. Binary packages will be available in the next Fink binary distribution release".

Apple X11 Support:

'startkde' now detects if you have Apple's quartz-wm (from the Apple X11 release), and runs with it instead of kwin if available. If you don't want to use Apple's window manager, you can get the old behaviour by putting:

export KDEWM=kwin

in your ~/.xinitrc file before the startkde line.





Pseudocolor (8-bit) visual plane support

(Thanks to John Harper and Toshimitsu Tanaka)

It means that starting the server with "-depth 8" will only create a PseudoColor visual, normally you get the TrueColor visuals plus a single PseudoColor visual that can be used by applications that want it.

To use it, try the following command from terminal:

/Applications/X11.app/Contents/MacOS/X11 -depth 8





xman from Apple's X11 v.03

(Thanks to Martin Costabel)

xman is an X11 program that provides a gui interface to the manpages.

If you want to use xman from Apple's X11, you have to run:

setenv GROFF_TYPESETTER latin1

before starting xman.

Because Apple's xman has a bug which it's still not yet fixed.

To start it, type in an xterm window:

xman &





Howto: Seamless Postscript printing

By Eric Dahlman at the x11-users mailing list

"A while back there was some talk about how to make X11 applications easily print under Jaguar and I promised to send on my solution. I got a free second so here it is.

The problem with printing Postscript is that the printing system (CUPS) does not know how to convert a Postscript document into a PDF which is what many OSX print drivers take as input. So I wrote a little filter that uses ps2pdf from Ghostscript and the configuration file to tell the printing system how to use it. Once the filter is installed then you can send Postscript to lpr and print to your hearts content.

This is particularly nice because there is no need to install the gimp-print printer drivers an you can just use the drivers you have currently working on your printer".

You can grab the two little files you need and the directions from:

Printing Postscript via lpr on Jaguar





Trouble launching OOo with Apple's X11

At the "OOo - Testing -Mac OS X forums" at the thread "Trouble launching OOo with Apple's X11", they report several problems:

Trouble launching OOo with Apple's X11

"From the crashlogs above, it appears that the crash *may* be related to changes in their OpenGL implementation. What may help is removing any of the X11 OpenGL libraries in /usr/X11R6/lib. When using Apple X11, /usr/X11R6/lib must *not* be contained in the path as loading or attempting to load the GL libraries from that directory will fail. They unfortunately have the same names as the OpenGL.framework libraries against which OpenOffice.org is linked".

And

"Some problems seem to related to...
* Locale (NULL)
* Java versions (1.3.3 vs 1.4.1)
* Installer graphics (jpg vs gif)
Of course, it doesn't help that several people have reported 'spontaneous recovery' after reboots etc. Well, it does help them but it makes figuring out what went wrong a little tougher "

And regarding,

* Installer graphics (jpg vs gif) :
"apparently on some systems those premature end of JPEG messages may be related to the installer crashes. I've never had a problem on my system (latest Java VM 1.3.1/1.4.1 and QT6), but others have. Interestingly enough, if the JPEG based installer is run off the 1.4.1 VM on my system, it segfaults inside of code that parses the JPEGS in the VM (very bad, very bad) but it doesn't crash under 1.3.1, only barfs up those messages from the console. So even if it seems to be harmless on my box, it may be wise to replace them in order to work around a potentially very serious bug in the JVM".

One post advices that people having weird problems like this, should back up important data, do a clean install of Mac OS X 10.2.x, apply any Mac OS X updates, install OOo and X11.app, and if things work, then start modifying the environment, restoring applications and data etc.





OpenOffice + Fink + dlcompat libraries

OOo wants you to have dlcompat libraries in /usr/local/lib.

Make links in /usr/local/lib to your fink-installed dlcompat libraries, otherwise your fink installation will stop working. This seems to work fine.





To get xterm to support scrollback while in "screen"

(Thanks to David Brown)

This problem is with screen and not with xterm.

Add a line such as the following to you ~/.screenrc:

# Do not use xterms alternate window buffer
# (won't add lines to scrollback bfr)
termcapinfo xterm|xterms|xs|xterm-color ti=\E7\E[?471





If you are using Fink installed KDE and Apple's X11

On April 10, Benjamin Reed posted the following at the 'fink-announce' mailing list:

KDE Security Advisory

Overview

KDE uses Ghostscript software for processing of PostScript (PS) and PDF files in a way that allows for the execution of arbitrary commands that can be contained in such files.

An attacker can prepare a malicious PostScript or PDF file which will provide the attacker with access to the victim's account and privileges when the victim opens this malicious file for viewing or when the victim browses a directory containing such malicious file and has file previews enabled.

An attacker can provide malicious files remotely to a victim in an e-mail, as part of a webpage, via an ftp server and possible other means.

More specifics can be found in the KDE security advisory at:

KDE.org


Solution

Updated packages for kdelibs, kdebase, and kdegraphics have been checked into Fink unstable:

kdelibs3-ssl-3.1.1-6
kdebase3-ssl-3.1.1-6
kdelibs3-3.1.1-6
kdebase3-3.1.1-6
kdegraphics3-3.1.1-5

All users of the unstable tree are encouraged to upgrade as soon as possible. After an initial smoke test, the KDE 3.1.1 packages will be moved to stable tomorrow, the morning of the 11th (EST). New binaries will be built as soon as possible, most likely within the next two weeks.

Users of the stable tree are encouraged to update as soon as these packages are available to help find any remaining problems that might come up so that we can get binaries built.

Users of the unstable tree can update immediately by running:

fink selfupdate-cvs; fink update-all

Users of the stable tree will be able to update tomorrow morning after 10:00 EST.





Installing Matlab on Mac OS X With Apple's X11

Nathaniel Grady's has written some notes on "Installing Matlab on Mac OS X with Apple's X11". You can read the notes at the following link:

Notes on Installing Matlab





To start OOo with Apple's X11

Thanks to Richard Gill

To get OOo to work (I have Apple's X11): one must start up the program from the command line (not from the launcher supplied by OOo). You follow OOo's instructions (which flash by on your screen at the end of installation), but you must remove /usr/X11R6/lib from the path for dynamic libraries.

So it goes like this:

setenv DISPLAY localhost:0
setenv DYLD_LIBRARY_PATH ###in one line with the next line
/Applications/OpenOffice.org1.0.1/program:/Applications/OpenOffice.org1.0.1
/program/filter
cd /Applications/OpenOffice.org1.0.1/program
sh soffice

I wrote a little unix script:

#!/bin/tcsh
setenv DISPLAY localhost:0
setenv DYLD_LIBRARY_PATH ###in one line with the next line
/Applications/OpenOffice.org1.0.1/program:/Applications/OpenOffice.org1.0.1
/program/filter
cd /Applications/OpenOffice.org1.0.1/program
sh soffice

This is saved in a file which is in my $PATH and made executable by doing chmod +x . Call it myoffice, say. Then I can put it in Apple's X11 "Applications" menu, as well as calling it from the command line.





To activate the "font menu" in xterm

Thanks to David McNett

"Ctrl-Apple-Click on the xterm window. (Assuming default mouse button configuration). xterm contains a variety of menus similar to the font menu, all accessable through a variety of chorded clicks (or alternate button clicks if you've got a multibutton mouse)"





Application to launch gv in Finder

Kazuhumi Murakami has made a small application called "Open GV.app" to launch gv in Finder. It launches gv and preview a postscript file with double-clicking in Finder.

It requires OSX 10.2.6, X11 and gv and you can download it from:

Open GV.app





To download and compile X11-wwdc(v1.0) source code

(Thanks to Toshimitsu Tanaka)

1.
Download X11-wwdc source code from:
developer.apple.com


2.
Get Xplugin.h and install as /usr/include/ Xplugin.h.
Read the followining post at:
x11-users list

(Also, Torrey T. Lyons informed that the current Xplugin.h is now checked into XFree86 CVS in xc/programs/Xserver/hw/darwin/quartz/xpr)


3.Create the symlink /usr/lib/libXplugin.dylib->libXplugin.1.0.dylib.
Read the followining post at:
x11-users list


4.
% tar xzf X11ForMacOSXSource-wwdc.tar.gz
% cd X11ForMacOSXSource-wwdc/xc


5.
% make World
% sudo make install
% sudo make install.man



6.
Launch /Applications/Utilities/X11.app.


Important: You cannot use quartz-wm with X11 v1.0 in Jaguar. It's just not open-source so it's not available to those who are building it themselves from source on jaguar. X11 v1.0 final does have quartz-wm, on panther .

So, in Jaguar to use X11-wwdc, you will have to install another window manager, like oroborus, blackbox, etc...

If you follow these instructions carefully, what you will get is a clean build in MacOSX v10.2.6 of X11 v1.0 and XFree86 v4.3.0 from the source you downloaded in "X11ForMacOSXSource-wwdc.tar.gz"

And, in the X11 "About box" you will read the inscription "X11 1.0 - XFree86 4.3.0"

Note: Be aware that Fink does not recognize this X11 installation at the moment, since it is based on XFree86 4.3 rather than XFree86 4.2.x. Fink's "system-xfree86" packages assumes that your non-Fink install of X11 was based on 4.2.x. I believe there is already a *not fully tested* system-xfree86 package in fink's CVS repository which might work with the self-compiled X11.

News 8/18/03: (Thanks to Benjamin Reed and Martin Costabel)
Benjamin Reed has committed to Fink unstable branch a new version of the system-xfree86 package. system-xfree86 is now a placeholder for the placeholder which depends on either system-xfree86-42 or system-xfree86-43.

This new package system-xfree86 in "unstable" works well for a first time install of Fink with an installation from source of Apple's X11-wwdc (v1.0).

Just enable "unstable" in the /sw/etc/fink.conf file by adding: unstable/main unstable/crypto to the beginning of the Trees: line and after run the command 'fink index'. Then run 'fink selfupdate-cvs' till you see the package, then run 'fink install system-xfree86'

It doesn't work for an update. To make it work for an update you have to use force (and dpkg) to install the update. Either:

sudo dpkg -r --force-depends system-xfree86
fink install system-xfree86


or

sudo dpkg -i --force-all
/sw/fink/dists/unstable/main/binary-darwin-powerpc
/x11-system/system-xfree86-42_4.2-1_darwin-powerpc.deb

(all in one line)
Then run:
fink install system-xfree86

Don't try the update remotely via ssh while you are not logged in at the console because it will hang.


FinkCommander:
If you're using FinkCommander, you can select system-xfree86, use Source->Force Remove, then reselect it and use Source->Install.





Latest Apple Developer Tools Update and Fink

If you use Fink to install packages in Apple's X11, be aware that Fink won't work with the latest Apple Developer Tools version (2003-06-26). Fink does not yet support compiling with gcc 3.3.

It is recommended that if you update your Developer Tools with the new patch, you should be careful to run sudo gcc_select 3 prior to any "fink build" or "fink install" commands.

Or, if you want to remove the updated Dev Tools to reinstall Apple's Dec 2002 Developer Tools tools on a clean system, there should be a Perl script called /Developer/Tools/uninstall-devtools.pl. If you run this, that should clear everything out, and then you can reinstall.





To install OpenOffice with Apple's X11 and Fink installed

1- Install OpenOffice, it will try to install its own version of dlcompat, so in order that it doesn't make your Fink installation completely dysfunctional, you'll need to do the following:

For dlcompat:
sudo ln -s /sw/lib/libdl.0.dylib /usr/local/lib/libdl.0.dylib
sudo ln -s /usr/local/lib/libdl.0.dylib /usr/local/lib/libdl.dylib


And similarly for fondu:
sudo ln -s /sw/bin/fondu /usr/local/bin/fondu

2- Install gimp-print and esp-ghostscript (these are installed into the /usr/local tree) with the packages from:

gimp-print.sourceforge.net

OpenOffice looks for libfreetype in /usr/X11R6/lib, so there is no need to symlink it in /usr/local/lib; the freetype libraries in /usr/X11R6/lib are installed by X11.










astronaut / Make Contact /
drop me a line at:           sao1@mac.com

MacOS X,    Fink,    X11,    Unix       ...and other related things