cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Armstrong <ada...@btinternet.com>
Subject Re: starting Xvfb for Cocoon
Date Sat, 15 Dec 2001 19:28:11 GMT
Hi Cindy,

May I suggest the following to try:

>From a shell prompt, do a 
	which Xvfb
This should report the full path to the Xvfb program.  Then, change the
Xvfb :1.... to the full path (e.g. /usr/sbin/Xvfb :1 ... - I don't know
what the proper path is as I don't have it installed myself).  You may
also have to do the same change in the killproc (not really sure).  The
reason for this is that your command shell will normally find this
program thanks to the PATH environment variable - but not all path
elements are present in the PATH variable when the init.d scripts are
being run, hence at boot time your script can't find Xvfb.

Also, the line export DISPLAY=:1 is really redundant in this startup
script - the important place to have this is before firing up
Tomcat/Cocoon.

I hope this helps,

David


On Tue, 2001-12-11 at 17:43, Cindy Ballreich wrote:
> I suppose that this is really a Xvfb or even a Linux question, but since it
> directly relates to Cocoon I hope you'll allow me to ask it here. I've
> tried linux.redhat.misc with no success.
> 
> I have a very basic RedHat 7.0 web server (Apache 1.3.20) and I want to run
> Cocoon 2.0 with Tomcat 3.3. Apparently, I also need to run Xvfb in order
> for Cocoon to work properly. I would very much like to start Xvfb at boot
> time along with all of the other web services. I've written an init.d
> script to do this. This script works very well from the command line, but
> for some reason it won't work at boot time. Perhaps Xvfb requires a service
> that isn't running when it tries to start? I was wondering if anyone might
> be doing this successfully and if they'd mind sharing their init.d script.
> I'd also appreciate being pointed to any documentation that might explain
> what I'm doing wrong.
> 
> My current script was accepted by chkconfig and all of the rc.d links are
> present. It works great from the command line and *appears* to work at boot
> time (I get the "starting" message and the result is "OK"), but once the
> system finishes booting and I log on there is no instance of Xvfb running. 
> 
> Any advice would be greatly appreciated.
>  
> Here is the script that I'm currently using...
> 
> -------------- beginning of script ---------------
> #!/bin/sh
> #
> # Startup script for Xvfb
> #
> # chkconfig: 2345 79 21
> # description: Xvfb - virtual frame buffer
> # processname: Xvfb
> #
> # Source function library.
> . /etc/rc.d/init.d/functions
> 
> ## See how we were called.
> case "$1" in
>   start)
>         echo -n "Starting Xvfb services: "
>         Xvfb :1 -screen 0 800x600x8 &
>         export DISPLAY=:1
> 
>         echo
>         touch /var/lock/subsys/Xvfb
>         ;;
>   stop)
>         echo -n "Stopping Xvfb services: "
>         killproc Xvfb
>  
>         echo
>         rm -f /var/lock/subsys/Xvfb
>         ;;
>   status)
>         status Xvfb
>         ;;
>   restart|reload)
>         $0 stop
>         $0 start
>         ;;
>   *)
>         echo "Usage: xvfb {start|stop|status|restart}"cocoon-users@xml.apache.org
>         exit 1
> esac
> 
> exit 0
> -------------- end of script ---------------
> 
> 
> This script is similar to the one in this usenet posting (beware wordwrap)...
> 
> http://groups.google.com/groups?q=+%22starting+Xvfb%22&hl=en&lr=lang_en&rnum
> =2&selm=m266r04r65.fsf%40gododdin.internal.jasmine.org.uk
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 
> 



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message