Re: Can't display Java gui

From: Robert Clark (clark_at_warez.exiter.com)
Date: 11/09/04


Date: Tue, 09 Nov 2004 00:48:26 -0500

In article <f8c56b39.0411080743.260c23db@posting.google.com>, Conrad
Eaglehill <airkart@hotmail.com> wrote:

> 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
> [ snip ]
>
> 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).

If you logged in as yourself (your user account) then the X server will be
7configured to prevent anyone except you from connetting GUI apps. You can
tell the X server to allow connections from any user on the local machine
by running:

xhost + localhost.

man xhost will have more details. Or you can use sudo or su to switch to the
user that does have permission to connect to the X server.

That being said, I have to go with the general concensus and say "sendmail
launching a GUI app? Yikes!"

- Rob

-- 
(to email me, remove "warez.")


Relevant Pages

  • RFX Networks/ RackAdmin.com ALERT
    ... below was posted to some security websites. ... | in security and scalable server management on varying levels. ... Got Root? ... Your Server login ID is: ...
    (comp.os.linux)
  • RFX NETWORKS ALERT
    ... below was posted to some security websites. ... | in security and scalable server management on varying levels. ... Got Root? ... Your Server login ID is: ...
    (alt.linux)
  • Solaris Sparc 9 12/3 Core ./installer failing due Java?
    ... system SUNWadmr System & Network Administration Root ... system SUNWapchd Apache Web Server Documentation ... system SUNWapchu Apache Web Server (usr) ... system SUNWaudd Audio Drivers ...
    (comp.unix.solaris)
  • core install of Solaris 9 (sparc) package list can be trimmed ?
    ... This is a server that will have very specific reasons ... system SUNWadmr System & Network Administration Root ... system SUNWeu8os American English/UTF-8 L10N For OS Environment User Files ... system R SUNWfcip Sun FCIP IP/ARP over FibreChannel Device Driver ...
    (comp.unix.solaris)
  • [Full-Disclosure] RFX Networks
    ... | in security and scalable server management on varying levels. ... | monitor to take action during situations of service failure. ... Got Root? ... Your Server login ID is: ...
    (Full-Disclosure)