| | 570 | |
| | 571 | * $ sudo x11vnc |
| | 572 | {{{ |
| | 573 | |
| | 574 | ############################################################### |
| | 575 | #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# |
| | 576 | #@ @# |
| | 577 | #@ ** WARNING ** WARNING ** WARNING ** WARNING ** @# |
| | 578 | #@ @# |
| | 579 | #@ YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!! @# |
| | 580 | #@ @# |
| | 581 | #@ This means anyone with network access to this computer @# |
| | 582 | #@ may be able to view and control your desktop. @# |
| | 583 | #@ @# |
| | 584 | #@ >>> If you did not mean to do this Press CTRL-C now!! <<< @# |
| | 585 | #@ @# |
| | 586 | #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# |
| | 587 | #@ @# |
| | 588 | #@ You can create an x11vnc password file by running: @# |
| | 589 | #@ @# |
| | 590 | #@ x11vnc -storepasswd password /path/to/passfile @# |
| | 591 | #@ or x11vnc -storepasswd /path/to/passfile @# |
| | 592 | #@ or x11vnc -storepasswd @# |
| | 593 | #@ @# |
| | 594 | #@ (the last one will use ~/.vnc/passwd) @# |
| | 595 | #@ @# |
| | 596 | #@ and then starting x11vnc via: @# |
| | 597 | #@ @# |
| | 598 | #@ x11vnc -rfbauth /path/to/passfile @# |
| | 599 | #@ @# |
| | 600 | #@ an existing ~/.vnc/passwd file from another VNC @# |
| | 601 | #@ application will work fine too. @# |
| | 602 | #@ @# |
| | 603 | #@ You can also use the -passwdfile or -passwd options. @# |
| | 604 | #@ (note -passwd is unsafe if local users are not trusted) @# |
| | 605 | #@ @# |
| | 606 | #@ Make sure any -rfbauth and -passwdfile password files @# |
| | 607 | #@ cannot be read by untrusted users. @# |
| | 608 | #@ @# |
| | 609 | #@ Use x11vnc -usepw to automatically use your @# |
| | 610 | #@ ~/.vnc/passwd or ~/.vnc/passwdfile password files. @# |
| | 611 | #@ (and prompt you to create ~/.vnc/passwd if neither @# |
| | 612 | #@ file exists.) Under -usepw, x11vnc will exit if it @# |
| | 613 | #@ cannot find a password to use. @# |
| | 614 | #@ @# |
| | 615 | #@ @# |
| | 616 | #@ Even with a password, the subsequent VNC traffic is @# |
| | 617 | #@ sent in the clear. Consider tunnelling via ssh(1): @# |
| | 618 | #@ @# |
| | 619 | #@ http://www.karlrunge.com/x11vnc/#tunnelling @# |
| | 620 | #@ @# |
| | 621 | #@ Or using the x11vnc SSL options: -ssl and -stunnel @# |
| | 622 | #@ @# |
| | 623 | #@ Please Read the documention for more info about @# |
| | 624 | #@ passwords, security, and encryption. @# |
| | 625 | #@ @# |
| | 626 | #@ http://www.karlrunge.com/x11vnc/faq.html#faq-passwd @# |
| | 627 | #@ @# |
| | 628 | #@ To disable this warning use the -nopw option, or put @# |
| | 629 | #@ the setting in your ~/.x11vncrc file. @# |
| | 630 | #@ @# |
| | 631 | #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# |
| | 632 | ############################################################### |
| | 633 | |
| | 634 | (snip) |
| | 635 | |
| | 636 | |
| | 637 | Some tips and guidelines: |
| | 638 | |
| | 639 | ** An X server (the one you wish to view) must be running before x11vnc is |
| | 640 | started: x11vnc does not start the X server. (however, see the -create |
| | 641 | option if that is what you really want). |
| | 642 | |
| | 643 | ** You must use -display <disp>, -OR- set and export your $DISPLAY |
| | 644 | environment variable to refer to the display of the desired X server. |
| | 645 | - Usually the display is simply ":0" (in fact x11vnc uses this if you forget |
| | 646 | to specify it), but in some multi-user situations it could be ":1", ":2", |
| | 647 | or even ":137". Ask your administrator or a guru if you are having |
| | 648 | difficulty determining what your X DISPLAY is. |
| | 649 | |
| | 650 | ** Next, you need to have sufficient permissions (Xauthority) |
| | 651 | to connect to the X DISPLAY. Here are some Tips: |
| | 652 | |
| | 653 | - Often, you just need to run x11vnc as the user logged into the X session. |
| | 654 | So make sure to be that user when you type x11vnc. |
| | 655 | - Being root is usually not enough because the incorrect MIT-MAGIC-COOKIE |
| | 656 | file may be accessed. The cookie file contains the secret key that |
| | 657 | allows x11vnc to connect to the desired X DISPLAY. |
| | 658 | - You can explicitly indicate which MIT-MAGIC-COOKIE file should be used |
| | 659 | by the -auth option, e.g.: |
| | 660 | x11vnc -auth /home/someuser/.Xauthority -display :0 |
| | 661 | x11vnc -auth /tmp/.gdmzndVlR -display :0 |
| | 662 | you must have read permission for the auth file. |
| | 663 | See also '-auth guess' and '-findauth' discussed below. |
| | 664 | |
| | 665 | ** If NO ONE is logged into an X session yet, but there is a greeter login |
| | 666 | program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need |
| | 667 | to find and use the raw display manager MIT-MAGIC-COOKIE file. |
| | 668 | Some examples for various display managers: |
| | 669 | |
| | 670 | gdm: -auth /var/gdm/:0.Xauth |
| | 671 | -auth /var/lib/gdm/:0.Xauth |
| | 672 | kdm: -auth /var/lib/kdm/A:0-crWk72 |
| | 673 | -auth /var/run/xauth/A:0-crWk72 |
| | 674 | xdm: -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk |
| | 675 | dtlogin: -auth /var/dt/A:0-UgaaXa |
| | 676 | |
| | 677 | Sometimes the command "ps wwwwaux | grep auth" can reveal the file location. |
| | 678 | |
| | 679 | Starting with x11vnc 0.9.9 you can have it try to guess by using: |
| | 680 | |
| | 681 | -auth guess |
| | 682 | |
| | 683 | (see also the x11vnc -findauth option.) |
| | 684 | |
| | 685 | Only root will have read permission for the file, and so x11vnc must be run |
| | 686 | as root (or copy it). The random characters in the filenames will of course |
| | 687 | change and the directory the cookie file resides in is system dependent. |
| | 688 | |
| | 689 | See also: http://www.karlrunge.com/x11vnc/faq.html |
| | 690 | }}} |