FAQ on Apple's X11 server

btoneill

keeper of the cheese
I have created a FAQ on Apple's X11 server with many questions asked here, and on other sites and mailing lists. You can get to it at http://www.misplaced.net/fom/X11. This is still a work in progress, so any suggestions or additions are welcome.

Brian
 
Thanks for posting the FAQ very helpful you might be able to help what does the .cshrc file do and does it effect X11 ?

Keep up the work

Cheers
 
Yeah, there is the lifesaver xmodmap directive to make the Alt key really work on international keyboards.

there is also more useful info and tidbits.


dani++
 
I say "thank you", too!

I extended your suggestion about how to enable a foreign keyboard mapping a bit.

Instead of manually invoking
/Applications/X11.app/Content/MacOS/X11 -keymap Deutsch.keymapping
from the command line you can manipulate the X11 executable so that it starts with your keyboard mapping:

1) in Terminal, become superuser:

sudo bash --login

2) change to the X11 executable directory:

cd /Applications/X11.app/Content/MacOS/

3) rename the original executable

mv X11 X11.bin

4) create the following shell script, e.g. with the vi editor:

#! /bin/sh
$(dirname $0)/X11.bin -keymap Deutsch.keymapping

This will invoke the original X11 executable with the appropriate keyboard mapping (which is the german mapping in my case).

5) name this script "X11" as the original executable name and make it executable:

chmod +x X11

This way you can conveniently double-click the X11 icon in /Applications or put it into the dock. X11 will then start with the appropriate keyboard mapping.

If you want the ssh-agent to run this is also very simple, just prepend the 2nd line in the shell script with /usr/bin/ssh-agent, such as:

#! /bin/sh
/usr/bin/ssh-agent $(dirname $0)/X11.bin -keymap Deutsch.keymapping
 
btoneill,

I suggest you also give them the location of your FAQs in your post at the Apple X11-users list as several people got puzzled by it:

http://lists.apple.com/mhonarc/x11-users/mail2.html

For those that may be interested, I have setup an Unoffical FAQ with
questions/answers for Apple's X11. The FAQ is catered more towards new X11
users, but hopefully can be of benefit to all. Some of the information
is covered in this lists FAQ, but alot of it is not. I'm welcome to any
suggestions/additions/etc that anyone may have.

Thanks,
Brian

PS: Please no religious arguments about the "right" way to do something
that may be on the FAQ that you disagree with.

--
btoneill@misplaced.net

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

<< I suggest that you tell us where it is... KeS >>

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

<< Any clue as to where your FAQ is -- an URL, perhaps? ;) >>

James Bucanek

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

Cheers...
 
There was an update with the URL sent out on Monday after I got home and realised I botched the cut-n-paste :) I ofcourse was none too happy with myself when I got home and realised it after it hit the list (some 1-2 hours later, damn that list is slow...)

Brian
 
Thanks for FAQ, and thanks to rhg for that tip, I can now use X11 with french keymapping.

Originally posted by rhg

1) in Terminal, become superuser:

sudo bash --login

2) change to the X11 executable directory:

cd /Applications/X11.app/Content/MacOS/

3) rename the original executable

mv X11 X11.bin

4) create the following shell script, e.g. with the vi editor:

#! /bin/sh
$(dirname $0)/X11.bin -keymap Deutsch.keymapping

This will invoke the original X11 executable with the appropriate keyboard mapping (which is the german mapping in my case).

5) name this script "X11" as the original executable name and make it executable:

chmod +x X11

[/B]
 
More Please!!! There are a lot of us who would like to make greater use of the UNIX environment and its programs if only we can get the basics down. Keep at it and you will help a load of people learn to use their Macs for more than just point and shoot.
 
More Please!!! There are a lot of us who would like to make greater use of the UNIX environment and its programs if only we can get the basics down. Keep at it and you will help a load of people learn to use their Macs for more than just point and shoot.
 
I have a good quesion for this... What if we realize we really don't need X11 at the moment? How do we fully uninstall it?
 
Thanks for the FAQ, it helped me figure out that I needed X11 SDK to get fink to install system-xfree.

My question, is how do I customize my xterms default background, font, etc. colors? Also, can I set transparency like I can for Terminal? Ideally, I'd like to get the my xterms to look the same as my Terminal windows.
 
