File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I find out if X Server is running?

 
Timothy Sam
Ranch Hand
Posts: 751
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Timothy Sam
Ranch Hand
Posts: 751
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 751
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PERFECT! Thank you very much!
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic