beast-dev / beast-mcmc

Bayesian Evolutionary Analysis Sampling Trees
http://beast.community
GNU Lesser General Public License v2.1
188 stars 71 forks source link

beast -citation requires X11 ?? #1100

Closed EricDeveaud closed 1 year ago

EricDeveaud commented 3 years ago

Hello,

[gensoft@55c39a5bf82f beast-mcmc-1.10.5-23570d1]$ beast -citations_file foo

        BEAST v1.10.5 Prerelease #23570d1, 2002-2019
       Bayesian Evolutionary Analysis Sampling Trees
                 Designed and developed by
   Alexei J. Drummond, Andrew Rambaut and Marc A. Suchard

               Department of Computer Science
                   University of Auckland
                  alexei@cs.auckland.ac.nz

             Institute of Evolutionary Biology
                  University of Edinburgh
                     a.rambaut@ed.ac.uk

              David Geffen School of Medicine
           University of California, Los Angeles
                     msuchard@ucla.edu

                Downloads, Help & Resources:
                    http://beast.community

Source code distributed under the GNU Lesser General Public License:
            http://github.com/beast-dev/beast-mcmc

                     BEAST developers:
    Alex Alekseyenko, Guy Baele, Trevor Bedford, Filip Bielejec, Erik Bloomquist, Matthew Hall,
    Joseph Heled, Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
    Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
            Oliver Pybus, Chieh-Hsi Wu, Walter Xie

                         Thanks to:
        Roald Forsberg, Beth Shapiro and Korbinian Strimmer

Exception in thread "main" java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    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 dr.app.beast.BeastMain.main(Unknown Source)

why ?

regards

Eric

elbosso commented 1 year ago

Hello, try adding the option -beagle_info to your command line - if it is not present, the application indeed tries to show you a dialog containing various information and configuration switches. That is the reason why it searches for means to display windows - in your case: an X11 encironment.

For reference: https://github.com/beast-dev/beast-mcmc/blob/master/src/dr/app/beast/BeastMain.java#L766

rambaut commented 1 year ago

Yes as @elbosso says - the absence of an XML file on the command line means BEAST tries to open a dialog box for you to specify one. The -citations_file needs an XML file so it knows what models you are using and thus what citations to include. On a linux environment it will try to open an X11 window.