I would use the telnet method.... You only need to do it once after each reboot. So if you leave the machine on mostly, then once you start your session, it will stay alive until you kill it. That will also allow you to see which session it starts. (In fact, that is the way I manage my home firewall machine. I do port forwarding via ssh to my machine at home, so I can start a remove VNCserver @ home and see it from work 😀)
If you really want to do a boot time script, then go down into /etc/rc.d/init.d and look at a few of those scripts. They will give you some examples.... Find a small one to copy.
Then, go to /etc and do a find for 'S??<scriptfile>'. That will give you an indication of all the places to link in your file, then do the links.
Here's an example.
let's say you decide to look at /etc/rc.d/init.d/cron, and make a copy of it called /etc/rc.d/init.d/vncs
edit your /etc/rc.d/init.d/vncs and make it start vncserver..... Probably make sure it starts on :2 or so, so that it does not interfere with the standard X server and any additional XServers you might want to start.
cd /etc
find . -name 'S??cron'
This will return a list of where the start script is invoked from. (mine returns
./rc2.d/S89cron
./rc3.d/S89cron
./rc4.d/S89cron
./rc5.d/S89cron)
Now go into those directories, and create a link to your vncs script. You want this to fire pretty late, so you want to make the number pretty large. The scripts are invoked in numerical order.... So, something like this:
cd rc2.d
ln -sf /etc/rc.d/init.d/vncs ./S95vncs
cd ../rc3.d
ln -sf /etc/rc.d/init.d/vncs ./S95vncs
cd ../rc4.d
ln -sf /etc/rc.d/init.d/vncs ./S95vncs
cd ../rc5.d
ln -sf /etc/rc.d/init.d/vncs ./S95vncs
Now it will start. However, The problem I see with this is that I THINK it will start as root, which means that you will be starting an XServer/XSession attached to root. Unless you set it up to do the standard X login console. If you have it come up straight into your user desktop without logging in, then the telnet process is better.