9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] vncs and warped pointers
@ 2004-11-20 15:22 andrey mirtchovski
  2004-11-20 16:08 ` David Leimbach
  0 siblings, 1 reply; 16+ messages in thread
From: andrey mirtchovski @ 2004-11-20 15:22 UTC (permalink / raw)
  To: 9fans

If you've tried vnc-ing to a Plan 9 machine from UNIX you'll know that
it doesn't really work 100% because the mouse pointer isn't warping
properly, which brings down the mood of acme editing sessions.  there
are provisions made (EncMouseWarp) for supporting this but i'm not
sure where exactly are they supposed to work.  not in tightvnc.

If you prefer vnc to drawterm however and if you'd like to have mouse
warping in acme, here are instructions on how to modify both vncs and
TightVNC to get proper warping behaviour using the protocol extensions
used by TightVNC (Plan 9 must conform to lUNIX, as usual):

On the Plan 9 side:

	plan9% diff vncs.c /sys/src/cmd/vnc/vncs.c
	684d683
	< 	v->canwarp = 1;
	1019c1018
	< 		vncwrlong(v, 0xFFFFFF18); /* extension to the protocol used by tightvnc, at least */
	---
	> 		vncwrlong(v, EncMouseWarp);
	plan9% 


On the TightVNC side, download tightvnc from www.tightvnc.com,
uncompress do the 'xmkmf; make World' dance and edit
vncviewer/cursor.c's HandleCursorPos() thusly:

	mirtchov@localrob$ diff cursor.c cursor.c.old 
	322c322,324
	<   XWarpPointer(dpy, None, desktopWin, 0, 0, 0, 0, x, y);
	---
	>   if (appData.useX11Cursor) {
	>     if (appData.fullScreen)
	>       XWarpPointer(dpy, None, desktopWin, 0, 0, 0, 0, x, y);
	324c326,335
	<   return True; 
	---
	>     return True; 
	>   }
	> 
	>   if (x >= si.framebufferWidth)
	>     x = si.framebufferWidth - 1;
	>   if (y >= si.framebufferHeight)
	>     y = si.framebufferHeight - 1;
	> 
	>   SoftCursorMove(x, y);
	>   return True;

Essentially hardcoding TightVNC to warp always. 

Hope you find it useful.  There are a few things that are still
annoying -- if acme wants to warp the cursor while you're moving it
the warp will be lost.  That's just how vncviewer was written.

andrey, who woke up way too early this morning...

ps: crashes under plan9port's rio when attempting to hide the
window...  works with twm though! :)

pps: this mail written using vncs/vncviewer + warping



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

* Re: [9fans] vncs and warped pointers
  2004-11-20 15:22 [9fans] vncs and warped pointers andrey mirtchovski
@ 2004-11-20 16:08 ` David Leimbach
  2004-11-20 16:17   ` andrey mirtchovski
  0 siblings, 1 reply; 16+ messages in thread
From: David Leimbach @ 2004-11-20 16:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Great Stuff man!  I've often been frustrated by some of drawterm's
behavior when going from Mac OS X.  I've got a bit of stuff on my
spare time plate right now but I might take a crack at fixing some of
those problems in the future.

The single biggest one is the font disappearing trick.  This is an
annoyance because I can make it happen every time I use it by first
opening up a rc window and trying to run "replica/pull".  Then if I
open up an acme window the fonts come back.  This works every time
I've done it so far.

The other one that is a bit strange to me is the colors not matching
up with a local session.  Lots of yellow.  Not a terribly bad "error"
per se but still I wonder if/why color information is communicated or
if it's just being misinterpretted.

Anyway... great stuff.  I'll definitely try it :)

Dave


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

* Re: [9fans] vncs and warped pointers
  2004-11-20 16:08 ` David Leimbach
