## Source via csh, dont run directly!
cd /tmp
mkdir H
cd H
set home = /tmp/H
setenv HOME /tmp/H
rehash
cat > ui << 'HHIui'
# Hobbit's general-purpose Unix box init; runs under *csh only.  Now revised
# to deal with SV lookalikes, Solarisn't, etc.
# Last edit: 940919@asylum/mit/wherever
# You don't leave this in .login or .cshrc -- you source this after you log in.
# I may want a virgin shell sometimes.  This may not be your idea of the
# "correct" way to do things, so if you're looking for canonical login inits,
# find someone else's.  If you want this to act like .login, drop
# "source ui" into .login, which is easy to nuke when it loses.

# Job-wide stuff first -- don't take if we did already.
if (! ${?INITED}) then
# Path stuff.  Construct it carefully based on what's out there, starting with
# something reasonably sane.
setenv PATH /bin:/usr/bin:/etc:/usr/etc:/usr/ucb:/usr/lib
# Tack everything else on the end, allowing for all the braindead possibilities
# I've run into along the way.  Still by no means all-inclusive.
# dot ain't in there for obvious reasons...
foreach xx ( /usr/etc/yp /usr/lib/netsvc/yp /usr/lib/netsvc/nis /usr/lib/nfs \
  /usr/bsd /sbin /usr/sbin /usr/local/bin /usr/local/etc /usr/local \
  /usr/ccs/bin /usr/openwin/bin /usr/NeWS/bin /usr/X11/bin /usr/bin/X11 \
  /usr/bin/X11/bin /usr/local/X11 /usr/local/X11/bin /usr/local/bin/X11 \
  /usr/X/bin /bin/athena /usr/athena/bin /usr/local/athena/bin \
  /etc/athena /usr/athena/etc /usr/local/athena/etc /usr/cs/bin \
  /usr/lib/acct /usr/sbin/acct /usr/lbin )
  if ( -d $xx ) setenv PATH ${PATH}:${xx}
end
## if (-d /usr/games) setenv PATH ${PATH}:/usr/games -- punt...
rehash
setenv DPATH ${PATH}
# Make a diligent attempt to find vi; otherwise, preload a complaint.
# EDITOR needs an abspath...
unsetenv EDITOR
if (-f /usr/ucb/vi) setenv EDITOR /usr/ucb/vi
if (-f /usr/bin/vi) setenv EDITOR /usr/bin/vi
if (-f /bin/vi) setenv EDITOR /bin/vi
if (! ${?EDITOR}) echo 'Couldn'\''t set EDITOR?\!'
# but PAGER *doesn't* need an abspath?  Go figger.
setenv PAGER 'more -l'
# NOTE: osf [at least] breaks "more", thus the following test.
more -l /dev/null >& /dev/null ; if ( $status ) setenv PAGER 'more -e'
# vi has cute options from Hell too, although it'd never *say* so.
setenv EXINIT 'map Q :q\!|map B 1G|map K 080lF xi\
map U 0i	71lF xi|set ic showmatch terse'
# where to find manpages; same design as PATH.  X manpages are often off in
# obscure places..
setenv MANPATH /usr/share/man:/usr/man
foreach xx ( /usr/local/man /usr/openwin/man /usr/lib/X11/man \
  /usr/local/X11/man /usr/bin/X11/man )
  if ( -d $xx ) setenv MANPATH ${MANPATH}:${xx}
end
# Grab system-dependent things here, instead of first off, so we can add
# local funny paths into uimd [which also checks INITED].
if (-f ~/uimd) source ~/uimd
# useful shorthands; mostly for sunos4.0, buglix, other 4.xbfd clones
if (-d /etc/security) setenv sec /etc/security
if (-d /usr/etc/sec) setenv sec /usr/etc/sec
setenv aud /etc/security/audit
setenv yp /var/yp
setenv bb /usr/spool/news
setenv dd /etc/dumpdates
setenv fs /etc/fstab
setenv pc /etc/printcap
setenv tc /etc/termcap
setenv um /usr/spool/mail
setenv ul /usr/lib
setenv ui /usr/include
setenv uis /usr/include/sys
setenv sys ~/sys
# news junk FROM HELL!! -- find equivalents, if any for vnews or use gnu..
setenv NICKNAME '*Hobbit*'
setenv NAME '*Hobbit*'
setenv ORGANIZATION 'large'
# New-group checking by default turned off.  To turn on, do "rrn +q"
setenv RNINIT '-C8 -d$HOME -e -F\ \ \  -g30 -h +hfrom -L -M -q -s -t -T -v +/'
setenv AUTOSUB \*
# trash the majority of right-widgeted includes; tell rn "v" if you want to
# see it all.  Guess what?  Most of the time you *DON'T* -- go figure, eh?
setenv HIDELINE '^>\|^.>\|^|\| article <\| writes:$\| wrote:$'
setenv NEWSHEADER 'Newsgroups: %(%F=^$?%C:%F)\
Path: localhost\!%%s\
Organization: %o\
Sender: root\
Approved: God\
Date: %`${HOME}/idate`\
Expires: 1 Apr 95 12:34\
Subject: %s\n\n'
# setenv NEWSPOSTER 'vi %h ;inews -h < %h' -- tossed in favor of...
setenv NEWSPOSTER 'vi %h ; ${HOME}/Hinews < %h; mv %h %h.bak'
# turn off/on losing switches; since sttys vary all over the map, some of
# these may fail, so do them separately.
stty sane
stty intr ^C kill ^U erase ^\?
stty susp ^Z
stty echoe echok
stty icanon
stty isig
stty crt
# stty load -load5 -load15 -pid		# old Rutgers-ism
# Set machine-name-based prompt string that we can tack other things on to.
# This is a horrible kludge, but sed is fun, and there aren't any tr-like
# builtins that I can find.  [tr needs the brackets on some systems.]
set pcap=`hostname | sed 's;^\(.\).*$;\1;' | tr \[a-z\] \[A-Z\]`
setenv pbase $pcap`hostname | sed 's;.\([^\.]*\).*$;\1;'`
unset pcap
if (-f ~/sys/flist) then
  alias flist '~/sys/flist'
endif
# Sometimes "user" doesn't get set, like on boot -s...
if (! $?user) then
  set user = `whoami`
endif
# address "ls" lossage.  Syntax of -L and -g tends to vary machine to machine.
# L really should mean follow the link; g really should mean show groups.
# SV and its ilk tend to reverse them, bastards..
# Depends on ~/.link -> ~/ui -- create this yourself, dude
setenv LSL L
ls -Ll ~/.link | grep ' ui' > /dev/null
if ( $status ) setenv LSL ''
set yy = `ls -lg /bin/cat | wc -c`
set xx = `ls -l /bin/cat | wc -c`
if ( $yy > $xx ) then
  setenv LSG g
else
  setenv LSG ''
endif
unset xx
unset yy
# Where I dump my "man" temporaries
setenv MNF /tmp/xHM$$
# handy stock-X-geometry; use to prevent the wm from ASKING where to put it!
setenv G '-g +20+0'
rm -f ~/.rhosts ~/.lastlogin
rm -f /tmp/xHM* >& /dev/null
rm -f ~/.history ~/.sh_history ~/.stmp
# how much junk mail piled up?  [rehack of "alias from"..]
if (-f /usr/spool/mail/$user) then
  echo `egrep "^From " /usr/spool/mail/$user | wc -l` new messages.
endif
# doesn't work in all cshes:
# limit coredumpsize 0
# limit datasize 20000
# Okay to do now that ^K is nice and quick, but *only for top level*!
set ignoreeof
# and tell subsequent invocations that we did all this
setenv INITED 1
endif

# Shell-specific things.  Chop this off to create a .cshrc equivalent.
unset noglob
unset autologout
set mail=(60 /usr/spool/mail/${user})
set history=25
unset savehist
umask 22
set filec
if ($?editmode) then
  unset editmode
endif
set notify
set fignore='.o .BAK'
# if I *want* to overwrite things, I don't need shit from the shell..
unset noclobber
# if we're god, change things a bit
if (`whoami` == root) then
  set prompt="${pbase}\\!\\! "
  rm -f /etc/hosts.equiv
else
  set prompt="${pbase}+ "
endif

