summaryrefslogtreecommitdiffstats
path: root/x11vnc/cleanup.c
diff options
context:
space:
mode:
authorrunge <runge>2008-10-19 16:16:41 +0000
committerrunge <runge>2008-10-19 16:16:41 +0000
commit1c03dd4d51a35103e93c3adaf1f619c868324c77 (patch)
treeacbd2c41501e1c491023ab36717febdab32aff03 /x11vnc/cleanup.c
parent16c7ea1b357ab518ee5a40f2a663843f064479a9 (diff)
downloadlibtdevnc-1c03dd4d51a35103e93c3adaf1f619c868324c77.tar.gz
libtdevnc-1c03dd4d51a35103e93c3adaf1f619c868324c77.zip
x11vnc: -chatwindow, -scale WxH, -enc changes.
Diffstat (limited to 'x11vnc/cleanup.c')
-rw-r--r--x11vnc/cleanup.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/x11vnc/cleanup.c b/x11vnc/cleanup.c
index 3422d35..3a584bb 100644
--- a/x11vnc/cleanup.c
+++ b/x11vnc/cleanup.c
@@ -226,6 +226,26 @@ int trap_getimage_xerror(Display *d, XErrorEvent *error) {
static int Xerror(Display *d, XErrorEvent *error) {
X_UNLOCK;
+
+ if (getenv("X11VNC_PRINT_XERROR")) {
+ fprintf(stderr, "Xerror: major_opcode: %d minor_opcode: %d error_code: %d\n",
+ error->request_code, error->minor_code, error->error_code);
+ }
+
+ if (xshm_opcode > 0 && error->request_code == xshm_opcode) {
+ if (error->minor_code == X_ShmAttach) {
+ char *dstr = DisplayString(dpy);
+ fprintf(stderr, "\nX11 MIT Shared Memory Attach failed:\n");
+ fprintf(stderr, " Is your DISPLAY=%s on a remote machine?\n", dstr);
+ if (strstr(dstr, "localhost:")) {
+ fprintf(stderr, " Note: DISPLAY=localhost:N suggests a SSH X11 redir to a remote machine.\n");
+ } else if (dstr[0] != ':') {
+ fprintf(stderr, " Note: DISPLAY=hostname:N suggests a remote display.\n");
+ }
+ fprintf(stderr, " Suggestion, use: x11vnc -display :0 ... for local display :0\n\n");
+ }
+ }
+
interrupted(0);
if (d) {} /* unused vars warning: */