"man xterm" has all the option for configuration on xterm, but xterm is a very simple program. You can change text color, or change the background color. There is no transparency, no pixmap backgrounds, no pretty 3d scrollbars, etc. If you want something with a bit more eye candy to it, you can install Eterm which has pretty scrollbars, and you can do pixmap backgrounds, etc. Eterm "supports" transparency, but it isn't a live transparency. Basically Eterm transparency sets it's background to the background of the desktop, it doesn't know about windows underneeth it. If you want the pretty eye candy and transparency keep using Terminal.app, use it just as you would xterm, but make sure the DISPLAY environment variable is set to :0.0 so that any X11 applications you run will know where to display to.
 
Thanks for the info btoneill.

You mentioned setting the display to 0.0 or something like that. How exactly do you do this? My machine currently doesn't open X11 apps from Terminal.app because it 'can't open display'. If i set this correctly, when i type 'gimp' in Terminal.app, will it open in Apple X11? (both of which are already installed)

Your knowledge is greatly appreciated.
 
the commands are:

DISPLAY=:0.0
export DISPLAY

if you put this into .profile in your home directory it will be present in any terminal window automatically
 
If you're using sh/ksh/bash the command to set the display is: DISPLAY=:0.0; export DISPLAY

if you're using csh/tcsh (the Apple default shell) it is: setenv DISPLAY :0.0

Brian
 
Hi,

I have setup Fink and apples version of X11 I have installed gnome and I have added them to the application menu.

The problem I have is that I can start gnome or KDE from the Xterm window. But I cannot get it to launch from the application menu.

the command i have put in to start KDE is /sw/bin/startkde

for gnome I have tried exec gnome-session and /sw/bin/gnome-session

What am I doing wrong??
 
Just installed the new X11 0.2.1. The good news: The system's keymapping is now correctly supported so my "shell script hack" is no longer necessary...

...except you're using the ssh-agent as I do. In this case it can still be helpful (I didnt't find an "official" way to start it with X11 - putting it into .xinitrc doesn't seem to work).

Therefore, I'm still using the "shell script hack" to launch the ssh-agent. I'm basically using the same shell script as before but omitted the -keymap option:

#! /bin/sh
/usr/bin/ssh-agent $(dirname $0)/X11.bin

...just to let you know :)

Originally posted by rhg
Instead of manually invoking
/Applications/X11.app/Content/MacOS/X11 -keymap Deutsch.keymapping
from the command line you can manipulate the X11 executable so that it starts with your keyboard mapping:

1) in Terminal, become superuser:

sudo bash --login

2) change to the X11 executable directory:

cd /Applications/X11.app/Content/MacOS/

3) rename the original executable

mv X11 X11.bin

4) create the following shell script, e.g. with the vi editor:

#! /bin/sh
$(dirname $0)/X11.bin -keymap Deutsch.keymapping

This will invoke the original X11 executable with the appropriate keyboard mapping (which is the german mapping in my case).

5) name this script "X11" as the original executable name and make it executable:

chmod +x X11

This way you can conveniently double-click the X11 icon in /Applications or put it into the dock. X11 will then start with the appropriate keyboard mapping.

If you want the ssh-agent to run this is also very simple, just prepend the 2nd line in the shell script with /usr/bin/ssh-agent, such as:

#! /bin/sh
/usr/bin/ssh-agent $(dirname $0)/X11.bin -keymap Deutsch.keymapping
 
vikingshelmut,

Or you could write in your ~/.cshrc or ~/.tcshrc file:

Code:
if (! $?DISPLAY) then
   setenv DISPLAY :0.0
endif
 
ok, that faq is a real help btonelli, thanks a lot. but i looked in the common problems and "I start X11.app and it just quits!" because that is what has been happening to me, and then i did ps -aux | grep X and saw this
root 16619 0.0 0.0 0 0 con- Z 31Dec69 0:00.00 (X11)
kjell 3101 0.0 0.1 1416 308 std S+ 9:51AM 0:00.01 grep X
root 16645 0.0 0.0 0 0 con- Z 31Dec69 0:00.00 (X11)
root 17725 0.0 0.0 0 0 con- Z 31Dec69 0:00.00 (X11)
root 17732 0.0 0.0 0 0 con- Z 31Dec69 0:00.00 (X11)
root 2872 0.0 0.0 0 0 con- Z 31Dec69 0:00.00 (X11)
so i do kill 16619, and then i get: 16619: No such process. so those processes started dec 31 1969, aren't doing anything except for keeping my x11.app from running. I have tried restarting/logging out and it has not worked. This all started when i finked KDE, but couldn't get KDE to work. if anyone can help me it would be great!
 
Back
Top