sagansstash
Registered
Hey All,
Im fairly new to all this, so please forgive any ignorance on my part.
Recently, I found a piece of code to put into my .cshrc file that supposedly allows me to run X11 from inside apple's Term.app, the purpose being to get a shiny clean menu bar, and automatic text wrapping when you resize a window (something Ive found xgterm in X11 to be lacking)
I would just like to know what the code actually does, how its working, and why it works. It consists of the following:
if ($OSTYPE == "darwin" && !($?DISPLAY) && -e /tmp/.X11-unix/* ) then
set X11_FOLDER = /tmp/.X11-unix
set currentUser = `whoami`
set bb = `/bin/ls -l $X11_FOLDER | grep $currentUser`
set bbb = `echo $bb | awk '{printf(":%d.0", $9);}'`
setenv DISPLAY $bbb
echo "Setting DISPLAY = $bbb"
endif
From my (very) linited understanding, I cant see how this works, but it does seem to.
Thanks very much.
Im fairly new to all this, so please forgive any ignorance on my part.
Recently, I found a piece of code to put into my .cshrc file that supposedly allows me to run X11 from inside apple's Term.app, the purpose being to get a shiny clean menu bar, and automatic text wrapping when you resize a window (something Ive found xgterm in X11 to be lacking)
I would just like to know what the code actually does, how its working, and why it works. It consists of the following:
if ($OSTYPE == "darwin" && !($?DISPLAY) && -e /tmp/.X11-unix/* ) then
set X11_FOLDER = /tmp/.X11-unix
set currentUser = `whoami`
set bb = `/bin/ls -l $X11_FOLDER | grep $currentUser`
set bbb = `echo $bb | awk '{printf(":%d.0", $9);}'`
setenv DISPLAY $bbb
echo "Setting DISPLAY = $bbb"
endif
From my (very) linited understanding, I cant see how this works, but it does seem to.
Thanks very much.