Mac OS X X11 Server, called X11.app, is configured to open a new xterm on launch by default. This default behavior can be pretty annoying, but can be easily disabled.
In order to stop Mac OS X X11.app from launching a new and empty xterm when launched for the first time, one must install a customized .xinitrc file into $HOME.
During start, X11.app looks for $HOME/.xinitrc and, if no one is found, it executes /etc/X11/xinit/xinitrc. It’s the /etc/X11/xinit/xinitrc script the one that launches an empty xterm.
To stop X11.app from launching an empty xterm:
cp /etc/X11/xinit/xinitrc $HOME/.xinitrc
- Edit $HOME/.xinitrc and remove the line that reads
This will prevent X11.app from starting useless client applications, like xterm, on launch.
9 thoughts on “Preventing X11.app from automatically opening an XTerm on launch”
Thanks, this is about the only source of this information that I could Google. Can you publish it in forums.macosxhints.com so that other people can benefit from it?
I’m having this problem. I found xinitrc only in X11/lib, not in /etc. The xinitrc I found did not contain a line starting xterm, rather it starts quartz-wm. Commenting out that line solved my problem. Apparently quartz-wm is a window manager for x.
@Macintosh-2 ~ % locate xinitrc
@Macintosh-2 ~ % cat .xinitrc
# merge in defaults and keymaps
if [ -f “$sysresources” ]; then
xrdb -merge “$sysresources”
if [ -f “$sysmodmap” ]; then
if [ -f “$userresources” ]; then
xrdb -merge “$userresources”
if [ -f “$usermodmap” ]; then
Minus the hype and promotions…Palm Pre Plus makes life easier than any other smartphone on the market!
Thanks for the Post, thanks for this great Post. I will come back later ! Great information about surprise locksmith : surprise locksmith
An interesting discussion may be worth comment. I think that you need to write more on this kind of topic, it might not be a taboo subject but generally everyone is not enough to communicate on such topics. To the next. Cheers
Excellent post. I was checking constantly this blog and I am impressed! Very useful info particularly the last part Smile I care for such info a lot. I was looking for this certain information for a very long time. Thank you and good luck.
Wow, wonderful blog format! How long have you been blogging for? you make blogging glance easy. The full look of your site is great, as well as the content material!
Hmm it looks like your site ate my first comment (it was super long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to the whole thing. Do you have any tips and hints for first-time blog writers? I’d really appreciate it.
Our story is all about new beginnings! We met, both after big, life-altering breakups, and started fresh together by fortunate coincidence. And we’ve marked a lot of milestones in the process! He helped me believe in myself in new ways (it was with his support that I bought my first place!), helped me see some good things I was missing and reminded me of the importance of a great sense of humor! I think its fitting that we’re having a Christmas wedding on December 19, since to me, Christmas marks the return to light! Our colors are deep green and gold, and we’re using lots of candles and fresh greenery to symbolize life and light. I think the Rococo suite would fit beautifully with our theme! It has a rich, botanical quality, but with a bright cheerfulness to it that brings just the right touch of whimsy and elegance. It would be such an honor to send this to our guests!