@ 2004-11-20 16:17   ` andrey mirtchovski
  2004-11-21  6:14     ` [9fans] Booting a new kernel Paul Lalonde
  2004-11-21 17:51     ` [9fans] vncs and warped pointers David Leimbach
  0 siblings, 2 replies; 16+ messages in thread
From: andrey mirtchovski @ 2004-11-20 16:17 UTC (permalink / raw)
  To: 9fans


> The single biggest one is the font disappearing trick.  This is an
> annoyance because I can make it happen every time I use it by first
> opening up a rc window and trying to run "replica/pull".  Then if I
> open up an acme window the fonts come back.  This works every time
> I've done it so far.
> 

have you seen this?

	http://groups.google.com/groups?hl=en&lr=&c2coff=1&selm=200403111151.i2BBpGlg021310%40adat.davidashen.net


andrey



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

* [9fans] Booting a new kernel
  2004-11-20 16:17   ` andrey mirtchovski
@ 2004-11-21  6:14     ` Paul Lalonde
  2004-11-21 23:15       ` pat
  2004-11-22  6:27       ` [9fans] " Paul Lalonde
  2004-11-21 17:51     ` [9fans] vncs and warped pointers David Leimbach
  1 sibling, 2 replies; 16+ messages in thread
From: Paul Lalonde @ 2004-11-21  6:14 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I'm trying to build a CPU/auth server, and I'm failing to get it to 
boot.  I've placed the kernel in the fat partition, same place as my 
terminal kernel (which works fine, and is one I built myself a while 
ago), and added an entry in my plan9.ini allowing me to choose it:

[4e]
bootfile=sdD0!9fat!9pcfnew
bootfile=sdD0!9fat!9pccpuf

When I choose 9pcfnew it works fine, but when I try 9pccpuf I get the error:
error walking to 9pccpuf
Boot devices: ....

Any clues? 

Thanks,
    Paul



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

* Re: [9fans] vncs and warped pointers
  2004-11-20 16:17   ` andrey mirtchovski
  2004-11-21  6:14     ` [9fans] Booting a new kernel Paul Lalonde
@ 2004-11-21 17:51     ` David Leimbach
  2004-11-21 21:44       ` David Leimbach
  1 sibling, 1 reply; 16+ messages in thread
From: David Leimbach @ 2004-11-21 17:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Sat, 20 Nov 2004 09:17:04 -0700, andrey mirtchovski
<mirtchov@cpsc.ucalgary.ca> wrote:
> 
> > The single biggest one is the font disappearing trick.  This is an
> > annoyance because I can make it happen every time I use it by first
> > opening up a rc window and trying to run "replica/pull".  Then if I
> > open up an acme window the fonts come back.  This works every time
> > I've done it so far.
> >
> 
> have you seen this?
> 
>         http://groups.google.com/groups?hl=en&lr=&c2coff=1&selm=200403111151.i2BBpGlg021310%40adat.davidashen.net
> 
> 
> andrey

Not until now... :)  Thanks for the link I'll check it out.  

Dave

> 
>


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

* Re: [9fans] vncs and warped pointers
  2004-11-21 17:51     ` [9fans] vncs and warped pointers David Leimbach
@ 2004-11-21 21:44       ` David Leimbach
  0 siblings, 0 replies; 16+ messages in thread
From: David Leimbach @ 2004-11-21 21:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Sun, 21 Nov 2004 09:51:14 -0800, David Leimbach <leimy2k@gmail.com> wrote:
> On Sat, 20 Nov 2004 09:17:04 -0700, andrey mirtchovski
> 
> 
> <mirtchov@cpsc.ucalgary.ca> wrote:
> >
> > > The single biggest one is the font disappearing trick.  This is an
> > > annoyance because I can make it happen every time I use it by first
> > > opening up a rc window and trying to run "replica/pull".  Then if I
> > > open up an acme window the fonts come back.  This works every time
> > > I've done it so far.
> > >
> >
> > have you seen this?
> >
> >         http://groups.google.com/groups?hl=en&lr=&c2coff=1&selm=200403111151.i2BBpGlg021310%40adat.davidashen.net
> >
> >
> > andrey
> 
> Not until now... :)  Thanks for the link I'll check it out.
> 

Works great too so far... thanks :)

Dave

> Dave
> 
> >
> >
>


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

