Blog‎ > ‎

Use X11 from Apple's Terminal app

posted Dec 23, 2008, 10:01 PM by Jade Rubick
This is the coolest tip I've heard in a while. I didn't even realize it was possible... (now it is no longer necessary)

In your /etc/profile:

<blockquote>
# System-wide .profile for sh(1)

# added to allow X11 applications to run
if [[ -z $DISPLAY ]]
 then
 export DISPLAY=:0.0
fi

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
export PATH

[ -r /etc/bashrc ] && source /etc/bashrc
</blockquote>

Open up X11, and now you can use X11 apps from the terminal. Nice!

You can set up X11 to boot on startup, in the background, and now you have seamless X11 / Terminal use.



The Little Gnome Hidding in X11

I discovered something related this week as I was testing different OpenACS install scenarios:

  1. Installed a Debian variant (Ubuntu) which runs Gnome
  2. Used Fink on my Powerbook to install a Gnome compatible X window manager: sudo fink install metacity (had to update Fink first)
  3. Added this to .xinitrc in my home directory
  4. #this line makes copy paste from quartz possible
    quartz-wm --only-proxy &
    xterm -geometry 72x34+100+40 -fn *-fixed-*-*-*-20-* &
    exec /sw/bin/metacity
  5. Started X11 in full screen mode (X11 preferences menu)
  6. then in an xterm:
  7. xhost + my.debian.server.com
    ssh -X my.debian.server.com
  8. The grand finale:
  9. gnome-session

This called up the Gnome Desktop Environment on my Powerbook (!) spread across the 17inch TFT and the TFT on my desk. Copy paste from OS X to X using only three keys to switch back and forth.

Poof the little earth spirit appears: all the OS X machines in our lab can act as thin clients for Ubuntu with OpenOffice, Gimp, etc. Reminds me of being back in college sitting in front of a huge X terminal getting my first sweet taste of Unix and the Web. Now I can give people I work with their first sweet taste of Linux. Not bad.

by Carl Robert Blesius on 11/14/04

Comments