9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] detecting drawterm
@ 2009-07-31 10:31 roger peppe
  2009-07-31 10:48 ` Steve Simon
  2009-07-31 10:54 ` Noah Evans
  0 siblings, 2 replies; 5+ messages in thread
From: roger peppe @ 2009-07-31 10:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

i'm probably being stupid here, but what's a good robust way
of detecting in $home/lib/profile that the remote connection
is from drawterm, so that i can start rio etc?

currently the best i've got is to check /mnt/term/sysname,
but that falls down the moment i connect from a different host...



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

* Re: [9fans] detecting drawterm
  2009-07-31 10:31 [9fans] detecting drawterm roger peppe
@ 2009-07-31 10:48 ` Steve Simon
  2009-07-31 11:04   ` roger peppe
  2009-07-31 10:54 ` Noah Evans
  1 sibling, 1 reply; 5+ messages in thread
From: Steve Simon @ 2009-07-31 10:48 UTC (permalink / raw)
  To: 9fans

Drawterm connects with service=cpu

In the cpu clause I do this:

 	if (! test -e /mnt/term/mnt/wsys) {	# dt2k
		# cpu call from drawterm
		if (test -e /mnt/term/dev/secstore){
			auth/factotum -n
			cat /mnt/term/dev/secstore | read -m > /mnt/factotum/ctl
			echo > /mnt/term/dev/secstore
		}
		if not {			# old drawterm
			auth/factotum
		}
		webfs
		plumber
		webcookies
		upas/fs
		exec rio -s -i startup
	}

note the secstore device created by drawterm which I push into
my new factotum and then clean out (just in case).

-Steve



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

* Re: [9fans] detecting drawterm
  2009-07-31 10:31 [9fans] detecting drawterm roger peppe
  2009-07-31 10:48 ` Steve Simon
@ 2009-07-31 10:54 ` Noah Evans
  1 sibling, 0 replies; 5+ messages in thread
From: Noah Evans @ 2009-07-31 10:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

/mnt/term/dev/hostdomain?

AFAIK it's always drawterm.net.

On Fri, Jul 31, 2009 at 12:31 PM, roger peppe<rogpeppe@gmail.com> wrote:
> i'm probably being stupid here, but what's a good robust way
> of detecting in $home/lib/profile that the remote connection
> is from drawterm, so that i can start rio etc?
>
> currently the best i've got is to check /mnt/term/sysname,
> but that falls down the moment i connect from a different host...
>
>



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

* Re: [9fans] detecting drawterm
  2009-07-31 10:48 ` Steve Simon
@ 2009-07-31 11:04   ` roger peppe
  2009-07-31 19:31     ` Skip Tavakkolian
  0 siblings, 1 reply; 5+ messages in thread
From: roger peppe @ 2009-07-31 11:04 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/7/31 Steve Simon <steve@quintile.net>:
> Drawterm connects with service=cpu
>
> In the cpu clause I do this:
>
>        if (! test -e /mnt/term/mnt/wsys) {     # dt2k
>                # cpu call from drawterm
>                if (test -e /mnt/term/dev/secstore){
>                        auth/factotum -n
>                        cat /mnt/term/dev/secstore | read -m > /mnt/factotum/ctl
>                        echo > /mnt/term/dev/secstore
>                }
>                if not {                        # old drawterm
>                        auth/factotum
>                }
>                webfs
>                plumber
>                webcookies
>                upas/fs
>                exec rio -s -i startup
>        }
>

that's useful, thanks.
i hadn't noticed the (apparently undocumented) secstore device.

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

* Re: [9fans] detecting drawterm
  2009-07-31 11:04   ` roger peppe
@ 2009-07-31 19:31     ` Skip Tavakkolian
  0 siblings, 0 replies; 5+ messages in thread
From: Skip Tavakkolian @ 2009-07-31 19:31 UTC (permalink / raw)
  To: 9fans

> i hadn't noticed the (apparently undocumented) secstore device.

ditto.




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

end of thread, other threads:[~2009-07-31 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-31 10:31 [9fans] detecting drawterm roger peppe
2009-07-31 10:48 ` Steve Simon
2009-07-31 11:04   ` roger peppe
2009-07-31 19:31     ` Skip Tavakkolian
2009-07-31 10:54 ` Noah Evans

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).