LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Red Hat 9.1 + VNC Auto Start (https://www.linuxquestions.org/questions/linux-newbie-8/red-hat-9-1-vnc-auto-start-63262/)

JustMe5551212 06-02-2003 04:06 PM

Red Hat 9.1 + VNC Auto Start
 
Hi everyone.

I am a total Linux Noob, so pre-apologies for any ignorance :)

I loaded RH 9 on a PC and I am trying to get it to auto boot and start VNC for me so I can throw it in a compter cabinet and remote to it for maintenance, etc.

I am using GNOME as the GUI and I've managed to create a user account and then tell the OS that it should log in as that user after a 10 second delay at the logon prompt.

After reading some in here, I also figured out how to go in to Preferences --> Sessions and add an auto start program.

"So what's the problem?" you ask.

Well, as the auto-start program, I chose \usr\bin\vncserver.

Now when the computer boots, it just does disk access forever and ever, and VNC never starts.

Any great wisdom you can bestow is greatly appreciated.

TIA.

jdc2048 06-03-2003 03:15 AM

I don't have a machine with vnc anywhere near me currently, but I will try checking this at home later.

First, some questions back to you though.

1. What are you getting on the console? Is it logging in automatically?

2. You only typed the back-slashes in this post right? You are actually using forward-slashes in the auto-start field?

3. Have you had any success running vncserver when not using it as an auto-start program?

4. What color mouse do you have?

5. Just kidding on the last one. :) What's in the vnc log for the user who is auto-logged on? There should be a ".vnc" directory in their home directory with some info in it.

JustMe5551212 06-03-2003 08:31 AM

1. Without specifying any auto start program, the console logs in without any problems automatically. Once I specified the suto start program, it starts ok, but then the disk drive constantly runs, like it's maybe starting and stopping VNC over and over. It's still logged in, but so slow that I can't do anything.

2. They are forward slashes, that was just my Linux noob-ness coming out. I used the browse function in GNOME to actually point to the program I wanted to run @ startup.

3. VNC works great if I log in and just go to a terminal session and type 'vncserver'. It prompts me for a password and then runs great. It is curious that it always asks for a password. Sort of makes me think I need to add something to a startup file for VNC to auto set that. That's partially what leads me to believe that the disk access problem mentioned in #1 is from VNC starting and stopping over and over. Perhaps because it can't start in 'batch' becuase I need to put a default password in a file someplace ?

4. Grey on the Linux box right now, white on the PC I want to remote in to. Eventually no mouse on the Linux box when it goes to the cabinet :p

5. There are several logs in the .vnc folder. There are 8 .log files and 8 .pid files, which points me at my theory of this thing starting and stopping VNC over and over.

Thanks for the feedback and I await more wisdom :D

jdc2048 06-03-2003 04:01 PM

1. good

2. good

3. Does it (vncserver) ask you for a password each time? Mine only asks me for a password the first time, then stores it encrypted in a file 'passwd' under the .vnc directory. When you start the vncserver manually, are you able to run vncclient and connect to it?

4. :)

5. vncserver creates a new log file for each virtual display it attempts to create (successful or not).

Next: I would try piping the output from your auto-start program to a file if it doesn't already do that. I am using gentoo and don't have the option to test this, but I would think it would work by using the redirect as in the following in your auto-start thing.
Code:

"/usr/bin/vncserver > /home/myhome/.vnc/autostart.output.log"
I'll check back later, am on my way to work soon.
Jeremiah

JustMe5551212 06-03-2003 08:14 PM

I 'think' I might have figured it out.

In my auto start program, I only specified this:

'/usr/bin/vncserver'

In digging around everyplace I could find, I saw a syntax where they added the display after the command, like such:

'/usr/bin/vncserver :1'

And now it seems to work :)

I did also find some documentation on using inetd to listen for connections so it wil lonly start another X session when someone tries to connect, but that was a touch over my head.

If you've got it set up that way and would like to impart some knowledge this way, feel free :)

I am thinking of reloading with Mandrake and it seems to be the recommend Distro for nooBs, but I hate to do it now that I got VNC working...lol

:D

jdc2048 06-03-2003 08:34 PM

You could also add some other command line options to that as well, for instance the '-geometry' option will allow you to specify the size of the display when you remote connect to it. Also the '-depth' option will allow you to specify 8,16, or 32 bit depth, which will add more colors to the display. Check out the man page for vncserver, it is fairly well written.

I may look into the inetd part of it, I haven't used it before ... might be interesting and of use to me. I have 3 computers on my desk and only one monitor.

I think that Redhat is fine for noobs as well. I recommend you just pick one and stick with it, switching around too often will only cause you confusion. Once you get more experienced, then switching around will not be such a big deal.

lifeform 09-24-2003 05:07 AM

hi! i'm also trying to obtain the same setup.
only difference is that i'm using mandrake 9.1
any idea how i can get vncserver to run at startup?

i've managed to get it to do the auto-login.

jdc2048 09-26-2003 08:43 PM

I haven't used mandrake, so I am not sure where the auto-start feature is. If you find it, then the syntax should be pretty much the same.

lifeform 09-26-2003 09:51 PM

yep! have managed to get it up n running.. :P

thanks!!!


All times are GMT -5. The time now is 09:17 PM.