LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-15-2004, 01:53 PM   #1
GD_19
LQ Newbie
 
Registered: Aug 2003
Distribution: Gentoo
Posts: 28

Rep: Reputation: 15
vncserver won't start from rc.local


Hi! I have created the following /etc/rc.local file in order to set up vnc at boot time:

touch /var/lock/subsys/local
/sbin/route add -net 140.143.0.0/16 gw 10.143.7.1
/etc/init.d/vncserver start
/usr/bin/vncserver :1 -geometry 1280x1024
/usr/bin/vncserver :2 -geometry 800x600

however either the vncserver service does not start, or no X11 sessions are started from the /usr/bin/vncserver script.

The problem is that should I enter these same commands at the command line or execute the rc.local file after the system has booted, everything works fine!

Moreover running an nmap after starting vnc also starts a service named vnc-http-1 at port 5801. I can only connect to port 5901 which the vnc-1 service listens to. What is the use of the vnc-http-1 service?

Thanks!
GD
 
Old 01-15-2004, 01:59 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
The http port is used to load the java viewer via a web browser.

Try creating a logfile for those commands to see if it gives you more information - change the commands to:
/etc/init.d/vncserver start 2>&1 > /tmp.vncserver1.log
/usr/bin/vncserver :1 -geometry 1280x1024 2>&1 > /tmp.vncserver2.log
/usr/bin/vncserver :2 -geometry 800x600 2>&1 > /tmp.vncserver3.log

Then post the contents of the log files.
 
Old 01-15-2004, 02:02 PM   #3
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
I think the vnc-http-1 service is for java connections through a browser.

Yeah....what Dave said.....
 
Old 01-15-2004, 02:21 PM   #4
GD_19
LQ Newbie
 
Registered: Aug 2003
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
Woa! that was fast!

thanks for your reply

only log 1 has a 50 byte size after a reboot. here's what I get:

[root@gdgate /]# cat ./tmp.vncserver1.log
Starting VNC server: [ OK ]

now explain that:
Code:
[root@gdgate /]# nmap localhost

Starting nmap 3.48 ( http://www.insecure.org/nmap/ ) at 2004-01-15 22:21 EET
Interesting ports on gdgate.pwn (127.0.0.1):
(The 1653 ports scanned but not shown below are in state: closed)
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
111/tcp open  rpcbind
631/tcp open  ipp

Nmap run completed -- 1 IP address (1 host up) scanned in 2.734 seconds
[root@gdgate /]# /etc/init.d/vncserver status
Xvnc is stopped
[root@gdgate /]# /etc/rc.local
SIOCADDRT: File exists

New 'gdgate.pwn:1 (root)' desktop is gdgate.pwn:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/gdgate.pwn:1.log


New 'gdgate.pwn:2 (root)' desktop is gdgate.pwn:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/gdgate.pwn:2.log

[root@gdgate /]# /etc/init.d/vncserver status
Xvnc (pid 2028 2017) is running...
[root@gdgate /]# nmap localhost

Starting nmap 3.48 ( http://www.insecure.org/nmap/ ) at 2004-01-15 22:22 EET
Interesting ports on gdgate.pwn (127.0.0.1):
(The 1647 ports scanned but not shown below are in state: closed)
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
111/tcp  open  rpcbind
631/tcp  open  ipp
5801/tcp open  vnc-http-1
5802/tcp open  vnc-http-2
5901/tcp open  vnc-1
5902/tcp open  vnc-2
6001/tcp open  X11:1
6002/tcp open  X11:2

Nmap run completed -- 1 IP address (1 host up) scanned in 3.283 seconds
[root@gdgate /]#
go figure...
 
Old 01-15-2004, 02:55 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
What about adding a few pauses:
sleep 30
/etc/init.d/vncserver start
sleep 30
/usr/bin/vncserver :1 -geometry 1280x1024
sleep 30
/usr/bin/vncserver :2 -geometry 800x600

This will put 30 second pauses to let the previous command run for a while. Try it with the long pauses just for testing purposes although it will slow your boot down by 1 1/2 minutes.
 
Old 03-13-2004, 12:27 AM   #6
luegner
Member
 
Registered: Jul 2003
Location: Henderson, NV
Distribution: Slackware
Posts: 47

Rep: Reputation: 15
Anyone know how to run vnc server without actually logging in on boot time?

Last edited by luegner; 03-13-2004 at 12:28 AM.
 
  


Reply



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 07:57 AM
Howto start VNCServer before LogIn? florian_mrt Linux - Networking 24 09-13-2005 01:42 PM
start vncserver. bruse Linux - Networking 1 09-10-2005 12:21 PM
how to start the vncserver ust Linux - Software 1 05-11-2005 02:23 AM
vncserver in rc.local as other user? jvdbossc Linux - General 2 05-24-2004 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:09 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
Open Source Consulting | Domain Registration