Commit d60e8ccf authored by runge's avatar runge

x11vnc: Get ultravnc textchat working with ssvnc.

parent a874ddee
2007-02-18 Karl Runge <runge@karlrunge.com>
* x11vnc: Get ultravnc textchat working with ssvnc.
2007-02-16 Karl Runge <runge@karlrunge.com> 2007-02-16 Karl Runge <runge@karlrunge.com>
* x11vnc: add Files mode to user controlled input. more * x11vnc: add Files mode to user controlled input. more
ultra/tight filexfer tweaks. rfbversion remote control. ultra/tight filexfer tweaks. rfbversion remote control.
......
x11vnc README file Date: Fri Feb 16 20:41:26 EST 2007 x11vnc README file Date: Sun Feb 18 18:24:55 EST 2007
The following information is taken from these URLs: The following information is taken from these URLs:
...@@ -10027,7 +10027,7 @@ x11vnc: a VNC server for real X displays ...@@ -10027,7 +10027,7 @@ x11vnc: a VNC server for real X displays
Here are all of x11vnc command line options: Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions) % x11vnc -opts (see below for -help long descriptions)
x11vnc: allow VNC connections to real X11 displays. 0.8.5 lastmod: 2007-02-16 x11vnc: allow VNC connections to real X11 displays. 0.8.5 lastmod: 2007-02-18
x11vnc options: x11vnc options:
-display disp -auth file -N -display disp -auth file -N
...@@ -10140,7 +10140,7 @@ libvncserver-tight-extension options: ...@@ -10140,7 +10140,7 @@ libvncserver-tight-extension options:
% x11vnc -help % x11vnc -help
x11vnc: allow VNC connections to real X11 displays. 0.8.5 lastmod: 2007-02-16 x11vnc: allow VNC connections to real X11 displays. 0.8.5 lastmod: 2007-02-18
(type "x11vnc -opts" to just list the options.) (type "x11vnc -opts" to just list the options.)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.TH X11VNC "1" "February 2007" "x11vnc " "User Commands" .TH X11VNC "1" "February 2007" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays x11vnc - allow VNC connections to real X11 displays
version: 0.8.5, lastmod: 2007-02-16 version: 0.8.5, lastmod: 2007-02-18
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
......
...@@ -3814,6 +3814,7 @@ int main(int argc, char* argv[]) { ...@@ -3814,6 +3814,7 @@ int main(int argc, char* argv[]) {
#if LIBVNCSERVER_HAVE_FORK && LIBVNCSERVER_HAVE_SETSID #if LIBVNCSERVER_HAVE_FORK && LIBVNCSERVER_HAVE_SETSID
if (bg) { if (bg) {
int p, n;
if (getenv("X11VNC_LOOP_MODE_BG")) { if (getenv("X11VNC_LOOP_MODE_BG")) {
if (screen && screen->listenSock >= 0) { if (screen && screen->listenSock >= 0) {
close(screen->listenSock); close(screen->listenSock);
...@@ -3835,7 +3836,6 @@ int main(int argc, char* argv[]) { ...@@ -3835,7 +3836,6 @@ int main(int argc, char* argv[]) {
} }
} }
/* fork into the background now */ /* fork into the background now */
int p, n;
if ((p = fork()) > 0) { if ((p = fork()) > 0) {
exit(0); exit(0);
} else if (p == -1) { } else if (p == -1) {
......
...@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0; ...@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.8.5 lastmod: 2007-02-16"; char lastmod[] = "0.8.5 lastmod: 2007-02-18";
/* X display info */ /* X display info */
......
...@@ -1374,25 +1374,41 @@ void set_server_input(rfbClientPtr cl, int grab) { ...@@ -1374,25 +1374,41 @@ void set_server_input(rfbClientPtr cl, int grab) {
} }
void set_text_chat(rfbClientPtr cl, int len, char *txt) { void set_text_chat(rfbClientPtr cl, int len, char *txt) {
char buf[100]; char buf[100];
int dochat = 1;
rfbClientIteratorPtr iter;
rfbClientPtr cl2;
if (no_ultra_ext) { if (no_ultra_ext || ! dochat) {
return; return;
} }
#if 0
rfbLog("set_text_chat: len=%d\n", len);
rfbLog("set_text_chat: len=0x%x txt='", len); rfbLog("set_text_chat: len=0x%x txt='", len);
if (0 < len && len < 10000) write(2, txt, len); if (0 < len && len < 10000) write(2, txt, len);
fprintf(stderr, "'\n"); fprintf(stderr, "'\n");
#endif
if (unixpw_in_progress) { if (unixpw_in_progress) {
rfbLog("set_text_chat: unixpw_in_progress, skipping.\n"); rfbLog("set_text_chat: unixpw_in_progress, skipping.\n");
return; return;
} }
if (0 && len == rfbTextChatOpen) { iter = rfbGetClientIterator(screen);
if (rfbSendTextChatMessage(cl, rfbTextChatOpen, "")) { while( (cl2 = rfbClientIteratorNext(iter)) ) {
rfbLog("rfbSendTextChatMessage: true\n"); if (cl2 == cl) {
} else { continue;
rfbLog("rfbSendTextChatMessage: false\n"); }
if (len == rfbTextChatOpen) {
rfbSendTextChatMessage(cl2, rfbTextChatOpen, "");
} else if (len == rfbTextChatClose) {
rfbSendTextChatMessage(cl2, rfbTextChatClose, "");
} else if (len == rfbTextChatFinished) {
rfbSendTextChatMessage(cl2, rfbTextChatFinished, "");
} else if (len <= rfbTextMaxSize) {
rfbSendTextChatMessage(cl2, len, txt);
} }
} }
rfbReleaseClientIterator(iter);
} }
int get_keyboard_led_state_hook(rfbScreenInfoPtr s) { int get_keyboard_led_state_hook(rfbScreenInfoPtr s) {
if (unixpw_in_progress) { if (unixpw_in_progress) {
rfbLog("get_keyboard_led_state_hook: unixpw_in_progress, skipping.\n"); rfbLog("get_keyboard_led_state_hook: unixpw_in_progress, skipping.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment