Previous Page | Next Page

  1. Introduction
  2. About Linux
  3. Installation and getting started
  4. Logging in and out
  5. Basic Linux Commands
  6. Linux Files and File Permissions
  7. Linux Directory Structure
  8. Finding Files
  9. Linux Help
  10. Setting Time
  11. Devices
  12. Tips
  13. Accessing Other Filesystems
  14. Accessing Removable Media
  15. Making and Managing Filesystems
  16. Emergency Filesystems and Procedures
  17. LILO and Runlevels
  18. Init
  19. Environment, Shell Selection, and Startu
  20. Linux Kernel
  21. Package Installation and Printing
  22. Configuration, Logging and CRON
  23. Keys and Terminal Configuration
  24. Sound Configuration
  25. Managing Users
  26. Passwords
  27. Process Control
  28. Configuration and Diagnostic Tools
  29. Overall Configuration
  30. Using PAM
  31. Basic Network Setup
  32. Tools and Terms
  33. Novell and Printing
  34. Inetd Services
  35. Xinetd Services
  36. Other Network Services
  37. FTP and Telnet
  38. Samba
  39. Identd (auth)
  40. X Configuration
  41. X Use
  42. Using X Remotely
  43. X Documentation
  44. DNS
  45. DHCP and BOOTP
  46. Apache
  47. NFS
  48. PPP
  49. Mail
  50. Routing
  51. IP Masquerading
  52. Proxy Servers and ipchains
  53. UUCP
  54. News
  55. NIS
  56. Network Security
  57. Secure Shell
  58. Text Processing
  59. Shell Programming
  60. Emacs
  61. VI
  62. Recommended Reading
  63. Credits

Using Linux X Remotely

If you want to display an X session on a windows 95/98/NT/2000/xxx computer from a Linux computer, do the following:

  1. Go to the website and download a minimum of:
    1. vnc_latest_doc.tgz or
    2. vnc-3_3_3_x86_linux_2_0.tgz
    You may want to retrieve other files such as "vnc-3_3_3_javasrc.tgz", vnc-3_3_3_unixsrc.tgz", or "" if you are interested in source code.
  2. On the Linux machine do the following:
    1. Put the file


      in "usr/local" or a directory of your choosing.
    2. Unzip the file by typing "tar xvzf vnc-3_3_3_x86_linux_2_0.tgz".
    3. Type "cd vnc_x86_linux_2.0"
    4. Copy or move the following files
      1. Xvnc
      2. vncpasswd
      3. vncserver
      4. vncviewer
      to the directory "/usr/bin" or an appropriate directory included in your system path.
    5. If you want to run a window manager other than "twm", modify the file "xstartup" in your user's home directory, usually "/root/.vnc/xstartup"
      1. Comment out the line with a # in front of the line

        twm &

      2. To run KDE add

        startkde &

        or to run gnome add

        gnome-session &

    6. Type "vncserver" and enter the password you will want to use to login from the session display with.
    7. If you want the server to be available on the next boot, add the line:


      To your "/etc/rc.d/rc.local" file or to the users $HOME/.bash_profile.

    Be aware that putting the "vncserver" line in the rc.local file will activate it on a system or root level. You may note that if you run it this way, the next time you boot, it may ask you to enter a password again. If you want to run the program on a user to user level, you will want to place the above line in the user's home directory in the file ".bash_profile", so they can run it independently of root or the system. If you do this you'll need to modify the above line to be "vncserver :2" and have a different display number assigned to each user. If you don't assign specific display numbers to each user a different display number will be assigned in the order that users log in since the program uses the next available display number whenever it is run. The display number is reported to the user when the vncserver program is run. After that you can look for the process name, Xvnc, with the "ps -aux |grep Xvnc to tell what display numbers are valid and which process is owned by which user.

    Also when the user logs off the vncserver program for that user still keeps running. To kill the vncserver program you may want to add the line:

    vncserver -kill :2

    to the .bash_logout file in the user's home directory. Be sure you use the correct display number in the file. In the example above I used the number 2 but it would need to be the correct number for your user.

  3. On the windows machine:
    1. Unzip the file

      to a suitable location for temporary storage.

    2. Enter the directory "winvnc"
    3. Run "setup.exe" by double clicking on the file.
    4. Reboot your computer.
    5. Run the vnc viewier, by selecting "Start", "programs", "VNC" and "Run VNCviewer".
    6. When prompted enter the address or name of the vncserver machine followed by a :screennumber similar to mymachine:1 or The last number after the colon is the display number, and the user must enter the correct number to communicate to the correct VNC server program being run for that user on the remote (Linux) computer.
    7. When prompted enter your password for access.

To change the password after the program has been installed, use the vncpasswd program. It is also worth noting, that when exiting a remote X session, you are best off to logoff using the normal shutdown procedure accessed from the start button rather than just clicking the X in the upper right corner of the session window. You are less likely to have system problems this way.