Thursday, October 25, 2012

Looking for NX Client for Android or Blackberry 10? Try bVNC Secure!

I have started building NX-like functionality into my SSH tunnelling VNC client, bVNC Secure, starting with bVNC Secure v.2.9.1. The VNC client can now automatically find and attach to existing X sessions, or launch new X sessions on demand, much like NX. It is also similar in responsiveness to NX.

bVNC is an Android 2.2+ and Blackberry 10/Playbook application, available on Google Play and App World respectively. Find it on your mobile device or here:

Google Play, for devices running Android 2.2+, or here:

App World for Blackberry Playbook and Blackberry 10 devices.

There is also a fully-featured free version of bVNC. Buying the donation version of bVNC from Google Play and App World is greatly appreciated.

The NX-like mode is called AutoX and can be configured by tapping a button on the main connection screen, once one selects the "Secure VNC over SSH" connection type. The underlying mechanism for finding and/or starting remote X-sessions is the x11vnc VNC server starting Xvfb, Xvnc or Xdummy to run a nested X server. You also need OpenSSH to tunnel to your computer.

To have the necessary server-side packages, you need to install x11vnc, xvfb, and if you want to try Xvnc mode, vnc4server. To install them on Ubuntu/Debian, one would do:
sudo apt-get install x11vnc xvfb vnc4server openssh-server
Once the packages are installed, start bVNC, enter the address of the server, username/password of your account, and tap on the "Configure AutoX" button.

Select the connection mode, and tap Confirm. For users who want to select a specific session program to run, tap the Advanced settings button.

Finding existing X-sessions is compatible with ALL window managers.

Creating new X-sessions automatically is known to be generally compatible with:

