It need root!



  • Where i work, i got trapped by a colleague saying

    "Hey, you, you know tomcat, is it true when the seller says me i need root to run a tomat-based application?"

    I thought, "ok, application needs port 80 and install guy don't know about using an apache front end, it's quite a bit tricky to configure". I explain it to colleague.

    Colleague, quite not happy about seller (he really does not like when an installer say, on our production environment 'i need to run as root' and i agree why him), but happy i agree with him, comes back a few minutes later and says:

    "Ok, come explaining to install guy, he says he need root otherwise java has no access to graphical interface..."

    Calmly, trying not to murder someone, i explained to the install guy, there is a command, known as 'startx' that starts a graphical interface on behalf of current user and, no, java does not require root to access it. It's even discouraged in tomcat documentation...

     

    I'm still wondering when, in that software company, they will figure out they don't need to be root to launch eclipse ide, or sun one studio, or jedit, or a simple java applet...
     

     



  • Been there, done that.  Even with IIS, it amazes me how clueless vendors are.  I just read through the docs for a third party app and it says to give Everyone full control on web directory.  All this because they are too stupid and/or lazy to figure out how to set it up right.

     



  • Why on earth do you need a GUI for a server application ? My servers do not event have a X-server, hence the startx command is absent...



  • @acne said:

    Why on earth do you need a GUI for a server application ? My servers do not event have a X-server, hence the startx command is absent...
    Welcome to windows.

    Are you sure you want to start your webserver? This might expose websites to the outside world.

    [yes] [no] [filenotfound]



  • @acne said:

    Why on earth do you need a GUI for a server application ? My servers do not event have a X-server, hence the startx command is absent...

    Some uses of graphics in Java (e.g., java.awt and friends) might actually require java to connect to an X server, even if you have no intention of presenting a UI... e.g., when drawing graphics and saving as png or whatever to send down the network pipe.  I'm not sure if it actually uses the X server in any fashion, or if it says, "oh you're using class Foo, and class Foo sometimes requires X, so I'm gonna connect to X all the time".

    Regardless of whether this is a Java WTF (may very well be), the usual solution is to use xvfb, which is an X server that requires no monitor and no input devices.  See http://www.xfree86.org/4.0.1/Xvfb.1.html



  • @AssimilatedByBorg said:

    @acne said:

    Why on earth do you need a GUI for a server application ? My servers do not event have a X-server, hence the startx command is absent...

    Some uses of graphics in Java (e.g., java.awt and friends) might actually require java to connect to an X server, even if you have no intention of presenting a UI... e.g., when drawing graphics and saving as png or whatever to send down the network pipe. 

    This was true many years ago, but since version 1.4, AWT supports the headless mode for such operations. 



  • @ammoQ said:

    @AssimilatedByBorg said:

    @acne said:

    Why on earth do you need a GUI for a server application ? My servers do not event have a X-server, hence the startx command is absent...

    Some uses of graphics in Java (e.g., java.awt and friends) might actually require java to connect to an X server, even if you have no intention of presenting a UI... e.g., when drawing graphics and saving as png or whatever to send down the network pipe. 

    This was true many years ago, but since version 1.4, AWT supports the headless mode for such operations. 

    Excellent, I sit corrected!  My experience with it was indeed many years ago, and haven't worried since then, though I think I've used the same technique with other applications once or twice. 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.