BrainDump
  Home arrow BrainDump arrow Page 2 - Secure Remote Desktop Sharing with VNC...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

Secure Remote Desktop Sharing with VNC on Linux
By: Barzan "Tony" Antal
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 11
    2007-04-24

    Table of Contents:
  • Secure Remote Desktop Sharing with VNC on Linux
  • Getting Started
  • Setting up the Environment
  • More Useful VNC Commands
  • Final Words

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    PCmover - $15 Off with Coupon Code CJPH7Q

    Secure Remote Desktop Sharing with VNC on Linux - Getting Started
    (Page 2 of 5 )

    First we need to make sure that no previous VNC packages are installed. Running the command below uninstalls the specified package. Usually two packages are already installed, and these are vnc and vncserver. Try the command below for these two.

    rpm -e name_of_the_package

    Then go to the folder location where you've downloaded your new TightVNC RPM. Run the following command to install:

    rpm -ivh exact_name_of_the_package_goes_here                

    If you are in a rush and don't like using the TAB auto-completion you might run the following command instead of the previous one:

    rpm -ivh tightvnc*rpm

    If the installation ends successfully you should see the following lines or something similar:

    Preparing...                ########################### [100%]

       1:tightvnc-server        ########################### [100%]

    Next you need to actually run the server. Type the following command:

    vncserver :1 -geometry 1024x768 -depth 16

    When you run the command, it's going to ask for a password. Decide whether or not you want to use a separate view-only password. You should just type in the password you desire and then hit enter. Of course, running "vncserver :1" is enough but this way you have the ability to customize and add advanced options. Check out the way it starts up.

    You will require a password to access your desktops.

     

    Password:

    Verify:

    Would you like to enter a view-only password (y/n)? n

     

    New 'X' desktop is localhost:1

     

    Creating default startup script /root/.vnc/xstartup

    Starting applications specified in /root/.vnc/xstartup

    Log file is /root/.vnc/localhost:1.log

    Notes:

    • ":1" is the display ID. The number 1 is just an example. The ports that will be open and allocated by the VNC server are the following: 5801, 5901 and 6001 (that's if the # is 1, otherwise it's 5800+#, and so on);
    • "-geometry" attributes the resolution;
    • "-depth" stands for the color depth.

    To back up my previous statement I've run "netstat -ta." Here is its output:

    Active Internet connections (servers and established)

    Proto Recv-Q Send-Q Local Address           Foreign Address         State

    tcp        0      0 *:5801                  *:*                     LISTEN

    tcp        0      0 *:5901                  *:*                     LISTEN

    tcp        0      0 *:6001                  *:*                     LISTEN

    Obviously, you're going to have more connections. I've deleted the rest to reduce the size of the table that I've attached. Currently, those are the ones we care about.

    That should be all you need to do on your server. Both SSHd and VNCserver should be running by now. Now, I'm going to lead you through the steps that you need to follow to be able to view your server from a remote computer (which also runs Linux).

    More BrainDump Articles
    More By Barzan "Tony" Antal


       · This is the end of the series. I hope that you've found it interesting and...
     

       

    BRAINDUMP ARTICLES

    - Outsourcing: the Hoopla, the Reality
    - MySQL Plays in the Sun
    - All About SQL Functions
    - SQL: Functioning in the Real World
    - More Advanced SQL Statements
    - Beginning SQL the SEQUEL: Working with Advan...
    - Beginning SQL
    - A Look at the VI Editor
    - A Quick Tour of Boo
    - Book Review: Open Source Licensing
    - PGP and GPG: Email for the Practical Parano...
    - Microsoft Continues War on Open Source
    - Secure Remote Desktop Sharing with VNC on Li...
    - A Look at Google Project Hosting
    - What we can Learn from Two Linux vs. Microso...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway