Results 1 to 6 of 6

Thread: problem with VNC setup

  1. #1

    Default problem with VNC setup

    Hi,

    I am trying to configure vnc on my home server from may laptop. Both are running opensuse leap along with KDE.

    I have googled for days with no luck.

    So i install tightvnc on server from ssh connection using yast on terminal.

    then i run
    Code:
    susebox:~ # vncserver 
    xauth: (argv):1:  bad display name "susebox:2" in "add" command
    
    New 'susebox:2 (admin)' desktop is susebox:2
    
    Starting applications specified in /root/.vnc/xstartup
    Log file is /root/.vnc/susebox:2.log
    Code:
    susebox:~ # vncviewer susebox:2
    
    TigerVNC Viewer 64-bit v1.6.0
    Built on: ??-??-?? ??:??
    Copyright (C) 1999-2015 TigerVNC Team and many others (see README.txt)
    See http://www.tigervnc.org for information on TigerVNC.
    Can't open display:
    i tried # vncviewer ip_server:2 also got an error

    i disable firewall, still no luck...
    i have find this topic here, there are lot covered my topic but still i couldn't solve my problem...

  2. #2
    Join Date
    Nov 2013
    Location
    Kamloops, BC, Canada
    Posts
    3,974

    Default Re: problem with VNC setup

    First question, is susebox the remote PC?
    -Gerry Makaro
    Fraser-Bell Info Tech
    Solving Tech Mysteries since the Olden Days!
    ~~
    If I helped you, consider clicking the Star at the bottom left of my post.

  3. #3

    Default Re: problem with VNC setup

    yes, susebox is pc i want to remote.
    Quote Originally Posted by Fraser_Bell View Post
    First question, is susebox the remote PC?

  4. #4
    Join Date
    Nov 2013
    Location
    Kamloops, BC, Canada
    Posts
    3,974

    Default Re: problem with VNC setup

    Quote Originally Posted by momod View Post
    Hi,

    I am trying to configure vnc on my home server from may laptop. Both are running opensuse leap along with KDE.

    I have googled for days with no luck.

    So i install tightvnc on server from ssh connection using yast on terminal.

    then i run
    Code:
    susebox:~ # vncserver 
    xauth: (argv):1:  bad display name "susebox:2" in "add" command
    
    New 'susebox:2 (admin)' desktop is susebox:2
    
    Starting applications specified in /root/.vnc/xstartup
    Log file is /root/.vnc/susebox:2.log
    Code:
    susebox:~ # vncviewer susebox:2
    
    TigerVNC Viewer 64-bit v1.6.0
    Built on: ??-??-?? ??:??
    Copyright (C) 1999-2015 TigerVNC Team and many others (see README.txt)
    See http://www.tigervnc.org for information on TigerVNC.
    Can't open display:
    If susebox is the remote machine, then you are trying to run the viewer on the remote machine. You need to run it locally.

    After you have run vncserver on the remote machine, log out of that ssh session, keep the console open, but keep note that the display number, in this case, is 2. This number might be different the next time you evoke vncserver on that machine, so remember to pay attention to that number.

    Now, the generic command you would issue would be like this, but since you are spawning a new desktop session on the remote machine, look to the next example for the changes you need to make:
    NORMALLY:
    Code:
    ssh -t -L 5900:localhost:5900 YourUser@xxx.xxx.xxx.x 'x11vnc -localhost -nolookup -nopw -display :0'
    That is normally how you would open the x11vnc ssh connection from your machine to the remote machine, if the user is already logged into the desktop.

    However, since you are not connecting to display 0, but instead to display 2 in your above example, you need to change the 5900 to 5902 and the display:0 to display:2, like this:
    Code:
    ssh -t -L 5902:localhost:5902 YourUser@xxx.xxx.xxx.x 'x11vnc -localhost -nolookup -nopw -display :2'
    Leave that console window open.

    Of course, you need to be certain that the 590x ports are open in your firewall.

    Also, if going through a router remotely over the internet, you need to map those ports in the router to your server.

    Then, you need to open a second console locally, and issue:
    Code:
    vncviewer localhost:2
    ... or, you could just issue:
    Code:
    vncviewer
    and a small gui will pop up, where you can enter the
    Code:
    localhost:2
    in the provided box.

    Do not worry about any notice that the connection is not secure: It is, since you are connected through an ssh connection (the first part of the command given in the first terminal window).
    -Gerry Makaro
    Fraser-Bell Info Tech
    Solving Tech Mysteries since the Olden Days!
    ~~
    If I helped you, consider clicking the Star at the bottom left of my post.

  5. #5

    Default Re: problem with VNC setup [SOLVED]

    thanks fraser was bit struggle to running command
    but now it works
    Quote Originally Posted by Fraser_Bell View Post
    If susebox is the remote machine, then you are trying to run the viewer on the remote machine. You need to run it locally.

    After you have run vncserver on the remote machine, log out of that ssh session, keep the console open, but keep note that the display number, in this case, is 2. This number might be different the next time you evoke vncserver on that machine, so remember to pay attention to that number.

    Now, the generic command you would issue would be like this, but since you are spawning a new desktop session on the remote machine, look to the next example for the changes you need to make:
    NORMALLY:
    Code:
    ssh -t -L 5900:localhost:5900 YourUser@xxx.xxx.xxx.x 'x11vnc -localhost -nolookup -nopw -display :0'
    That is normally how you would open the x11vnc ssh connection from your machine to the remote machine, if the user is already logged into the desktop.


    However, since you are not connecting to display 0, but instead to display 2 in your above example, you need to change the 5900 to 5902 and the display:0 to display:2, like this:
    Code:
    ssh -t -L 5902:localhost:5902 YourUser@xxx.xxx.xxx.x 'x11vnc -localhost -nolookup -nopw -display :2'
    Leave that console window open.

    Of course, you need to be certain that the 590x ports are open in your firewall.

    Also, if going through a router remotely over the internet, you need to map those ports in the router to your server.

    Then, you need to open a second console locally, and issue:
    Code:
    vncviewer localhost:2
    ... or, you could just issue:
    Code:
    vncviewer
    and a small gui will pop up, where you can enter the
    Code:
    localhost:2
    in the provided box.

    Do not worry about any notice that the connection is not secure: It is, since you are connected through an ssh connection (the first part of the command given in the first terminal window).

  6. #6
    Join Date
    Nov 2013
    Location
    Kamloops, BC, Canada
    Posts
    3,974

    Default Re: problem with VNC setup [SOLVED]

    Quote Originally Posted by momod View Post
    thanks fraser was bit struggle to running command
    but now it works
    I keep a copy of that first command in a small "connectivity" textfile where I can just copy it, paste it, and make any necessary changes. Makes it a lot easier.

    You are welcome, have fun.
    -Gerry Makaro
    Fraser-Bell Info Tech
    Solving Tech Mysteries since the Olden Days!
    ~~
    If I helped you, consider clicking the Star at the bottom left of my post.

Posting Permissions

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