Display depth on Solaris w/ VNC
bert at isgnw.CS.Uni-Magdeburg.De
Fri Mar 17 08:57:22 UTC 2000
(I'm CCing to PWS list because these guys might be interested in VNC, too.
Look at the bottom, Swikiers)
On Thu, 16 Mar 2000, David Pennell wrote:
> If I start up VNC on Solaris 2.7 with the default vncserver script
> (depth=8), I get a message from the Squeak VM complaining about not
> being able to support "class TrueColor" [nb - this is an X class, not
> a Squeak class] on a display depth of 8. I changed the vncserver to
> depth 16, one of the two depths that are supported for TrueColor in
> sqXWindow.c and all works, but still rather slowly (100 Mbps between a
> 300 MHz NT box and a 4xx MHz Ultra 60).
> Squeak's "Display depth" indicates 8 bits. So - if the image is using
> 8 bits, where did the TrueColor come from in the VM and how can I get
> everybody back to 8 bits and make things a little snappier?
VNC uses a rather unusual 8-bit TrueColor visual by default, while
the Unix VM expects an PseudoColor visual in 8 bit. This is a known issue
Option -cc n
Sets the colour Visual class used by the server. Some X
applications don't cope too well with the TrueColor visual
normally used by an 8-bit-deep Xvnc. You can make the server use
a PseudoColor visual by specifying -cc 3.
I use the following for 8/15 bit Squeak servers:
vncserver -geometry 800x600 -depth 8 -cc 3 -dontdisconnect
vncserver -geometry 800x600 -depth 15 -pixelformat RGB555 -dontdisconnect
15 bits is faster than 16 because no bit-shifting is necessary (Squeak
actually uses 15 bits even if it claims to use 16). Look for
stHasSameRGBMask16 in sqXWindow.c ...
Also, with a VNC server at :1 start Squeak with "-xshm -display unix:1"
options to make it faster.
Using all this I even can squeak remotely over an ISDN line with SSH
encryption. That way I can fully operate my Swiki servers from home :-)
All in all, the Squeak/VNC combination is so powerful someone should
implement the RFB protocol in Squeak directly - that way Mac/Win Squeakers
could use it to full advantage, too (Mac/Win VNC servers only provide the
local desktop remotely, while XVNC creates a real virtual desk which is
independend of the local display).
More information about the Squeak-dev