# FAQ on Apple's X11 server



## btoneill (Jan 13, 2003)

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


----------



## StarBuck (Jan 14, 2003)

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


----------



## dani++ (Jan 14, 2003)

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++


----------



## rhg (Jan 15, 2003)

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


----------



## fetlock (Jan 15, 2003)

> _Originally posted by btoneill _
> *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 *



Many thanks, Brian.  This is a big help!!


----------



## sao (Jan 15, 2003)

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
> ...



 Cheers...


----------



## btoneill (Jan 15, 2003)

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


----------



## cbaron (Jan 25, 2003)

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:
> 
> ...


----------



## afrovisn (Feb 7, 2003)

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.


----------



## afrovisn (Feb 7, 2003)

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.


----------



## adambyte (Feb 7, 2003)

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?


----------



## vikingshelmut (Feb 9, 2003)

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.


----------



## btoneill (Feb 10, 2003)

"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.


----------



## vikingshelmut (Feb 11, 2003)

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.


----------



## rhg (Feb 11, 2003)

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


----------



## btoneill (Feb 11, 2003)

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


----------



## StarBuck (Feb 11, 2003)

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??


----------



## rhg (Feb 16, 2003)

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:
> ...


----------



## sao (Feb 21, 2003)

vikingshelmut,

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


```
if (! $?DISPLAY) then
   setenv DISPLAY :0.0
endif
```


----------



## mr. k (Apr 18, 2003)

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)
> ...


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!


----------



## lurk (Apr 18, 2003)

Those are zombie processes and the should not be causing your problems.  You can't kill it because it is already dead.  The problem is that there is a bug in Jag which prevents those processes from getting properly reaped, the good news is that they should not be causing you any problems and they are using negligible resources.

Your real problem is elsewhere.  I don't do KDE but I wonder if it messed up your .xinitrc file.  Move ~/.xinitrc out of you user directory and see if you can start X11 then.  That should give you the single xterm if it works.

-Eric


----------



## larry98765 (May 7, 2003)

Thanks for the faq.

I checked it out but don't know where to find a good list of UNIX apps to get started with. Anyone have any suggestions? What are the killer UNIX apps?


----------



## Cat (May 8, 2003)

Try Fink & FinkCommander to find Unix apps. There's really a lot out there ... all kinds of utilities, window managers, wordprocessors ...

Abiword (also coming to OS X natively)
LaTeX distributions (try TeXShop)
FreeCiv (multiplayer Civ)
the GIMP (Photoshop like)
OpenOffice 
KDE utils, games & applets too numerous to mention & KOffice
etc. etc.


----------



## fixarfrazze (May 21, 2003)

Also there is a searchable mailing list at 
http://search.lists.apple.com/x11-users
with 
pw: archives 
logg: archives


----------



## crash (Jul 12, 2004)

quick question for the X11 geniuses:

i use VNC to admin a remote linux box that has KDE as the desktop environment. VNC by nature is a little sluggish, even on a local network. sure, i could use ssh to compress it, but then it's only slightly sluggish but choppy.

it occured to me a few minutes ago that i can use ssh to forward X winodws to my local X server. (ssh -X username@remote_machine) this is handy for running apps like gaim, rythymbox, etc but those are all apps that run inside the mac desktop environment, albeit as X-windows.

i tried running kde from with xterm, and it actually worked, but not quite how i expected: it ran alongside OS X and the other aqua elements. this makes sense, as kde is really just an application after all. this leads me to my question:

is there a way to run some kind of container window for x apps? a container window such that all of my x-windows apps are imprisoned? this way, KDE could take over this whole container window, and all of the x apps could run inside of it.

does that make any sense? if not, then nevermind.


----------



## Falcon040 (Oct 28, 2005)

The links in this thread are old and go nowhere.

The link http://www.apple.com/macosx/x11 goes nowhere stating: "Looking for something on the Mac OS X site?", "The page you tried was not found."  (The same link in the page http://www.misplaced.net/fom/X11/5.html is also old.)
The link http://search.lists.apple.com/x11-users also goes nowhere.


So, here we go:

DOWNLOAD PAGE: http://www.apple.com/support/downloads/x11formacosx.html

Just one question, it currently states "Mac OS X 10.3 through 10.3.9".  Does this work with Mac OS 10.4.x (Tiger)?


----------



## lurk (Oct 28, 2005)

No it doesn't work on Tiger.  However, X11 is included with Tiger.  Look for the installer on the Tiger disk, I would be more specific but I just don't remember where it was.


----------



## inigo45 (Dec 17, 2005)

Following your procedure my x11 is still in the international keymapping and not in the german. Firstly I found that the path is correctly /Applications/X11.app/Contents/MacOS/X11. Yeah the "s"! Well, unix is even case sensitive! I wouldn't get the glue. 
Any ideas?
Juergen



			
				rhg said:
			
		

> I say "thank you", too!
> 
> I extended your suggestion about how to enable a foreign keyboard mapping a bit.
> 
> ...


----------



## tomdkat (Feb 22, 2006)

Hi!  I'll be installing my first Mac mini over the weekend and I had a qucik question about X11, window managers, and the Aqua UI.

I'm not a Mac person, so please be patient with me. 

I'm interested in running the X server in anticipation of getting OpenOffice 2.0 up and running.  Ideally, the users of this Mac mini will "live" in the Aqua interface and be able to double-click some kind of OpenOffice icon which will start OpenOffice and that will connect to the X server that would be presumably running silently in the background.

If X is running, will the user be required to use a window manager as the UI or can my "idealistic" scenario above work?

Thanks!

Peace...


----------



## ex2bot (Feb 23, 2006)

Welcome to MoacOSX.com!

You can do this quite easily. Apple's X11, which should be on your mini's installation DVD, has its own window manager. The nice thing about this window manager is that its windows look like regular OS X aqua windows AND they're accelerated using the 3D card. The windows co-exist alongside OS X windows. Having said that, you can change the wm if you want.

OpenOffice.org 2.0, which I looked at for about 20 minutes, has an icon to start it automatically IIRC. I believe it even automatically starts X11.

Doug


----------



## tomdkat (Feb 23, 2006)

Great!  Thanks for the info!  Do you know where I can see screenshots of X running on OS X and where I can see windows displayed alongside OS X windows?

Peace...


----------



## tomdkat (Feb 25, 2006)

Well, I got the X11 server installed on the Mac mini.  Piece of cake.  Just went right in.  

One question, how can I configure it NOT to open an xterm window when the server starts?  I think that's been asked so I'll start a searching.  

Peace...


----------



## nixgeek (Feb 26, 2006)

I've been wanting to disabled xterm as well, but I've gotten so used to it being there that I actually use it (mainly for X11 forwarding through SSH sessions).


----------



## tomdkat (Feb 26, 2006)

nixgeek said:
			
		

> I've been wanting to disabled xterm as well, but I've gotten so used to it being there that I actually use it (mainly for X11 forwarding through SSH sessions).


Personally, I've got no problem with it (but I would prefer it launch an Eterm instead, but I digress... ) but the folks who will be using ths Mac mini I've been working on this weekend won't understand it.  The xterm is one of the side-effects of running OpenOffice 2.0 (since it starts the X server) and I know it will confuse them.  

Is there a way to have the xterm start up minimized at least?

EDIT:  Well, it looks like I found my answer, which makes me feel stupid since I didn't even think to modify .xinitc (which is horrible since I run X *all the time* at home on Linux... ).

Peace...


----------



## ex2bot (Mar 2, 2006)

Glad it worked out. I've read reports that OOO version 2 is faster and more useable than ver. 1 was. 

I like the idea of OpenOffice.org, and I like that ver 2 finally came out for the Mac, but I already have MS Office X. And I just bought iWork. I'm looking forward to a word processor (Pages) that is well-designed to do page layout. Word is not.

Doug


----------