- Kubuntu and KDE4 in general
- Xubuntu and Xfce in general
- Ubuntu 12.04 and Unity2D
- Ubuntu 12.10 with any window manager other than Unity installed (e.g. one of Gnome3, Xfce, KDE4, Mate, Trinity Desktop Environment, LXDE, etc.
- Gnome2 (possibly Mate, but not tested yet)
- KDE3 (possibly Trinity, but not tested yet)
- Gnome3 in "classic" mode.
- Unity2D


Caveats include:

- To find the X-login screen, you need to be a sudoer and be connecting with a password (not an ssh key).

- Finding existing X-sessions and finding the X login screen works fine with Ubuntu 12.10. Finding existing sessions works fine with Ubuntu 12.04, but finding the X-login screen does not work (needs to be bug-reported).

- Unity 3D with Compiz will not run correctly under Xvfb or Xvnc, so for now, use another window manager (needs to be bug-reported).

- Unity2D works fine on Ubuntu 12.04, however Unity2D is not available on Ubuntu 12.10 and later.

- Detaching from a running KDE4 session may cause KDE to not be able to launch any more KDE programs (needs to be bug-reported).



Experiment and let me know about your experiences in the comments below! Please also help report bugs to Ubuntu/Debian and any other Linux distribution so this mode starts working flawlessly!

35 comments:

  1. Replies
    1. You are welcome! Please consider relating your positive experience in a review of Free bVNC and/or bVNC!

      Delete
  2. hi.
    Sorry for my ignorance.
    I need to control an android device (himedia 900b media player) via my android phone (htc one x+).
    Would this be possible?

    ReplyDelete
  3. yes! you can install a VNC server from google play (search for "vnc server"), and use a VNC client like bVNC.

    ReplyDelete
  4. yes! you can install a VNC server from google play (search for "vnc server"), and use a VNC client like bVNC.

    ReplyDelete
  5. Hi Dave,

    Well, without presuming that you've made a procedural mistake, how are you actually disconnecting from your session? You should not be logging off, but rather simply using the Disconnect button from the menu. If you are getting a new connection every time, you should look in the process list and see whether there aren't a host of "abandoned" simultaneous sessions running on your machine. If that's the case, then x11vnc's session finding script isn't working on your system and it is creating a new session every time for you. What distro are we talking about anyway?

    Cheers, and good luck! I hope you're enjoying the functionality.

    ReplyDelete
  6. Yeah, then your options are to:

    1) Report the bug on launchpad and try to fix/workaround the problem with finding sessions.

    2) log off every time (until you do (1)?)

    :)

    Glad you like it!

    ReplyDelete
  7. Hi! I tested the free version so far and getting a connection to an existing X-session with Auto-X was quite easy to set up, installed two or 3 packages in Arch linux and everything was ready. What I couldn't find out so far was how to start a new session or how to change the screen resolution for an existing session, did a google search but am rather stuck right now.

    ReplyDelete
  8. Nevermind, catalyst was acting up and screen resolution is fine now with a bit of tinkering.

    ReplyDelete
  9. Hello!
    Thanks for a great program! It works like a charm when I am connectiong to my open existing session on my Panthen DE on Ubuntu 12.04.
    I was wondering though if it is possible to launch a single app apart from the running session. Eventhough I assume it should be fairly trivial, I did not find a way how to do it.

    I have in mind starting LibreOffice or OpenShot for example on my Ubuntu machine and viewing them on my Android tablet using bVNC (ssh encrypted).

    Thanks for Your help!

    ReplyDelete
    Replies
    1. The only way i can think of, currently is to use AutoX and add the program you want to launch to the Startup applications of your window managet.

      Delete
  10. I was wondering how to use bVNC passwordless with keys with OpenSSH.

    Where do I put which keys?

    Thanks

    ReplyDelete
    Replies
    1. Tap on the Manage Key button when in VNC over SSH mode to create/impoer an SSH key. After creating/importing, you can copy to clipboard or share the public part of the key to put in the authorized_keys file on the server.

      Delete
    2. Wow, you responded fast :)

      I get an Error! saying "failed to authenticate to SSH server with a key-pair. Please check your SSH username, and ensure your public key is in the authorized_keys file on the remote side.

      Is there somewhere I need to be setting the username?

      Delete
    3. no, you need to import the public part of the key in the authorized_keys file in the .ssh/ directory of the user server-side. 

      Delete
    4. I thought I did that...I generated a key with the android app (I like the way randomness is generated by the way). Then I decrypted it within the app, then saved it to the downloads folder. Then opened the file on the server and copied it into the server's authorized_keys file in the .ssh/ directory of my user.

      Am I missing something obvious? Is there anything need to import into the Android App?

      Thanks again

      Delete
  11. Replies
    1. Sorry, no. This is a VNC client, not an NX client. I've tried using x11vnc to attach to existing NX sessions, but they freeze whenever the NX client is not connected for some reason.

      Delete
    2. I tested a KDE 4 session and It works for me with Xvfb setting.

      Delete
  12. I have been using bNVC happily for months to control my LinuxMint 17 desktop from my Android device, via home WiFi. Now I want to do the same when I am away from home, via the public internet. To try to set this up, I have switched off phone WiFi and connected via 3G, but after 24hours of searching for how to do this, and trying dozens of different ways, I simply cannot get it to work. I managed to get a plain text terminal connection using Android app JuiceSSH, but I can't quite remember how, and I simply don't understand what I'm doing with countless keys and passwords and passphrases ... can you provide a simple step-by-step guide to moving from successful at-home Plain VNC to away-from-home secure VNC?

    ReplyDelete
  13. Correction: I only got JuiceSSH working through local WiFi; on public internet, it just had endless Authentication Failures. The standard response from bVNC is "Failed to connect to SSH Server. Please check network connectivity, and SSH server address and port". I use my fixed home IP address and I have tried ports 22 and 5900.

    ReplyDelete
  14. Still reading and getting nowhere. Now using android app ConnectBot as it tells me what is going on. To get bVNC working remotely, do I need to do all this SSH stuff separately at all? And, do I need to generate two key pairs (one pair for each machine), or just one key pair (for the single connection between them)? What do I then do with the public and private keys to get the thing to work?

    ReplyDelete
  15. OK, so I *finally* de-bugged this. I read a zillion guides to how to do this, but none of them suggested this absolutely necessary step. My router was not forwarding port 22 to my home PC. Any attempt to log in by SSH from outside was attempting to log into my router - so, obviously, no success (and I had no way of knowing this). Port forwarding instructions (on the router) regarding port 22 were being ignored. Instead I chose an alternative port number at random, and set that (in the router) to forward to port 22 on my PC, then set my android to go to that port on my home IP address. Finally I got in. I still have virtually no idea how key pairs work, or (for that matter) what a port is. But I am logging in to "Secure VNC over SSH", and I assume that that is what I am getting: secure VNC - SOMEHOW.

    ReplyDelete
  16. Excellent program - I use it regularly! Question on AutoX - my current experience connecting to an Ubuntu 14.04 server shows:
    Xvnc works - but slow
    Xvfb works better
    Xdummy - if there is no active X session active then it fails. With an active X session it seems to work.
    Any ideas on why the Xdummy is not working as "standalone"?

    ReplyDelete
    Replies
    1. Didn't see this question - looks like Xdummy is a legacy script which is not needed anymore. https://xpra.org/trac/wiki/Xdummy

      Delete
  17. just downloaded it and it worked flawlessly. best app ever. going to buy the paid version now.

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. Is there anyone that could help me?

    ReplyDelete
    Replies
    1. Sure, but I can't see a question :). I hope it all worked out!

      Delete
  20. How to connect internet in kali Linux in my android plzzz help sir

    ReplyDelete
  21. Extraneous: Looking For Nx Client For Android Or Blackberry 10? Try Bvnc Secure! >>>>> Download Now

    >>>>> Download Full

    Extraneous: Looking For Nx Client For Android Or Blackberry 10? Try Bvnc Secure! >>>>> Download LINK

    >>>>> Download Now

    Extraneous: Looking For Nx Client For Android Or Blackberry 10? Try Bvnc Secure! >>>>> Download Full

    >>>>> Download LINK ZM

    ReplyDelete