Page 2 of 3

Re: Trouble working with SSH

Posted: 1. Jul 2011, 23:24
by Dennola4
Hi aiya88. Actually X11 is on this Mac:

Code: Select all

Original-Art-iMac:~ gallerydir$ locate X11 | grep bin
/Applications/Utilities/X11.app/Contents/MacOS/X11.bin
/usr/X11/bin
/usr/X11/bin/X
/usr/X11/bin/Xephyr
/usr/X11/bin/Xfake
/usr/X11/bin/Xnest
/usr/X11/bin/Xquartz
/usr/X11/bin/Xvfb
/usr/X11/bin/appres
/usr/X11/bin/atobm
/usr/X11/bin/bdftopcf
/usr/X11/bin/bdftruncate
/usr/X11/bin/bitmap
/usr/X11/bin/bmtoa
/usr/X11/bin/cxpm
/usr/X11/bin/editres
/usr/X11/bin/fc-cache
/usr/X11/bin/fc-cat
/usr/X11/bin/fc-list
/usr/X11/bin/fc-match
/usr/X11/bin/fc-query
/usr/X11/bin/fc-scan
/usr/X11/bin/font_cache
/usr/X11/bin/fonttosfnt
/usr/X11/bin/freetype-config
/usr/X11/bin/fslsfonts
/usr/X11/bin/fstobdf
/usr/X11/bin/gccmakedep
/usr/X11/bin/glxgears
/usr/X11/bin/glxinfo
/usr/X11/bin/iceauth
/usr/X11/bin/ico
/usr/X11/bin/koi8rxterm
/usr/X11/bin/libpng-config
/usr/X11/bin/libpng12-config
/usr/X11/bin/listres
/usr/X11/bin/lndir
/usr/X11/bin/luit
/usr/X11/bin/makedepend
/usr/X11/bin/makestrs
/usr/X11/bin/mkfontdir
/usr/X11/bin/mkfontscale
/usr/X11/bin/oclock
/usr/X11/bin/resize
/usr/X11/bin/sessreg
/usr/X11/bin/setxkbmap
/usr/X11/bin/showfont
/usr/X11/bin/showrgb
/usr/X11/bin/startx
/usr/X11/bin/sxpm
/usr/X11/bin/twm
/usr/X11/bin/ucs2any
/usr/X11/bin/uxterm
/usr/X11/bin/viewres
/usr/X11/bin/x11perf
/usr/X11/bin/x11perfcomp
/usr/X11/bin/xauth
/usr/X11/bin/xcalc
/usr/X11/bin/xclipboard
/usr/X11/bin/xclock
/usr/X11/bin/xconsole
/usr/X11/bin/xcursorgen
/usr/X11/bin/xcutsel
/usr/X11/bin/xditview
/usr/X11/bin/xdm
/usr/X11/bin/xdmshell
/usr/X11/bin/xdpr
/usr/X11/bin/xdpyinfo
/usr/X11/bin/xedit
/usr/X11/bin/xev
/usr/X11/bin/xeyes
/usr/X11/bin/xfd
/usr/X11/bin/xfontsel
/usr/X11/bin/xfs
/usr/X11/bin/xfsinfo
/usr/X11/bin/xft-config
/usr/X11/bin/xgc
/usr/X11/bin/xhost
/usr/X11/bin/xinit
/usr/X11/bin/xinput
/usr/X11/bin/xkbbell
/usr/X11/bin/xkbcomp
/usr/X11/bin/xkbevd
/usr/X11/bin/xkbprint
/usr/X11/bin/xkbvleds
/usr/X11/bin/xkbwatch
/usr/X11/bin/xkeystone
/usr/X11/bin/xkill
/usr/X11/bin/xload
/usr/X11/bin/xlogo
/usr/X11/bin/xlsatoms
/usr/X11/bin/xlsclients
/usr/X11/bin/xlsfonts
/usr/X11/bin/xmag
/usr/X11/bin/xman
/usr/X11/bin/xmessage
/usr/X11/bin/xmh
/usr/X11/bin/xmodmap
/usr/X11/bin/xmore
/usr/X11/bin/xpr
/usr/X11/bin/xprop
/usr/X11/bin/xrandr
/usr/X11/bin/xrdb
/usr/X11/bin/xrefresh
/usr/X11/bin/xset
/usr/X11/bin/xsetmode
/usr/X11/bin/xsetpointer
/usr/X11/bin/xsetroot
/usr/X11/bin/xsm
/usr/X11/bin/xstdcmap
/usr/X11/bin/xterm
/usr/X11/bin/xtrapchar
/usr/X11/bin/xtrapin
/usr/X11/bin/xtrapinfo
/usr/X11/bin/xtrapout
/usr/X11/bin/xtrapproto
/usr/X11/bin/xtrapreset
/usr/X11/bin/xtrapstats
/usr/X11/bin/xvinfo
/usr/X11/bin/xwd
/usr/X11/bin/xwininfo
/usr/X11/bin/xwud
/usr/X11/lib/X11/fonts/OTF/SyrCOMNisibin.otf
/usr/X11/lib/X11/fonts/OTF/SyrCOMNisibinOutline.otf
/usr/X11/share/gtk-doc/html/cairo/bindings-errors.html
/usr/X11/share/gtk-doc/html/cairo/bindings-fonts.html
/usr/X11/share/gtk-doc/html/cairo/bindings-memory.html
/usr/X11/share/gtk-doc/html/cairo/bindings-overloading.html
/usr/X11/share/gtk-doc/html/cairo/bindings-path.html
/usr/X11/share/gtk-doc/html/cairo/bindings-patterns.html
/usr/X11/share/gtk-doc/html/cairo/bindings-return-values.html
/usr/X11/share/gtk-doc/html/cairo/bindings-streams.html
/usr/X11/share/gtk-doc/html/cairo/bindings-surfaces.html
/usr/X11/share/gtk-doc/html/cairo/language-bindings.html

Anyway, I tried your suggestion. I opened an xterm. First I ran Gapan's command to connect to my server. Once connected as dennis@darkstar I ran Gapan's second command (to create a tunnel) from the xterm session. I received the same message:

Code: Select all

01/07/2011 18:18:05 x11vnc version: 0.9.10 lastmod: 2010-04-28  pid: 18423
No protocol specified
01/07/2011 18:18:05 XOpenDisplay(":0") failed.
01/07/2011 18:18:05 Trying again with XAUTHLOCALHOSTNAME=localhost ...
No protocol specified

01/07/2011 18:18:05 ***************************************
01/07/2011 18:18:05 *** XOpenDisplay failed (:0)
EDIT: I am now at home on the Linux server I have been connecting to from the Mac. When I run this on the machine:

Code: Select all

ssh -p 6666 -C -t -L 5900:localhost:5900 dennis@localhost 'x11vnc -display :0'
I get this:

Code: Select all

###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  **  WARNING  **  WARNING  **  WARNING  **  WARNING  **   @#
#@                                                           @#
#@        YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!        @#
#@                                                           @#
#@  This means anyone with network access to this computer   @#
#@  may be able to view and control your desktop.            @#
#@                                                           @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  You can create an x11vnc password file by running:       @#
#@                                                           @#
#@       x11vnc -storepasswd password /path/to/passfile      @#
#@  or   x11vnc -storepasswd /path/to/passfile               @#
#@  or   x11vnc -storepasswd                                 @#
#@                                                           @#
#@  (the last one will use ~/.vnc/passwd)                    @#
#@                                                           @#
#@  and then starting x11vnc via:                            @#
#@                                                           @#
#@      x11vnc -rfbauth /path/to/passfile                    @#
#@                                                           @#
#@  an existing ~/.vnc/passwd file from another VNC          @#
#@  application will work fine too.                          @#
#@                                                           @#
#@  You can also use the -passwdfile or -passwd options.     @#
#@  (note -passwd is unsafe if local users are not trusted)  @#
#@                                                           @#
#@  Make sure any -rfbauth and -passwdfile password files    @#
#@  cannot be read by untrusted users.                       @#
#@                                                           @#
#@  Use x11vnc -usepw to automatically use your              @#
#@  ~/.vnc/passwd or ~/.vnc/passwdfile password files.       @#
#@  (and prompt you to create ~/.vnc/passwd if neither       @#
#@  file exists.)  Under -usepw, x11vnc will exit if it      @#
#@  cannot find a password to use.                           @#
#@                                                           @#
#@                                                           @#
#@  Even with a password, the subsequent VNC traffic is      @#
#@  sent in the clear.  Consider tunnelling via ssh(1):      @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/#tunnelling            @#
#@                                                           @#
#@  Or using the x11vnc SSL options: -ssl and -stunnel       @#
#@                                                           @#
#@  Please Read the documention for more info about          @#
#@  passwords, security, and encryption.                     @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/faq.html#faq-passwd    @#
#@                                                           @#
#@  To disable this warning use the -nopw option, or put     @#
#@  the setting in your ~/.x11vncrc file.                    @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
###############################################################
01/07/2011 22:44:04 x11vnc version: 0.9.10 lastmod: 2010-04-28  pid: 31720
No protocol specified
01/07/2011 22:44:04 XOpenDisplay(":0") failed.
01/07/2011 22:44:04 Trying again with XAUTHLOCALHOSTNAME=localhost ...
No protocol specified

