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:
- Go to the website http://www.uk.research.att.com/vnc and download a minimum of:
- vnc_latest_doc.tgz or vnc_latest_doc.zip
- vnc-3_3_3_x86_linux_2_0.tgz
- vnc-3_3_3r2_x86_win32.zip
You may want to retrieve other files such as "vnc-3_3_3_javasrc.tgz", vnc-3_3_3_unixsrc.tgz", or "vnc-3_3_3r2_winsrc.zip" if you are interested in source code.
- On the Linux machine do the following:
- Put the file
vnc-3_3_3_x86_linux_2_0.tgz
in "usr/local" or a directory of your choosing.
- Unzip the file by typing "tar xvzf vnc-3_3_3_x86_linux_2_0.tgz".
- Type "cd vnc_x86_linux_2.0"
- Copy or move the following files
- Xvnc
- vncpasswd
- vncserver
- vncviewer
to the directory "/usr/bin" or an appropriate directory included in your system path.
- 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"
- Comment out the line with a # in front of the line
twm &
- To run KDE add
startkde &
or to run gnome add
gnome-session &
- Type "vncserver" and enter the password you will want to use to login from the session display with.
- If you want the server to be available on the next boot, add the line:
vncserver
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.
- On the windows machine:
- Unzip the file
vnc-3_3_3r2_x86_win32.zip
to a suitable location for temporary storage.
- Enter the directory "winvnc"
- Run "setup.exe" by double clicking on the file.
- Reboot your computer.
- Run the vnc viewier, by selecting "Start", "programs", "VNC" and "Run VNCviewer".
- When prompted enter the address or name of the vncserver machine followed by a :screennumber similar to mymachine:1 or 10.1.1.1:1. 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.
- 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.
|