tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Einfeldt" <ralph.einfe...@uptime-isc.de>
Subject AW: need X running tomcat
Date Thu, 06 Jun 2002 08:46:38 GMT
Better user Xvfb.

Depending on the distribution you use you can
place a start script like this in /etc/init.d or 
/etc/rc.d/init.d to start xvfb.

XVFB=/usr/X11R6/bin/Xvfb
XVFBARGS=":99 -screen 0 1024x768x24 -fbdir /var/run -ac"
PIDFILE=/var/run/xvfb.pid
case "$1" in
  start)
    echo -n "Starting virtual X frame buffer: Xvfb"
    start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile
--background --exec $XVFB -- $XVFBARGS
    echo "."
    ;;
  stop)
    echo -n "Stopping virtual X frame buffer: Xvfb"
    start-stop-daemon --stop --quiet --pidfile $PIDFILE
    echo "."
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
        echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
        exit 1
esac

exit 0

This is what we use for debian.
:99 is the value for the xserver id that must be set 
in the DISPLAY env.

DISPLAY=localhost:99.0

Additionaly you have to define a link in /etc/rc?.d to this file
for the run levels where you need the Xvfb. (This is for debian,
other distributions 

For tomcat you can do the same.

> -----Urspr√ľngliche Nachricht-----
> Von: Michael Reutter [mailto:tomcat@meinsenf.at]
> Gesendet: Donnerstag, 6. Juni 2002 09:52
> An: Tomcat Users List
> Betreff: need X running tomcat
> 
> 
> Hi!
> 
> I'm running tomcat 3.3.1 on a linux box!
> 
> my servlets need some fonts to generate some images.
> Now I have to do the following to start tomcat:
> 
> (no X is running)
> login as root
> startx &
> export DISPLAY=myserver:0
> tomcat.sh start
> 
> or
> 
> start xdm
> login as root
> tomcat.sh start
> 
> 1. Am I on the right way???
> 
> 2. How to automate this, so my tomcat runs after a reboot ...
> 
> 
> thanks
> michi
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 
> 

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message