Remote desktop using VNC
Log file is /home/freeos/.vnc/vncserv:1.log
If this is the first time you are running vncserver, you will be prompted for a password. This password will be used when accessing your vncservers. Use vncpasswd to change this password at a later date.
":1" here means that the server has been started on display 1. Vncserver will take up the first available display. To start vncserver on a specific display, use "vncserver :[display-number]".
vncserver :3
Now, let's connect to the server and check whether it is accessible. While in X, open a Xterm window and run vncviewer.
vncviewer [server]:[display]
vncviewer freeos:1
You can use hostnames or IP addresses here. Do not forget to include the display number to connect to. There can be multiple desktops running on separate displays so you should specify the one you want to connect to. Enter the password to connect with. If correct you will be looking at a desktop in a window.
By default VNC uses the twm window manger but this can easily be modified to your liking. Open the file $HOME/.vnc/xstartup in a editor. Look for "twm &" and modify that to run the window manger of your liking. Our choice was Windowmaker for which we modified the line to "wmaker &". KDE user may want to user "startkde &" here. You can also place any other commands here that you might want to run at startup. To stop a server use "vncserver -kill :display".
vncserver -kill :1 will kill the display running on 1.
Start a new server, connect to it and you will now see your favorite window manager pop-up. You can have more than one server running. Now open any application and work as you would on your own desktop. Now for a little experiment. Don't shutdown any of the running applications but close the window that contains your remote desktop. Don't worry. You're about to see one very cool feature of VNC. Start vncviewer and connect to the same server and display. Your desktop will still be as you left it! Barring the server going down or your application seg-faulting, you will still see your desktop as you left it. You can connect from any other machine on the network or over the Internet and still continue where you left off.
Speaking of the Internet, the Java viewer that VNC provides does come in handy if you have a Java browser but not a viewer. Simply connect to http://server:5800+display-number to open the desktop within your browser. To connect to 192.168.1.23 and display 2, use the following.
- « first
- ‹ previous
- of 3
- next ›
- last »