Opened 15 years ago
Closed 14 years ago
#7074 closed defect (fixed)
[Patch] Can't connect to window server - not enough permissions
Reported by: | Carsten Fechtmann | Owned by: | Álvaro Iradier |
---|---|---|---|
Priority: | normal | Component: | PlantUmlMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
In case there is a problem with Java (or rather AWT) to connect to the X-server, which might be due to the Apache process not being allowed access to X, the java process (running PlanUML.jar) should be started in a 'headless' mode.
Here is a patch, that should take care of this (it works for me / OS X 10.6 server)
Index: plantuml/macro.py =================================================================== --- plantuml/macro.py (revision 7928) +++ plantuml/macro.py (working copy) @@ -50,7 +50,7 @@ if not graphs.has_key(img_id): - cmd = "java -jar \"%s\" -pipe" % (self.plantuml_jar) + cmd = "java -jar -Djava.awt.headless=true \"%s\" -pipe" % (self.plantuml_jar) p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) (stdout, stderr) = p.communicate(input=source) if p.returncode != 0:
Attachments (1)
Change History (5)
Changed 15 years ago by
Attachment: | headlessAWT.patch added |
---|
comment:1 Changed 15 years ago by
Status: | new → assigned |
---|
Thanks for the patch,
do you know if this will affect the operation of other systems? (mine is working correctly without the headless option, will it work anyway?)
Thanks.
comment:2 Changed 15 years ago by
It should work as well, as it only tells AWT not to go through the - for this operation not required X server - but just make the graphics to be passed on to Trac.
However, since my setup requires this patch, I am in no position to try what happens if it works with this patch also on systems, where it works already 'out of the box'.
On the other hand, if you got such a system, it is a simple thing to try out.
comment:4 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
patch to run Java/AWT in headless mode