Results 1 to 3 of 3

Thread: tunneling x11vnc through ssh on a non standard port to ubuntu computer tightvnc

  1. #1
    Join Date
    Jun 2012
    Location
    US
    Beans
    40
    Distro
    Ubuntu 16.04 Xenial Xerus

    Unhappy tunneling x11vnc through ssh on a non standard port to ubuntu computer tightvnc

    Hi, I have been stuck with setting up my virtual desktop on my ubuntu laptop. I am running ubuntu to ubuntu with x11vnc I start the process on my laptop as follows: " ssh -L5904:localhost:5900 -p Port remoteuser@remoteip." That command works, then I start x11vnc server, "x11vnc -noncache -once -shared -rfbauth ~/.vnc/passwd." This command works and starts connection. Then I open another window on my laptop and type, export VNC_VIA_CMD='/usr/bin/ssh -2 -c aes128-cbc -x -p Port -l User -f -: %L:%H:%R %G sleep 20' (not sure if works). then I type, vncviewer -endcodings Tight -depth 8 -quality 1 -via IPofremotemachine -u remoteuser localhostort. The first time it work but from now on it just gives me the vncviewer -help screen everytime. I type in the password for my remote machine and then shows -help screen for vncviewer. I think the problem is with Tightvnc viewer but don't know what. Please help. I got some info on www.vanemery.com/Linux/VNC/vnc-over-ssh.html‎.
    Last edited by ty74; June 26th, 2013 at 08:20 PM.

  2. #2
    Join Date
    Apr 2012
    Beans
    7,256

    Re: tunneling x11vnc through ssh on a non standard port to ubuntu computer tightvnc

    If you want to connect again once the first connection is terminated, but disallow multiple concurrent connections, then you probably want to start x11vnc with '-never-shared -forever' instead of '-once -shared' - see

    Code:
    man x11vnc
    
           -once
    
                  Exit after the first successfully connected viewer  disconnects,
                  opposite of -forever. This is the Default.
    
           -forever
    
                  Keep  listening for more connections rather than exiting as soon
                  as the first client(s) disconnect. Same as -many
    
                  To get the standard non-shared VNC behavior where when a new VNC
                  client connects the existing VNC client is dropped use:  -never‐
                  shared -forever   This method can also be used to guard  against
                  hung TCP connections that do not go away.
    
    I'm not familiar with the VNC_VIA_CMD or the '-via' option but I suspect they are only applicable when you are tunneling via a (3rd) intermediate host - if you are tunneling straight from the x11vnc server to your laptop then once you have set up the SSH tunnel (which looks correct btw) and started the remote x11vnc server, afaik it *should* be sufficient just to do

    Code:
    vncviewer -encodings tight -depth 8 -quality 1 localhost::5904
    (where 5904 is your chosen alternative local port) or equivalently

    Code:
    vncviewer -encodings tight -depth 8 -quality 1 localhost:04
    Or you can use the Remmina VNC client which is standard in Ubuntu I think

  3. #3
    Join Date
    Jun 2012
    Location
    US
    Beans
    40
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: tunneling x11vnc through ssh on a non standard port to ubuntu computer tightvnc

    That did the trick the -nevershared -forever options on x11vnc command. Thanks for the tip steeldriver!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •