C
Conrad Eaglehill
Hi.
I'm using sendmail 8.12.9 for a project on RedHat Fedora Core 2 on my
personal computer with a perfectly functioning X window server. Part
of this project requires me to modify sendmail to open a Java gui
application. When I attempted this originally, I got the following
error: "No X11 DISPLAY variable was set, but this program performed an
operation which requires it." Figuring that sendmail for whatever
reason unset it, I called the C function setenv() in sendmail to set
it and got the following error: "Exception in thread "main"
java.lang.InternalError: Can't connect to X11 window server using
'localhost:0.0' as the value of the DISPLAY variable." Using the
command-line imperative "-Djava.awt.headless=true" for the Java
program gives the following message: "Exception in thread "main"
java.awt.HeadlessException."
Looking into the problem, I found that when running as root, lots of
people have had the same problem, and their solution was "don't run as
root." Sendmail needs root permissions for some things, so this isn't
an option for me. I wonder if anyone know how to run a Java
application that needs the X-Window server as root, (or perhaps would
allow me to run a Java gui from sendmail as another user temporarily).
Thanks in advance,
Conrad Eaglehill
I'm using sendmail 8.12.9 for a project on RedHat Fedora Core 2 on my
personal computer with a perfectly functioning X window server. Part
of this project requires me to modify sendmail to open a Java gui
application. When I attempted this originally, I got the following
error: "No X11 DISPLAY variable was set, but this program performed an
operation which requires it." Figuring that sendmail for whatever
reason unset it, I called the C function setenv() in sendmail to set
it and got the following error: "Exception in thread "main"
java.lang.InternalError: Can't connect to X11 window server using
'localhost:0.0' as the value of the DISPLAY variable." Using the
command-line imperative "-Djava.awt.headless=true" for the Java
program gives the following message: "Exception in thread "main"
java.awt.HeadlessException."
Looking into the problem, I found that when running as root, lots of
people have had the same problem, and their solution was "don't run as
root." Sendmail needs root permissions for some things, so this isn't
an option for me. I wonder if anyone know how to run a Java
application that needs the X-Window server as root, (or perhaps would
allow me to run a Java gui from sendmail as another user temporarily).
Thanks in advance,
Conrad Eaglehill