-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ETE: cannot connect to X server #101
Comments
Sorry, this is a known issue. The only way to get the renderer working is having an X server. It is actually a limitation of Qt4, which ETE uses for drawing. A minimal X system would be enough, or even using a forwarded X display. We know this is quite annoying and we are working on an Qt4-free renderer. |
Thanks for the reply. Is it possible for it to raise an Exception rather than exit python? I might try to use xvfb as a headless dummy Xserver. |
The exit call seems to be raised by qt4, so all we can do is to check before importing the library. Shouldn't be difficult, I will look into it. Let us know if xvfb works, never tried before. |
xvfb worked a dream. After installation as an Ubuntu package, I could just preface my webserver command line with |
This worked great for me. Thanks, @JohnReid ! |
@jhcepas, could you describe how you would do that check? I'm building some plots as part of IAB, and when I execute my tests via TravisCI they fail due to the missing xserver. I'd like to just check and skip rendering the plots if the xserver isn't available. Thanks! |
I got this working in my TravisCI build by starting the xserver there (thanks for the tip @jairideout!). Here's how I'm doing that, in case it's useful for others. |
@gregcaporaso , we use xvfb also under TravisCI Line 36 in a734959
|
Hi, just wanted to state my support to find an alternate renderer that doesn't rely on an X server; I would have problems to run xvfb on our cluster, so something that is less of a workaround would be preferable. Thanks for the great work. |
Well, despite our best efforts we couldn't use ETE on Amazon EC2 instance because it relies on X server. For us this is the reason to forget ETE |
I just tried the following commands on an Amazon EC2 instance running Ubuntu server 14.04.2 LTS:
and everything ran ok. No need of an X server. |
Here is a success story for compiling xvfb without root access on RHEL: |
This fix from following anaconda thread works for me: ContinuumIO/anaconda-issues#1806 In [1]: import os |
Any idea how to suppress the error output that results from running with this setting (as discussed at ContinuumIO/anaconda-issues#1806) on a remote server with no x server or x 11 forwarding?
Here is the error output I get:
|
is the error coming directly from ete3? qt messages should only appear when
using graphics features in ete.
Also, using xvfb is workaround for servers without x11
…On 30 July 2018 at 00:45, Andrew Sanchez ***@***.***> wrote:
Any idea how to suppress the error output that results from running with
this setting (as discussed at ContinuumIO/anaconda-issues#1806
<ContinuumIO/anaconda-issues#1806>) on a remote
server with no x server or x 11 forwarding?
- os.environ['QT_QPA_PLATFORM']='offscreen'
Here is the error output I get:
QFontDatabase: Cannot find font directory ~/miniconda3/envs/env/lib/fonts - is Qt installed correctly?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAJ_SnsLwcZ2fmA9Gxf5MENVNIlOAXEFks5uLjsYgaJpZM4EHJ_A>
.
|
Yes, it's from ete3 after generating .svg trees. It resulted after setting
`os.environ['QT_QPA_PLATFORM']='offscreen'`
My goal in using that setting was to avoid relying on xvfb/x11. xvfb
worked great, but in the interest of ease of reproducibility, I'd like to
avoid requiring others to install xvfb.
I can research the problem/open an issue with pyqt if that makes more
sense, unless you have any ideas.
Thanks!
On Mon, Jul 30, 2018 at 1:41 AM, Jaime Huerta-Cepas <
notifications@github.com> wrote:
… is the error coming directly from ete3? qt messages should only appear when
using graphics features in ete.
Also, using xvfb is workaround for servers without x11
On 30 July 2018 at 00:45, Andrew Sanchez ***@***.***> wrote:
> Any idea how to suppress the error output that results from running with
> this setting (as discussed at ContinuumIO/anaconda-issues#1806
> <ContinuumIO/anaconda-issues#1806>) on a
remote
> server with no x server or x 11 forwarding?
>
> - os.environ['QT_QPA_PLATFORM']='offscreen'
>
> Here is the error output I get:
>
> QFontDatabase: Cannot find font directory ~/miniconda3/envs/env/lib/fonts
- is Qt installed correctly?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AAJ_SnsLw
cZ2fmA9Gxf5MENVNIlOAXEFks5uLjsYgaJpZM4EHJ_A>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#101 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALKp6jATH7MHbupB3PF3MLHxEgOtTCIaks5uLsa-gaJpZM4EHJ_A>
.
|
I see, then I am afraid that you will need xvfb. At least I could not find any other way. |
I solved this error by
|
As an alternative to XVFB, I've had had success setting the following environment variables: export QT_QPA_PLATFORM=offscreen
export XDG_RUNTIME_DIR=/tmp/runtime-runner |
ETE exits python when I try to render a tree without an X server. This is a real shame as I want to run it on a server (without X) to serve tree images from. Is there any way around this?
The text was updated successfully, but these errors were encountered: