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 |
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. |
"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 |
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 ? |
make sure /etc/init.d/vncserver is executable
|
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) |
try putting a slash before usr
/bin/su user1 -c "/usr/X11/bin/vncserver :1" |
sigh.
Stupid me :/ u´r right Works now perfectly Thank you Demonbane |
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 11:36 PM. |