Installing X-Window (X11) on the iMac
Can’t recall how I got X11 onto my Powerbook (probably from dev discs?) but where is it on my iMac (Tiger) discs?
Well if u…..
- insert the first install disc
- scroll down to u see the “Optional Installs” PKG icon & double click on it
- Follow through options (answering the obvious!) till u get to “Installation Type”
- Click on “Applications” in the Package window
And u should see this…..
Just check on X11 and install 😉
Now all I do now is “ssh -Y username@server” and I can open an X-window app on the server (on Panther you needed “ssh -X username@server”).
However I prefer to work in iTerm and not the xterm app that came with X11. For this to work you need to set the DISPLAY variable correctly. I groked this from http://xanana.ucsc.edu/xtal/sample.bashrc
# Set the DISPLAY variable -- works for Apple X11 with Fast User Switching if [[ -z $DISPLAY && -z $SSH_CONNECTION ]]; then disp_no=($( ps -awx | grep -F X11.app | awk '{print $NF}' | grep -e ":[0-9]" )) if [[ -n $disp_no ]];then export DISPLAY=${disp_no}.0 else export DISPLAY=:0.0 fi echo "DISPLAY has been set to $DISPLAY" fi
There r ways of getting X11 up headless from iTerm… but my usage of X11 is just occasional so I’ll leave that to another day.