Page 27 of 64 FirstFirst ... 17252627282937 ... LastLast
Results 261 to 270 of 637

Thread: HOWTO: Set up VNC server with resumable sessions

  1. #261
    Join Date
    Jan 2007
    Beans
    193

    Re: HOWTO: Set up VNC server with resumable sessions

    Quote Originally Posted by Tichondrius View Post
    Ok, to resume a session you started on your physical display (display :0) all you really need is to turn on Ubuntu's remote desktop feature using the Remote Desktop Preferences dialog box accessible from System->Preferences->Remote Desktop menu item. Just check the first two options there (allow other users to view your desktop and allow other users to control your desktop) and set the password in the bottom of the dialog box (check the REuqire password option), and you're done !
    The above uses the built in VNC capability that Ubuntu comes installed with, but the drawback is that it's a little slow, and you need to enable it for each user which wants to allow his desktop to be view or controlled remotely. Also this doesn't allow remote VNC clients to log in to GDM, only to view a GDM session that was started by someone actually using the physical display. So if currently no one is logged in, a remote user cannot connect to display :0 and start a new session.
    But don't worry - there is a better way which allows you to view the phyical display remotely and also log-in to a new session from GDM (using a remote VNC client) ! And it works faster (as fast as the regular VNC server), and works for all users. Here's how to do that :

    1. Install x11vnc package

    Code:
    sudo apt-get install x11vnc
    2. Add x11vnc service to xinetd:

    Code:
    sudo gedit /etc/xinetd.d/x11vnc
    Enter this into the new file:

    Code:
    service x11vnc
    {
            port            = 5900
            type            = UNLISTED
            socket_type     = stream
            protocol        = tcp
            wait            = no
            user            = root
            server          = /usr/bin/x11vnc
            server_args     = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
            disable         = no
    }
    3. Restart xinetd (usually there is no need to reboot, but occasionally it might be required)

    Code:
    sudo /etc/init.d/xinetd stop
    sudo killall Xvnc
    sudo killall x11vnc
    sudo /etc/init.d/xinetd start
    4. From a remote machine use your VNC client to connect to display :0

    Code:
    vncviewer  vnchost:0
    Note that after loggging from GDM and also after logging out from the X-session back and going back to GDM, the VNC client gets disconnected for some reason. So you just need to re-connect and you will get back into the session you logged into. When logging out, the disconnect happens when gnome asks you to confirm your intention to log out, so it's best to turn off the log-out confirmation dialog box by going to System->Preferences->Sessions and un-checking the "ask on logout" option.

    Please tell me how this works out for you....I plan to add this to the HOWTO

    Alright...

    I followed this:
    http://ubuntuforums.org/showthread.p...174#post771174

    And everything goes well. I can connect at any time, but it doesn't prompt me for a password or anything of that nature.

    I'd like to add the option to use a password file, or only enable localhost connections for SSH tunneling...

    I need help securing this thing...

    This works
    Code:
    server_args     = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
    This does not. When I try to connect I get an "EndOfStream" error with the linux viewer, or the windows viewer will give me fits about protocol negotiation.
    Code:
    server_args     = -inetd -o /var/log/x11vnc.log -display :0 -rfbauth /home/aaron/.vncpasswd -many -bg
    Help

  2. #262
    Join Date
    Jan 2007
    Beans
    232
    Distro
    Kubuntu

    Re: HOWTO: Set up VNC server with resumable sessions

    I wonder if there is a way to force the VNC server to bind to localhost. I can then use SSH tunneling through localhost. I can do that now but it would be nice to be able to force the VNC server to only accept connections through localhost.

  3. #263
    Join Date
    Jan 2007
    Beans
    193

    Re: HOWTO: Set up VNC server with resumable sessions

    Quote Originally Posted by Pollywoggy View Post
    I wonder if there is a way to force the VNC server to bind to localhost. I can then use SSH tunneling through localhost. I can do that now but it would be nice to be able to force the VNC server to only accept connections through localhost.
    There sure is. check the man page.

  4. #264
    Join Date
    Feb 2007
    Beans
    10
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Set up VNC server with resumable sessions

    Quote Originally Posted by Pollywoggy View Post
    I wonder if there is a way to force the VNC server to bind to localhost. I can then use SSH tunneling through localhost. I can do that now but it would be nice to be able to force the VNC server to only accept connections through localhost.
    you could just block ports 5900-5901 with iptables..

    So i have a question too.... i can connect to both 0,1 displays but i can't connect to display 1 with vnc over ssh.though i can connect to display 0 with vnc over ssh and display 1 with plain vnc (in port 5901)...any proposals?

    note that i have configured both displays as mentioned in this thread.

  5. #265
    Join Date
    Jan 2007
    Beans
    232
    Distro
    Kubuntu

    Re: HOWTO: Set up VNC server with resumable sessions

    Quote Originally Posted by slAoD View Post
    you could just block ports 5900-5901 with iptables..

    So i have a question too.... i can connect to both 0,1 displays but i can't connect to display 1 with vnc over ssh.though i can connect to display 0 with vnc over ssh and display 1 with plain vnc (in port 5901)...any proposals?

    note that i have configured both displays as mentioned in this thread.
    I recall I had a similar problem relating to displays.

  6. #266
    Join Date
    Mar 2007
    Beans
    10

    Re: HOWTO: Set up VNC server with resumable sessions

    I've been fighting with getting vnc4server working on AMD64 without any luck. An interesting current symptom is that I seem to have a link cycle now. (Both members of the cycle go away when vnc4server is removed.)

    With:
    vnc4-common_4.1.1+xorg1.0.2-0ubuntu1.6.10.1_amd64.deb
    and
    vnc4server_4.1.1+xorg1.0.2-0ubuntu1.6.10.1_amd64.deb

    $ which Xvnc
    /usr/bin/Xvnc

    $ ls -laF /usr/bin/Xvnc
    lrwxrwxrwx 1 root root 22 2007-03-26 21:16 /usr/bin/Xvnc -> /etc/alternatives/Xvnc*

    $ ls -laF /etc/alternatives/Xvnc
    lrwxrwxrwx 1 root root 14 2007-03-26 21:16 /etc/alternatives/Xvnc -> /usr/bin/Xvnc4*

    Strangely, even with this, I get activity when I Xvnc manually. However, the net result is the "typical" xsession-less gray screen. Feh.

    So, ..., two questions: How can a link cycle work at all? and Has anyone got a solution for the gray screen of limbo?

  7. #267
    Join Date
    Mar 2007
    Beans
    10

    Re: HOWTO: Set up VNC server with resumable sessions

    Ignoring my brain damaged problem distinguishing (/usr/bin/)Xvnc and Xvnc4, is there any progress with getting a window manager to actually start under vnc4server on AMD64?

    Quote Originally Posted by fuzzyeric View Post
    I've been fighting with getting vnc4server working on AMD64 without any luck. An interesting current symptom is that I seem to have a link cycle now. (Both members of the cycle go away when vnc4server is removed.)

    With:
    vnc4-common_4.1.1+xorg1.0.2-0ubuntu1.6.10.1_amd64.deb
    and
    vnc4server_4.1.1+xorg1.0.2-0ubuntu1.6.10.1_amd64.deb

    $ which Xvnc
    /usr/bin/Xvnc

    $ ls -laF /usr/bin/Xvnc
    lrwxrwxrwx 1 root root 22 2007-03-26 21:16 /usr/bin/Xvnc -> /etc/alternatives/Xvnc*

    $ ls -laF /etc/alternatives/Xvnc
    lrwxrwxrwx 1 root root 14 2007-03-26 21:16 /etc/alternatives/Xvnc -> /usr/bin/Xvnc4*

    Strangely, even with this, I get activity when I Xvnc manually. However, the net result is the "typical" xsession-less gray screen. Feh.

    So, ..., two questions: How can a link cycle work at all? and Has anyone got a solution for the gray screen of limbo?

  8. #268
    Join Date
    Mar 2007
    Beans
    10

    Re: HOWTO: Set up VNC server with resumable sessions

    In case it was inobvious, I'm still pursuing an AMD64 solution because the "wget $1; wget $2; dpkg -i $1; dpkg -i $2" instructions for AMD64 users are completely unworkable. Both wget()s for the *4.0-7.3_amd64.deb files succeed. However, the dpkg() invocations fail with:
    dpkg: dependency problems prevent configuration of vnc4server:
    vnc4server depends on libstdc++5 (>= 1:3.3.4-1); however:
    Package libstdc++5 is not installed.
    vnc4server depends on xserver-common; however:
    Package xserver-common is not installed.

    I suspect the first is that my existing libstdc++6 (4.1.1-13) isn't a viable substitute for libstdc++5.
    I suspect the second is that xserver-xorg-common doesn't exist, xserver-common having been replaced with x11-common about 15 months ago.

    Of course, insisting that dpkg --ignore-depends the relevant packages will get both packages installed; and neither will work.
    /usr/bin/Xvnc: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

    So, the AMD64-specific instructions appear not to work on AMD64.

  9. #269
    Join Date
    Mar 2007
    Beans
    10

    Re: HOWTO: Set up VNC server with resumable sessions

    I too have the "gray screen" on AMD64 problem. I've traced this problem down a bit. It's caused by
    1) I don't start a GUI on display :0. (It's a headless server in a closet. No point in wasting a couple hundred MB in pointless footprint.)
    2) Xvnc starts no window manager.

    So, although KDE is an XDMCP server, it's not running and isn't started by the xinetd->Xvnc chain.

    Resolution: Use vnc4server, which not only can start Xvnc, but can *also* start your window manager et al. Modify the /etc/xinetd.d/Xvnc file to read as:

    service Xvnc
    {
    type = UNLISTED
    disable = no
    socket_type = stream
    protocol = tcp
    wait = yes
    user = root
    server = /usr/bin/vnc4server
    server_args = :1 -geometry 1280x768 -depth 16 -query localhost -inetd -o
    nce -fp /usr/share/fonts/X11/misc,/usr/share/fonts/X11/misc/,/usr/share/fonts/X1
    1/Type1/,/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/75dpi/ -DisconnectCli
    ents=0 -AlwaysShared -IdleTimeout=0 passwordFile=/root/.vncpasswd
    port = 5901
    }

    What's changed is the name of the server. The arguments have also been sorted to suit the syntax of vnc4server. Note that your desired arguments might be a bit different from mine.

  10. #270
    Join Date
    Mar 2007
    Beans
    10

    Re: HOWTO: Set up VNC server with resumable sessions

    Note: this uses the vnc4server package from the universe repository, version 4.1.1+xorg1.0.2-0ubuntu1.6.10.1 .

Page 27 of 64 FirstFirst ... 17252627282937 ... 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
  •