Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46

Thread: HOWTO: Server Side VNC Client

  1. #1
    Join Date
    Dec 2005
    Beans
    231
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Talking

    After 19 grueling hours trying to set up a VNC Client that resides on my VNC Server, here it is.

    I was looking for a Java Based VNC Client, that someone could simply connect to through my existing apache web server, and enter the password. Then, they could browse the machine just like a normal VNC connection.

    I thought all I had to do was apt-get the tightvnc-java package. Nope. Wouldn't give me a web interface. Besides, I wanted it integrated.

    Here's how I did it.

    Make sure that you have the universe repository enabled. http://www.ubuntuguide.org/#extrarepositories

    Also make sure that you have the correct plugins for your browser, if you are going to be testing it on the same machine. (that means you need the java plugin for Firefox, for most of you.)

    1. INSTALL APACHE (If not already done)

    If you don't already have Apache installed, install it now.

    apt-get apache2

    That's easy, it comes all nice and configured, ready to go. Let's check the setup with the web browser. Just point it to 127.0.0.1 (Yep, "localhost" does just fine too) It should pop up with a screen that says "apache2-default/" with a little folder in front of it. If it doesn't, try logging out, and then back in.

    YAY! That worked! (If not, there is a nice tutorial on how to install apache at http://www.ubuntuguide.org/#apachehttpserver that I used)

    Now for our purposes, all we need is apache. We don't have to worry about any other parts other than the base installation. (IE. php, mysql, etc.)

    2. ACTIVATE REMOTE DESKTOP

    This is actually a VNC server that comes shipped with Ubuntu, and since I am tailoring this to be simple, I thought I would use this instead of X11VNC. Intangible wrote a nice peice on installing and configuring X11VNC if you want to check it out.

    To activate this, go to System -> Preferences -> Remote Desktop. Allow other Users to view and control your desktop, and MAKE SURE TO PUT IN PASSWORD PROTECTION!! Also, turn off asking for confirmation.

    3. DOWNLOAD AND INSTALL THE JAVA VNC VIEWER

    This is actually pretty simple too. I didn't use the repository, because I needed all the files in one place, ready for deployment.

    Download this file to your home directory:
    http://prdownloads.sourceforge.net/v...ar.gz?download

    (From http://www.tightvnc.com it's in the downloads section, under "Java
    (viewer only)" and the package you want is the tar.gz of the binary format downloads)

    sudo file-roller /home/user/tightvnc-1.2.9_javabin.tar.gz
    (replace "user" with your user name)

    extract everything to /var/www

    sudo gedit /var/www/index.html

    Delete all of the file, and replace it with this slightly modified version.

    Code:
    <HTML>
    <TITLE>
    TightVNC desktop
    </TITLE>
    <APPLET CODE=VncViewer.class CODEBASE=classes/ WIDTH=800 HEIGHT=632>
    <param name=PORT value=5900>
    <param name="Open New Window" value="yes">
    </APPLET>
    <BR>
    <A href="http://www.tightvnc.com/">TightVNC site</A>
    </HTML>
    Save it.

    4. TRY IT OUT!

    go to a browser, and go through the same steps as you did to check the apache server. It should pop up with a java window this time! That's your client! Feel free to type in your password, and give it a go, from another machine. (Bad things happen when you connect to the local computer, and share the same screen.)

    To connect from a remote computer, get your IP address, ( http://www.whatsmyip.com/ ) and go type it into another computer's browser. If that computer is on your network, you need your "Private IP" which you can get from typing ifconfig into the browser.

    Have Fun!
    Last edited by dragonfyre13; January 4th, 2006 at 10:34 PM.
    If the box says "Needs Windows 2000 or better" why won't it work on Linux?

    There are 10 types of people...those who understand binary, and those who don't.

  2. #2
    Join Date
    Dec 2005
    Beans
    134

    Re: HOWTO: Server Side VNC Client

    One piece of wisdom I stumbled across -- the TightVNC Java client doesn't necessarily automatically open a new window for the display; sometimes it stays embedded in the web page. To force it to open a new window every time, add the following line to the index.html file (step 3):
    Code:
    <APPLET CODE=VncViewer.class CODEBASE=classes/ WIDTH=800 HEIGHT=632>
    <param name=PORT value=5900>
    <param name="Open New Window" value="yes">
    </APPLET>
    -Jeremy

  3. #3
    Join Date
    Nov 2005
    Beans
    57

    Re: HOWTO: Server Side VNC Client

    Quote Originally Posted by dragonfyre13
    Before using this example, make sure the
    value of the PORT parameter is set correctly (normally, the port number
    is 5900 + display number).
    What is this display number you are speaking of?

    thanks.

  4. #4
    Join Date
    Dec 2005
    Beans
    231
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Server Side VNC Client

    That's just an example script. I'm editing it right now to reflect a few changes to make it even easier, and so you don't even have to worry about that.
    If the box says "Needs Windows 2000 or better" why won't it work on Linux?

    There are 10 types of people...those who understand binary, and those who don't.

  5. #5
    Join Date
    Dec 2005
    Beans
    231
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Server Side VNC Client

    Thanks Chenel. I added it to the page's HTML.
    If the box says "Needs Windows 2000 or better" why won't it work on Linux?

    There are 10 types of people...those who understand binary, and those who don't.

  6. #6
    Join Date
    Dec 2005
    Beans
    134

    Re: HOWTO: Server Side VNC Client

    Dragonfyre-

    Do you have any idea if there are any VNC servers on Linux that have an embedded Java viewer like the Windows ones usually do? I've hunted around a lot, and I haven't been able to find anything useful. I'd rather do that than Apache (even though I'm using Apache for now) since I don't really need the extra overhead of running Apache exclusively for the VNC client download...

  7. #7
    Join Date
    Nov 2005
    Beans
    57

    Re: HOWTO: Server Side VNC Client

    Dragonfyre,

    Thanks for the HOWTO. Works great.

  8. #8
    Join Date
    Dec 2005
    Beans
    231
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Server Side VNC Client

    Quote Originally Posted by chenel
    Dragonfyre-

    Do you have any idea if there are any VNC servers on Linux that have an embedded Java viewer like the Windows ones usually do? I've hunted around a lot, and I haven't been able to find anything useful. I'd rather do that than Apache (even though I'm using Apache for now) since I don't really need the extra overhead of running Apache exclusively for the VNC client download...
    I'll check around. i would assume there is, and it seems that there should be an easier way, but I haven't found it. Some of them boast that there is, but I can't get any of them to work.
    If the box says "Needs Windows 2000 or better" why won't it work on Linux?

    There are 10 types of people...those who understand binary, and those who don't.

  9. #9
    Join Date
    Dec 2005
    Beans
    134

    Re: HOWTO: Server Side VNC Client

    Quote Originally Posted by dragonfyre13
    I'll check around. i would assume there is, and it seems that there should be an easier way, but I haven't found it. Some of them boast that there is, but I can't get any of them to work.
    Let me know which ones make that claim--I'm willing to do some tinkering to see if I can get them to work!

    Thanks.

  10. #10
    Join Date
    Dec 2005
    Beans
    231
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Server Side VNC Client

    Quote Originally Posted by chenel
    Let me know which ones make that claim--I'm willing to do some tinkering to see if I can get them to work!

    Thanks.
    Well, tight VNC is one of them, I believe. I know hidden in the documentation X11VNC says something about it. If it helps, they seem to all say that if your VNC port is 5901, 5801 should be the port you dial into with a browser to get the VNC Java interface. I always get an "RPC 003:003" message when I dial in on 5901, and on 5801 I get nothing.
    If the box says "Needs Windows 2000 or better" why won't it work on Linux?

    There are 10 types of people...those who understand binary, and those who don't.

Page 1 of 5 123 ... 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
  •