1756762 Members
2674 Online
108852 Solutions
New Discussion юеВ

VNC startup on boot

 
SOLVED
Go to solution
Mike Berry_2
Advisor

VNC startup on boot

Hello all.

Running HP-UX 11. Installed VNC. If you run "vncserver" from a shell, it works fine. The problem is starting a vncserver on boot. Our DBAs want exclusive use of DISPLAY:1 for their clients, therefore we try to start this vncserver on boot to ensure that this desktop is always grabbed by the DBAs user before anyone else has a chance to start a vnc session. After boot, this vnc session starts and is reachable, but does not display anything in the desktop session (no dtterm or CDE desktop manager). We've tried adding sleeps in the startup script, thinking that VNC is trying to start before CDE has fully started, but same result (VNC is set to start up last within run-level 3, immediately after CDE). One very odd thing is that, once the machine is up, if you drop to run-level 2 (init 2), thereby killing VNC and CDE, and then go back up to run-level 3 (init 3), then the vnc session is fine!!
Please help before somebody dies.

Thanks

Mike
9 REPLIES 9
Sean OB_1
Honored Contributor
Solution

Re: VNC startup on boot

We have a startup script in rc3.d that runs the following:


#!/sbin/sh
#

case "$1" in
'start')

chmod -R 777 /tmp/.X11-unix
su - oracle -c "vncserver :20 -depth 24"
;;

'stop')
su - oracle -c "vncserver -kill :20"
;;

*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
Wodisch_1
Honored Contributor

Re: VNC startup on boot

Hi Mike,

another way of starting VNC server might help you there: on the VNC home page you can find a description about how to run VNCserver from "inetd"!

HTH,
Wodisch
Rick Beldin
HPE Pro

Re: VNC startup on boot

I've modified one of our test systems to start VNC when CDE starts up. This gives me a complete login session that can be shared.

The only thing that needed to be done was to add a line to /etc/dt/config/Xservers. Be aware that the following line is very long and the ITRC interface may have munged it.
Trick is to pre-define a passwd for VNC and specify it on the command line as well as specifying the fonts that the VNC server will use.

anglfish.atl.hp.com:11 Xvnc local@none /usr/bin/Xvnc :11 -alwaysshared -geometry 1600x1200 -fp /usr/lib/X11/fonts/hp_roman8/75dpi/,/usr/lib/X11/fonts/iso_8859.1/100dpi/,/usr/lib/X11/fonts/iso_8859.1/75dpi/,/usr/lib/X11/fonts/hp_kana8/,/usr/lib/X11/fonts/iso_8859.2/75dpi/,/usr/lib/X11/fonts/iso_8859.5/75dpi/,/usr/lib/X11/fonts/iso_8859.6/75dpi/,/usr/lib/X11/fonts/iso_8859.7/75dpi/,/usr/lib/X11/fonts/iso_8859.8/75dpi/,/usr/lib/X11/fonts/iso_8859.9/75dpi/,/usr/lib/X11/fonts/misc/,/opt/graphics/PEX5/fonts/usascii/stroke,/opt/graphics/PEX5/fonts/hp_japanese/stroke,/opt/graphics/PEX5/fonts/ascii/stroke,/usr/dt/config/xfonts/C,/usr/lib/X11/fonts/iso_8859.15/75dpi -rfbport 5911 -rfbauth /root/.vnc/passwd -rfbwait 120000 -httpport 5811 -httpd /opt/classes -depth 24
Necessary questions: Why? What? How? When?
Bill Thorsteinson
Honored Contributor

Re: VNC startup on boot

Sean OB_1
Honored Contributor

Re: VNC startup on boot

Dang,

I finally get to be the first one to answer a question, and I get no points. :-(

How depressing.
Mike Berry_2
Advisor

Re: VNC startup on boot

Thanks all

Our proxy has been down two days, so couldn't check these out. Trying today.

You all get 10 points for being so patient (apart from Sean)!!


Cheers


Mike

Mike Berry_2
Advisor

Re: VNC startup on boot

Chaps,

Still no joy! I think that the problem is CDE authentication, as a VNC session always starts ok. What I would like to do is to try and pass user and password to CDE.

Rick -
Tried your modification to /usr/dt/config/Xservers, and this then provided a full CDE environment, but required a CDE login first. I didn't make it clear that the user that owns this VNC session is a non-interactive user i.e. Oracle reports uses this session, and needs the CDE environment to run in (I am in the process of trying to pass credentials to CDE at the same time). Just the same, your answer has increased my understanding of the CDE startup process, and I'm sure that we will continue to use this in some way. Thanks again.

Mike
Alex Glennie
Honored Contributor

Re: VNC startup on boot

My understanding of Oracle reports is that it just needs an Xserver to display to: why not just use X Virtual framebuffer aka xvfb (a virtual Xserver run in memory as opposed to on a physical device) ie in your case it would most likely run on the unix server or w/s involved here unless this non interactive user needs to see what he's doing / physically interact with the screen.

fyi xvfb comes as a supported hpux xserver extension these days if you install circa June 2001 or later xserver patches for 10.20,11.00 or 11.11

PHSS_ : 25293,26577,or 26566 respectively ....are the latest.
David Deaderick
New Member

Re: VNC startup on boot

I am having the same issue occur on my Oracle 9i Application Servers. Was a resolution ever sucessful?