General
cancel
Showing results for 
Search instead for 
Did you mean: 

VNC server startup (gray desktop) and Oracle reports

SOLVED
Go to solution
Liam Curtis
Frequent Advisor

VNC server startup (gray desktop) and Oracle reports

Hi all...have another issue in addition to my recent post about NFS. We are using VNC server on HP UX 11i for running Oracle graphics toolkit and other necessary Oracle processes. The VNC server starts fine as a service in rc2 and I can run xclock, etc., but no luck with outputting pdf's or using Graphics toolkit. I also get that infamous gray desktop. That being said, if I stop and start the service from a console, everything works fine. (I also notice that I get a cde desktop when I do this.)

The only correlation I can find is that you need a desktop/terminal running for this stuff to work. I've searched other threads and saw others having this issue, but did not find a definitive answer.

Any ideas?

Thanks much!
5 REPLIES
Alex Glennie
Honored Contributor
Solution

Re: VNC server startup (gray desktop) and Oracle reports

Liam not being an Oracle expert I'm not sure if the Oracle graphics toolkit = aka Oracle Developers toolkit but ...

The Oracle Developer's Toolkit for web servers requires an Xserver to generate and render the document. This document is then passed to the web server so that it can be viewed from the local Web browsers. Oracle documentation indicates that an Xsession process is required to use this feature. Unfortunately, this information is not accurate.

What the Oracle application really needs is an Xserver process and a window manager process to be able to render the data and to create a HTML document.

The Oracle application makes internal calls to check the window size and window position of the window it opens to create the HTML document. If a window manger process is not available the internal calls from the Oracle application will fail.

An alternative to using VNC would to be make use of xvfb and just start a cut down mwm session
TwoProc
Honored Contributor

Re: VNC server startup (gray desktop) and Oracle reports

For you to run this, of course your DISPLAY variable still needs to be set by the time your toolkit is trying to start up. Are you perhaps running a file to setup your environment variables, and losing your DISPLAY variable in the transition of setting up a new ORACLE_HOME, etc ? Does the xterminal that is running this have xhost permission granted to the server that is running the toolkit at the time that you are trying to render? OK, one more - the desktop session that is set to accept the render requests - is it logged in and the desktop/vnc server opened with a "user" login having it opened already?

We are the people our parents warned us about --Jimmy Buffett
Steven E. Protter
Exalted Contributor

Re: VNC server startup (gray desktop) and Oracle reports

Oracle reports can render reports to clients so long as it has an X windows server to work with. It can be any X type workstation. If one is not available, one can use a frame generated or as I like to call it fako X Server.

http://www6.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=PHSS_31293&context=hpux:800:11:11

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Liam Curtis
Frequent Advisor

Re: VNC server startup (gray desktop) and Oracle reports

thanks for the replies. All your answers help to piece the puzzle together. It seems that our issue is because a desktop is never launched when vnc starts.

However, as I mentioned, vnc starts fine at boot and we can run xclock, but we have to then stop the service and start it again to see a desktop. I saw some posts about people running under inetd, but never saw any confirmations.

We do set the display variable right in our startup script:

PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH

VNC=/usr/contrib/bin/vncserver
USER=oracle
CONSOLE=0
HOST=XXX

case $1 in
'start')
if [ -f $VNC ]
then
echo "$0 starting up"
su - $USER -c "export DISPLAY=$HOST:$CONSOLE.0;$VNC :$CONSOLE; x
host +"
fi
;;
'stop')
if [ -f $VNC ]
then
echo "$0 stopping "
su - $USER -c "$VNC -kill :$CONSOLE"
fi
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
exit


Steve Adams
Occasional Visitor

Re: VNC server startup (gray desktop) and Oracle reports

Hi I use this to launch the HP LDAP console within a VNC session at boot time.

#!/sbin/sh
#
PATH=/usr/sbin:/usr/bin:/sbin:/usr/bin/X11:/opt/vnc:/usr/contrib/bin/X11
export PATH

HOME=$(grep "^ldapadm:" /etc/passwd | awk -F: {'print $6'})
export HOME

XAUTHORITY=$HOME/.Xauthority
export XAUTHORITY


rval=0
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"
rval=1
fi
}

case "$1" in

"start_msg") echo "Starting Netscape LDAP Console" ;;

"start")
echo "$0 start2" | at now +1 minute >/dev/null 2>&1
exit
;;

"start2")
ps -ef | grep "ns-" | grep -iv grep > /dev/null 2>&1
if [ $? = 0 ]
then
su - ldapadm -c "vncserver :9; export DISPLAY=:9; /var/opt/nets
cape/server7/startconsole & "
set_return
fi
rval=2
;;

"stop_msg")
;;

"stop")
vncserver -kill :9
set_return
;;

"restart")
$0 stop
$0 start2
;;
esac

Which gives me the LDAP console and a full CDE dekstop. I have this as just about the last rc script so you might need to increase the 'now +1 minute' to suit.