LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-06-2014, 07:39 AM   #1
szejiekoh
LQ Newbie
 
Registered: Jun 2014
Posts: 28

Rep: Reputation: Disabled
chkconfig / service / init.d and VNCserver


Dear all,

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

Code:
[root@racnode1 init.d]# chkconfig | grep vncserver
vncserver      	0:off	1:off	2:on	3:on	4:on	5:on	6:off
[root@racnode1 init.d]#
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)

Why ?

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.

Thanks.
Regards,
Alan
 
Old 12-06-2014, 08:41 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,609

Rep: Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702
http://www.linuxquestions.org/questi...ssions-577265/
 
1 members found this post helpful.
Old 12-06-2014, 01:54 PM   #3
szejiekoh
LQ Newbie
 
Registered: Jun 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Thanks smallpond. I got everything working now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I edit an init.d script after chkconfig --add ? dadoprso Linux - Server 3 10-18-2012 06:43 PM
init.d script not executing and missing from chkconfig gw1500se Mandriva 3 11-19-2010 12:27 PM
[SOLVED] chkconfig: cannot add new service. deostroll Linux - Server 5 03-09-2010 02:09 AM
service foo does not support chkconfig packets Linux - Newbie 2 12-18-2006 11:23 PM
init.d and chkconfig? lt_wentoncha Mandriva 3 06-26-2006 06:37 AM


All times are GMT -5. The time now is 12:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration