Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

  1. #1
    Join Date
    Oct 2004
    Location
    Paradise Island, Bahamas
    Beans
    361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    There is a vnc module for X that can be installed which will provide the native :0 X display when connecting remotely with the vncviewer.

    1. Install the "vnc4server" package (universe). This will provide "/usr/lib/xorg/modules/extensions/libvnc.so" (The vnc.so module for VNC 4.1.2 was changed from vnc.so to libvnc.so.)

    2. Add "vnc" to the Module section in /etc/X11/xorg.conf
    Section "Module"
    ...
    Load "vnc"
    EndSection

    3.a.If your VNC server is running in a secure environment, you can disable authentication with the following configuration:

    Section "Screen"
    ...
    Option "SecurityTypes" "None"
    EndSection

    3.b. If your VNC server is NOT running in a secure environment, you will need to set a VNC password using the vncpasswd program:

    # vncpasswd
    Password:
    Verify:

    Then tell the VNC module where the password is stored in xorg.conf:

    Section "Screen"
    ...
    Option "SecurityTypes" "VncAuth"
    Option "UserPasswdVerifier" "VncAuth"
    Option "PasswordFile" "/root/.vnc/passwd"
    EndSection

    4. Logout and restart X (Ctrl-Alt Backspace)

    References:
    <http://www.realvnc.com/products/free/4.1/x0.html>
    <http://gentoo-wiki.com/HOWTO_Use_TightVNC_W/_JPEG_Compression_to_connect_to_existing_X_Session s>
    linxos.com hllug.org bubbasgeek.com
    100% Linux/BSD @Home: Ubuntu -hp6810,Desktop,Server,MythTV. hpdm4. M0n0WALL -fw/router.

  2. #2
    Join Date
    Oct 2006
    Beans
    13

    Re: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    Great guide and all, just a word of warning tho... This VNC server seems to dislike the fglrx module(my machine hardlocked) :/

    I found another one that does the same, but you will have to start it manually from within your environment... X11vnc, will try out vnc4server on my upcoming fileserver, it's going to be run without a monitor and keyboard, so VNC is the only option.

  3. #3
    Join Date
    Mar 2005
    Location
    Canada
    Beans
    1,595

    Re: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    What is the difference/benefit vs. the traditional VNC connection?

    Thanks,
    Dave

  4. #4
    Join Date
    Oct 2004
    Location
    Paradise Island, Bahamas
    Beans
    361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    The standard vncserver does not allow connecting to the visible display :0; the display you would see if a monitor was connected to the computer. Instead it creates another display :1 which is not visible . For a file server or helping a local user on his desktop, you want to connect to the visiable display :0 not :1.

    There is another solution, using "X11vnc". But you can only connect as a user if a user is already logged into the computer. In this case, you would have to connect as root, login as a user and the reconnect with X11vnc again as a user.

    So, the vnc module for X is somewhat easier to use.
    linxos.com hllug.org bubbasgeek.com
    100% Linux/BSD @Home: Ubuntu -hp6810,Desktop,Server,MythTV. hpdm4. M0n0WALL -fw/router.

  5. #5
    Join Date
    Mar 2005
    Location
    Canada
    Beans
    1,595

    Re: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    Quote Originally Posted by emperor View Post
    The standard vncserver does not allow connecting to the visible display :0; the display you would see if a monitor was connected to the computer. Instead it creates another display :1 which is not visible . For a file server or helping a local user on his desktop, you want to connect to the visiable display :0 not :1.

    There is another solution, using "X11vnc". But you can only connect as a user if a user is already logged into the computer. In this case, you would have to connect as root, login as a user and the reconnect with X11vnc again as a user.

    So, the vnc module for X is somewhat easier to use.
    Thanks. As you can see in the attached screen shot, when I connect using "remote desktop" (aka vino & Terminal Service Client) I get the user desktop :0. I guess that's one of the differences between vino & VNC.

    I also just tried to connect when no one is logged in & I can't --- good to know. I use VNC at work to manage my XP computers rather then RDP for a few reasons: 'shared' desktop for help-desk as you mentioned above, file transfer & chat... plus cross-platform support for OSX, Linux & MS. Of course, o\n Windows machines, VNC allows you to install as a service and you can connect even at the CTRL-ALT-DEL login prompt.

    Anyhow, thanks for the thorough explanation.

    -Dave
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	vnc-vs-vino.jpg 
Views:	223 
Size:	218.1 KB 
ID:	17981  

  6. #6
    Join Date
    Oct 2004
    Location
    Paradise Island, Bahamas
    Beans
    361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    vino is actual another solution that I did not address in my previous post. Vino is Gnome specific vnc server and apparently does not start-up until after you login to Gnome.
    linxos.com hllug.org bubbasgeek.com
    100% Linux/BSD @Home: Ubuntu -hp6810,Desktop,Server,MythTV. hpdm4. M0n0WALL -fw/router.

  7. #7
    Join Date
    Sep 2006
    Location
    Indianapolis
    Beans
    283
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    I tried this and got it working so I could use vncviewer in Windows to connect. I had originally used the built in vnc in Remote Desktop but that broke when I setup XGL with Beryl. I kept getting grey screens. When I setup vnc4server I got the same problem. I wanted to remote into my 0 session. I then tried X11vnc and it worked fine but it wouldn't prompt me for a password. I've temporarily blocked my 5900 and 5901 ports on my router as the computer is still listening on those with xinetd. I'm not sure where to go next with this. When I tried putting making the changes to xorg.conf and restarted the x-server failed. Thank god I've been using Ubuntu for 2 months now so backup every file before I change it cuz it's soooooo easy to break things in linux when you're a noob. I'm going to keep digging through the how-tos and hope I can find something to help me but if anyone here is running XGL with Beryl 0.1.1 and has a vnc server with authorization working for session 0 and can point me to the right how-to I'd appreciate it.
    "I'm a leaf on the wind.....watch how I soar..."
    Registered Linux User #433722 || Registered Ubuntu User #8767

  8. #8
    Join Date
    Oct 2006
    Beans
    13

    Re: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    That dude who's got a VNC-server setup with XGL/Beryl would then be me, but I am afraid I've got to disappoint you, taking over my screen via VNC from a WinXP machine produces a grand looking desktop with emerald themed windows, but the remote screen doesn't update(the screen on the actual machine you're controlling is changing and updating but it's not helping you) when you try to move stuff around.

    Just got Beryl working two days ago and haven't fiddled around too much with anything yet.

  9. #9
    Join Date
    Aug 2006
    Beans
    Hidden!

    Re: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    Hey,

    How do I set the resolution that the VNC server is using?
    I don't have a monitor plugged in so it's defaulting at 800x600.

    Cheers
    Simon

  10. #10
    Join Date
    Oct 2004
    Location
    Paradise Island, Bahamas
    Beans
    361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Howto: Remote the native X server (i.e. the ":0" X display) using VNC

    Quote Originally Posted by Simon Thulbourn View Post
    Hey,

    How do I set the resolution that the VNC server is using?
    I don't have a monitor plugged in so it's defaulting at 800x600.

    Cheers
    Simon
    According to: http://www.realvnc.com/products/free/4.1/x0.html

    You should be able to add:

    -geometry widthxheight
    Specify the size of the desktop to be created. Default is said to be 1024x768.

    In xorg.conf, for example:

    Section "Module"
    ...
    Load "vnc -geometry 1024x768"
    EndSection

    However, I have not tried this as 800x600 works for me.
    Last edited by emperor; November 23rd, 2006 at 05:23 AM.
    linxos.com hllug.org bubbasgeek.com
    100% Linux/BSD @Home: Ubuntu -hp6810,Desktop,Server,MythTV. hpdm4. M0n0WALL -fw/router.

Page 1 of 2 12 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
  •