01/07/2011 22:44:04 ***************************************
01/07/2011 22:44:04 *** XOpenDisplay failed (:0)

*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.

Some tips and guidelines:

** An X server (the one you wish to view) must be running before x11vnc is
   started: x11vnc does not start the X server.  (however, see the -create
   option if that is what you really want).

** You must use -display <disp>, -OR- set and export your $DISPLAY
   environment variable to refer to the display of the desired X server.
 - Usually the display is simply ":0" (in fact x11vnc uses this if you forget
   to specify it), but in some multi-user situations it could be ":1", ":2",
   or even ":137".  Ask your administrator or a guru if you are having
   difficulty determining what your X DISPLAY is.

** Next, you need to have sufficient permissions (Xauthority) 
   to connect to the X DISPLAY.   Here are some Tips:

 - Often, you just need to run x11vnc as the user logged into the X session.
   So make sure to be that user when you type x11vnc.
 - Being root is usually not enough because the incorrect MIT-MAGIC-COOKIE
   file may be accessed.  The cookie file contains the secret key that
   allows x11vnc to connect to the desired X DISPLAY.
 - You can explicitly indicate which MIT-MAGIC-COOKIE file should be used
   by the -auth option, e.g.:
       x11vnc -auth /home/someuser/.Xauthority -display :0
       x11vnc -auth /tmp/.gdmzndVlR -display :0
   you must have read permission for the auth file.
   See also '-auth guess' and '-findauth' discussed below.

** If NO ONE is logged into an X session yet, but there is a greeter login
   program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need
   to find and use the raw display manager MIT-MAGIC-COOKIE file.
   Some examples for various display managers:

     gdm:     -auth /var/gdm/:0.Xauth
              -auth /var/lib/gdm/:0.Xauth
     kdm:     -auth /var/lib/kdm/A:0-crWk72
              -auth /var/run/xauth/A:0-crWk72
     xdm:     -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
     dtlogin: -auth /var/dt/A:0-UgaaXa

   Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.

   Starting with x11vnc 0.9.9 you can have it try to guess by using:

              -auth guess

   (see also the x11vnc -findauth option.)

   Only root will have read permission for the file, and so x11vnc must be run
   as root (or copy it).  The random characters in the filenames will of course
   change and the directory the cookie file resides in is system dependent.

See also: http://www.karlrunge.com/x11vnc/faq.html
Connection to localhost closed.
dennis@darkstar:~$ 
:?:

Re: Trouble working with SSH

Posted: 2. Jul 2011, 16:25
by gapan
Do you have an active X session under user "dennis" in the server? Are you logged in a desktop environment?

Re: Trouble working with SSH