# aliases, by the fuckload...
# This in response to OSF 'man's STUPID way of handling escape sequences
alias h "man \!* | sed 's/\[..//g' > $MNF ; ${PAGER} $MNF ; rm -f $MNF"
alias lman 'nroff -man \!* | ${PAGER}'
# in case man -k doesn't work like in Encore's lame-ass distribution
alias apropos "fgrep -i \!* /usr/man/whatis"
# Plugging in the above-derived LSx variables...
alias v "ls -laF${LSL}${LSG}s \!* |${PAGER}"
alias vd "ls -laF${LSL}${LSG}sd \!* |${PAGER}"
alias l 'ls -Fa \!*'
alias lsd 'ls -lF \!* |egrep /$'
alias lse 'ls -lF \!* |egrep \\\*$'
alias cdu 'cd ..'
alias cdul 'cd ..;ls -F'
alias pwd 'echo $cwd'
alias apath 'setenv PATH \!*\:${PATH} ; rehash'
alias dpath 'setenv PATH ${DPATH} ; rehash'
alias t "${PAGER}"
# This is a really sick hack to emulate the old "edit" behavior of the 20.
# It works only because SIGSTPing out of emacs stops alias expansion.
# The second "alias g start_g" is to catch the case where you start up a
# new emacs and exit without ever pausing it.
alias start_g 'alias g "%emacs; alias g start_g"; emacs -nw; alias g start_g'
alias g start_g
alias str 'strings \!* |${PAGER}'
alias att "cat >>"
alias iv printenv
# grepping 2-intro doesnt work everywhere, but errno.h is pretty consistent
alias err 'egrep #def.\*\[\ \	\]\!*\[\ \	\] /usr/include/errno.h'
alias grep "fgrep -i"
diff -c0 /etc/group /etc/group >& /dev/null
# osf2 broke "diff", too; won't take -C 0 -- needs -C 1.  Sheeeyit.  Fix
# in "uimd" if needed, this is just too ridiculous.
if ( $status ) then
  alias dp 'diff -C 0 \!* | ${PAGER}'
else
  alias dp 'diff -c0 -t \!* |${PAGER}'
endif
# Assuming that ps -w is a valid indicator of bsd-ish PSes
ps -w >& /dev/null
if ( $status ) then
  alias sy 'ps -ef | ${PAGER}'
  alias fp 'ps -ef | fgrep -i'
  alias ip 'ps -f'
else
  alias sy 'ps -auxww | ${PAGER}'
  alias fp 'ps -auxww | fgrep -i'
  alias ip 'ps -ux'
endif
alias d rm
alias fix 'rm -f core; rm -f xHM*; rm -f .*.CKP .*.BAK *.CKP *.BAK \#* *~'
alias  clear
alias _ 'source '
alias tit 'setenv TERM'
alias xt66 'setenv TERMCAP ~/xtermcap; setenv TERM xt66'
# this came later, after dumb machines started honoring the stty settings
alias xt68 "setenv TERM xterm; stty rows 68"
alias huge 'setenv TERMCAP ~/xtermcap; setenv TERM xt110'
# old xterm, etc aliases nuked in favor of ...
alias xi "~/xi"
alias bxt 'xterm -g 80x65+300+0 -n \?\?\? \!* &'
alias i400 'echo "        I        I        I        I        I        I        I        I"; setenv TERM i400; stty tabs'
alias h19 'setenv TERM h19u'
alias vt100 'setenv TERM vt100'
alias wt100 'setenv TERM vt100 ; stty rows 49'
# needs to be stty -a on some SV; punted for now
alias iter 'stty everything'
alias nec 'stty -echo'
alias ec 'stty echo'
# $[s and $[1r fixes lusing sun consoles
alias tfix 'reset; stty sane; clear; echo "[s[1r\ ...Fixed\\!"'
alias j jobs -l
alias su echo You do not have permission to su root
alias hang suspend
alias hup 'kill -HUP'
alias nuke 'kill -9'
alias shit 'smit -s /dev/null -l /dev/null'
alias  'clear ; logout'
alias w 'w -h'
alias f finger
# some systems have yp, some don't..
### probably broke for NIS+..
tail -2 /etc/passwd |fgrep -s +: ; if ($status == 0) then
  alias wu "ypcat passwd |fgrep -i"
else
  alias wu "cat /etc/passwd |fgrep -i"
endif
# Mail/communication stuff
alias m 'cd ~/m ; Mail'
# use a tmp file so we can send things to people again if they luse, or the
# same msg to other people
alias s 'cat > ~/.stmp; write \!* < ~/.stmp'
alias sa 'write \!* < ~/.stmp'
alias sm sendmail
alias mwt $sys/mwt
# stock "from" loses if you dont have a mail file...
alias from 'if (-f /usr/spool/mail/$user) egrep "^From " /usr/spool/mail/$user'
alias fromc \
 'if (-f /usr/spool/mail/$user) egrep "^From " /usr/spool/mail/$user | wc -l'
alias biff 'tail -1f /usr/spool/mail/${user} | egrep "^(From |Subject: )" &'
# only if you have "host".  If you don't, get it.
# if you still lose, you can make them do "nslookup -q=any" instead.
alias mx 'host -v -t mx'
alias ns 'host -v -t ns'
alias hh "host -v -t any"
which host | fgrep -s /host >& /dev/null ; if ( $status ) then
  alias hh "nslookup -q=any"
endif
alias tn telnet
alias tns 'telnet 127.0.0.1'
alias rl rlogin
# they took the NIC away, snif; and most "whois"es are still broken
alias ww 'whois -h rs.internic.net'
# there are many traceroutes that don't allow wait times of less than 2 sec..
alias tw 'traceroute -w 2'
# some pings are broke: -s means size of packet, with -c count or something
alias bp 'ping -s \!* 1460'
alias pz 'ping -s \!* 20 1'
# all you need now is -Plpnn; postscript flagged by %! at top of input
alias qp 'lpr -h -l'
alias ni 'date "+%a  %y%m%d.%H%M%S"'
# if we have ntpq..
alias rni 'ntpq -c rv \!* | fgrep clock='
alias sink sync
alias dc "`which dc` ~/.dcinit"

# Call this again in case we were already inited.  It's small and checks
# INITED itself, so this should be harmless.  Unless you drop weird stuff
# into it.  Done here so you can override any of the above aliases.
if (-f ~/uimd) source ~/uimd
'HHIui'
cat > xi << 'HHIxi'
#! /bin/sh
## last edit: 940919@mit et al; finally got AIX working
## Start X my way, using my path [preset via UI] all the way down.
## This is multi-purpose: it's the startup script, and it's also
## the startup script and the startup script depending on what name
## it was run with.  Confused yet??

## A little history: switching with environment variables or magic arguments
## was unreliable at best.  $0, our own progname, is about the only thing that
## has any chance of surviving xinit's random braindeath.  Thus, this is called
## "xi" with symlinks "xi.s" and "xi.c" for server and client.
## Later hack: if it's called .xsession, the right thing happens.

# first figure out how we were invoked; suck out the basename
XPN=`echo $0 | sed 's/.*\///'`
XSES=''
if test "${XPN}" = ".xsession" ; then
  XSES=yow
  XPN="xi"
fi
if test "${XPN}" != "xi"; then
  if test -z "${XPID}" ; then
    echo Cannot invoke $XPN directly, use \"xi\"
    exit 1
  fi
fi

## Invocation 1: from the top level shell when we start.
## spin off .twmrc from here, so we don't need a separate file
if test "${XPN}" = "xi" ; then
# idiot check
  if test ! -z "${XPID}" ; then
    echo X is already running, dickweed!
    exit 1
  fi
  XPID=$$; export XPID
  cat > $HOME/.twmrc << EoTT
