x11vnc: fix crash for kde dcop. limit ncache beta tester to 96MB viewers.

pull/1/head
runge 17 years ago
parent 0d4870c0a0
commit 15f792bc21

@ -1,3 +1,7 @@
2007-03-13 Karl Runge <runge@karlrunge.com>
* x11vnc: fix crash for kde dcop. limit ncache beta
tester to 96MB viewers.
2007-02-18 Karl Runge <runge@karlrunge.com> 2007-02-18 Karl Runge <runge@karlrunge.com>
* x11vnc: Get ultravnc textchat working with ssvnc. * x11vnc: Get ultravnc textchat working with ssvnc.

File diff suppressed because it is too large Load Diff

@ -115,11 +115,14 @@ void print_help(int mode) {
" etc, although they will be clipped if they extend beyond\n" " etc, although they will be clipped if they extend beyond\n"
" the window.\n" " the window.\n"
"-clip WxH+X+Y Only show the sub-region of the full display that\n" "-clip WxH+X+Y Only show the sub-region of the full display that\n"
" corresponds to the rectangle with size WxH and offset\n" " corresponds to the rectangle geometry with size WxH and\n"
" +X+Y. The VNC display has size WxH (i.e. smaller than\n" " offset +X+Y. The VNC display has size WxH (i.e. smaller\n"
" the full display). This also works for -id/-sid mode\n" " than the full display). This also works for -id/-sid\n"
" where the offset is relative to the upper left corner\n" " mode where the offset is relative to the upper left\n"
" of the selected window.\n" " corner of the selected window. An example use of this\n"
" option would be to split a large (e.g. Xinerama) display\n"
" into two parts to be accessed via separate viewers by\n"
" running a separate x11vnc on each part.\n"
"\n" "\n"
"-flashcmap In 8bpp indexed color, let the installed colormap flash\n" "-flashcmap In 8bpp indexed color, let the installed colormap flash\n"
" as the pointer moves from window to window (slow).\n" " as the pointer moves from window to window (slow).\n"
@ -354,9 +357,8 @@ void print_help(int mode) {
" per-client viewonly state the filetransfer permissions\n" " per-client viewonly state the filetransfer permissions\n"
" will NOT change.\n" " will NOT change.\n"
"\n" "\n"
"-ultrafilexfer Note, to *enable* UltraVNC filetransfer (currently\n" "-ultrafilexfer Note: to enable UltraVNC filetransfer and to get it to\n"
" disabled by default, this may change...) and to get it\n" " work you probably need to supply these libvncserver\n"
" to work you probably need to supply these libvncserver\n"
" options: \"-rfbversion 3.6 -permitfiletransfer\"\n" " options: \"-rfbversion 3.6 -permitfiletransfer\"\n"
" \"-ultrafilexfer\" is an alias for this combination.\n" " \"-ultrafilexfer\" is an alias for this combination.\n"
"\n" "\n"

@ -2846,7 +2846,7 @@ static int scan_display(int ystart, int rescan) {
int x, y, w, n; int x, y, w, n;
int tile_count = 0; int tile_count = 0;
int nodiffs = 0, diff_hint; int nodiffs = 0, diff_hint;
int xd_check, xd_freq = 1; int xd_check = 0, xd_freq = 1;
static int xd_tck = 0; static int xd_tck = 0;
y = ystart; y = ystart;

@ -845,7 +845,7 @@ static void initialize_snap_fb(void) {
snap_fb = snap->data; snap_fb = snap->data;
} }
rfbClient* client = NULL; static rfbClient* client = NULL;
void vnc_reflect_bell(rfbClient *cl) { void vnc_reflect_bell(rfbClient *cl) {
if (cl) {} if (cl) {}

@ -611,26 +611,27 @@ static void solid_gnome(char *color) {
} }
static char *dcop_session(void) { static char *dcop_session(void) {
char *empty = strdup("");
#if NO_X11 #if NO_X11
RAWFB_RET(""); RAWFB_RET(empty);
return ""; return empty;
#else #else
char list_sessions[] = "dcop --user '%s' --list-sessions"; char list_sessions[] = "dcop --user '%s' --list-sessions";
int len; int len;
char *cmd, *host, *user = NULL; char *cmd, *host, *user = NULL;
char *out, *p, *ds, *dsn = NULL, *sess = NULL, *sess2 = NULL; char *out, *p, *ds, *dsn = NULL, *sess = NULL, *sess2 = NULL;
RAWFB_RET(""); RAWFB_RET(empty);
if (getenv("SESSION_MANAGER")) { if (getenv("SESSION_MANAGER")) {
return ""; return empty;
} }
user = get_user_name(); user = get_user_name();
if (strstr(user, "'") != NULL) { if (strstr(user, "'") != NULL) {
rfbLog("invalid user: %s\n", user); rfbLog("invalid user: %s\n", user);
free(user); free(user);
return ""; return empty;
} }
len = strlen(list_sessions) + strlen(user) + 1; len = strlen(list_sessions) + strlen(user) + 1;

@ -1,8 +1,8 @@
.\" This file was automatically generated from x11vnc -help output. .\" This file was automatically generated from x11vnc -help output.
.TH X11VNC "1" "February 2007" "x11vnc " "User Commands" .TH X11VNC "1" "March 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-19 version: 0.8.5, lastmod: 2007-03-13
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
@ -125,11 +125,14 @@ the window.
\fB-clip\fR \fIWxH+X+Y\fR \fB-clip\fR \fIWxH+X+Y\fR
.IP .IP
Only show the sub-region of the full display that Only show the sub-region of the full display that
corresponds to the rectangle with size WxH and offset corresponds to the rectangle geometry with size WxH and
+X+Y. The VNC display has size WxH (i.e. smaller than offset +X+Y. The VNC display has size WxH (i.e. smaller
the full display). This also works for \fB-id/-sid\fR mode than the full display). This also works for \fB-id/-sid\fR
where the offset is relative to the upper left corner mode where the offset is relative to the upper left
of the selected window. corner of the selected window. An example use of this
option would be to split a large (e.g. Xinerama) display
into two parts to be accessed via separate viewers by
running a separate x11vnc on each part.
.PP .PP
\fB-flashcmap\fR \fB-flashcmap\fR
.IP .IP
@ -417,9 +420,8 @@ will NOT change.
.PP .PP
\fB-ultrafilexfer\fR \fB-ultrafilexfer\fR
.IP .IP
Note, to *enable* UltraVNC filetransfer (currently Note: to enable UltraVNC filetransfer and to get it to
disabled by default, this may change...) and to get it work you probably need to supply these libvncserver
to work you probably need to supply these libvncserver
options: "\fB-rfbversion\fR \fI3.6 \fB-permitfiletransfer\fR"\fR options: "\fB-rfbversion\fR \fI3.6 \fB-permitfiletransfer\fR"\fR
"\fB-ultrafilexfer\fR" is an alias for this combination. "\fB-ultrafilexfer\fR" is an alias for this combination.
.IP .IP

@ -75,7 +75,7 @@
* extensions exists that allow drawing the mouse into the framebuffer) * extensions exists that allow drawing the mouse into the framebuffer)
* *
* The current *position* of the remote X mouse pointer is shown with * The current *position* of the remote X mouse pointer is shown with
* the -cursor option. Further, if -cursorX or -X is used, a trick * the -cursor option. Further, if -cursor X is used, a trick
* is done to at least show the root window cursor vs non-root cursor. * is done to at least show the root window cursor vs non-root cursor.
* (perhaps some heuristic can be done to further distinguish cases..., * (perhaps some heuristic can be done to further distinguish cases...,
* currently "-cursor some" is a first hack at this) * currently "-cursor some" is a first hack at this)
@ -3266,6 +3266,23 @@ int main(int argc, char* argv[]) {
scr = DefaultScreen(dpy); scr = DefaultScreen(dpy);
rootwin = RootWindow(dpy, scr); rootwin = RootWindow(dpy, scr);
if (ncache_beta_tester) {
int h = DisplayHeight(dpy, scr);
int w = DisplayWidth(dpy, scr);
int mem = (w * h * 4) / (1000 * 1000), MEM = 96;
if (mem < 1) mem = 1;
/* limit poor, unsuspecting beta tester's viewer to 96 MB */
if ( (ncache+2) * mem > MEM ) {
int n = (MEM/mem) - 2;
if (n < 0) n = 0;
n = 2 * (n / 2);
if (n < ncache) {
ncache = n;
}
}
}
if (grab_always) { if (grab_always) {
Window save = window; Window save = window;
window = rootwin; window = rootwin;
@ -3533,7 +3550,7 @@ int main(int argc, char* argv[]) {
rfbLog(" iconifying/deiconifying windows, moving and raising\n"); rfbLog(" iconifying/deiconifying windows, moving and raising\n");
rfbLog(" windows, and reposting menus. In the simple CopyRect\n"); rfbLog(" windows, and reposting menus. In the simple CopyRect\n");
rfbLog(" encoding scheme used (no compression) a huge amount\n"); rfbLog(" encoding scheme used (no compression) a huge amount\n");
rfbLog(" of extra memory (20-80MB) is used on both the server and\n"); rfbLog(" of extra memory (20-100MB) is used on both the server and\n");
rfbLog(" client sides. This mode works with any VNC viewer.\n"); rfbLog(" client sides. This mode works with any VNC viewer.\n");
rfbLog(" However, in most you can actually see the cached pixel\n"); rfbLog(" However, in most you can actually see the cached pixel\n");
rfbLog(" data by scrolling down, so you need to re-adjust its size.\n"); rfbLog(" data by scrolling down, so you need to re-adjust its size.\n");

@ -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-19"; char lastmod[] = "0.8.5 lastmod: 2007-03-13";
/* X display info */ /* X display info */

Loading…
Cancel
Save