It all started when I want to use my vnc viewer from my remote machine to connect to my local server running CentOS 6.4
As i reboot my CentOS server, i realize that I have to re-run execute my vncserver as vncserver -geometry 1440 x 900 again.
Hence, I went to find out how to enable the auto startup of service during Linux machine bootup and i started to read about chkconfig and init.d
This is what i found out
[root@racnode1 init.d]# chkconfig | grep vncserver
vncserver 0:off 1:off 2:on 3:on 4:on 5:on 6:off
I realize my VNCserver is auto started but here come my problems and queries
Q1) Even though, when i do a ps -ef | grep vnc, i can see my vncserver running on a certain port 1, i am not able to connect to it.
I have to manually execute vncserver again which will run on another port and then i am able to connect in (E.g 2)
Q2) How do we control during auto startup, the correct user that will be use to startup the service ? (e.g. i do not want to auto start vncserver as root, i want to auto start it as another user)
Q3) How do i add parameters to a auto startup service ? e.g.
vncserver -geometry 1440x900 ?
Q4) Can a service auto startup without adding it as a service in chkconfig ? Meaning i just put the "script" inside the /init.d/ folder.
Hope to hear from you gurus soon.