# =====  + .twmrc +  =====
## least-intrusive-possible TWM init ...
borderwidth 1
### COLORS are defined in .../lib/rgb.txt
color {
# Defining bordercolor here seems to win over xrdb.
  bordercolor "yellow"
  iconbordercolor "green"
  menubackground "navyblue"
  menuforeground "yellow"
}
### CURSORS are defined in .../include/X11/cursorfont.h.
# set root cursor via "xsetroot", nothing available here.
cursors {
  button "dot"
  icon "crosshair"
  select "hand1"
  destroy "X_cursor"
}
iconborderwidth 1
# very important to me:
notitle
maxwindowsize "1000x1000"
opaquemove
nomenushadows
# things that I want to flip around between real fast with f.warpring
windowring { "xterm" "dxterm" "emacs" }
# menus -- don't need no stinkin menus, really, but they're sometimes fun
menu "Gah" {
  "What?!" f.title
  "Hosts ->" f.menu "Hell"
  "Nuke..." f.delete
  "Reset" f.restart
# Complete bailout: hunt down and kill the server.  Drastic...
  "Eject!!!" ( "cyan":"red" ) ! "kill -9 \${XPID}"
}
# the obligatory "machines" menu.  "!" is f.exec; optional-colors are (fg:bg)
# delicate pastel colors: turquoise salmon pink lavender wheat skyblue
#   powderblue khaki sandybrown rosybrown plum thistle
# SITE-SPEC: put your own pile here
menu "Hell" {
  "Local" ( "black":"thistle" ) ! \
    "xterm -g 80x65+0+0 -bg thistle -n Local &"
  "Asylum" ( "black":"powderblue" ) ! \
    "xterm -g 80x65+0+0 -bg powderblue -n Asylum -e rlogin asylum.sf.ca.us \
      -l hobbit &"
  "Bronze" ( "black":"khaki" ) ! \
    "xterm -g 80x65+0+0 -bg khaki -n Bronze -e rlogin bronze.lcs.mit.edu \
      -l hobbit &"
}
# buttons.  This is gonna make it feel kinda like Windows, believe it or not.
# Not that I particularly like windows, but the idea here is to minimize
# use of the fucking RODENT to do what I want.
### KEYSYMS can be seen via "xmodmap -pk".  "Meta" is usually the little
### diamond-splat key next to space.
button1 = m : root : f.menu "Gah"
button1 = m : icon | window : f.move
button1 = m : frame : f.resize
"Tab" = m : icon | window : f.warpring "next"
# warpring doesn't do the right thing if you're sitting in the root
"Tab" = m : root : f.warpto "xterm"
"F4" = c : window : f.iconify
"F4" = m : all : f.destroy
"L" = m : all : f.refresh
# =====  - .twmrc -  =====
EoTT

# if under XDM, skip the server startup poop
  if test $XSES ; then
    cd
    exec ./xi.c > $HOME/Xerrors 2>&1
    echo XSESSION exec of ${0}.c fucked up!
  fi
  rm -fr /tmp/.X11* /tmp/.NeWS* ; sync
# Call xinit, which takes "client -args -- server -args" ... seems kinda
# bass-ackwards, but hey...  This blocks until everything under it exits.
  xinit ${0}.c -- ${0}.s > $HOME/Xerrors 2>&1
  kbd_mode -a ; reset
  rm -f $HOME/.twmrc
  echo X server xit...
  exit 0
fi

## Invocation 2: server startup from above.  Path all pre-set.
## Blocks until the server exits.  Xnews is invoked here; add searches for
## a different one if you like.  The server might just be called "X" on
## some machines.  This can't be done as a "for" because servers take
## different args.  At least we can reuse *some* of the code..
if test "${XPN}" = "xi.s" ; then
# aix is a special case, in the educational sense of the word; it will need
# a completely different section.  "which aixterm" might be a good test
  srv=`which aixterm | egrep -v '^[Nn]o '`
  if test -f "${srv}" ; then
    echo Starting aix X ...
    exec X -f 3 nologo r -s 15 || echo AIX SUX!!
  fi
# Buglix doesn't take quite the same args as everyone else, so the same
# sort of test should sniff it out and deal
  srv=`which dxterm | egrep -v '^[Nn]o '`
  if test -f "${srv}" ; then
    echo Starting Buglix X ...
    exec X -auth /dev/null || echo Buglix Blew its Breakfast!
    exit 0
  fi
# try and find a default system "X".  Using -f, because sometimes "test" is
# buggy and returns true on "-x null-string"...
  srv=`which X | egrep -v '^[Nn]o '`
  if test -f "${srv}" ; then
    echo Starting $srv ...
### XXX: this is now right for solarisn't, may break on other things.
    exec $srv -auth /dev/null -nobanner \
      || echo $srv isn\'t configured right in this script!
    exit 0
  fi
# punt, try and run xnews instead [SunlOSs]
  srv=`which xnews | egrep -v '^[Nn]o '`
  if test -f "${srv}" ; then
    echo Starting $srv ...
    exec $srv -auth /dev/null -nobanner || echo $srv fucked up: status $?
#    exit 0
  fi
  echo "Can\'t find any X server?!"
  exit 1
fi

## Invocation 3: The server is running; now fire off everything else.
## This can be carved out as .xsession for XDM-handled xterms if this
## whole file doesn't work as such for some reason.
#
if test "${XPN}" = "xi.c" ; then
# =====  + .xsession +  =====
#! /bin/sh
  echo Server running.
  xhost -
