wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes How do I find out if X Server is running? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "How do I find out if X Server is running?" Watch "How do I find out if X Server is running?" New topic
Author

How do I find out if X Server is running?

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi guys, I only have shell access on our Linux server. I need the X Server running as specified here

http://forge.octo.com/jcaptcha/confluence/display/general/FAQ

I'm using JCAPTCH as my CAPTCHA engine. I dunno the drawbacks yet... But since I'm encountering other problems in our deployment I couldn't test yet if this problem would add to them. So how do I find our that x server is running? Thanks!


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Look carefully at that page; it explains several things you can do. One of those is *not* to run an actual X server -- it's not going to be a convenient solution, and doesn't do much for your site security.

As far as finding out if an X server is running, type

ps -ef | grep X

and look for a process just named "X". But even if one is running, unless it's running as the same user that the server is running as, chances are it's set up with security options to prevent the server from connecting, anyway.

So your best option is to use the "-Djava.awt.headless=true Java command-line switch when starting your Java server.


[Jess in Action][AskingGoodQuestions]
Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Thank you very much for your reply. Would setting those options not affect my image resizing methods in some of my classes? Thank you.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

In "headless" mode, graphical stuff works except it doesn't appear on a screen anyplace. This is just what you want for image manipulation.
Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
PERFECT! Thank you very much!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I find out if X Server is running?
 
Similar Threads
can any body help how to use jcaptcha engine
how can i customize the jcaptcha
JCaptcha security Image generation
JCaptcha - How to avoid profanity/profane/obscene words
JCaptcha security Image generation