diff options
author | runge <runge> | 2006-12-10 03:12:02 +0000 |
---|---|---|
committer | runge <runge> | 2006-12-10 03:12:02 +0000 |
commit | 5b198763c597459a27e7e88827dcc748b98b6670 (patch) | |
tree | 07111d31dc1932bd6c5bb99bd899916e5efb7129 /x11vnc/help.c | |
parent | 726cedb871a70aa6307df74e769605ee89bd52d0 (diff) | |
download | libtdevnc-5b198763c597459a27e7e88827dcc748b98b6670.tar.gz libtdevnc-5b198763c597459a27e7e88827dcc748b98b6670.zip |
x11vnc: FINDCREATEDISPLAY support to create X session if one cannot be found. Fix bug in java viewer.
Diffstat (limited to 'x11vnc/help.c')
-rw-r--r-- | x11vnc/help.c | 121 |
1 files changed, 85 insertions, 36 deletions
diff --git a/x11vnc/help.c b/x11vnc/help.c index cd9d6e6..4096e1c 100644 --- a/x11vnc/help.c +++ b/x11vnc/help.c @@ -685,17 +685,27 @@ void print_help(int mode) { "\n" " If the string is, e.g. WAIT:0.0 or WAIT:1, i.e. \"WAIT\"\n" " in front of a normal X display, then that indicated\n" -" display is used. A more interesting case is like this:\n" +" display is used.\n" +"\n" +" One can also insert a geometry between colons, e.g.\n" +" WAIT:1280x1024:... to set the size of the display the\n" +" VNC client first attaches to since some VNC viewers\n" +" will not automatically adjust to a new framebuffer size.\n" +"\n" +" A more interesting case is like this:\n" "\n" " WAIT:cmd=/usr/local/bin/find_display\n" "\n" " in which case the command after \"cmd=\" is run to\n" " dynamically work out the DISPLAY and optionally the\n" " XAUTHORITY data. The first line of the command output\n" -" must be of the form DISPLAY=<xdisplay>. Any remaining\n" -" output is taken as XAUTHORITY data. It can be either\n" -" of the form XAUTHORITY=<file> or raw xauthority data for\n" -" the display (e.g. \"xauth extract - $DISPLAY\" output).\n" +" must be of the form DISPLAY=<xdisplay>. On Linux\n" +" if the virtual terminal is known append \",VT=n\" to\n" +" this string and the chvt(1) program will also be run.\n" +" Any remaining output is taken as XAUTHORITY data.\n" +" It can be either of the form XAUTHORITY=<file> or raw\n" +" xauthority data for the display (e.g. \"xauth extract -\n" +" $DISPLAY\" output).\n" "\n" #ifndef NO_SSL_OR_UNIXPW " In the case of -unixpw (but not -unixpw_nis), then the\n" @@ -749,6 +759,7 @@ void print_help(int mode) { " As a special case, WAIT:cmd=FINDDISPLAY will run a\n" " script that works on most Unixes to determine a user's\n" " DISPLAY variable and xauthority data (see who(1)).\n" +"\n" " To have this default script printed to stdout (e.g. for\n" " customization) run with WAIT:cmd=FINDDISPLAY-print\n" "\n" @@ -765,10 +776,46 @@ void print_help(int mode) { " Where /.../x11vnc is the full path to x11vnc.\n" " It is used in the Apache SSL-portal example (see FAQ).\n" "\n" -" Finally, one can insert a geometry between colons,\n" -" e.g. WAIT:1280x1024:... to set the size of the display\n" -" the VNC client first attaches to since some VNC viewers\n" -" will not automatically adjust to a new framebuffer size.\n" +" An experimental option is WAIT:cmd=FINDCREATEDISPLAY\n" +" that is like FINDDISPLAY in that is uses the same method\n" +" to find an existing display. However, if it does not\n" +" find one it will try to *start* up an X server session\n" +" for the user. This is the only time x11vnc tries to\n" +" start up an X server.\n" +"\n" +" By default FINDCREATEDISPLAY will try Xdummy and\n" +" then Xvfb. The Xdummy wrapper is part of the x11vnc\n" +" source code (x11vnc/misc/Xdummy) It should be available\n" +" in PATH and have run \"Xdummy -install\" once to create\n" +" the shared library. Xdummy requires root permission\n" +" and only works on Linux. Xvfb is available on most\n" +" platforms.\n" +"\n" +" When x11vnc exits (i.e. user disconnects) the X server\n" +" session stays running in the background. Presumably the\n" +" FINDDISPLAY will find it next time. The user must exit\n" +" the X session in the usual way for it to terminate.\n" +"\n" +" So this is a somewhat odd mode for x11vnc in that it\n" +" will start up and poll virtual X servers. This can\n" +" be used from, say, inetd(8) to provide a means of\n" +" definitely getting a desktop (either real or virtual)\n" +" on the machine. E.g. a desktop service:\n" +"\n" +" 5915 stream tcp nowait root /usr/sbin/tcpd /.../x11vnc\n" +" -inetd -q -http -ssl SAVE -unixpw -users unixpw=\\\n" +" -passwd secret -prog /.../x11vnc \\\n" +" -display WAIT:cmd=FINDCREATEDISPLAY\n" +"\n" +" Where /.../x11vnc is the full path to x11vnc.\n" +"\n" +" Use WAIT:cmd=FINDCREATEDISPLAY-print to print out the\n" +" script used. You can specify the preferred order via\n" +" e.g., WAIT:cmd=FINDCREATEDISPLAY-Xdummy,Xvfb,X and/or\n" +" leave out ones you do not want. The the extra case \"X\"\n" +" means try to start up a real, hardware X server using\n" +" xinit(1). If there is already an X server running the\n" +" X case may only work on Linux (see startx(1)).\n" "\n" #ifndef NO_SSL_OR_UNIXPW "-ssl [pem] Use the openssl library (www.openssl.org) to provide a\n" @@ -2524,35 +2571,37 @@ void print_help(int mode) { " Default: %d\n" "-debug_tiles Print debugging output for tiles, fb updates, etc.\n" "\n" -"-snapfb Instead of polling the X display framebuffer (fb) for\n" -" changes, periodically copy all of X display fb into main\n" -" memory and examine that copy for changes. Under some\n" -" circumstances this will improve interactive response,\n" -" or at least make things look smoother, but in others\n" -" (most!) it will make the response worse. If the video\n" -" h/w fb is such that reading small tiles is very slow\n" -" this mode could help. To keep the \"framerate\" up\n" -" the screen size x bpp cannot be too large. Note that\n" +"-snapfb Instead of polling the X display framebuffer (fb)\n" +" for changes, periodically copy all of X display fb\n" +" into main memory and examine that copy for changes.\n" +" (This setting also applies for non-X -rawfb modes).\n" +" Under some circumstances this will improve interactive\n" +" response, or at least make things look smoother, but in\n" +" others (most!) it will make the response worse. If the\n" +" video h/w fb is such that reading small tiles is very\n" +" slow this mode could help. To keep the \"framerate\"\n" +" up the screen size x bpp cannot be too large. Note that\n" " this mode is very wasteful of memory I/O resources\n" " (it makes full screen copies even if nothing changes).\n" " It may be of use in video capture-like applications,\n" -" or where window tearing is a problem.\n" +" webcams, or where window tearing is a problem.\n" "\n" "-rawfb string Instead of polling X, poll the memory object specified\n" " in \"string\".\n" "\n" -" For shared memory segments string is of the\n" -" form: \"shm:N@WxHxB\" which specifies a shmid\n" -" N and framebuffer Width, Height, and Bits\n" -" per pixel.\n" -"\n" " For file polling to memory map mmap(2) a file use:\n" -" \"map:/path/to/a/file@WxHxB\", with WxHxB as above.\n" -" \"mmap:...\" is the same. If there is trouble with mmap,\n" -" use \"file:/...\" for slower lseek(2) based reading.\n" -" Use \"snap:...\" to imply -snapfb mode and the \"file:\"\n" -" access (this is for devices that only provide the fb\n" -" all at once).\n" +" \"map:/path/to/a/file@WxHxB\", with framebuffer Width,\n" +" Height, and Bits per pixel. \"mmap:...\" is the\n" +" same.\n" +"\n" +" If there is trouble with mmap, use \"file:/...\"\n" +" for slower lseek(2) based reading. Use \"snap:...\"\n" +" to imply -snapfb mode and the \"file:\" access (this\n" +" is for devices that only provide the fb all at once).\n" +"\n" +" For shared memory segments string is of the form:\n" +" \"shm:N@WxHxB\" which specifies a shmid N and with\n" +" WxHxB as above. See shmat(1) and ipcs(1)\n" "\n" " If you do not supply a type \"map\" is assumed if\n" " the file exists (see the next paragraphs for some\n" @@ -2579,7 +2628,7 @@ void print_help(int mode) { " guesses them based on the bpp.\n" "\n" " Another optional suffix is the Bytes Per Line which in\n" -" some cases is not WxHxB/4. Specify it as WxHxB-BPL\n" +" some cases is not WxB/4. Specify it as WxHxB-BPL\n" " e.g. 800x600x16-2048. This could be a normal width\n" " 1024 at 16bpp fb, but only width 800 shows up.\n" "\n" @@ -2612,11 +2661,11 @@ void print_help(int mode) { " display, this usage should be very rare, i.e. doing\n" " something strange with /dev/fb0.\n" "\n" -" If the device is not \"seekable\" try reading it all\n" -" at once in full snaps via the \"snap:\" mode (note:\n" -" this is a resource hog). If you are using file: or\n" -" map: and the device needs to be reopened for *every*\n" -" snapfb snapshot, set the environment variable:\n" +" If the device is not \"seekable\" (e.g. webcam) try\n" +" reading it all at once in full snaps via the \"snap:\"\n" +" mode (note: this is a resource hog). If you are using\n" +" file: or map: and the device needs to be reopened for\n" +" *every* snapfb snapshot, set the environment variable:\n" " SNAPFB_RAWFB_RESET=1 as well.\n" "\n" " If you want x11vnc to dynamically transform a 24bpp\n" |