9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Life with plan9port
@ 2005-02-18 21:35 Karl Sackett
  2005-02-18 22:00 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Sackett @ 2005-02-18 21:35 UTC (permalink / raw)
  To: 9fans

I'm using plan9port for my daily work and I've picked up a lot from the
threads on tips and rio extensions.  But I tend to use the plan9port
tools and applications as I would use Linux and X tools and apps, and
I know I'm missing out on what plan9port is capable of.

For starters, how should I set up lib/profile and my X startup scripts?
Presently I only set $path and $font and define a few functions
in lib/profile.  My .xsession file starts plumber then execs rio.
What else can I do?  What other servers should I start?

--
Karl Sackett                     K4KRS                    krs@hiwaay.net

   "When fascism comes to America, it will be wrapped in the flag and
    carrying the cross."                               Sinclair Lewis


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] Life with plan9port
  2005-02-18 21:35 [9fans] Life with plan9port Karl Sackett
@ 2005-02-18 22:00 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2005-02-18 22:00 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

This is a bunch of my startup files.  It's the sh half, but
I have similar stuff set up for rc.  (I use bash on one machine
and rc on another to force myself to keep plan9port
working nicely with both.)

Notice the setting of $BROWSER (see web(1)), $EDITOR,
$GS_FONTPATH, $PAGER (see cat(1)), $secstore (used by factotum),
$COREDIR (see core(1); most of my systems are set up to
dump cores into /core/username).

The complicated if at the end of .profile checks to see if I'm
logging in on tty1, and if so starts factotum, ssh-agent, and X.
It needs to set $NAMESPACE because X is not yet running.
The .bashrc set +o emacs and set +o vi turn off (sic) emacs
and vi line editing, so that bash runs in cooked mode, so
I can edit my command lines with 9term.

The script riostart, which has nothing to do with rio
(it does on Plan 9!), starts my stats, acme, and firefox
windows.

Russ

t23=; cat .profile
PATH=$HOME/bin:$PATH:/usr/local/plan9/bin
PLAN9=/usr/local/plan9

BROWSER=firefox
CVS_RSH=ssh
EDITOR=E
GS_FONTPATH=$PLAN9/postscript/font
H=`hostname | sed 's/\..*//'`
MPAGE="-t -bLetter"
PAGER=nobs
PS1=$H'=; '

unset FCEDIT VISUAL

font=/usr/local/plan9/font/lucm/unicode.9.font
home=$HOME
prompt="$H=; ^A	"  # for rc
user=$USER
secstore=swtch.com
server=am

export \
	BROWSER\
	CVS_RSH\
	EDITOR\
	FCEDIT\
	GS_FONTPATH\
	H\
	MPAGE\
	PAGER\
	PATH\
	PLAN9\
	PS1\
	VISUAL\
	font\
	home\
	prompt\
	user\
	secstore\

ulimit -c unlimited

if [ -d /core/rsc ]; then
	COREDIR=/core/rsc; export COREDIR
fi

. $HOME/.bashrc

if [ "`/bin/ls -l /proc/self/fd/0 2>/dev/null | awk '{print $NF}'`" =
'/dev/tty1' ]
then
	# echo
	# echo Console login.
	NAMESPACE=/tmp/ns.`hostname`
	export NAMESPACE
	rm -rf $NAMESPACE; mkdir $NAMESPACE
	# echo '	name' space $NAMESPACE
	# echo Starting factotum.
	9 factotum
	# echo Starting SSH agent.
	eval `9 ssh-agent -e`
	startx
fi
t23=; cat .bashrc
_cd () {
	\cd "$@" &&
	case "$TERM!$-" in
	linux!*)
		;;
	*!*i*)
		awd
	esac
}
alias cd=_cd
PS1=$H'=; ' export PS1
set +o emacs
set +o vi
set -a	# autoexport

[ -d $PLAN9 ] || . $HOME/.profile
t23=; cat .xinitrc
plumber
riostart
rio  &
sleeper
t23=; cat bin/riostart
#!/usr/local/plan9/bin/rc

astats &
sleep 2
# the funny acme comments are for restart
switch(`{hostname}){ # acme
case tux	# acme
	acme -a -W 1592x1100@0,100 -l lib/acme.dump &
case t23 *	# acme
	acme -a -W 1392x942@0,100 -l lib/acme.dump &
} # acme
firefox &
t23=; cat bin/sleeper
#!/bin/sh

while true
do
	sleep 1000
done
t23=;
t23=; cat bin/restart
#!/bin/sh

grep $1 $HOME/bin/riostart | /usr/local/plan9/bin/rc
t23=; cat bin/astats
#!/bin/sh

x=/usr/local/plan9/bin/auxstats
l=lcs.mit.edu
c=csail.mit.edu
mach="tux.$c:$x amsterdam.$l:$x tears.$l:$x sweat.$l:$x"
if [ `hostname` = t23 ]
then
	mach="t23 $mach"
fi

stats -W 500x100@0,0 -lmisce $mach
# stats -W 100x100@0,0 -lmisce

t23=;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-18 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-18 21:35 [9fans] Life with plan9port Karl Sackett
2005-02-18 22:00 ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).