No X11 DISPLAY variable error when installing CTP

403 views
Skip to first unread message

Karine Seymour

unread,
Jun 23, 2016, 9:31:45 AM6/23/16
to RSNA MIRC CTP/TFS User Group
Hello,

I am trying to install CTP on a remote linux server via a ssh connexion (using putty). 

I get the following error : 

root@proliphyc1:/home/medexprim# java -jar CTP-installer.jar
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which r equires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:2 07)
at java.awt.Window.(Window.java:535)
at java.awt.Frame.(Frame.java:420)
at java.awt.Frame.(Frame.java:385)
at javax.swing.JFrame.(JFrame.java:174)
at org.rsna.installer.Installer.(Installer.java:76)
at org.rsna.installer.Installer.main(Installer.java:67)

I have tried using both OpenJDK and Java from Oracle.

I followed instructions on various forums and tried :

root@proliphyc1:/home/medexprim# java -Djava.awt.headless=true -jar CTP-installer.jar
Exception in thread "main" java.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
        at java.awt.Window.<init>(Window.java:536)
        at java.awt.Frame.<init>(Frame.java:420)
        at java.awt.Frame.<init>(Frame.java:385)
        at javax.swing.JFrame.<init>(JFrame.java:189)
        at org.rsna.installer.Installer.<init>(Installer.java:76)
        at org.rsna.installer.Installer.main(Installer.java:67)

I also tried : export DISPLAY=:0.0

But then, when I run the install command, nothing happens (no prompt). 

Would you have any suggestion or recommandation? 

Thank you very much,
Karine

John Perry

unread,
Jun 23, 2016, 11:03:49 AM6/23/16
to rsnas-ctpmir...@googlegroups.com
The CTP-installer program requires a graphics environment. CTP does not.
 
One way around the problem is to do the installation on a computer that has a graphics environment and then manually copy the CTP directory (and all its subdirectories) to the target machine.
 
The CTP configuration is contained in the config.xml file located in the CTP directory. You can configure your CTP manually by editing the file with a text editor, but I recommend using the Launcher program's Configuration Editor to do it. A typical CTP installation has only one pipeline, but some have many. A typical pipeline has three or four pipeline stages, but some have 10 or more. Each pipeline stage has anywhere from four to more than a dozen parameters. The Launcher Configuration Editor guides you through the configuration process; it knows all the attributes and their defaults, and it provides explanations. At the risk of sounding immodest, I know everything about CTP (I wrote it), but I never configure it by hand – it's just too easy to forget something that the configuration editor would have caught. If you are running on a system that doesn't have a graphics environment, I recommend running the Launcher program on a system that does, using the configuration editor to create a configuration for your project, and then copying the config.xml file over to the target system.
 
Note that when running CTP on a system that doesn't have a graphics environment, you can't use the Launcher program (which has a graphical UI). You must either use the Runner program (in the CTP directory) or manually enter the command to start CTP.
 
The Launcher program keeps some persistent data in the Launcher.properties file located in the CTP directory. The file includes some graphical properties like the size of its window (w, h) and where on the screen it was last displayed (x, y), as well as some JRE properties like the starting heap size (ms), the maximum heap size (mx), and the thread stack size (ss). The Runner program also uses this file to get the JRE properties. If the file is missing, the Runner program uses the system defaults. The defaults are usually okay, but I like to give it more heap space if I'm processing large images. If you want to control the heap size, you can create the file on the target machine yourself, or you can run the Launcher program on a machine with a graphics environment, set the parameters, and copy the file to the target machine.
 
Here is the Launcher.properties file from one of my CTP installations:
 
#Launcher.properties
#Sat Jun 04 10:51:19 CDT 2016
ms=128
ext=
mon=no
ssl=no
h=970
y=55
x=1953
w=1129
d32=no
mx=768
clr=yes
ss=
 
One more thing: I always build on the Oracle JDK and run on the Oracle JRE. I have never tested on the OpenJDK.
 
JP
--
You received this message because you are subscribed to the Google Groups "RSNA MIRC CTP/TFS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsnas-ctpmirc-user...@googlegroups.com.
To post to this group, send email to rsnas-ctpmir...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsnas-ctpmirc-user-group.
For more options, visit https://groups.google.com/d/optout.

Bogdan Mitrea

unread,
Jun 23, 2016, 4:11:26 PM6/23/16
to RSNA MIRC CTP/TFS User Group
It builds and runs fine with OpenJDK 1.8

Karine Seymour

unread,
Jun 23, 2016, 6:19:13 PM6/23/16
to RSNA MIRC CTP/TFS User Group
Thank you very much for your detailed answer. I followed your instructions and it's working fine. Thanks again.

Kirk Smith

unread,
Jun 24, 2016, 4:01:23 PM6/24/16
to rsnas-ctpmir...@googlegroups.com
I use the free version of MobaXterm to SSH to a remote linux server from my windows box. No X11 display to configure as it handles it for you.
Kirk

Reply all
Reply to author
Forward
0 new messages