Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 01-04-2004, 12:32 PM   #1
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Rep: Reputation: 15
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.

Old 01-04-2004, 03:31 PM   #2
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: Reputation: 32
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

Old 01-05-2004, 10:39 AM   #3
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Original Poster
Rep: Reputation: 15
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.

Old 01-05-2004, 05:20 PM   #4
Registered: Aug 2003
Location: NY
Distribution: RH9, RH8, Slack, Vector
Posts: 497

Rep: Reputation: 31
ok try same as above but

chkconfig --level 35 vncviewer host:1 on
Old 01-08-2004, 02:51 AM   #5
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Original Poster
Rep: Reputation: 15
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.

Old 01-08-2004, 09:04 AM   #6
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
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
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.
Old 01-08-2004, 08:24 PM   #7
Senior Member
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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
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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting vncserver mickeyboa Fedora 3 08-08-2005 02:47 AM
Robust vncserver startup file (rc.vncserver) arobinson74 Slackware 4 05-14-2005 05:33 AM
Trouble starting vncserver maximyus Linux - Networking 3 04-02-2005 12:49 PM
Starting VNCserver on Mandrake 10.0 archange Linux - Newbie 1 10-01-2004 08:14 PM
Getting vncserver to run automatically when user logs in indespair Linux - Networking 2 10-26-2003 02:37 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:33 PM.

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