Setting up vnc server on kubuntu

Discussion in 'Linux Networking' started by Paulo da Silva, Aug 20, 2015.

  1. Hi!

    It should be easy ... but does not work!

    The simple question is:

    How to setup a vnc server on kubuntu to a android client?

    Now, what I have tried ...
    1. Shut down my firewall ... just in case.
    2. Started krfb.
    3. Started an invited connection which generated a password.
    4. Allowed a non invited connection.
    Both from 3 an 4 I got a message from kde that the connection from a
    <variable (not 5900)> port was refused.
    On the android client (I tried 3) the reason for the failure was "null"!
    The specified port is 5900.

    5. I tried vncserver ...
    5a. vncserver alone caused a navigation through several trivial
    questions, including a password, which I answer.
    vncserver creates a :1 session. Invoking a second time creates a :2.
    I have nothing at :1 and :2 so I tried
    vncserver :0
    but it claims that there is already a session open there. Was it from krfb?

    Thanks for any help/comments.
     
    Paulo da Silva, Aug 20, 2015
    #1
    1. Advertisements

  2. Paulo da Silva

    stepore Guest

    Shut down, how? Make sure you're accepting not dropping packets.
    For testing purposes (if not permanently), I wouldn't use krfb or
    vinagre or whatever built-in VNC server is installed with your Desktop.
    Try it with x11vnc instead. Make sure to rule out any desktop specific
    anomalies, and will definitely share :0.

    Try this:
    <http://tunebox.net/video/1238918/android-phone-remote-control-my-ubuntu-in-x11vnc-server.html>
     
    stepore, Aug 21, 2015
    #2
    1. Advertisements

  3. I have a script to drop any control of the firewall. No problem for sure
    here.
    After posting i did some more experiments:

    I have installed tightvncserver

    Terminating kde and stopping lightdm I was able to kill the vncserver
    (from krfb) at :0. Then I launched vncserver (=tightvncserver) at :0 and
    got in the client a X session. But it has no windows manager. Just the
    ususal X at the center of the screen.

    I don't know:
    1. How to connect to a kde session.
    2. How to connect to a specific desktop (Ex. :1). This should be useful
    because I didn't need to stop the krfb at :0. If I put :1 after the IP
    address on the client it thinks this is port 1!
    Even so, if this is possible, I would probably end up with an empty X
    screen ...

    BTW, I cannot uninstall krfb because kde network manager depends on it
    and it has always a vnc session running at :0.

    Thanks
     
    Paulo da Silva, Aug 21, 2015
    #3
  4. Paulo da Silva

    stepore Guest

    Tightvncserver doesn't allow sharing your main X session/display :)0)
    which is why I suggested x11vnc.
    See above.
    To get a decent window manager on display :1 with tightvncserver you'll
    need to hack your ~/.vnc/xstartup file. something like:
    xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic -nowin &
    startlxde &

    (Of course you'll need lxde installed -- so use whatever DE you wish
    ((google it))
    I don't use KDE, but in your xstartup, you'll need something like startkde
    Again, I don't use KDE but this makes no sense. No way a network manager
    depends on a VNC-based desktop sharing tool. I'm not suggesting you
    uninstall, just turn it off. There must be a setting somewhere. Find it.
    Turn it off. You have full control of your box.
     
    stepore, Aug 21, 2015
    #4
  5. Ok. As I said, I installed it before reading your post.
    But it's true!
    # aptitude purge -s krfb
    Os seguintes pacotes serão REMOVIDOS:
    krfb{p}
    0 pacotes actualizados, 0 novos instalados, 1 para serem removidos e 0
    não actualizados.
    É preciso obter 0 B de ficheiros. Depois de desempacotar, serão
    libertados 957 kB.
    Os seguintes pacotes têm dependências não satisfeitas:
    kdenetwork : Depende: krfb (>= 4:4.11) mas não vai ser instalado.
    As seguintes acções irão resolver estas dependências:

    Remover os seguintes pacotes:
    1) kde-full
    2) kdenetwork

    Sorry for the portuguese language.
    Last 3th line=Remove the following packages.
    krfb is like the dark matter. I only know it exists because kde always
    take control of port 5900 and sessions of tightvncserver starts at :1.
    Cannot find any way to get rid off it.

    Changing to x11vnc everything is working fine except for some color
    problems, but I think this has more to do with the client side. Gray,
    for example, shows as pink!
    At first things looked as not working because x11vnc created a "new"
    port 5901 and I was trying to connect to 5900. So the old refuse message
    from kde.

    Thank you very much for your support an patience.
    Paulo da Silva
     
    Paulo da Silva, Aug 21, 2015
    #5
  6. Paulo da Silva

    stepore Guest

    Brazil or Portugal?
    That seems crazy to me, mas e o que e ;)

    But it must be a simple service running that you can simply stop or
    kill. Is krfb not listed in /etc/init/ or /etc/init.d or running in your
    task bar?

    Not sure if this is talking about an older KDE than you have, but
    apparently you just stop the service, make sure it's not in "auto start
    applications", log off, then log back in.

    https://forum.kde.org/viewtopic.php?f=18&t=86352
    Find a VNC client that allows you to change compression/quality on
    connections. That should help with colours.
    If it's still not well, this is another good guide:
    http://www.verot.net/xvnc_kde.htm?lang=en-GB
     
    stepore, Aug 22, 2015
    #6
  7. Good! :-;
    It is not a service (nothing in /etc).
    It is not in auto start list.
    Something in kde (kde network manager?) launches it when kde starts.
    There are two processes krfb running. I killed them and nothing seems to
    be happening, but ... I don't know if this is a good idea. After all
    there must be some reason for KNM needing it.
    I was using android vnc viewer. Now I changed to bSecure and it seems to
    work fine.

    ....
    Thanks
     
    Paulo da Silva, Aug 23, 2015
    #7
  8. I meant bVNC.
     
    Paulo da Silva, Aug 23, 2015
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.