YaK:: Croquet RFB (VNC) work... | [Changes] [Calendar] [Search] [Index] [PhotoTags] |
Here we are able to Transcript the problem. The transcript shows all keyboard events and all mouse events in which the mouse position moved over 12 pixels (manhattan distance), marked as CURSOR JUMP.
The CURSOR JUMP marked in red is the problem -- it shows a "red click" 57 pixels away from where the mouse really is. The mouse is actually perfectly still, while I'm hitting <PageDown> (KBD Event Keydown 12), but this makes the RFB Client think I swiped with mouse down to a point 57 pixel away.
Here's a stack trace (triggered by a "red" CURSOR JUMP). For some reason, the marked line sends an old Mouse Event after a Keyboard Event.
This is the snapshot (ignore any files below) -> VncJan17.tar.gz
Fixing VNC in Hedgehog:
One problem that needs to be fixed before we proceed is the fact that the new version of Croquet doesn't have a working VNC client. There is a temporary fix. I found under Croquet-RFB, the TRFBMonitor class, in the method destroyLogonWorld on the last line:
destroyLogonWorld | world | logonWorld ifNil:[^self]. world := logonWorld. logonWorld := nil. world destroy. world scheduler shutDown.commenting out "world destroy." the seems to do the job.
Single application VNC:
(Ryan) I edited the ~/.vnc/xstartup script to run the kwin window manager and nothing else in the display and then created a file called cvnc.py (for croquet vnc) to run the vncserver in a nice 800x600 resolution and depth of 24 to avoid the bug below. It then adds a specified application to the display.
To run it type: cvnc -a <app>
Where <app> is the string that you use to run your application, such as: "firefox yak.net"
#!/usr/bin/env python import getopt, sys, os comStart = 'vncserver -geometry 800x600 -depth 24' def startVNC(display): os.system(comStart+' :'+display) def startApp(app, display): os.system('DISPLAY=127.0.0.1:'+display+' kstart --ontop --fullscreen '+app+' &') def usage(): print """---CroquetVNC--- This is used to launch a VNC server with a single application for application sharing withing Croquet. Usage: -h, --help This help option -a <arg> Run application <arg>. --app=<arg> ex: firefox""" try: opts, args = getopt.getopt(sys.argv[1:], 'ha:', ['help', 'app=']) except getopt.GetoptError: # print help information and exit: usage() # o:option, a:argument for o, a in opts: if o in ('-h', '--help'): usage() if o in ('-a', '--app'): startVNC("1") startApp(a,"1")
Here's a picture of it in use:
RFBClient open [RFBClient>>rfbProtocolVersion] server version 3.8 [RFBClient>>rfbProtocolVersion] viewer version 3.7 [RFBClient>>rfbInitialisation] server pixel format a RFBPixelFormat(16bpp, depth 16 LE, true colour 31,63,31 11+5+0)DEFAULT TEXTURE...Check file name:xwin.png RFB: caught ConnectionClosed: Connection close while waiting for data.DEFAULT TEXTURE...Check file name:xwin.png DEFAULT TEXTURE...Check file name:xwin.png
On my Athlon box, the Squeak VNC has bad verical artifacts:
bad rendering, shadows to the right of stuff (1 or 2 or 4 pixels away?), and cursor leaves
deposits when moving to the left (but not to the right):
ACTUALLY this is a known bug, with 16-bit mode and different endians.
(last modified 2006-02-22) [Login] |