LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to Autostart a VNC Server with the System ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-autostart-a-vnc-server-with-the-system-110831/)

Tian 10-31-2003 12:25 PM

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

Demonbane 10-31-2003 03:05 PM

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.

Tian 11-01-2003 02:49 PM

"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

Tian 11-01-2003 07:40 PM

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 ?

Demonbane 11-01-2003 08:11 PM

make sure /etc/init.d/vncserver is executable

Tian 11-01-2003 08:22 PM

Yes I did that already. After testing a bit around I´m 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 doesn´t work)

Demonbane 11-01-2003 08:25 PM

try putting a slash before usr
/bin/su user1 -c "/usr/X11/bin/vncserver :1"

Tian 11-01-2003 08:55 PM

sigh.

Stupid me :/

u´r right

Works now perfectly
Thank you Demonbane

Demonbane 11-01-2003 08:57 PM

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


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