Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: How can I VNC my Ubuntu from Mac?

  1. #1
    Join Date
    Nov 2010
    Beans
    28

    How can I VNC my Ubuntu from Mac?

    I have installed VNC Server x11vnc on my Ubuntu 10.10 according to instructions on https://help.ubuntu.com/community/VNC .
    I can ssh to my Ubuntu from my macbook OS X 10.6 through home router and get output like:
    ...
    11/12/2010 00:18:51 screen setup finished.
    11/12/2010 00:18:51
    The VNC desktop is: localhost:0
    PORT=5900
    ...

    However, no matter what I tried, I cannot use a VNC client to view my Ubuntu desktop from my macbook. Every time connection failed. I have tried Chicken of the VNC and some other vnc clients, but they just don't work. Can somebody tell me how can I connect to my Ubuntu, please? I wanna know which client is used and its version or download link, and exactly how to set it up.

    Many thanks!

  2. #2
    Join Date
    Aug 2008
    Location
    Hmm..$whereis?
    Beans
    136
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How can I VNC my Ubuntu from Mac?

    Can your mac "see" the vnc service on Ubuntu. You could run a port scan from the mac on your ubuntu computer to check that. Also Ubuntu desktop comes with a VNC server pre-installed. Check out System -> Preferences -> Remote Desktop. Did you try it?
    Debian 6.0.1(Squeeze)/64bit
    **************************
    MSI K9AGM4-L | AMD Athlon64 X2 4000+ | 2x1GB DDR2 800MHZ(Transcend) | ATI Radeon Xpress 1250(Onboard) | Seagate 250GB SATA II | Acer AL1916W

  3. #3
    Join Date
    Dec 2006
    Beans
    810

    Re: How can I VNC my Ubuntu from Mac?

    Quote Originally Posted by yangjiangnan View Post
    I can ssh to my Ubuntu from my macbook OS X 10.6 through home router and get output like:
    ...
    11/12/2010 00:18:51 screen setup finished.
    11/12/2010 00:18:51
    The VNC desktop is: localhost:0
    PORT=5900
    ...

    However, no matter what I tried, I cannot use a VNC client to view my Ubuntu desktop from my macbook. Every time connection failed.
    Please show the entire remaining x11vnc messages including when you try to connect via the vnc viewer. The above you show is before any viewer tries to connect.

    Also indicate what you typed into the vnc viewer to specify the vnc server.

  4. #4
    Join Date
    Nov 2010
    Beans
    28

    Re: How can I VNC my Ubuntu from Mac?

    Quote Originally Posted by BugBuster View Post
    Can your mac "see" the vnc service on Ubuntu. You could run a port scan from the mac on your ubuntu computer to check that. Also Ubuntu desktop comes with a VNC server pre-installed. Check out System -> Preferences -> Remote Desktop. Did you try it?
    Thanks. But how can I run a port scan?
    Now I have tried Remote Desktop and successfully connected to my Ubuntu by Chicken. However, when I scroll up and down this website (using Firefox) using two fingers from Chicken of the VNC, it does not work right. Every time when I scroll up, it directly goes to the bottom. I guest this is a bug of Chicken.

    And when I set the desktop sharing on Ubuntu, it said:"Your desktop is only reachable over the local network. Others can access your computer using the address 192.168.0.2 or jiangnan-PC.local." So, can I connect Ubuntu via Internet rather than just from home? Can use some portforwarding on the router to achieve this?
    Finally, Chicken seems to have too few options to set, is it possible that the connection would be too slow if I connect via Internet? Any solutions to this? Thanks.

  5. #5
    Join Date
    Nov 2010
    Beans
    28

    Re: How can I VNC my Ubuntu from Mac?

    Quote Originally Posted by krunge View Post
    Please show the entire remaining x11vnc messages including when you try to connect via the vnc viewer. The above you show is before any viewer tries to connect.

    Also indicate what you typed into the vnc viewer to specify the vnc server.

    First, I typed "ssh jiangnan@192.168.0.2" and connected to Ubuntu from Mac. Then

    jiangnan@jiangnan-PC:~$ x11vnc -safer -localhost -nopw -once -display :0
    10/12/2010 23:56:26 -safer mode:
    10/12/2010 23:56:26 vnc_connect=0
    10/12/2010 23:56:26 accept_remote_cmds=0
    10/12/2010 23:56:26 safe_remote_only=1
    10/12/2010 23:56:26 launch_gui=0
    10/12/2010 23:56:26 x11vnc version: 0.9.10 lastmod: 2010-04-28 pid: 5083
    10/12/2010 23:56:26 Using X display :0
    10/12/2010 23:56:26 rootwin: 0xac reswin: 0x7400001 dpy: 0xa37c30
    10/12/2010 23:56:26
    10/12/2010 23:56:26 ------------------ USEFUL INFORMATION ------------------
    10/12/2010 23:56:26 X DAMAGE available on display, using it for polling hints.
    10/12/2010 23:56:26 To disable this behavior use: '-noxdamage'
    10/12/2010 23:56:26
    10/12/2010 23:56:26 Most compositing window managers like 'compiz' or 'beryl'
    10/12/2010 23:56:26 cause X DAMAGE to fail, and so you may not see any screen
    10/12/2010 23:56:26 updates via VNC. Either disable 'compiz' (recommended) or
    10/12/2010 23:56:26 supply the x11vnc '-noxdamage' command line option.
    10/12/2010 23:56:26
    10/12/2010 23:56:26 Wireframing: -wireframe mode is in effect for window moves.
    10/12/2010 23:56:26 If this yields undesired behavior (poor response, painting
    10/12/2010 23:56:26 errors, etc) it may be disabled:
    10/12/2010 23:56:26 - use '-nowf' to disable wireframing completely.
    10/12/2010 23:56:26 - use '-nowcr' to disable the Copy Rectangle after the
    10/12/2010 23:56:26 moved window is released in the new position.
    10/12/2010 23:56:26 Also see the -help entry for tuning parameters.
    10/12/2010 23:56:26 You can press 3 Alt_L's (Left "Alt" key) in a row to
    10/12/2010 23:56:26 repaint the screen, also see the -fixscreen option for
    10/12/2010 23:56:26 periodic repaints.
    10/12/2010 23:56:26
    10/12/2010 23:56:26 XFIXES available on display, resetting cursor mode
    10/12/2010 23:56:26 to: '-cursor most'.
    10/12/2010 23:56:26 to disable this behavior use: '-cursor arrow'
    10/12/2010 23:56:26 or '-noxfixes'.
    10/12/2010 23:56:26 using XFIXES for cursor drawing.
    10/12/2010 23:56:26 GrabServer control via XTEST.
    10/12/2010 23:56:26
    10/12/2010 23:56:26 Scroll Detection: -scrollcopyrect mode is in effect to
    10/12/2010 23:56:26 use RECORD extension to try to detect scrolling windows
    10/12/2010 23:56:26 (induced by either user keystroke or mouse input).
    10/12/2010 23:56:26 If this yields undesired behavior (poor response, painting
    10/12/2010 23:56:26 errors, etc) it may be disabled via: '-noscr'
    10/12/2010 23:56:26 Also see the -help entry for tuning parameters.
    10/12/2010 23:56:26 You can press 3 Alt_L's (Left "Alt" key) in a row to
    10/12/2010 23:56:26 repaint the screen, also see the -fixscreen option for
    10/12/2010 23:56:26 periodic repaints.
    10/12/2010 23:56:26
    10/12/2010 23:56:26 XKEYBOARD: number of keysyms per keycode 6 is greater
    10/12/2010 23:56:26 than 4 and 2 keysyms are mapped above 4.
    10/12/2010 23:56:26 Automatically switching to -xkb mode.
    10/12/2010 23:56:26 If this makes the key mapping worse you can
    10/12/2010 23:56:26 disable it with the "-noxkb" option.
    10/12/2010 23:56:26 Also, remember "-remap DEAD" for accenting characters.
    10/12/2010 23:56:26
    10/12/2010 23:56:26 X FBPM extension not supported.
    10/12/2010 23:56:26 X display is capable of DPMS.
    10/12/2010 23:56:26 --------------------------------------------------------
    10/12/2010 23:56:26
    10/12/2010 23:56:26 Default visual ID: 0x21
    10/12/2010 23:56:26 Read initial data from X display into framebuffer.
    10/12/2010 23:56:26 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5464
    10/12/2010 23:56:26 WARNING: Width (1366) is not a multiple of 4. VncViewer has problems with that.
    10/12/2010 23:56:26
    10/12/2010 23:56:26 X display :0.0 is 32bpp depth=24 true color
    10/12/2010 23:56:26
    10/12/2010 23:56:26 Autoprobing TCP port
    10/12/2010 23:56:26 Autoprobing selected port 5902
    10/12/2010 23:56:26 Listening also on IPv6 port 5902 (socket 10)
    10/12/2010 23:56:26
    10/12/2010 23:56:26 Xinerama is present and active (e.g. multi-head).
    10/12/2010 23:56:26 Xinerama: number of sub-screens: 1
    10/12/2010 23:56:26 Xinerama: no blackouts needed (only one sub-screen)
    10/12/2010 23:56:26
    10/12/2010 23:56:26 fb read rate: 197 MB/sec
    10/12/2010 23:56:26 fast read: reset wait ms to: 10
    10/12/2010 23:56:26 fast read: reset defer ms to: 10
    10/12/2010 23:56:26 The X server says there are 12 mouse buttons.
    10/12/2010 23:56:26 screen setup finished.
    10/12/2010 23:56:26

    The VNC desktop is: localhost:1
    PORT=5901

    ************************************************** ****************************
    Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

    The scheme stores pixel data offscreen on the VNC viewer side for faster
    retrieval. It should work with any VNC viewer. Try it by running:

    x11vnc -ncache 10 ...

    One can also add -ncache_cr for smooth 'copyrect' window motion.
    More info: http://www.karlrunge.com/x11vnc/faq....client-caching


    Then, in the SSVNC which is an "Enhanced TightVNC Viewer", I typed localhost:1 in the VNC Hostisplay field and clicked connect, but the connection just failed. And in Chicken of the VNC, when I did the same thing, I got "Could not connect to server localhost:1, connection refused: connect()."

  6. #6
    Join Date
    Apr 2009
    Location
    Canada
    Beans
    12
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How can I VNC my Ubuntu from Mac?

    You need to enter the IP address of the Ubuntu box not localhost.
    Localhost is the computer you're on.
    For Internet use, you need to setup portforwarding and remember the IP address of the router, or use a free DNS provider.

  7. #7
    Join Date
    Dec 2006
    Beans
    810

    Re: How can I VNC my Ubuntu from Mac?

    Quote Originally Posted by yangjiangnan View Post
    First, I typed "ssh jiangnan@192.168.0.2" and connected to Ubuntu from Mac. Then

    jiangnan@jiangnan-PC:~$ x11vnc -safer -localhost -nopw -once -display :0
    10/12/2010 23:56:26 -safer mode:
    10/12/2010 23:56:26 vnc_connect=0
    10/12/2010 23:56:26 accept_remote_cmds=0
    10/12/2010 23:56:26 safe_remote_only=1
    ...

    The VNC desktop is: localhost:1
    PORT=5901

    ************************************************** ****************************
    Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

    The scheme stores pixel data offscreen on the VNC viewer side for faster
    retrieval. It should work with any VNC viewer. Try it by running:

    x11vnc -ncache 10 ...

    One can also add -ncache_cr for smooth 'copyrect' window motion.
    More info: http://www.karlrunge.com/x11vnc/faq....client-caching


    Then, in the SSVNC which is an "Enhanced TightVNC Viewer", I typed localhost:1 in the VNC Hostisplay field and clicked connect, but the connection just failed. And in Chicken of the VNC, when I did the same thing, I got "Could not connect to server localhost:1, connection refused: connect()."
    Your log shows that NO VNCVIEWER whatsoever initiated a connection to your x11vnc process. So we have to solve that problem (you are not trying to connect correctly)

    I suggest adding "-L 5901:localhost:5901" to your SSH command line. This is required; it enables an encrypted SSH tunnel for port 5901 between the two machines.

    And then add "-rfbport 5901" to your x11vnc cmdline (please don't skip this.)

    And then use "localhost:1" in your Mac VNC viewer (either SSVNC or Chicken of the VNC)

    Some Mac's don't know what "localhost" is. If that is your case, use "127.0.0.1:1" instead of "localhost:1".

    Report back here how it goes.
    Last edited by krunge; December 11th, 2010 at 06:24 PM.

  8. #8
    Join Date
    Dec 2006
    Beans
    810

    Re: How can I VNC my Ubuntu from Mac?

    Quote Originally Posted by mathspeedy View Post
    You need to enter the IP address of the Ubuntu box not localhost.
    No he/she has to use localhost (and I assume wants to). He is using SSH for tunnelling so the viewer connects to localhost to go through the SSH tunnel.

    Note that "-localhost" was supplied to the x11vnc cmdline, so some sort of tunnel connection must be used. Incoming ethernet connections will be denied when using this option.

  9. #9
    Join Date
    Nov 2010
    Beans
    28

    Re: How can I VNC my Ubuntu from Mac?

    Quote Originally Posted by krunge View Post
    No he/she has to use localhost (and I assume wants to). He is using SSH for tunnelling so the viewer connects to localhost to go through the SSH tunnel.

    Note that "-localhost" was supplied to the x11vnc cmdline, so some sort of tunnel connection must be used. Incoming ethernet connections will be denied when using this option.
    Yes. I wanna use the SSH tunnel. And by using the two command line you suggested, I successfully connected to my Ubuntu via Internet. Thanks!

    I list them as below:

    1. Install ssh and x11vnc on Ubuntu. Forward port 22 to Ubuntu PC's IP in the router.
    2. On mac terminal, run: ssh username@ip -L 5901:localhost:5901
    3. After open the ssh, run " x11vnc -safer -localhost -nopw -once -display :0 -rfbport 5901 " on Ubuntu.
    4. Use SSVNC to connect to localhost:1, using None at the bottom rather than SSL or SSH.

    I can only connect by SSVNC, but not Chicken of the VNC, that's kinda weird. But that's enough.

  10. #10
    Join Date
    Apr 2009
    Location
    Canada
    Beans
    12
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How can I VNC my Ubuntu from Mac?

    Damn, I didn't notice he was trying to tunnel his VNC session via SSH.
    I was on my iTouch and didn't read everything...
    Last edited by mathspeedy; December 11th, 2010 at 11:43 PM. Reason: ...

Page 1 of 3 123 LastLast

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
  •