Fink & Apple's X11

      / X11 v0.2 FAQs /


- The Macosxhints Forums -


Apple's X11 v0.2
Frequently Asked Questions


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

Contents

Upgrading to Apple's X11 Public Beta v0.2
Official Apple's FAQs for X11 Public Beta v0.2
What's New in Apple's X11 v0.2
Launch of twm instead of Aqua Quartz Window Manager issue
What does the "option for no-click-to-focus" do?
Fink Script to fix the library issues in Apple's X11
X11 v0.2 crashing on launch
About x11 Extensions
Keyboard shortcut to quit X11
To keep your .dmg files
Custom Xmodmap files
Windows not refocusing with WindowMaker - Codetek?
If the 'nph-x11.hqx' file doesn't expand
X11 for Mac OS X Beta 0.2.1 released
If you installed both, Apple's X11 and XDarwin
Print from X11 applications using "lp"
Configure a three-button mouse to work with X11.app
KDE window opens with it's title bar underneath X11's menu bar
X11, Fonts, and OpenOffice
More on OpenOffice
AppleScript to launch Apple's X11 and The Gimp
Printing from Abiword







Upgrading to Apple's X11 Public Beta 0.2

1-Download 'X11 for Mac OS X Public Beta v0.2'(41.8MB)

2- Download and Reinstall 'X11 for Mac OS X Public Beta SDK' (3.9MB)


Download Apple's X11 and SDK





Official Apple's FAQs for X11 Public Beta v0.2

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

Apple's X11 v0.2 FAQs

To access the FAQs,

Subscribe to x11-users discussion list





What's New in Apple's X11 v0.2

Support for Gnome, KDE hints

Application windows now cascade instead of piling on top of each if they do not have an explicit placement policy

Added /usr/include/X11 and /usr/lib/X11 symlinks

Menu in the Dock now shows a list of X11 windows.

Support for Copy & Paste working with other window managers.

No-click-to-focus option : defaults write com.apple.x11 wm_ffm true

Support for move window events from CodeTek's VirtualDesktop.

Support to respect the Mac OS X's International keyboard mapping.

Keymappings from /System/Library/Keyboards.

Support for -iconic. E.g. xterm -iconic now puts the xterm into the Dock on launch.

New preference options to control xauth usage

Bug fixes and other feature enhancements.





Launch of twm instead of Aqua Quartz Window Manager issue

