LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-31-2003, 12:25 PM   #1
Tian
LQ Newbie
 
Registered: Oct 2003
Posts: 5

Rep: Reputation: 0
How to Autostart a VNC Server with the System ?


Hi


I found many threads about this now but nothing helped me.
Most times directories or files were missing on my system (wrong distribution?) or I just did not get it.

Thats very frustratin now... so I hope someone here can help me.

I have a Suse 8.2 PC here and want to run a VNC Server. The programm should start with the PC / System. It should run without a login of a user.

I hope someone can help me.
Thx

Tian
 
Old 10-31-2003, 03:05 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Ok this is a quick and dirty method, you should use /etc/init.d/skeleton as a reference and write a proper runlevel script, but anyway here it goes:
create a file /etc/init.d/vncserver with the following content:

/bin/su user1 -c "usr/X11/bin/vncserver :1"

change user1 to whatever user you want to start the vnc server with(better not use root)
then make a symlink to runlevel 5 or whatever's your default runlevel

ln -s /etc/init.d/vncserver /etc/rc.d/rc5.d/S99vnc

that should do the trick, but as I mentioned before make a proper startup script if you can, better off that way.
 
Old 11-01-2003, 02:49 PM   #3
Tian
LQ Newbie
 
Registered: Oct 2003
Posts: 5

Original Poster
Rep: Reputation: 0
"then make a symlink to runlevel 5 or whatever's your default runlevel

ln -s /etc/init.d/vncserver /etc/rc.d/rc5.d/S99vnc"

What do u mean with this? I tried to use it in the command sehll but it did not work.

also a file named S99vnc doesnt exist

pls help me one more time
 
Old 11-01-2003, 07:40 PM   #4
Tian
LQ Newbie
 
Registered: Oct 2003
Posts: 5

Original Poster
Rep: Reputation: 0
I managed to do everything above now.
I checked if every file is where it should be and also the authorisations for the files are right.

If I reboot now just nothing changed ...

Any Ideas what went wrong ?
 
Old 11-01-2003, 08:11 PM   #5
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
make sure /etc/init.d/vncserver is executable
 
Old 11-01-2003, 08:22 PM   #6
Tian
LQ Newbie
 
Registered: Oct 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Yes I did that already. After testing a bit around Im now sure that /etc/init.d/vncserver is executed but it gets an error:

Running /etc/init.d/vncserver.sh


bash: line 1: usr/x11R6/bin/vncserver: No such file or directory


I already checked if the file is in that directory.
I changed x11 to x11R6 cause thats the directory x11 leads to.
(Both doesnt work)
 
Old 11-01-2003, 08:25 PM   #7
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
try putting a slash before usr
/bin/su user1 -c "/usr/X11/bin/vncserver :1"
 
Old 11-01-2003, 08:55 PM   #8
Tian
LQ Newbie
 
Registered: Oct 2003
Posts: 5

Original Poster
Rep: Reputation: 0
sigh.

Stupid me :/

ur right

Works now perfectly
Thank you Demonbane

Last edited by Tian; 11-01-2003 at 08:57 PM.
 
Old 11-01-2003, 08:57 PM   #9
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Well I suppose its my fault that I made a typo in the original reply, hehe :-)
but glad to hear its all sorted out 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
vnc server markehb Linux - Software 8 05-16-2004 01:32 PM
How can I autostart a (teamspeak) server! eugeny Linux - Software 0 02-11-2004 02:41 PM
autostart iptables script on system startup step Linux - Networking 2 03-21-2003 08:25 AM
VNC Autostart sholle Linux - Newbie 1 02-03-2003 02:15 PM
VNC on a server RedHat123 Linux - Security 1 09-30-2002 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:59 PM.

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