Posted: 2. Jul 2011, 17:51
by Dennola4
Do you have an active X session under user "dennis" in the server? Are you logged in a desktop environment?
I boot my computer, get to the SalixOS login screen which prompts me for user name (dennis) and password, then xfce4 starts and I am on my user desktop. If I open a terminal emulator and issue the command:

Code: Select all

x11vnc -rfbauth /home/dennis/.vnc/passwd 
I get an X11 session whose display is darkstar:0 and which listens on port 5900. Any other command seems to yield the error message I keep reporting. I had the idea of running this command first on the server then trying to connect to it from the client with:

Code: Select all

ssh -p 6666 -C -t -L 5900:localhost:5900 dennis@server_ip 'x11vnc -display :0'
but it didn't work and I honestly don't know if it even makes any sense. Just trying stuff.

:?

Re: Trouble working with SSH

Posted: 2. Jul 2011, 21:34
by aiya88
Hi,

I think what Gapan meant was "when you tried to connect to your server from your mac, did your xfce was already launched?" (I think :) )

The x11vnc FAQ tells about the error your encountering (sorry, I don't have enough posts to give you the URL). Maybe your connection can't get the right permissions, so maybe you could try something like that:

Code: Select all

ssh -p 6666 -C -t -L 5900:localhost:5900 dennis@localhost 'x11vnc -display :0 -auth /home/dennis/.Xauthority'

Re: Trouble working with SSH

Posted: 2. Jul 2011, 22:16
by Dennola4
aiya88,

I am reading the page I think you are referring to: http://www.karlrunge.com/x11vnc/faq.html#faq-xperms and since the command x11vnc works from the server computer which hosts the X display, I think you are right when you suggest it is a permissions issue. Going to try to solve it and if I have success I will post.

Thanks for helping. :-)

EDIT: Ok, so from the client computer I managed to run x11vnc with the following command (which is slightly altered for security reasons, obviously):

Code: Select all

dennis@darkstar:~$ ssh -p 6666 -C -t -L 5900:localhost:5900 dennis@111.222.333.44 'sudo x11vnc -rfbauth ~/.vnc/passwd -auth /var/state/gdm/:0.Xauth -display :0'
which got the following response:

Code: Select all

