# Ubuntu 14 16 Plots GR - cannot get a plot window

**URL:** <https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514>\
**Category:** Visualization\
**Tags:** question, plotting\
**Created:** [July 19, 2018, 9:06pm UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514 "2018-07-19T21:06:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronubi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronubi/32/4085_2.png) [@ronubi](https://discourse.julialang.org/u/ronubi)\
**Post date:** [July 19, 2018, 9:06pm UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514/1 "2018-07-19T21:06:02Z")

</div>

From a terminal, I launch julia 0.6.3 and try to plot something as follows:

```
import Plots ; pl=Plots ;
pl.gr(legend=false, format=:png) ;
pl.plot([0,1])

```

On VNC-connected logins to two different Ubuntu servers (one a VM), I get error messages instead of a plot window popping up.

On my Mac, I get what I expect:

 ![plot01](https://global.discourse-cdn.com/julialang/original/3X/f/a/fa4aa980dd973fd70296801ebd1a617cd59806ca.png)

On the Ubuntu 14.04.5 LTS (VM) server, I get “Qt: XKEYBOARD extension not present” and then a seg fault (which doesn’t crash the julia session).

On the Ubuntu 16.04.4 LTS (actual) server, I get “QXcbConnection: Falied to initialize XRandr” then the same Qt message as above, then “Unsupported screen format: depth 16, red\_mask: 3f, blue\_mask: f800”, then “Using RGB16 fallback, if this works your X11 server is reporting a bad screen format.” then “qksqt: Fatal IO error 2 (No such file or directory) on X server :1.”

On both servers, plotting works fine in a Jupyter notebook. And XWindows pop-ups work on both as well (e.g. xload from a terminal).

Please help!

---

<div class="post-metadata">

**Author:** ![ronubi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronubi/32/4085_2.png) [@ronubi](https://discourse.julialang.org/u/ronubi)\
**Post date:** [July 20, 2018, 1:59pm UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514/2 "2018-07-20T13:59:12Z")

</div>

**Update 1** : If I switch the backend to Plotly, I can get plots rendered into a browser tab, but cannot save programmatically as PNG. (I can use the mouse to download as PNG, but this will be tedious and unworkable for my project needs.)

---

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [July 22, 2018, 9:00am UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514/3 "2018-07-22T09:00:39Z")

</div>

Could you please install the required packages on those Ubuntu servers as described [here](http://gr-framework.org/julia.html):

```julia
apt install libxt6 libxrender1 libgl1-mesa-glx

```

---

<div class="post-metadata">

**Author:** ![ronubi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronubi/32/4085_2.png) [@ronubi](https://discourse.julialang.org/u/ronubi)\
**Post date:** [July 23, 2018, 1:06pm UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514/4 "2018-07-23T13:06:49Z")

</div>

Those were already installed, so that’s not it. Thanks anyway.

---

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [July 23, 2018, 2:30pm UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514/5 "2018-07-23T14:30:05Z")

</div>

Could you please try plain X11, e.g.

```julia
using Plots
gr(format=:x11)
plot(randn(10))

```

---

<div class="post-metadata">

**Author:** ![ronubi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronubi/32/4085_2.png) [@ronubi](https://discourse.julialang.org/u/ronubi)\
**Post date:** [July 23, 2018, 6:20pm UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514/6 "2018-07-23T18:20:05Z")

</div>

Still no joy.

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [July 23, 2018, 8:17pm UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514/7 "2018-07-23T20:17:08Z")

</div>

I use the same underlying OS (LinuxMint) and this is working – check your startups and make sure something with XRandr in the name is active as a startup program. I cannot tell you how to do that, but I do know that fixed things for me.

---

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [July 23, 2018, 8:57pm UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514/8 "2018-07-23T20:57:58Z")

</div>

Can you open any X11 client? xclock xterm, …

---

<div class="post-metadata">

**Author:** ![ronubi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronubi/32/4085_2.png) [@ronubi](https://discourse.julialang.org/u/ronubi)\
**Post date:** [July 23, 2018, 9:05pm UTC](https://discourse.julialang.org/t/ubuntu-14-16-plots-gr-cannot-get-a-plot-window/12514/9 "2018-07-23T21:05:42Z")

</div>

Yes, as I wrote in the first post -

> [@ronubi](#):
>
> On both servers, plotting works fine in a Jupyter notebook. And XWindows pop-ups work on both as well (e.g. xload from a terminal).
