Page 5 of 8 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 75

Thread: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

  1. #41
    Join Date
    Jun 2007
    Beans
    602
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    I got it working using:
    Code:
    sudo x11vnc -auth /var/lib/gdm/:0.Xauth -display :0


    Now how can I have this autorun every time the system reboots? I read in the FAQ:
    Continuously: Have x11vnc reattach each time the X server is restarted (i.e. after each logout):

    To make x11vnc always attached to the X server including the login screen you will need to add a command to a display manager startup script.

    Please consider the security implications of this! Besides having the VNC display for the X session always accessible (but hopefully password protected), there may other issues.

    The name of the display manager startup script file depends on desktop used and seem to be:

    GNOME /etc/X11/gdm/Init/Default (or Init/:0)
    KDE /etc/kde*/kdm/Xsetup
    XDM /etc/X11/xdm/Xsetup (or xdm/Xsetup_0)
    CDE /etc/dt/config/Xsetup

    although the exact location can depend on operating system and distribution. See the documentation for your display manager: gdm(1), kdm(1), xdm(1), dtlogin(1) for additional details. There may also be display number specific scripts: e.g. Xsetup_0 vs. Xsetup, you need to watch out for.

    Note: The above gdm setting of KillInitClients=false in /etc/X11/gdm/gdm.conf (or /etc/gdm/gdm.conf, etc.) for GDM is needed here as well. Other display managers (KDM, etc) may also have a similar problem.

    Note: The above Dtlogin*grabServer:False step for Solaris will be needed for dtlogin here as well.

    In any event, the line you will add to the display manager script (Xsetup or whatever) will look something like:

    /usr/local/bin/x11vnc -rfbauth /path/to/the/vnc/passwd -o /var/log/x11vnc.log -forever -bg

    where you should customize the exact command to your needs.

    Happy, happy, joy, joy: Note that we do not need to specify -display or -auth because happily they are already set for us in the DISPLAY and XAUTHORITY environment variables for the Xsetup script!!!

    You may also want to force the VNC port with something like "-rfbport 5900" (or -N) to avoid autoselecting one if 5900 is already taken.
    In my case the file is "/etc/gdm/gdm.conf", but what I don't understand is what (exactly) do I need to add to this file, and where in the file should I place the line?
    Last edited by BassKozz; January 2nd, 2008 at 01:37 AM.

  2. #42
    Join Date
    Dec 2006
    Beans
    810

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    Quote Originally Posted by B/-\ssKozz View Post
    I got it working using:
    Code:
     sudo x11vnc -auth /var/lib/gdm/:0.Xauth -display :0


    In my case the file is "/etc/gdm/gdm.conf", but what I don't understand is what (exactly) do I need to add to this file, and where in the file should I place the line?
    The gdm.conf (or gdm.conf-custom) is where you put the
    Code:
    KillInitClients=false
    (otherwise GDM will kill x11vnc after a user logs in; you could always just restart x11vnc and reconnect, but that is a pain)

    For the x11vnc command, from your post:
    GNOME /etc/X11/gdm/Init/Default (or Init/:0)
    so start looking around for that file. This sort of file is often gratuitously renamed and/or relocated by distros, etc. so you may have to hunt for it. See the faq-display-manager link for suggested options.

    Once you find it put in your x11vnc command with '-bg' option for it to go into the background. You do NOT need to supply -display or -auth, since the whole idea of the Xsetup, Default script is that those env. vars are already set for the cmds run by the script.

  3. #43
    Join Date
    Nov 2007
    Location
    Sweden
    Beans
    3
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    First of all, I'm a fresh (since september this year very happy) Ubuntu user. as the family "computer specialist" I've even got most of my family members start using Ubuntu as well. This is my first post and until now the first problem I haven't been able to solve by searching this magnificent forum, it's really great!!

    now to the situation:
    I'm using two ubuntu-machines on my home network where I've followed this HOWTO to set up remote access from one to the other, let's call them server (where x11vnc is installed) and client (where I want to connect - again - with xvncviewer as mentioned on post #11). As I've just suggested, this worked perfectly the first time when I installed it a few days ago, BUT I'm not able to connect from the client anymore. the sharex11vnc file loads without any problems (I guess since the service is running when I log in) and the I can ssh to the server.
    what happens:
    after i ssh to the server I open a new terminal window and try to open the vncviewer
    Code:
    xvncviewer localhost:0
    a vnc authentication window pops up, but the problem is that I can't write anything to it so I'm forced to close it since there is nothing I can do (see attached picture) Therefore the authentication process gets cancelled and nothing happens the first day when this worked this window didn't pop up.
    I could try to uninstall everything and redo the HOWTO and see if that solves the problem, but I believe it's better to try and solve it the "hard way" first because of the learning factor. besides, I haven't really got it how the uninstalling of programs work
    I hope someone can help me on this one, it worked really good the first time and I wanted to go over to the next step and try to connect to a server over the internet.
    Attached Images Attached Images

  4. #44
    Join Date
    Dec 2006
    Beans
    810

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    Quote Originally Posted by aikidoka View Post
    As I've just suggested, this worked perfectly the first time when I installed it a few days ago, BUT I'm not able to connect from the client anymore. the sharex11vnc file loads without any problems (I guess since the service is running when I log in).
    What did you use to make sure x11vnc is running? The ps(1) command or something else?
    after i ssh to the server I open a new terminal window and try to open the vncviewer a vnc authentication window pops up, but the problem is that I can't write anything to it so I'm forced to close it since there is nothing I can do (see attached picture) Therefore the authentication process gets cancelled and nothing happens the first day when this worked this window didn't pop up.
    What does the x11vnc output file say? If you are not collecting any x11vnc output try adding something like:
    Code:
    x11vnc .... -o /tmp/x11vnc.log
    so when you try to connect you will see the connection logged etc.

    However, from what you say I think you have accidentally installed and enabled some other VNC server (e.g. either vncserver or vnc.so) and it is now grabbing the VNC Port (5900) and you are connecting to it instead. The log should tell you which port x11vnc found open (it tries 5900 first, then 5901...)

    The HOWTO says to collect the port into ~/.vnc/port.txt, but one might be better off forcing x11vnc to only use one, e.g.:
    Code:
    -rfbport 5900
    then it will exit if it cannot open that port. Then, using ps(1) say, one could see that the x11vnc process is not running if something else grabbed port 5900.

    If you do find you are connecting to x11vnc and not some other one and are still having the problem, try adding this x11vnc option:
    Code:
    -rfbversion 3.7
    This works around a bug fixed in the upstream x11vnc. Some viewers and x11vnc didn't work at protocol level 3.8

  5. #45
    Join Date
    Nov 2007
    Location
    Sweden
    Beans
    3
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    First of all, thx for the quick reply!

    To your first question, yes I checked with ps and the service was also running on the right port.
    I then added the line you suggested to get an output file and tried to connect, but everything looked fine there as well.
    At last I changed the rfbversion (btw, what is that??), but the problem remained, so I much cleverly (stupid me should have tried this before ) tried a different vnc viewer (xtightvncviewer from the repos) and it worked like a charm!
    The problem seems to be on the xvncviewers authentication program, with xtightvncviewer the prompt for the password is in the CLI whereas the xvncviewer prompts me in a GUI (blah!! ).
    Is there any good reason why I should choose one viewer over the other regarding performance? I can't seem the find out where they differ the most...
    I'm still gonna try and figure out what the problem with the xvncviewer is, if I find somthing out I'll post it here as an edit... Or if someone else has an answer for the problem and want to spare me the hard work of searching, please post
    now, back to work

  6. #46
    Join Date
    Dec 2006
    Beans
    810

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    At last I changed the rfbversion (btw, what is that??)
    It is the version of the VNC protocol between server and client. VNC started as RFB (Remote FrameBuffer). The -rfbversion option tells x11vnc which protocol version to advertise.
    but the problem remained, so I much cleverly (stupid me should have tried this before) tried a different vnc viewer (xtightvncviewer from the repos) and it worked like a charm! The problem seems to be on the xvncviewers authentication program, with xtightvncviewer the prompt for the password is in the CLI whereas the xvncviewer prompts me in a GUI.
    Yes, you mentioned you couldn't even type the PW into the GUI, correct? That is really strange... so maybe the whole problem is local.

    BTW, what are the versions of the 2 viewers and x11vnc you are using?

  7. #47
    Join Date
    Jan 2008
    Beans
    9

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    Okay, I am new to Linux and Ubuntu. I'm trying to play around and learn this system on the prodding of a friend. The first thing I wanted to set up is this VNC connection as the remote desktop didn't work. After reinstalling the Ubutu I have updated all the suggested updates.

    I went through the directions except I'm getting an error when I try to set the password and when I reboot it doesn't tell me that VNC is working on any port. The message just doesn't have a port number. So I tried running that code line for x11vnc from the terminal and I noticed that it tells me that I can't write to ~/.vnc/port.txt because I don't have permissions. That's the same error I was getting for setting the password. It told me I didn't have permission there either.

    Can anyone help this newbie?

  8. #48
    Join Date
    Jun 2007
    Beans
    602
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    chrisdl,

    You have to use "sudo" in the beginning of the command...
    i.e.:
    Code:
    sudo x11vnc -auth /var/lib/gdm/:0.Xauth -display :0

  9. #49
    Join Date
    Jan 2008
    Location
    England
    Beans
    37
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    Thanks. This was really helpful for me
    Current Status :
    ADVENT 7017 LAPTOP RUNNING : Windows XP SP2 - Mac OS X Leopard
    MV IXIUS LAPTOP RUNNING : Ubuntu 7.10 GUSTY GIBBON

  10. #50
    Join Date
    Jan 2008
    Beans
    9

    Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop

    B/-|ssKoss, what do you mean by that? In the sharex11vnc file that I created? Does it need a 'sudo' in front of the x11vnc?

    Since I had just started, I thought I would just start from scratch again - this is very frustrating. I haven't gotten an error in making the password but when I run the line of code again, it still says that it can't make the port.txt file because of permissions.

    Does anyone know what I can check?

Page 5 of 8 FirstFirst ... 34567 ... 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
  •