LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 12-21-2006, 07:46 AM   #1
Xzi
LQ Newbie
 
Registered: Dec 2006
Location: England
Distribution: Debian
Posts: 24

Rep: Reputation: 15
Running 'vncserver' on boot


I am a relatively new user so I'm trying to get more used to using Linux.
My Linux box is in a different room, which is rather inconvenient to get to. So far what I've managed to do is login into the box and run 'vncserver'. Then I can go use one of my other towers to remotely login into the box.

This all works fine, but when I restart the box I have to login and start the vncserver all over again. I would like it to start up the service on boot. I understand there are security issues of this, but this is just on my local network, the port cannot be accessed from outside my LAN as it will be blocked by my firewall.

I have tried a couple of things, but I am quite confused.

Thanks in advance for any help .

Xzi
 
Old 12-21-2006, 09:08 AM   #2
kscott121
Member
 
Registered: Jul 2003
Location: NC
Distribution: Fedora,Mepis,Debian
Posts: 84

Rep: Reputation: 15
Greetings
Not a Mandriva user myself but the basics are that you want to look to see how your distro starts processes. There is probably a GUI app in your Programs/System type tab that lets you set up which of the runlevels you want a program to run in. The GUI in my KDE Knoppix system is called KsysV (Interestingly this and only this app has retained it's German language flavor rather than appearing in English like everything else. To bad I don't know German.)

Also the /etc/init.d and /etc/rcS.d directories (on Debian anyways) have all the scripts for starting processes (And manually stopping and restarting etc.). If you have those directories , snoop around in there.

at a command prompt, type
man init
and
man inittab
to read some background on all this

Google Mandriva & runlevel together and you'll see a bunch of helpful links.
I haven't used vncvserver for a while but their docs probably tell you how to setup it up to auto start.

Good luck and Merry Christmas.

K Scott
 
Old 12-21-2006, 12:27 PM   #3
Xzi
LQ Newbie
 
Registered: Dec 2006
Location: England
Distribution: Debian
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks for the help.

I've had a look in the directories you mentioned, there is a file called vncserver in /etc/init.d, but I can't completely follow the code thats written in the file. I have a vague idea about what it is doing. It seems to allow the server to be stopped and started, but obviously this file isn't being called on boot or would it already be running? There is another vncserver file in /etc/rc1.d which by eye looks exactly the same.

Running those commands produces some instructions, which part of are straight over my head!

I am currently looking up the run level in google. I just thought I'd post to maybe get some more ideas. This would be so much easier if I wasn't so used to finding stuff like this under 100 GUI Windows menus lol!

Thanks so far and Mery Christmas to you too
Xzi

Last edited by Xzi; 12-21-2006 at 01:10 PM.
 
Old 12-21-2006, 02:08 PM   #4
Xzi
LQ Newbie
 
Registered: Dec 2006
Location: England
Distribution: Debian
Posts: 24

Original Poster
Rep: Reputation: 15
Right I've done it. I just thought I'd post what I've done for the benefit of anyone else who may need to do this in the future.

I found this resource on the runlevels in Mandriva: http://club.mandriva.com/xwiki/bin/v.../AdminAservice

Using what that told me I set the vncserver to runlevel 3 (CLI) and 5 (GUI) using the chkconfig.
In the form: chkconfig --level 5 vncserver on

Then editing the file /etc/sysconfig/vncservers. I uncommented and changed the line to:
VNCSERVERS="1:admin"

This is the form: VNCSERVERS="display no:user"

Thanks for your help, wouldn't have known about the run levels without it .

Xzi
 
  


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
Starting vncserver at boot using rc.local promethious Linux - General 3 10-14-2005 08:57 AM
Robust vncserver startup file (rc.vncserver) arobinson74 Slackware 4 05-14-2005 06:33 AM
vncserver for each user on boot devfreak Linux - Software 6 04-10-2005 07:42 PM
Change vncserver geometry while running arobinson74 Linux - Software 0 02-28-2005 10:28 AM
VNCServer Resolution Question - Running a 1280x1024 vnc session on a 1024x768 system sirejman Linux - Networking 4 08-02-2004 02:09 AM


All times are GMT -5. The time now is 02:58 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