Manually starting a VNC server is necessary for testing VNC. Once you got VNC to work correctly, you can copy the command line to a script or inetd.conf. First, I created an executable script ~/.vnc/xstartup with the following contents:
#!/bin/sh
exec /etc/X11/Xsession
This file has to be made executable, of course. Prior to starting vnc4server, make sure your X session can start normally by checking your ~/.xsession file. My .xsession file looks like this:
#!/bin/sh
exec openbox
Then, I started vnc4server:
vnc4server -geometry 800x600 -depth 16 -name VNC4
The first time you run vnc4server, it will ask you for the password. Create a password that only you can guess and memorize it. Next, I installed TightVNC U3 package on my Sandisk U3 flash. I went over to another PC running Windows and plugged in my USB flash. The U3 menu popped up and I clicked on the TightVNC icon. Then, I specified the address of my Linux box running vnc4server:
192.168.1.234:1 or
192.168.1.234::5901
After I was done with vnc session, I killed the vnc4server with the following command:
vnc4server -kill :1
When vnc sessions don't seem working, check the log file: ~/.vnc/*.log
No comments:
Post a Comment