Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-08-2007, 03:39 PM   #1
LQ Newbie
Registered: Apr 2004
Posts: 15

Rep: Reputation: 0
X11 error with Java Screenshot agent running as a service

I have created a small Java Agent that run on boot as a service on a CentOS box (linux). I am trying to implement in to the agent a screen capture function, where a screenshot is taken every 10 seconds and sent to a directory.

I have managed to do this, and it runs fine when I run it when logged in as a user.
However when I start the log agent as a service, I get the following error:

No X11 DISPLAY variable was set, but this program performed an operation which requires it.

Now the only reason I can think this is happening is because when the log agent starts up on boot, there is no X session open, however it still does not work when I log in, maybe because the log agent is running as root, and I am logging in as a different user. Is there any way to make the Java Screen Capture Robot, just take screenshots of the default X11 session of the person who is logged in?

Many Thanks



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java/X11 Display Property Error jonnybot Slackware 7 06-11-2009 11:47 AM
Error: Agent Configuration Agent (use Oracle with Linux) shipon_97 Linux - Enterprise 0 02-02-2007 01:11 AM
Error starting NetBackup: Cannot connect to the NB-Java authentication service charleycat Linux - Software 1 05-25-2005 09:13 AM
X11 error with Java code on Red Hat naijaguy Programming 2 01-08-2005 06:23 PM
Help! Running IglooFTP-PRO : error: does not find asaba Linux - Software 0 11-02-2004 11:36 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration