# Why does Plots require firewall access? (gksqt)

**URL:** https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803
**Category:** New to Julia
**Tags:** windows
**Created:** [April 22, 2021, 1:00pm UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803 "2021-04-22T13:00:35Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![danilo-bc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danilo-bc/32/19590_2.png) [@danilo-bc](https://discourse.julialang.org/u/danilo-bc)
#### Post date: [April 22, 2021, 1:00pm UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/1 "2021-04-22T13:00:35Z")

</div>

I recently installed Julia on my Windows 10 machine using the given installer, opened `cmd`, then `julia`, added `Plots` package then did the following:

```plaintext
using Plots
gr()
plot(1:10)

```

A firewall permission message appeared asking if I’d grant permission to gksqt (which I’m sure is the gr plot window manager thing), but why does it ask for it?

The plot is shown with no error even if I don’t answer the firewall prompt.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/4/44e9b5be5d2e79549238bced7caad5b9b7302f25.jpeg)

---

<div class="post-metadata">

### Author: ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)
#### Post date: [April 22, 2021, 1:23pm UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/2 "2021-04-22T13:23:08Z")

</div>

Plots isn’t really using the socket GR is. I’m not 100% on WHY GR is using a socket but it is shown in the diagram:

[https://gr-framework.org/about.html](https://gr-framework.org/about.html)

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [April 25, 2021, 12:25am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/3 "2021-04-25T00:25:09Z")

</div>

@jheinen would be able to answer this better than I.

From my limited understanding, GR uses a separate driver program, `gksqt.exe` that acts as a server to manage the QT framework. The Julia package GR.jl communicates with gksqt.exe over network sockets in order to create plots. If you would like to avoid this, there are other GKS workstation types you can use.

You can find the source code for the GR framework here:

> **[GitHub - sciapp/gr: GR framework: a graphics library for visualisation...](https://github.com/sciapp/gr)**
>
> GR framework: a graphics library for visualisation applications - GitHub - sciapp/gr: GR framework: a graphics library for visualisation applications

In particular, the code for `gksqt` is here:

> <https://github.com/sciapp/gr/blob/master/lib/gks/qt/gksqt.cxx>

---

<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: [April 25, 2021, 7:01am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/4 "2021-04-25T07:01:39Z")

</div>

Yes. `GR` needs the socket to communicate with `GKS QtTerm`, which in turn requires its own event loop. The same applies to the `GKSTerm.app` under macOS - here the driver must run even in a master thread. Whether there are other ways to implement this form of IPC under Windows is not known to me.

---

<div class="post-metadata">

### Author: ![luraess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luraess/32/16189_2.png) [@luraess](https://discourse.julialang.org/u/luraess)
#### Post date: [April 28, 2021, 11:41am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/5 "2021-04-28T11:41:04Z")

</div>

Thanks for the info @jheinen. Would be nice if there could be a fix at some point since it is “annoying” to always get the warning message (under macOS)  
 ![Screenshot 2021-04-28 at 13.39.08](https://global.discourse-cdn.com/julialang/original/3X/e/b/eb7013480eca5e54dc9accb718875ff5b2f44757.png)  
and having to manually “allow” it each time a new plot window is triggered.

---

<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: [April 29, 2021, 1:45pm UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/6 "2021-04-29T13:45:56Z")

</div>

Do you have the firewall enabled on your macOS system, or, did you already add exception rules?

---

<div class="post-metadata">

### Author: ![luraess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luraess/32/16189_2.png) [@luraess](https://discourse.julialang.org/u/luraess)
#### Post date: [April 29, 2021, 8:15pm UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/7 "2021-04-29T20:15:25Z")

</div>

Yes, I have the firewall enabled on macOS. I cannot add a rule as I the gksqt “app” is not available from within the firewall application options (adding a rule to Julia bundle does not fix the issue neither). gksqt only shows up in the firewall exceptions upon the pop-up window arrives and I click “Allow”.  
Also ()this may be unrelated though) until very recently `Plots.jl` was triggering the GKS QTerm app while it triggers gksqt.

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [May 4, 2021, 6:15pm UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/8 "2021-05-04T18:15:04Z")

</div>

Is that the stock macOS firewall? I wonder if it will not prompt for this if we only listen for a certain local address.

---

<div class="post-metadata">

### Author: ![luraess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luraess/32/16189_2.png) [@luraess](https://discourse.julialang.org/u/luraess)
#### Post date: [May 5, 2021, 6:58am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/9 "2021-05-05T06:58:00Z")

</div>

Yes, it occurs with the macOS firewall (I have activated since years). Until recently there was no issue with Plots.jl and the GKS QTerm. But more or less in phase with the switch from Julia 1.5.4 to Julia 1.6 the GKS QTerm now became gksqt and prompts for firewall access all the times (highly annoying). Also, it seems gksqt is a corrupted version of GKS QTerm since one cannot close it without having to quit and the interaction with Julia is less stable (more crashes then previously).

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [May 5, 2021, 7:10am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/10 "2021-05-05T07:10:50Z")

</div>

Ah, well it might be the switch to using GR\_jll.jl rather that the GR tarball.

This will switch you back to the tarball version of the binaries.

```julia
julia> ENV["JULIA_GR_PROVIDER"] = "GR"

(@v1.6) pkg> build GR 

```

You can figure which binary provider you are using by checking the value of `GR.gr_provider[]`. The two valid values are either “BinaryBuilder” (GR\_jll) or “GR” (tarball).

If that fails you can try reverting GR to an earlier version such as [v0.55.0](https://github.com/jheinen/GR.jl/releases/tag/v0.55.0). That can be done using the following command:

```julia
(@v1.6) pkg> add GR@v0.55.0

```

It would be best to file an issue at [GR.jl/GR.jl at master · jheinen/GR.jl · GitHub](https://github.com/jheinen/GR.jl/blob/master/src/GR.jl) so the problems you are having can be documented and tracked.

---

<div class="post-metadata">

### Author: ![luraess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luraess/32/16189_2.png) [@luraess](https://discourse.julialang.org/u/luraess)
#### Post date: [May 5, 2021, 7:20am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/11 "2021-05-05T07:20:43Z")

</div>

Thank you for your post 🙂 !

> [@mkitti](#):
>
> `(@v1.6) pkg> add GR@v0.55.0`

This fixes both GKS QtTerm “deprecation mode” issue and also does no longer prompt for firewall access.

Before reverting to v0.55.0 I tried with both suggested `JULIA_GR_PROVIDER` but this did not impact the behaviour of plotting. I will file an issue as suggested so a fix could be found for the latest version.

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [May 5, 2021, 7:28am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/12 "2021-05-05T07:28:23Z")

</div>

At least you have a temporary solution.

I would suggest giving `ENV["JULIA_GR_PROVIDER"] = "GR"` another try and rebuilding the latest GR and confirming `GR.gr_provider[]` has the right value. This would at least allow us to confirm that something changed with the tarballs between v0.55.0 and v0.57.x. @jheinen might be able to hunt down what is causing the issue.

What version of macOS are you using?

---

<div class="post-metadata">

### Author: ![luraess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luraess/32/16189_2.png) [@luraess](https://discourse.julialang.org/u/luraess)
#### Post date: [May 5, 2021, 7:43am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/13 "2021-05-05T07:43:13Z")

</div>

I am running on macOS 10.15.7.

Now I am confused as all seems to work the fine (having `ENV["JULIA_GR_PROVIDER"] = "GR"`) since I downgraded GR and upgraded it again.

I wanted to test with `GR_jll.jl` but setting `ENV["JULIA_GR_PROVIDER"] = "BinaryBuilder"` may not be the way doing it ?

---

<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: [May 5, 2021, 7:55am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/14 "2021-05-05T07:55:11Z")

</div>

So now you are using `GR v0.57.4` with `ENV["JULIA_GR_PROVIDER"] = "GR"` and everything works fine?

---

<div class="post-metadata">

### Author: ![luraess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luraess/32/16189_2.png) [@luraess](https://discourse.julialang.org/u/luraess)
#### Post date: [May 5, 2021, 7:59am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/15 "2021-05-05T07:59:11Z")

</div>

Yes.

But this setting was also what I had before forcing `GR v0.55.0` and upgrading it again and then it did not work properly.

EDIT: the only difference is that previously I did not have explicitly package `GR` added but it came shipped with `Plots`.

---

<div class="post-metadata">

### Author: ![henrikjaerleblad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrikjaerleblad/32/21172_2.png) [@henrikjaerleblad](https://discourse.julialang.org/u/henrikjaerleblad)
#### Post date: [May 11, 2021, 9:44am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/16 "2021-05-11T09:44:52Z")

</div>

Another Mac user here. Solved by changing the JULIA\_GR\_PROVIDER as suggested, without having to downgrade/upgrade GR. Thanks

---

<div class="post-metadata">

### Author: ![Ali\_Guzel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ali_guzel/32/33773_2.png) [@Ali\_Guzel](https://discourse.julialang.org/u/Ali_Guzel)
#### Post date: [August 30, 2022, 2:30pm UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/17 "2022-08-30T14:30:17Z")

</div>

Hi dear expert,

I followed everything you said and plotting OK. But my avast anti-virus program caught gksqr.exe that it is infected by IDP.Generic virus… I did not put it in quarantine but allowed an exception by ignoring it… I hope I did right. what do you say Sir?

---

<div class="post-metadata">

### Author: ![Ali\_Guzel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ali_guzel/32/33773_2.png) [@Ali\_Guzel](https://discourse.julialang.org/u/Ali_Guzel)
#### Post date: [August 30, 2022, 2:38pm UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/18 "2022-08-30T14:38:01Z")

</div>

I am using Julia 1.8.0 on windows 10

---

<div class="post-metadata">

### Author: ![Ali\_Guzel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ali_guzel/32/33773_2.png) [@Ali\_Guzel](https://discourse.julialang.org/u/Ali_Guzel)
#### Post date: [August 30, 2022, 2:55pm UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/19 "2022-08-30T14:55:24Z")

</div>

and why is julia plot taking more time than actually solving differential equation? I really don’t get it !!!

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [August 31, 2022, 1:04am UTC](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803/20 "2022-08-31T01:04:02Z")

</div>

It’s because the UI is using sockets to communicate.

For faster plots, try using PackageCompiler or use a persistent Julia session.

[https://julialang.github.io/PackageCompiler.jl/dev/examples/plots.html](https://julialang.github.io/PackageCompiler.jl/dev/examples/plots.html)

[Next page](https://discourse.julialang.org/t/why-does-plots-require-firewall-access-gksqt/59803.md?page=2)
