9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] my web browsing technique
@ 2002-11-27  4:39 rob pike, esq.
  2002-11-27 19:35 ` Sam
  0 siblings, 1 reply; 3+ messages in thread
From: rob pike, esq. @ 2002-11-27  4:39 UTC (permalink / raw)
  To: 9fans

Kind of an old thread, but I like VNC OK and finally broke down and wrote
this plumbing rule:

	# urls to opera on another machine
	type is text
	data matches '(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?,%#~&/\-+=]+([:.][a-zA-Z0-9_?,%#~&/\-+=]+)*'
	plumb to web
	plumb start ssh my-vnc-machine.com 'DISPLAY=:3' opera -newpage ''''$0''''

The quotes around DISPLAY=:3 are to get the assignment past the
plumber; the quotes around $0 get its contents past ssh and into the
destination machine without reevaluation by the shell.

The
	plumb to web
line lets me debug the pattern: just
	cat /mnt/plumb/web
and click on a URL to see what the data matches. (Good trick in general.)

Opera will pop the URL into a running instance of itself if possible
(nice thinking, guys!) and the -newpage option means it will create a
new Opera subwindow rather than overwriting an existing page.  Someone
sends you a list of URLS?  Just right-click on each one in the list
and - voila!  - Opera will go fetch them all for you, each in a
different window.

This rule scratches the itch pretty well.  There well may be a better
pattern for the 'matches' line, but that's not the point.

-rob



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

* Re: [9fans] my web browsing technique
  2002-11-27  4:39 [9fans] my web browsing technique rob pike, esq.
@ 2002-11-27 19:35 ` Sam
  0 siblings, 0 replies; 3+ messages in thread
From: Sam @ 2002-11-27 19:35 UTC (permalink / raw)
  To: 9fans

> This rule scratches the itch pretty well.  There well may be a better
> pattern for the 'matches' line, but that's not the point.

Indeed it does.  Thanks a lot for posting it.  A very nice hack. ;)

Sam




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

* [9fans] my web browsing technique
@ 2002-11-11 21:26 matt
  0 siblings, 0 replies; 3+ messages in thread
From: matt @ 2002-11-11 21:26 UTC (permalink / raw)
  To: 9fans

I like to use drawterm for my plan9 atm.

so instead of opening a VNC to web browse I've made this little set of
programs.

web_waiter.py

I run this one on my windows box
[the docs say it will work in XFree too but as yet untested]

http://proweb.net/~matt/p9-4/web_waiter.py

it listens on a port and when given something that's got :// in it it opens
up your default browser on that page

web_plumber

on my plan9 machine I run this utility to open the remote port and submit
the url
http://proweb.net/~matt/p9-4/web_plumber.c


and then the plumbing rules :

protocol='(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais)'
domain='[a-zA-Z0-9_@]+([.:][a-zA-Z0-9_@]+)*/?[a-zA-Z0-9_?,%#~&/\-]+'

# URLs go to web browser
type is text
data matches $protocol://$domain$file
plumb to web
plumb start rc -c '/usr/matt/bin/web_plumber -w tcp!192.168.1.101!8005 '$0



I've got a dual screen setup so I have drawterm in the main window and the
Mozilla in the second window

m



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

end of thread, other threads:[~2002-11-27 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-27  4:39 [9fans] my web browsing technique rob pike, esq.
2002-11-27 19:35 ` Sam
  -- strict thread matches above, loose matches on Subject: below --
2002-11-11 21:26 matt

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