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 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
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
If I use Xvfb,can I start x server normally, this is a simulator. For example; if I put your lines to catalina.sh and then I start the x server.Is the programs keeps running? Regards Murat Akca On Friday 05 March 2004 19:28, rouvas wrote:
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
On Friday 05 March 2004 20:02, Murat Akca wrote:
If I use Xvfb,can I start x server normally, this is a simulator. For example; if I put your lines to catalina.sh and then I start the x server.Is the programs keeps running?
Yes. Xvfb is a *virtual* framebuffer (or something similar). That is, it doesn't really exists in any physical medium except in RAM. I do it with SuSe.8.0.Pro for 6 months now, no problems whatsoever. -Stathis.
Regards Murat Akca
On Friday 05 March 2004 19:28, rouvas wrote:
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
participants (2)
-
Murat Akca
-
rouvas