BrainDump
  Home arrow BrainDump arrow Page 2 - Secure Remote Desktop Sharing with VNC on Linux
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
BRAINDUMP

Secure Remote Desktop Sharing with VNC on Linux
By: Barzan "Tony" Antal
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 12
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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
     

       

    BRAINDUMP ARTICLES

    - Migrating Oracle to PostgreSQL with Enterpri...
    - Demystifying SELinux on Kernel 2.6
    - Yahoo and Microsoft Create Ad Partnership
    - The Advantages of Obscure Open Source Browse...
    - Dell Announces CSI-style Digital Forensics S...
    - Milepost GCC Speeds Open-Source Development
    - Learn These 10 Programming Languages
    - Tomcat Capacity Planning
    - Internal and External Performance Tuning wit...
    - Tomcat Benchmark Procedure
    - Benchmarking Tomcat Performance
    - Tomcat Performance Tuning
    - Wubi: Windows-based Ubuntu Installer
    - Configuring and Optimizing Your I/O Scheduler
    - Linux I/O Schedulers





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek