in Technology

Removing the default (annoying) xterm window under Mac X11

If you are like me, you use X11 on your Mac only for OpenOffice (I am waiting for the native build). But when you start OpenOffice, it also starts X11 – which in turn starts xterm – a command line for X11. I just upgraded X11, and the xterm started coming again. I forgot how I had fixed it last time, so searched for it again. Here’s the perfect solution for doing this. (Taken from a post by Peter on BML)

The default settings for startup under the Mac X11 create an xterm window. This can be annoying if one primarily uses X11 for openoffice or other programs and uses the Mac Terminal program for the command line.

The default settings for startup are contained in the file ‘/usr/X11R6/lib/X11/xinit/xinitrc’. Each user can override this by creating a .xinitrc file in their home directory. One line in this file needs to be changed to remove the launch of the xterm window.

Here are the specific command line instructions for doing this:

cp /usr/X11R6/lib/X11/xinit/xinitrc ~/.xinitrc
chmod u+w ~/.xinitrc
sed 's/xterm/# xterm/' ~/.xinitrc > foo
mv -f foo ~/.xinitrc

After this, quit X11 (if running) and relaunch and there should be no xterm window.

Worked like charm!

Write a Comment

Comment

  • Related Content by Tag