03/07/2011 01:35:46 passing arg to libvncserver: -rfbauth
03/07/2011 01:35:46 passing arg to libvncserver: /home/dennis/.vnc/passwd
03/07/2011 01:35:46 x11vnc version: 0.9.10 lastmod: 2010-04-28  pid: 17080
03/07/2011 01:35:46 Using X display :0
03/07/2011 01:35:46 rootwin: 0xac reswin: 0x3800001 dpy: 0x83f74f0
03/07/2011 01:35:46
03/07/2011 01:35:46 ------------------ USEFUL INFORMATION ------------------
03/07/2011 01:35:46 X DAMAGE available on display, using it for polling hints.
03/07/2011 01:35:46   To disable this behavior use: '-noxdamage'
03/07/2011 01:35:46
03/07/2011 01:35:46   Most compositing window managers like 'compiz' or 'beryl'
03/07/2011 01:35:46   cause X DAMAGE to fail, and so you may not see any screen
03/07/2011 01:35:46   updates via VNC.  Either disable 'compiz' (recommended) or
03/07/2011 01:35:46   supply the x11vnc '-noxdamage' command line option.
03/07/2011 01:35:46
03/07/2011 01:35:46 Wireframing: -wireframe mode is in effect for window moves.
03/07/2011 01:35:46   If this yields undesired behavior (poor response, painting
03/07/2011 01:35:46   errors, etc) it may be disabled:
03/07/2011 01:35:46    - use '-nowf' to disable wireframing completely.
03/07/2011 01:35:46    - use '-nowcr' to disable the Copy Rectangle after the
03/07/2011 01:35:46      moved window is released in the new position.
03/07/2011 01:35:46   Also see the -help entry for tuning parameters.
03/07/2011 01:35:46   You can press 3 Alt_L's (Left "Alt" key) in a row to
03/07/2011 01:35:46   repaint the screen, also see the -fixscreen option for
03/07/2011 01:35:46   periodic repaints.
03/07/2011 01:35:46
03/07/2011 01:35:46 XFIXES available on display, resetting cursor mode
03/07/2011 01:35:46   to: '-cursor most'.
03/07/2011 01:35:46   to disable this behavior use: '-cursor arrow'
03/07/2011 01:35:46   or '-noxfixes'.
03/07/2011 01:35:46 using XFIXES for cursor drawing.
03/07/2011 01:35:46 GrabServer control via XTEST.
Xlib:  extension "RECORD" missing on display ":0.0".
03/07/2011 01:35:46
03/07/2011 01:35:46 The RECORD X extension was not found on the display.
03/07/2011 01:35:46 If your system has disabled it by default, you can
03/07/2011 01:35:46 enable it to get a nice x11vnc performance speedup
03/07/2011 01:35:46 for scrolling by putting this into the "Module" section
03/07/2011 01:35:46 of /etc/X11/xorg.conf or /etc/X11/XF86Config:
03/07/2011 01:35:46
03/07/2011 01:35:46   Section "Module"
03/07/2011 01:35:46   ...
03/07/2011 01:35:46       Load    "record"
03/07/2011 01:35:46   ...
03/07/2011 01:35:46   EndSection
03/07/2011 01:35:46
03/07/2011 01:35:46
03/07/2011 01:35:46 XKEYBOARD: number of keysyms per keycode 6 is greater
03/07/2011 01:35:46   than 4 and 2 keysyms are mapped above 4.
03/07/2011 01:35:46   Automatically switching to -xkb mode.
03/07/2011 01:35:46   If this makes the key mapping worse you can
03/07/2011 01:35:46   disable it with the "-noxkb" option.
03/07/2011 01:35:46   Also, remember "-remap DEAD" for accenting characters.
03/07/2011 01:35:46
03/07/2011 01:35:46 X FBPM extension not supported.
03/07/2011 01:35:46 X display is capable of DPMS.
03/07/2011 01:35:46 --------------------------------------------------------
03/07/2011 01:35:46
03/07/2011 01:35:46 Default visual ID: 0x21
03/07/2011 01:35:46 Read initial data from X display into framebuffer.
03/07/2011 01:35:46 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
03/07/2011 01:35:46
03/07/2011 01:35:46 X display :0.0 is 32bpp depth=24 true color
03/07/2011 01:35:46
03/07/2011 01:35:46 Autoprobing TCP port
03/07/2011 01:35:46 Autoprobing selected port 5901
03/07/2011 01:35:46 Listening also on IPv6 port 5901 (socket 6)
03/07/2011 01:35:46
03/07/2011 01:35:46 Xinerama is present and active (e.g. multi-head).
03/07/2011 01:35:46 Xinerama: number of sub-screens: 1
03/07/2011 01:35:46 Xinerama: no blackouts needed (only one sub-screen)
03/07/2011 01:35:46
03/07/2011 01:35:46 fb read rate: 76 MB/sec
03/07/2011 01:35:46 The X server says there are 13 mouse buttons.
03/07/2011 01:35:46 screen setup finished.
03/07/2011 01:35:46

The VNC desktop is:      darkstar:1
PORT=5901

******************************************************************************
A step closer. Now what?

:?: :shock: :?:

Re: Trouble working with SSH

Posted: 3. Jul 2011, 14:58
by gapan
For some reason you get PORT=5901. So try this instead:

Code: Select all

ssh -p 6666 -C -t -L 5901:localhost:5901 dennis@111.222.333.44 'sudo x11vnc -rfbauth ~/.vnc/passwd -auth /var/state/gdm/:0.Xauth -display :0'

Re: Trouble working with SSH

Posted: 3. Jul 2011, 16:20
by Dennola4
1) pre-establish faraway Linux server with user 'dennis' logged into active X session.
2) from local Unix client open terminal and enter:

Code: Select all

ssh -p 6666 dennis@111.222.333.44
3) Now I am dennis@darkstar and can access remote files. In this same terminal I now type:

Code: Select all

