Click to See Complete Forum and Search --> : launching vnc at startup


av8or
03-02-2001, 03:21 PM
I'm running RH 6.2 on my computer at home and I have a spare computer to play with. I have RH6.2 on this one also. I don't have an extra monitor so I'd like to be able to run vncserver at startup so I don't have to keep switching the monitor cables. How can I do this? I looked on the "vnc" home page and it directed me to iXVNC, but I was unable to reach the page. I've searched this forum and found a few things but none that actually help. This is one of the things I've tried:
1. In rc.local file Add this to the bottom of your rc.local

echo "Auto login of user username"
cd /home/username #place you home directory here
su - username
2. Add the following to the bottom of your ~/.bash_profile:

if [ "`tty`" = "/dev/console" -o "`tty`" = "/dev/tty0" ]
then
vncserver
fi

It does not work. What does all that mean? I know I'm doing something wrong with the "'tty'" part.

can someone help me please? Maybe with something a little easier?

Thanks

[ 02 March 2001: Message edited by: av8or ]

FoBoT
03-02-2001, 03:32 PM
i need to know this also, i will be doing a similar setup soon

i have been using VNC at work (just winders :( ) and really, really like it

chimaybleue
03-02-2001, 03:33 PM
Did you try to edit your /etc/inittab ? It's not difficult, but if you don't know, I'll reread an article I used to edit mine ... Don't esitate to post again if you think this could be the solution ...

av8or
03-02-2001, 03:50 PM
I haven't tried editing inittab. Could you please shead more light on this? I'd appreciate it.

bdg1983
03-02-2001, 06:38 PM
inittab has nothing to do with it...

Could you put the vncserver startup command in the Xwindows startup file? Not sure what the file is for Redhat.

av8or
03-03-2001, 01:00 AM
I'm not starting Xwindows on boot. I'm starting in runlevel 3. I don't have an extra monitor so I'd like to be able to turn the machine on, let it boot up all the way and then be able to connect to it via VNC.

bdg1983
03-03-2001, 07:15 PM
I may be incorrect, but doesn't VNC need X to run?

If the Linux PC you want to connect to is only running in consolemode, can you not use Telnet or SSH?

av8or
03-04-2001, 11:19 PM
No, X-Windows does not need to be running in order to launch vncserver. When you connect with a remote client, a separate instance of X-Windows is started.

chimaybleue
03-05-2001, 07:23 AM
I'll post the inittab thing, even if it doesn't work for your matter : you could want, one day to use this method (I use this to launch gpm on runlevel 3)

You have to add a line, with an ID (2 digits : 123 isn't correct, nor 9, but you can put mb if you want), this ID mustn't be used yet ... You follow this with a ":". you then specify the runlevel you want, ":", then "once" or "respawn" (or other, read the docs) it says how many time it will launch the prog. You finish with the command and the args ... Hope this could anyway be useful for you ...

[ 06 March 2001: Message edited by: chimaybleue ]

av8or
03-05-2001, 11:46 AM
Thanks chimaybleue ,

I'll try that.

av8or
03-05-2001, 03:22 PM
Hay All,

I found this post and have tried it and it works great. Thanks to everyone who posted replys to my post. Special thanks to djv!! You da man.
http://www.linuxnewbie.org/cgi-bin/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=1&t=011051