Hi
I am using Xvnc 3.3r2 on differents OS (Linux, UW7...) and I found 2 bugs:
BUG #1 - 16bpp
In 16bpp there is a problem about the number of bits associated with Red,
Green and Blue level. Xvnc uses RGB655 and the "standard" value is RGB565.
Some people reported this problem few month ago and Const Kaplinsky posted a
patch in November 2000. I tested this patch and it seems to be OK.
I modified the patch to be compliant with the 3.3r2 version (it was made for
the 3.3r1 version).
BUG #2 - keyboard management
An US keyboard map is currently encoded in the Xvnc binary. This raises 2
problems:
- Some software can't be used with non-US keyboards (for example rdesktop
and a French keyboard)
- the US keyboard mapping is incomplete. For example the num pad is not
encoded. So a spreadsheet can be used.
So, I posted a smilar patch few months ago (but this one is lightly
different). This patch provides a full-PC keyboard encoding. And three
nationalities are supported: US, UK and FR.
Unfortunately, I wasn't able to offer this support through an Xvnc online
option. The nationality must be selected when Xvnc is compiled. So I think
this must be improved...
Then I hope the AT&T team will be interested and these 2 bugs will be fixed
with the next version (3.3r3). And I hope this version will be available
asap.
Note : I think it couldl be a good idea to display the Xvnc version when the
'Xvnc -h' command is invoked.
Vincent DEDIEU
Please find below the patches:
========================== BUG #1 - 16BPP ==============================
On file must be patched: /vnc_unixsrc/Xvnc/programs/Xserver/cfb/cfbcmap.c
--- cfbcmap.c.orig Thu Apr 19 14:04:22 2001
+++ cfbcmap.c Thu Apr 19 17:58:57 2001
@@ -343,16 +343,17 @@
extern int defaultColorVisualClass;
-#define _RZ(d) ((d + 2) / 3)
-#define _RS(d) 0
-#define _RM(d) ((1 << _RZ(d)) - 1)
-#define _GZ(d) ((d - _RZ(d) + 1) / 2)
-#define _GS(d) _RZ(d)
+
+#define _BZ(d) (d / 3)
+#define _BS(d) 0
+#define _BM(d) ((1 << _BZ(d)) - 1)
+#define _GZ(d) ((d - _BZ(d) + 1) / 2)
+#define _GS(d) _BZ(d)
#define _GM(d) (((1 << _GZ(d)) - 1) << _GS(d))
-#define _BZ(d) (d - _RZ(d) - _GZ(d))
-#define _BS(d) (_RZ(d) + _GZ(d))
-#define _BM(d) (((1 << _BZ(d)) - 1) << _BS(d))
-#define _CE(d) (1 << _RZ(d))
+#define _RZ(d) (d - _BZ(d) - _GZ(d))
+#define _RS(d) (_BZ(d) + _GZ(d))
+#define _RM(d) (((1 << _RZ(d)) - 1) << _RS(d))
+#define _CE(d) (1 << _GZ(d))
#define MAX_PSEUDO_DEPTH 10 /* largest DAC size I know */
@@ -524,13 +525,22 @@
visual->ColormapEntries = _CE(d);
/* fall through */
case StaticColor:
- visual->redMask = _RM(d);
- visual->greenMask = _GM(d);
- visual->blueMask = _BM(d);
- visual->offsetRed = _RS(d);
- visual->offsetGreen = _GS(d);
- visual->offsetBlue = _BS(d);
- }
+ if (d == 8) {
+ visual->redMask = 0x07;
+ visual->greenMask = 0x38;
+ visual->blueMask = 0xC0;
+ visual->offsetRed = 0;
+ visual->offsetGreen = 3;
+ visual->offsetBlue = 6;
+ } else {
+ visual->redMask = _RM(d);
+ visual->greenMask = _GM(d);
+ visual->blueMask = _BM(d);
+ visual->offsetRed = _RS(d);
+ visual->offsetGreen = _GS(d);
+ visual->offsetBlue = _BS(d);
+ }
+ }
vid++;
visual++;
}
========================== BUG #2 - KBD MANAGEMENT
=============================
Two files must be patched (in /vnc_unixsrc/Xvnc/programs/Xserver/hw/vnc):
- init.c
- kbdptr.c
To use this new keyboard map, one of the following compilation option must
be set (in
/config/cf/xfree86.cf, variable XFree86ServerDefines):
-DNEW_US_KBD
-DNEW_FR_KBD
-DNEW_UK_KBD
--- init.c.orig Thu Feb 8 17:29:47 2001
+++ init.c Thu Feb 8 17:31:19 2001
@@ -858,6 +858,18 @@
"instead)\n");
ErrorF("-localhost only allow connections from
localhost\n");
ErrorF("-inetd Xvnc is launched by inetd\n");
+#if defined (NEW_US_KBD) || defined (NEW_UK_KBD) || defined (NEW_FR_KBD)
+ ErrorF("\nNote: embedded keyboard mapping: ");
+#if defined (NEW_US_KBD)
+ ErrorF("US\n");
+#endif
+#if defined (NEW_UK_KBD)
+ ErrorF("UK\n");
+#endif
+#if defined (NEW_FR_KBD)
+ ErrorF("FR\n");
+#endif
+#endif
exit(1);
}
--- kbdptr.c.orig Wed Feb 7 10:29:57 2001
+++ kbdptr.c Thu Feb 22 10:51:47 2001
@@ -79,10 +79,14 @@
XK_Alt_R, NoSymbol,
#define ALT_R_KEY_CODE (MIN_KEY_CODE + 7)
- /* Standard US keyboard */
+ XK_Mode_switch, NoSymbol, /* Alt GR */
XK_space, NoSymbol,
- XK_0, XK_parenright,
+
+#ifdef NEW_US_KBD
+ /* Standard US keyboard */
+
+ XK_grave, XK_asciitilde,
XK_1, XK_exclam,
XK_2, XK_at,
XK_3, XK_numbersign,
@@ -92,6 +96,7 @@
XK_7, XK_ampersand,
XK_8, XK_asterisk,
XK_9, XK_parenleft,
+ XK_0, XK_parenright,
XK_minus, XK_underscore,
XK_equal, XK_plus,
@@ -99,11 +104,85 @@
XK_bracketright, XK_braceright,
XK_semicolon, XK_colon,
XK_apostrophe, XK_quotedbl,
- XK_grave, XK_asciitilde,
XK_comma, XK_less,
XK_period, XK_greater,
XK_slash, XK_question,
XK_backslash, XK_bar,
+#endif
+
+#ifdef NEW_UK_KBD
+ /* UK keyboard */
+
+ XK_grave, XK_notsign,
+ XK_1, XK_exclam,
+ XK_2, XK_quotedbl,
+ XK_3, XK_sterling,
+ XK_4, XK_dollar,
+ XK_5, XK_percent,
+ XK_6, XK_asciicircum,
+ XK_7, XK_ampersand,
+ XK_8, XK_asterisk,
+ XK_9, XK_parenleft,
+ XK_0, XK_parenright,
+
+ XK_minus, XK_underscore,
+ XK_equal, XK_plus,
+
+ XK_bracketleft, XK_braceleft,
+ XK_bracketright, XK_braceright,
+
+ XK_semicolon, XK_colon,
+ XK_apostrophe, XK_at,
+ XK_comma, XK_less,
+ XK_period, XK_greater,
+ XK_slash, XK_question,
+ XK_backslash, XK_bar,
+ XK_numbersign, XK_asciitilde,
+#endif
+
+#ifdef NEW_FR_KBD
+ /* French Keyboard */
+
+ XK_twosuperior, NoSymbol,
+ XK_ampersand, XK_1,
+ XK_eacute, XK_2,
+ XK_quotedbl, XK_3,
+ XK_apostrophe, XK_4,
+ XK_parenleft, XK_5,
+ XK_minus, XK_6,
+ XK_egrave, XK_7,
+ XK_underscore, XK_8,
+ XK_ccedilla, XK_9,
+ XK_agrave, XK_0,
+ XK_parenright, XK_degree,
+ XK_equal, XK_plus,
+
+ XK_dead_circumflex, XK_diaeresis,
+ XK_dollar, XK_sterling,
+
+ XK_ugrave, XK_percent,
+ XK_asterisk, XK_mu,
+
+ XK_less, XK_greater,
+ XK_comma, XK_question,
+ XK_semicolon, XK_period,
+ XK_colon, XK_slash,
+ XK_exclam, XK_section,
+
+/* special symbol accessed by AltGr */
+ XK_asciitilde, NoSymbol,
+ XK_numbersign, NoSymbol,
+ XK_braceleft, NoSymbol,
+ XK_bracketleft, NoSymbol,
+ XK_bar, NoSymbol,
+ XK_grave, NoSymbol,
+ XK_backslash, NoSymbol,
+ XK_asciicircum, NoSymbol,
+ XK_at, NoSymbol,
+ XK_bracketright, NoSymbol,
+ XK_braceright, NoSymbol,
+ XK_currency, NoSymbol,
+#endif
XK_a, XK_A,
XK_b, XK_B,
@@ -162,6 +241,37 @@
XK_F11, NoSymbol,
XK_F12, NoSymbol,
+/* Num Pad */
+
+ XK_Num_Lock, NoSymbol,
+ XK_KP_Divide, NoSymbol,
+ XK_KP_Multiply, NoSymbol,
+ XK_KP_Subtract, NoSymbol,
+ XK_KP_Home, NoSymbol,
+ XK_KP_Up, NoSymbol,
+ XK_KP_Page_Up, NoSymbol,
+ XK_KP_Add, NoSymbol,
+ XK_KP_Left, NoSymbol,
+ XK_KP_Begin, NoSymbol,
+ XK_KP_Right, NoSymbol,
+ XK_KP_End, NoSymbol,
+ XK_KP_Down, NoSymbol,
+ XK_KP_Page_Down, NoSymbol,
+ XK_KP_Enter, NoSymbol,
+ XK_KP_Insert, NoSymbol,
+ XK_KP_Delete, NoSymbol,
+ XK_KP_7, NoSymbol,
+ XK_KP_8, NoSymbol,
+ XK_KP_9, NoSymbol,
+ XK_KP_4, NoSymbol,
+ XK_KP_5, NoSymbol,
+ XK_KP_6, NoSymbol,
+ XK_KP_1, NoSymbol,
+ XK_KP_2, NoSymbol,
+ XK_KP_3, NoSymbol,
+ XK_KP_0, NoSymbol,
+ XK_KP_Decimal, NoSymbol,
+
/* Plus blank ones which can be filled in using xmodmap */
};
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to [EMAIL PROTECTED]
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------