ssh -p 6666 -C -t -L 5901:localhost:5901 dennis@111.222.333.44 'sudo x11vnc -rfbauth ~/.vnc/passwd -auth /var/state/gdm/:0.Xauth -display :0'
and get:

Code: Select all

03/07/2011 11:09:18 passing arg to libvncserver: -rfbauth
03/07/2011 11:09:18 passing arg to libvncserver: /home/dennis/.vnc/passwd
03/07/2011 11:09:18 x11vnc version: 0.9.10 lastmod: 2010-04-28  pid: 14660
03/07/2011 11:09:18 Using X display :0
03/07/2011 11:09:18 rootwin: 0xac reswin: 0x3600001 dpy: 0x83f74f0
03/07/2011 11:09:18 
03/07/2011 11:09:18 ------------------ USEFUL INFORMATION ------------------
03/07/2011 11:09:18 X DAMAGE available on display, using it for polling hints.
03/07/2011 11:09:18   To disable this behavior use: '-noxdamage'
03/07/2011 11:09:18 
03/07/2011 11:09:18   Most compositing window managers like 'compiz' or 'beryl'
03/07/2011 11:09:18   cause X DAMAGE to fail, and so you may not see any screen
03/07/2011 11:09:18   updates via VNC.  Either disable 'compiz' (recommended) or
03/07/2011 11:09:18   supply the x11vnc '-noxdamage' command line option.
03/07/2011 11:09:18 
03/07/2011 11:09:18 Wireframing: -wireframe mode is in effect for window moves.
03/07/2011 11:09:18   If this yields undesired behavior (poor response, painting
03/07/2011 11:09:18   errors, etc) it may be disabled:
03/07/2011 11:09:18    - use '-nowf' to disable wireframing completely.
03/07/2011 11:09:18    - use '-nowcr' to disable the Copy Rectangle after the
03/07/2011 11:09:18      moved window is released in the new position.
03/07/2011 11:09:18   Also see the -help entry for tuning parameters.
03/07/2011 11:09:18   You can press 3 Alt_L's (Left "Alt" key) in a row to 
03/07/2011 11:09:18   repaint the screen, also see the -fixscreen option for
03/07/2011 11:09:18   periodic repaints.
03/07/2011 11:09:18 
03/07/2011 11:09:18 XFIXES available on display, resetting cursor mode
03/07/2011 11:09:18   to: '-cursor most'.
03/07/2011 11:09:18   to disable this behavior use: '-cursor arrow'
03/07/2011 11:09:18   or '-noxfixes'.
03/07/2011 11:09:18 using XFIXES for cursor drawing.
03/07/2011 11:09:18 GrabServer control via XTEST.
Xlib:  extension "RECORD" missing on display ":0.0".
03/07/2011 11:09:18 
03/07/2011 11:09:18 The RECORD X extension was not found on the display.
03/07/2011 11:09:18 If your system has disabled it by default, you can
03/07/2011 11:09:18 enable it to get a nice x11vnc performance speedup
03/07/2011 11:09:18 for scrolling by putting this into the "Module" section
03/07/2011 11:09:18 of /etc/X11/xorg.conf or /etc/X11/XF86Config:
03/07/2011 11:09:18 
03/07/2011 11:09:18   Section "Module"
03/07/2011 11:09:18   ...
03/07/2011 11:09:18       Load    "record"
03/07/2011 11:09:18   ...
03/07/2011 11:09:18   EndSection
03/07/2011 11:09:18 
03/07/2011 11:09:18 
03/07/2011 11:09:18 XKEYBOARD: number of keysyms per keycode 6 is greater
03/07/2011 11:09:18   than 4 and 2 keysyms are mapped above 4.
03/07/2011 11:09:18   Automatically switching to -xkb mode.
03/07/2011 11:09:18   If this makes the key mapping worse you can
03/07/2011 11:09:18   disable it with the "-noxkb" option.
03/07/2011 11:09:18   Also, remember "-remap DEAD" for accenting characters.
03/07/2011 11:09:18 
03/07/2011 11:09:18 X FBPM extension not supported.
03/07/2011 11:09:18 X display is capable of DPMS.
03/07/2011 11:09:18 --------------------------------------------------------
03/07/2011 11:09:18 
03/07/2011 11:09:18 Default visual ID: 0x21
03/07/2011 11:09:18 Read initial data from X display into framebuffer.
03/07/2011 11:09:18 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
03/07/2011 11:09:18 
03/07/2011 11:09:18 X display :0.0 is 32bpp depth=24 true color
03/07/2011 11:09:18 
03/07/2011 11:09:18 Autoprobing TCP port 
03/07/2011 11:09:18 Autoprobing selected port 5900
03/07/2011 11:09:18 Listening also on IPv6 port 5900 (socket 6)
03/07/2011 11:09:18 
03/07/2011 11:09:18 Xinerama is present and active (e.g. multi-head).
03/07/2011 11:09:18 Xinerama: number of sub-screens: 1
03/07/2011 11:09:18 Xinerama: no blackouts needed (only one sub-screen)
03/07/2011 11:09:18 
03/07/2011 11:09:18 fb read rate: 79 MB/sec
03/07/2011 11:09:18 The X server says there are 13 mouse buttons.
03/07/2011 11:09:18 screen setup finished.
03/07/2011 11:09:18 