(By Haroon Sheikh at Apple's x11-users list)

"If you install Beta 2 on top of an existing install of X11 for Mac OS X, then you may notice that your window manager is twm instead of quartz-wm. This happens because Beta 2 now uses /etc/X11/xinit/xinitrc if a .xinitrc is not present in your home directory.

By default, the X11 installer does not install the 'X11 Config' package by default, if /etc/X11 is already present, because people may have customized their /etc/X11 configs.

If you select the 'X11 Config' package by customizing the installation, then your existing /etc/X11 directory is backed up as X11.AppleBackup and a new /etc/X11 is installed".


Workarounds:

- Select the X11 Config package by customizing the installation. By default this package is not installed and it contains the new /etc/X11/xinit/xinitrc that launches quartz-wm

- Modify /etc/X11/xinit/xinitrc to launch quartz-wm instead of twm.

- Add a ~/.xinitrc file to launch your xterm and the quartz-wm window manager.

- Do a clean install, i.e. wipe out the previous install of X11 and then install Beta 2 on top. To just fix this problem, you can also move aside /etc/X11 elsewhere before installing Beta 2.

You can uninstall the previous version by deleting (or moving aside) the following files:

sudo rm -rf /Applications/X11.app /usr/bin/open-x11 /private/etc/X11 /usr/X11R6 /Library/Receipts/X11* /usr/include/X11 /usr/lib/X11





What does the "option for no-click-to-focus" do?

"This option allows you to focus an X11 window by just moving the mouse to the window. This is different than the rest of the Aqua UI behavior where you have to click in the window to focus the window".

How do we activate the option?

To enable it, enter the following from an xterm (with out the quotes) and relaunch X11:

"defaults write com.apple.x11 wm_ffm true"

Make sure you write:

wm_ffm

(ffm = focus-follows-mouse)

This adds the wm_ffm key to the

~/Library/Preferences/com.apple.x11.plist

To undo it, enter:

defaults write com.apple.x11 delete wm_ffm





Fink Script to fix the library issues in Apple's X11

The script is not needed anymore with version 0.2 of Apple's X11.app





X11 0.2 crashing on launch

If it's installed, try by disabling the Unsanity "Application Enhancer" hack or exclude X11.app from the FruitMenu Application Enhancer module.





About x11 Extension

It provides a handy tool that allows you to switch between sessions like gnome and KDE, and window managers (icvewm, enlightenment, fvwm, fvwm2, blackbox, wmaker etc) and it has a drop down that lets you select these.

It also comes with some fink scripts for installing these windows managers (also gnome, KDE). And it has a check box which lets you turn on/off quartz-wm.

X11 Extension Web site





Keyboard shortcut to quit X11

Thanks to Michele Garoche (michele.garoche@easyconnect.fr)

(You need the Developer Tools installed)

1- Simply Ctr-I (i like ice) on X11.app (not running evidently).

2- Click on the column presentation in the toolbar
(to see the folders inside it).

3- Click on Contents.

4- Click on Resources. Click on English.lproj

5- Double-click on main.nib

6- Go to menu Tools, Show Info

7- Double on MainMenu in the main.nib window
(insist until you obtain it, and also search all you screen as sometimes it can be hidden under other windows)

8- Click on X11 in the main.nib - MainMenu window

9- Click on Quit X11

10- Go to the NSMenuItemInfo window.
You should have Attributes in the scrolling menu at the top of the window, if not change it.

11- Enter Q in the Key menu equivalent box and uncheck the up arrow modifier which is automatically checked (you should not have any modifier box checked).

12- Quit Interface Builder,
save the document main.nib when asked for.

13- Launch X11. You have a nice shortcut now (Cmd-Q as usual).






To keep your .dmg files

After installing Apple's X11 and the X11 SDK your .dmg files are moved to the trash but the thrash icon isn't automatically updated, so you will not see the full trash can icon.

If you like to keep the original .dmg files in case of future problems, click on the trash to open it and retrieve your files.





Custom Xmodmap files

with v2 of the X11 beta,
custom Xmodmap files are no longer necessary.





Windows not refocusing with WindowMaker - Codetek?

Once you have focused an Aqua window, you can no longer bring a WM window to the front - it is focused, but the Aqua window still stays visible above it, even as you drag the other one above it (so the X11 window ends up disappearing under Aqua).


It also happens with other window-managers. It's a bug in X11.app that survived from beta 1.0.





If the 'nph-x11.hqx' file doesn't expand

Change ".hqx" to ".dmg", and use Diskcopy.

If you download with Safari 1.0 v51, the file it's called 'x11.dmg'.
If you download with Internet Explorer 5.2 it's call 'nph-x11.hqx'.






X11 for Mac OS X Beta 0.2.1 released

Posted by Apple at the x11-users mailing lists:

An updated release of X11 for Mac OS X Beta (v 0.2.1) has been released. You can download it here:

Download Apple's X11 v 0.2.1

The only change between 0.2 and 0.2.1 is that now the installer defaults to installing the X11Config package. This should help address the problem where people were seeing the twm window manager instead of the quartz-wm window manager after a default installation. Even though there have been workarounds and explanations posted, a lot of users were unaware of the reason why they were not seeing the quartz-wm window manager with the default install. Advanced users (those that have made changes to /etc/X11) can either deselect the "X11 Config" package during install or restore their /etc/X11 directory from /etc/X11.AppleBackup.

From the Readme:

WARNING:
By default, the installer archives and then overwrites any existing X11 configuration information. Your existing /etc/X11 directory will be backed up as X11.AppleBackup and a new /etc/X11 will be installed. To prevent your existing X11 configuration files from being archived and overwritten, deselect the package named "X11 Config".

Thanks for the feedback. Please report any new bugs at:

Apple bugreporter





If you installed both, Apple's X11 and XDarwin

If you installed both Apple's X11 and XDarwin and sometimes you want to use Xdarwin with blackbox window manager for example, and sometimes Apple's X11 with quartz-wm, you can put this at the bottom of your ~/.xinitrc file to start the correct window manager (courtesy of Russell Stephany).

xdar="`ps xo command | grep XDarwin.app | grep -v grep | wc -l`"

if [ $xdar -eq 1 ]; then
            exec blackbox
else
            exec quartz-wm
fi






Print from X11 applications using "lp"

(Thanks to Francois Rigaut and Haroon Sheikh)

You can print from the command line using:
(from an xterm or equivalent, or Terminal.app)

lp filename

this will print to your default printer.

and:

lp -d cups-printer-name filename

will print to another printer.

From other X11 applications, you can usually print from the app menus. xfig, gv, openoffice, xemacs all include a "print" in their own menu, sometimes configurable (you generally have to specify the "print" command -lp- and the destination printer).

Check out gimp-print. The following links may be useful:

Gimp-print at sourceforge
Macwrite: x-print-on-mac-os-x-jaguar
Apple Developer: Printing





Configure a three-button mouse to work with X11.app

(Thanks to Greg Parker, Andrew Hartung, Michael, and Nick Zitzmann)

There are two ways to configure a real three-button mouse to work with X11.app and XDarwin:

1: Enable X11's "mouse button emulation" and configure the mouse software to send option-click and control-click for buttons 2 and 3.

2: Disable X11's "mouse button emulation" and configure the mouse software to send "middle click" and "right click" for buttons 2 and 3. This is the preferred configuration for a mouse with three physical buttons.

Make sure you have the most recent version of your mouse software.

For the ability to have different sets of mouse configurations on a per-application basis, the current versions of USB Overdrive and Kensington MouseWorks work great.

MouseWorks from Kensington, works great with X11, though you need one of their products.

USB Overdrive. It works fine with Logitech 3-button mouse, and it allows you to customize mouse configurations on a per-application basis. Tip: You can set up USB Overdrive so the "clicked wheel" actions are turned off and the scroll wheel works as the middle mouse button just for X11.app, and it works fine.
USB Overdrive


Is there any way to enable the scroll-wheel?

XDarwin looks for standard Cocoa scroll wheel events and turns them into X11 buttons 4 and 5. (not sure what X11.app does.) Some X11 apps like xterm understand this out of the box, but other X11 apps might need to be configured to recognize buttons 4 and 5 as scroll wheel motion. Use the xev program to check whether your X11 server is actually generating any X11 events when you move the wheel.


Tip for Logitech Wheel Mouse Optical:
Logitech Control Center configuration for the "Wheel Button"
should be set to "Advanced Click"
with the "Configure Advanced Click" tab settings
"Click Type" = Click and "Button number" = 3.





KDE window opens with it's title bar underneath X11's menu bar

Here's a possible workaround: call up the control center under KDE and activate Enable Desktop menus in the Behaviors page of the Desktops section. Every time a window goes underneath X11's or KDE's menu bar, just middle click (option click on some systems) on the desktop and select Unclutter windows in the pop up menu and everything comes back within reach. (Thanks to Edward Lichtner)

Or try this other way to make all the windows open at the center of the screen:

Control Center-->Window Behaviour-->Advanced

-->Enable Xinerama support
-->Enable window placement support

And then:

Window Behaviour-->Moving-->Placement-->Centered





X11, Fonts, and OpenOffice

OOo does not yet support MacOS X fonts 'directly', but you can easily convert most MacOS X fonts via fondu and install them for use in OOo. But, not all of the your MacOS X fonts are usable by OOo. So you will need to do some manual clean up prior to installing them in OOo.

Full instructions at the "OpenOffice.org MacOS X Testing forum":

Using MacOSX fonts in OOo

Some people reported success using the "nativefonts" package advertised in this thread:

Native Mac Fonts v3. Please Test!

Download the 'nativefont3.tar.gz' package:
nativefont3.tar.gz
(3.9 MB, instructions in the file)





More on OpenOffice

You can only Copy/Paste "plain text" between OOo and MacOS X apps using Apple's X11.

The import/export of JPEG, TIFF, GIF, etc works fine between OOo and other Mac apps.

The OOo Final Beta running in Apples' X11 ( both 0.1 and 0.2) supports font smoothing of _truetype_ fonts.

To see antialiasing in menus:

Choose the 'Tools/Options' menu item. Expand the 'OpenOffice.Org' section of the left-hand list and choose 'View'. Set the 'Scale', second from the top, to 109% or larger and click 'OK' to close the window and the menus should now appear antialiased.


You can download PC Truetype fonts (.ttf) from:

gimmefonts.com

Be selective and download fonts you know and remember to get the whole family. The fonts you download need to go in the folder:

/Applications/OpenOffice.org1.0.1/share/fonts/truetype






AppleScript to launch Apple's X11 and The Gimp

(Thanks to Martin Costabel and Marcelo Camperi)

Write a script in AppleScript Editor that looks like this:
tell application "X11"
   activate
end tell
do shell script "export DISPLAY=:0 && source /sw/bin/init.sh && gimp"

Then save as Application.

Works the same way for any program that uses Apple's X11, was installed by fink, and can be started from the command line.

You can also write a regular shell script to start an application, and then use "DropScript" to generate an application that will run the shell script.

The way to activate X11 by these means is to use the line:

osascript -e 'tell application "X11" to activate'

at the start of your shell script.

About DropScript:

"DropScript is an application for Mac OS X which lets you create new applications from any BSD program which takes files as command line arguments. Typically, these are scripts written in sh, perl, or other scripting languages".

Apple Downloads-Dropscript





Printing from Abiword

(Thanks to Martin Costabel)

"The problem is that Abiword and other X11-based Unix programs send Postscript files to the printer. This works, of course, if your printer is a postscript printer. It doesn't work for the usual USB inkjet printers, because Apple's version of CUPS does not include a filter for postscript files.

It contains filters for all kinds of files, but not for postscript. One possibility is to print to a file and then convert this postscript file to pdf using ps2pdf from a ghostscript package. The pdf file can then be printed using Preview or Acrobat Reader or simply by "lpr" from the command line.

The other possibility is to install gimp-print and eps-postscript, download from:

Gimp-print at sourceforge.net

This includes a postscript filter for cups. You can then define a second version of your USB printer using a driver from gimp-print. This will then probably work with Abiword".









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

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