* Re: [9fans] Booting a new kernel
  2004-11-21  6:14     ` [9fans] Booting a new kernel Paul Lalonde
@ 2004-11-21 23:15       ` pat
  2004-11-22  6:27       ` [9fans] " Paul Lalonde
  1 sibling, 0 replies; 16+ messages in thread
From: pat @ 2004-11-21 23:15 UTC (permalink / raw)
  To: plalonde, 9fans

The fragment you posted does not look correct
you might want to post the all of plan9.ini

Here's my plan9.ini on one of my servers.

[menu]
menuitem=terminal, Plan 9 terminal
menuitem=cpu, Plan 9 cpu/auth server

[terminal]
bootfile=sdC0!9fat!9pcf

[cpu]
bootfile=sdC0!9fat!9pccpuaf

[common]
bootargs=local!#S/sdC0/fossil
bootdisk=local!#S/sdC0/fossil
*nomp=1
*nodumpstack=1
partition=new
vgasize=640x480x8
monitor=xga
mouseport=ps2
venti='#S/sdC0/arenas'



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

* [9fans] Re: Booting a new kernel
  2004-11-21  6:14     ` [9fans] Booting a new kernel Paul Lalonde
  2004-11-21 23:15       ` pat
@ 2004-11-22  6:27       ` Paul Lalonde
  2004-11-22  6:51         ` geoff
  1 sibling, 1 reply; 16+ messages in thread
From: Paul Lalonde @ 2004-11-22  6:27 UTC (permalink / raw)
  To: Paul Lalonde; +Cc: Fans of the OS Plan 9 from Bell Labs

I'm an idiot.  My vmware machine had a disk mounted that the 9fat: 
script found it, instead of my usual boot partition.  It's working fine 
now.

The next thing is to get my pxe booting going, and it's going well 
(9pxeload is running on the new terminal), but I'm having troubles 
creating /cfg/pxe/xxxxxxxxxx, as I have no rooted cfg directory,
and mkdir tells me that I can't make one on '/', which is what I'd expect.

Should I just build the tree somewhere arbitrary and bind it?

Paul

Paul Lalonde wrote:

> I'm trying to build a CPU/auth server, and I'm failing to get it to 
> boot.  I've placed the kernel in the fat partition, same place as my 
> terminal kernel (which works fine, and is one I built myself a while 
> ago), and added an entry in my plan9.ini allowing me to choose it:
>
> [4e]
> bootfile=sdD0!9fat!9pcfnew
> bootfile=sdD0!9fat!9pccpuf
>
> When I choose 9pcfnew it works fine, but when I try 9pccpuf I get the 
> error:
> error walking to 9pccpuf
> Boot devices: ....
>
> Any clues?
> Thanks,
>    Paul
>
>


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

* Re: [9fans] Re: Booting a new kernel
  2004-11-22  6:27       ` [9fans] " Paul Lalonde
@ 2004-11-22  6:51         ` geoff
  2004-11-22 18:30           ` [9fans] Video and mouse problems Paul Lalonde
  0 siblings, 1 reply; 16+ messages in thread
From: geoff @ 2004-11-22  6:51 UTC (permalink / raw)
  To: 9fans

You can't create in your root, but you can create in the underlying
file system if you mount it with -c and are in the right group (adm on
my file server) or you set "allow" mode briefly:

	mount -c /srv/boot /n/boot
	mkdir /n/boot/cfg



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

* [9fans] Video and mouse problems
  2004-11-22  6:51         ` geoff
@ 2004-11-22 18:30           ` Paul Lalonde
  2004-11-22 20:28             ` Paul Lalonde
  0 siblings, 1 reply; 16+ messages in thread
From: Paul Lalonde @ 2004-11-22 18:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I did my first replica/pull last night since installing Plan 9, and now 
a few things are broken :-(
Things work fine under vmware, except for pasting in acme (which has 
never worked for me in vmware, but works fine in a native boot). 
Now, after the pull, even using my old kernel, but also with a new one, 
my nvidia vga card doesn't work in anything else but 640x480, leaving me 
with a black screen.
And as worrysome the mouse pointer is stuck in the upper left corner of 
the screen, although I can happily select text, move windows, etc, but 
without a cursor.  The cursor (stuck in the upper corner), does however 
change shapes, so I can tell when I get to window edges....  Again, this 
works in vmware, and worked before I did the pull.

Any ideas?





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

* Re: [9fans] Video and mouse problems
  2004-11-22 18:30           ` [9fans] Video and mouse problems Paul Lalonde