The VNC desktop is:      darkstar:0
PORT=5900

******************************************************************************
Next step?

:?:

Re: Trouble working with SSH

Posted: 3. Jul 2011, 18:44
by gapan
Dennola4 wrote:3) Now I am dennis@darkstar and can access remote files. In this same terminal I now type:

Code: Select all

ssh -p 6666 -C -t -L 5901:localhost:5901 dennis@111.222.333.44 'sudo x11vnc -rfbauth ~/.vnc/passwd -auth /var/state/gdm/:0.Xauth -display :0'
Don't run this in the same terminal as the one you are already connected through ssh. Run it in a new terminal in your client.

Re: Trouble working with SSH

Posted: 3. Jul 2011, 20:10
by Dennola4
Ok Gapan,

so I followed the above steps only this time ran the first ssh command in terminal "A" on the client, then ran the second command in terminal "B" on the client....as you instructed.

The output of terminal "A":

Code: Select all

Last login: Sun Jul  3 14:32:41 2011 from adsl-11-222-33-44.msy.bellsouth.net
Linux 2.6.33.4-smp.
dennis@darkstar:~$
The output from terminal "B":

Code: Select all

Last login: Sun Jul  3 14:42:03 on ttys001
Original-Art-iMac:~ gallerydir$ ssh -p 6666 -C -L 5901:localhost:5901 dennis@111.222.333.444 'sudo x11vnc -rfbauth ~/.vnc/passwd -auth /var/state/gdm/:0.Xauth -display :0'
dennis@111.222.333.444's password: 
03/07/2011 14:44:38 passing arg to libvncserver: -rfbauth
03/07/2011 14:44:38 passing arg to libvncserver: /home/dennis/.vnc/passwd
03/07/2011 14:44:38 x11vnc version: 0.9.10 lastmod: 2010-04-28  pid: 25573
03/07/2011 14:44:38 Using X display :0
03/07/2011 14:44:38 rootwin: 0xac reswin: 0x4400001 dpy: 0x83f74f0
03/07/2011 14:44:38 
03/07/2011 14:44:38 ------------------ USEFUL INFORMATION ------------------
03/07/2011 14:44:38 X DAMAGE available on display, using it for polling hints.
03/07/2011 14:44:38   To disable this behavior use: '-noxdamage'
03/07/2011 14:44:38 
03/07/2011 14:44:38   Most compositing window managers like 'compiz' or 'beryl'
03/07/2011 14:44:38   cause X DAMAGE to fail, and so you may not see any screen
03/07/2011 14:44:38   updates via VNC.  Either disable 'compiz' (recommended) or
03/07/2011 14:44:38   supply the x11vnc '-noxdamage' command line option.
03/07/2011 14:44:38 
03/07/2011 14:44:38 Wireframing: -wireframe mode is in effect for window moves.
03/07/2011 14:44:38   If this yields undesired behavior (poor response, painting
03/07/2011 14:44:38   errors, etc) it may be disabled:
03/07/2011 14:44:38    - use '-nowf' to disable wireframing completely.
03/07/2011 14:44:38    - use '-nowcr' to disable the Copy Rectangle after the
03/07/2011 14:44:38      moved window is released in the new position.
03/07/2011 14:44:38   Also see the -help entry for tuning parameters.
03/07/2011 14:44:38   You can press 3 Alt_L's (Left "Alt" key) in a row to 
03/07/2011 14:44:38   repaint the screen, also see the -fixscreen option for
03/07/2011 14:44:38   periodic repaints.
03/07/2011 14:44:38 
03/07/2011 14:44:38 XFIXES available on display, resetting cursor mode
03/07/2011 14:44:38   to: '-cursor most'.
03/07/2011 14:44:38   to disable this behavior use: '-cursor arrow'
03/07/2011 14:44:38   or '-noxfixes'.
03/07/2011 14:44:38 using XFIXES for cursor drawing.
03/07/2011 14:44:38 GrabServer control via XTEST.
Xlib:  extension "RECORD" missing on display ":0.0".
03/07/2011 14:44:38 
03/07/2011 14:44:38 The RECORD X extension was not found on the display.
03/07/2011 14:44:38 If your system has disabled it by default, you can
03/07/2011 14:44:38 enable it to get a nice x11vnc performance speedup
03/07/2011 14:44:38 for scrolling by putting this into the "Module" section
03/07/2011 14:44:38 of /etc/X11/xorg.conf or /etc/X11/XF86Config:
03/07/2011 14:44:38 
03/07/2011 14:44:38   Section "Module"
03/07/2011 14:44:38   ...
03/07/2011 14:44:38       Load    "record"
03/07/2011 14:44:38   ...
03/07/2011 14:44:38   EndSection
03/07/2011 14:44:38 
03/07/2011 14:44:38 
03/07/2011 14:44:38 XKEYBOARD: number of keysyms per keycode 6 is greater
03/07/2011 14:44:38   than 4 and 2 keysyms are mapped above 4.
03/07/2011 14:44:38   Automatically switching to -xkb mode.
03/07/2011 14:44:38   If this makes the key mapping worse you can
03/07/2011 14:44:38   disable it with the "-noxkb" option.
03/07/2011 14:44:38   Also, remember "-remap DEAD" for accenting characters.
03/07/2011 14:44:38 
03/07/2011 14:44:38 X FBPM extension not supported.
03/07/2011 14:44:38 X display is capable of DPMS.
03/07/2011 14:44:38 --------------------------------------------------------
03/07/2011 14:44:38 
03/07/2011 14:44:38 Default visual ID: 0x21
03/07/2011 14:44:38 Read initial data from X display into framebuffer.
03/07/2011 14:44:38 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
03/07/2011 14:44:38 
03/07/2011 14:44:38 X display :0.0 is 32bpp depth=24 true color
03/07/2011 14:44:38 
03/07/2011 14:44:38 Autoprobing TCP port 
03/07/2011 14:44:38 Autoprobing selected port 5901
03/07/2011 14:44:38 Listening also on IPv6 port 5901 (socket 6)
03/07/2011 14:44:38 
03/07/2011 14:44:38 PORT=5901
Xinerama is present and active (e.g. multi-head).
03/07/2011 14:44:38 Xinerama: number of sub-screens: 1
03/07/2011 14:44:38 Xinerama: no blackouts needed (only one sub-screen)
03/07/2011 14:44:38 
03/07/2011 14:44:38 fb read rate: 78 MB/sec
03/07/2011 14:44:38 The X server says there are 13 mouse buttons.
03/07/2011 14:44:38 screen setup finished.
03/07/2011 14:44:38 

The VNC desktop is:      darkstar:1

******************************************************************************
Next step?

Re: Trouble working with SSH

Posted: 3. Jul 2011, 20:18
by gapan
Open a new terminal and run:

Code: Select all

vncviewer -compresslevel 9 localhost
BTW, you don't need the first terminal, it was only to test the ssh connection.