# Zap some magic options into the server first.
# cool cursors: box_spiral cross diamond_cross iron_cross plus spider 
xrdb << EoTT
BorderWidth: 2
Background: wheat
! bordercolor is apparently overridden by twm in most cases
BorderColor: yellow
xterm*iconGeometry: 50x30-50+130
xterm*utmpInhibit: on
xterm*background: lightgray
xterm*foreground: black
xterm*borderColor: yellow
xterm*cursorColor: olivedrab
xterm*internalBorder: 1
xterm*jumpScroll: true
xterm*pointerColor: orchid
xterm*pointerShape: plus
! nuff for now, add to this more later
EoTT
# Put any one-shot stuff here: psh invocations, xrdb, etc...
  chmod 700 /tmp/.X11*
  chmod 700 /tmp/.NeWS*
  chmod 700 /tmp/smdb*
  xset b 40 4000 50 c 20 m 10 10 r
  xsetroot -cursor_name iron_cross -solid saddlebrown
# This apparently has permanent effects sometimes.  Too fucking bad.  Deal.
# It must go in this order, i.e. keysyms last, and separate invocations
# so the whole deal doesn't get skipped.
  xmodmap -e 'clear Lock' -e 'clear Control'
  xmodmap -e 'add Control = Control_L Caps_Lock'
  xmodmap -e 'keysym Caps_Lock = Control_L'
  xmodmap -e 'keysym BackSpace = Delete'
# keep track of processes we fire off so we can nuke them later
  XPL=
  xclock -g 80x80-0+0 -u 1 -bw 0 -fg blue -hd SpringGreen -hl red &
  XPL="${XPL} $!"
  xload -bg cadetblue -jump 1 -update 2 -g 100x100-0-0 &
  XPL="${XPL} $!"
  twm &
  XPL="${XPL} $!"
  echo Killpids: $XPL
# and the last thing that blocks; unwind starts when this goes away.  I'm
# blocking on the console xterm, NOT the window manager.
  xterm -g 80x65+0+5 -C -n console || echo Bugger!
  echo Unwinding...
  kill $XPL
  sleep 2
  cd ; rm -f .Xauthority .xsession-errors
  rm -fr .mosaic*
  rm -fr /tmp/.X11* /tmp/.NeWS* /tmp/smdb* ; sync
  exit 0
# =====  + .xsession +  =====
fi

echo Oops!  Invoked as $XPN, which is bogus
exit 1
'HHIxi'
cat > uimd << 'HHIuimd'
### Machine-specific stuff for MIT publics
if (! ${?INITED}) then
# make "mt" less painful; plug appropriate device in here
# setenv TAPE /dev/rmt0
### where do we usually read netluse from? [site-dep]
# setenv NNTPSERVER newsbox
more /etc/motd
# MIT: who knows who last used this WS
last | head -6
grep :: /etc/passwd ; grep :0: /etc/passwd
# Things to make the MIT environment more useful:
attach -n sipb outland consult graphics gnu
setenv MANPATH /usr/athena/man:${MANPATH}
# xxx: put "machtype" path-builders in here, including xxxbin and xxxetc
rehash
## the grand endif
endif

# shell-specifics below.
# the neurons might still fire the following way
rm -f /etc/hosts.equiv
# if running under X, idiot-proof ourselves
if (${?XPID}) set ignoreeof
# etherfind/snoop/whatever is highly machine-dependent.
# snoop - a turns on the speaker; you may not want this
alias EF 'snoop -a -d le0 -s 500'
# alias EF1 'snoop -d le1 -s 500'
# alias EF 'etherfind -v -i ie0'  ...etc...
## additions below?
alias weather "finger weather@cirrus.mit.edu | $PAGER"
alias lx 'lynx -telnet /dev/null'
alias rlb 'rlogin bronze.lcs.mit.edu'
# MIT hack: to add paths where stuff really lives.  Depends on their
# having been previously attached above...
alias mapath \
  'setenv PATH /mit/\!*/`machtype`bin:/mit/\!*/`machtype`etc:${PATH}; rehash'
'HHIuimd'

ln -s ui .link
ln -s xi xi.c
ln -s xi xi.s
ln -s xi .xsession
chmod 755 xi
source ./ui
