On Friday 05 March 2004 14:01, Murat Akca wrote:
Hi;
We are developing a server side program which creates images on the fly. We are using Java and Tomcat web server and we must start Tomcat as root.But for security reasons machine must be started as a system user. So we need to execute these commands before Tomcat start ups.
-xauth merge /home/user/.Xauthority -export DISPLAY=:0.0
1) install Xvfb 2) put following lines in catalina.sh before tomcat starts Xvfb :1 & export DISPLAY=:1 then you have a virtual framebuffer (through Xvfb) at display :1 no need to start real X.
We write a start up script which executes these commans before Tomcat starts.And we add this script at runlevel 5. I know that at runlevel 5 X-Window system is available.But program could not create images and gives this exception: -Could not connect to X-Window ?????
When we execute these commands manually after start up and start Tomcat manually again.Program works great.
I could not find any solution.Do u have any ideas?
Thanks .
Murat Akca