Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-04-2004, 12:32 PM
|
#1
|
|
Member
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149
Rep:
|
Starting a vncserver instance automatically at startup
I am having immense problems automating a simple scrip to start an instance of vncserver at when my machine starts up. Any clues of where to put the script file would be great.
Tx
p.n
|
|
|
|
01-04-2004, 03:31 PM
|
#2
|
|
Member
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335
Rep:
|
On your RH (and I guess your SuSE also) you can set vncserver service to start by running serviceconf (in GUI) or chkconfig at CLI. Syntax for chkconfig is:
chkconfig --level 35 vncserver on
to start it in init3 and init5
HTH!
|
|
|
|
01-05-2004, 10:39 AM
|
#3
|
|
Member
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149
Original Poster
Rep:
|
Well, this is actually not the problem. The service starts fine when the machine boots up. I need to start a VNC session eg ServerName:1 automatically. Any ideas on this would be helpful.
Thanks
p.n
|
|
|
|
01-05-2004, 05:20 PM
|
#4
|
|
Member
Registered: Aug 2003
Location: NY
Distribution: RH9, RH8, Slack, Vector
Posts: 497
Rep:
|
ok try same as above but
chkconfig --level 35 vncviewer host:1 on
|
|
|
|
01-08-2004, 02:51 AM
|
#5
|
|
Member
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149
Original Poster
Rep:
|
Nope. This is not it. I am sure I should be able to run a simple start up script. I tried one from /etc/rc.d/script but obviously there is something fundamental that I do not yet understand.
regards
p.n
|
|
|
|
01-08-2004, 09:04 AM
|
#6
|
|
Member
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 274
Rep:
|
Go to /etc/. (Hopefully) you'll find a folder rc.d and in it rc1.d-rc6.d. Just
put a script in the appropiate* folder, which contains something like
/wherever/it/is/stored/vncserver - don't forget to chmod +755 or whatever
it.
Name of the script can be derived from the other files in the folder, they're
usually something like S<twodigits><processname>, eg. S27vncserver.
Instead of a script you may also use a symlink, example
ln -snf /wherever/it/is/stored/vncserver /etc/rc.d/rc3.d/S27vncserver
BTW as which user did you install VNC? If you installed it as another
user than root, you'll probably run into the problem that the system will
try to execute the script/link in /etc/rc.d/... as root, but vncserver will
not find its config files in /root/.vnc.
*numbers refer to the runlevel. Not sure if the system goes through all
the folders, but if you enter >runlevel< at the console (after booting) and it comes back with 3, you should be fine with putting it into rc3.d.
|
|
|
|
01-08-2004, 08:24 PM
|
#7
|
|
Senior Member
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019
Rep:
|
you could also put in some script lines in /etc/rc.d/rc.local (for RH, anyways. don't know about suse). rc.local executes after all the other startup scripts execute. It is good for simple stuff.... like a one liner to start up a vnc instance.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:52 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|