@ 2004-11-22 20:28             ` Paul Lalonde
  2004-11-22 20:41               ` andrey mirtchovski
  0 siblings, 1 reply; 16+ messages in thread
From: Paul Lalonde @ 2004-11-22 20:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

More of an update: If I had to guess, I'd say the nvidia driver changed, 
and that the change broke support my on-board geforce mx.  In 
particular, video modes and hardware cursor position updates.

Does anyone have an older driver lying around I can try?  Where can I 
find out when changes were made to /sys/src/9/pc/vganvidia.c and get old 
versions? 

If only I'd had my venti up and running...

Thanks,
    Paul

Paul Lalonde wrote:

> I did my first replica/pull last night since installing Plan 9, and 
> now a few things are broken :-(
> Things work fine under vmware, except for pasting in acme (which has 
> never worked for me in vmware, but works fine in a native boot). Now, 
> after the pull, even using my old kernel, but also with a new one, my 
> nvidia vga card doesn't work in anything else but 640x480, leaving me 
> with a black screen.
> And as worrysome the mouse pointer is stuck in the upper left corner 
> of the screen, although I can happily select text, move windows, etc, 
> but without a cursor.  The cursor (stuck in the upper corner), does 
> however change shapes, so I can tell when I get to window edges....  
> Again, this works in vmware, and worked before I did the pull.
>
> Any ideas?
>
>
>
>


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

* Re: [9fans] Video and mouse problems
  2004-11-22 20:28             ` Paul Lalonde
@ 2004-11-22 20:41               ` andrey mirtchovski
  2004-11-22 20:53                 ` Charles Forsyth
  2004-11-22 21:31                 ` Paul Lalonde
  0 siblings, 2 replies; 16+ messages in thread
From: andrey mirtchovski @ 2004-11-22 20:41 UTC (permalink / raw)
  To: 9fans

> More of an update: If I had to guess, I'd say the nvidia driver changed, 
> and that the change broke support my on-board geforce mx.  In 
> particular, video modes and hardware cursor position updates.
> 
> Does anyone have an older driver lying around I can try?  Where can I 
> find out when changes were made to /sys/src/9/pc/vganvidia.c and get old 
> versions? 
> 
> If only I'd had my venti up and running...
> 
> Thanks,
>     Paul

you don't need your venti up and running!

remember, all resources are the same, regardless of where they exist
on the net.  run the following on your (networked) box:

% mntgen # just in case you don't have /n/sourcesdump and /n/sourcessnap
% 9fs sources
% history /n/sources/plan9/sys/src/9/pc/vganvidia.c
...

ah, the beauty of plan9. looking at the other screen i want to cry now:

# du -sh gt3.2.1-preogsi-source-installer.tar.gz 
84M     gt3.2.1-preogsi-source-installer.tar.gz



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

* Re: [9fans] Video and mouse problems
  2004-11-22 20:41               ` andrey mirtchovski
@ 2004-11-22 20:53                 ` Charles Forsyth
  2004-11-22 21:31                 ` Paul Lalonde
  1 sibling, 0 replies; 16+ messages in thread
From: Charles Forsyth @ 2004-11-22 20:53 UTC (permalink / raw)
  To: 9fans

>># du -sh gt3.2.1-preogsi-source-installer.tar.gz 
>>84M     gt3.2.1-preogsi-source-installer.tar.gz

``The X server has to be the biggest program I've ever seen that doesn't do anything for you.  -K Thompson''



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

* Re: [9fans] Video and mouse problems
  2004-11-22 20:41               ` andrey mirtchovski
  2004-11-22 20:53                 ` Charles Forsyth
@ 2004-11-22 21:31                 ` Paul Lalonde
  2004-11-22 21:34                   ` Russ Cox
  1 sibling, 1 reply; 16+ messages in thread
From: Paul Lalonde @ 2004-11-22 21:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Of course.  D'Oh.  It's going to take a while for me to really *believe* 
that random P9 systems will act the same way remotely :-)

Now if only that had identified some sort of driver change that broke me...

Is there anything else that would hijack my cursor and leave it in the 
upper left?  I was really hoping to kill my video issue with the same 
stone :-(

Thanks,
    Paul

andrey mirtchovski wrote:

>>More of an update: If I had to guess, I'd say the nvidia driver changed, 
>>and that the change broke support my on-board geforce mx.  In 
>>particular, video modes and hardware cursor position updates.
>>
>>Does anyone have an older driver lying around I can try?  Where can I 
>>find out when changes were made to /sys/src/9/pc/vganvidia.c and get old 
>>versions? 
>>
>>If only I'd had my venti up and running...
>>
>>Thanks,
>>    Paul
>>    
>>
>
>you don't need your venti up and running!
>
>remember, all resources are the same, regardless of where they exist
>on the net.  run the following on your (networked) box:
>
>% mntgen # just in case you don't have /n/sourcesdump and /n/sourcessnap
>% 9fs sources
>% history /n/sources/plan9/sys/src/9/pc/vganvidia.c
>...
>
>ah, the beauty of plan9. looking at the other screen i want to cry now:
>
># du -sh gt3.2.1-preogsi-source-installer.tar.gz 
>84M     gt3.2.1-preogsi-source-installer.tar.gz
>
>
>  
>


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

* Re: [9fans] Video and mouse problems
  2004-11-22 21:31                 ` Paul Lalonde
@ 2004-11-22 21:34                   ` Russ Cox
  2004-11-22 21:39                     ` Paul Lalonde
  0 siblings, 1 reply; 16+ messages in thread
From: Russ Cox @ 2004-11-22 21:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I assume you tried rebooting when the cursor
didn't work?  Andrey was right about moving
the mouse screwing it up, but waiting doesn't
always clear the problem.  If you have a 
window open then doing "echo reset >/dev/mousectl"
sometimes does.  So would rebooting.

Russ


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

* Re: [9fans] Video and mouse problems
  2004-11-22 21:34                   ` Russ Cox
@ 2004-11-22 21:39                     ` Paul Lalonde
  0 siblings, 0 replies; 16+ messages in thread
From: Paul Lalonde @ 2004-11-22 21:39 UTC (permalink / raw)
  To: Russ Cox, Fans of the OS Plan 9 from Bell Labs

None of those did a thing.  A related clue is that I have a narrow (<5 
pixels) black strip on the left of my screen, with a white square at the 
top the height of my cursor that moves a little as the cursor changes shape.

It feels like a mis-aligned memory map or somesuch.  I'll keep digging.

Paul

Russ Cox wrote:

>I assume you tried rebooting when the cursor
>didn't work?  Andrey was right about moving
>the mouse screwing it up, but waiting doesn't
>always clear the problem.  If you have a 
>window open then doing "echo reset >/dev/mousectl"
>sometimes does.  So would rebooting.
>
>Russ
>
>  
>


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

end of thread, other threads:[~2004-11-22 21:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-20 15:22 [9fans] vncs and warped pointers andrey mirtchovski
2004-11-20 16:08 ` David Leimbach
2004-11-20 16:17   ` andrey mirtchovski
2004-11-21  6:14     ` [9fans] Booting a new kernel Paul Lalonde
2004-11-21 23:15       ` pat
2004-11-22  6:27       ` [9fans] " Paul Lalonde
2004-11-22  6:51         ` geoff
2004-11-22 18:30           ` [9fans] Video and mouse problems Paul Lalonde
2004-11-22 20:28             ` Paul Lalonde
2004-11-22 20:41               ` andrey mirtchovski
2004-11-22 20:53                 ` Charles Forsyth
2004-11-22 21:31                 ` Paul Lalonde
2004-11-22 21:34                   ` Russ Cox
2004-11-22 21:39                     ` Paul Lalonde
2004-11-21 17:51     ` [9fans] vncs and warped pointers David Leimbach
2004-11-21 21:44       ` David Leimbach

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