# GLMakie in VSCode on hybrid graphics laptop

**URL:** https://discourse.julialang.org/t/glmakie-in-vscode-on-hybrid-graphics-laptop/74885
**Category:** VS Code
**Tags:** question, vscode, glmakie
**Created:** [January 19, 2022, 8:59pm UTC](https://discourse.julialang.org/t/glmakie-in-vscode-on-hybrid-graphics-laptop/74885 "2022-01-19T20:59:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sleort](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sleort/32/4875_2.png) [@Sleort](https://discourse.julialang.org/u/Sleort)
#### Post date: [January 19, 2022, 8:59pm UTC](https://discourse.julialang.org/t/glmakie-in-vscode-on-hybrid-graphics-laptop/74885/1 "2022-01-19T20:59:11Z")

</div>

My laptop runs Ubuntu 20.04. It has a discrete Nvidia GeForce GTX 1650 Ti GPU, which is set to be used on demand (“hybrid graphics”) following [Graphics Switching (Ubuntu) - System76 Support](https://support.system76.com/articles/graphics-switch-ubuntu/) . In an ordinary terminal, in order to run GLMakie on the GPU, I need to launch Julia as

```julia
$ __NV_PRIME_RENDER_OFFLOAD=1__ GLX_VENDOR_LIBRARY_NAME=nvidia julia

```

(instead of just `$ julia` ). Is there a way of doing this within VSCode, i.e. with the VSCode Julia REPL?

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [January 19, 2022, 9:47pm UTC](https://discourse.julialang.org/t/glmakie-in-vscode-on-hybrid-graphics-laptop/74885/2 "2022-01-19T21:47:51Z")

</div>

You should be able to use the `terminal.integrated.env.linux` setting for that or set these env variables in your shell before starting VS Code (from that same terminal, of course)

---

<div class="post-metadata">

### Author: ![Sleort](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sleort/32/4875_2.png) [@Sleort](https://discourse.julialang.org/u/Sleort)
#### Post date: [January 20, 2022, 12:49pm UTC](https://discourse.julialang.org/t/glmakie-in-vscode-on-hybrid-graphics-laptop/74885/3 "2022-01-20T12:49:58Z")

</div>

Thanks for the reply!

Before I got to try your suggestions, I accidentally discovered that I no longer have to set these environment variables to use GLMakie - it now works “out of the box”! (Sometime between now and last time I tried to accomplish this, something must have been updated such that this is no longer required. Yay!)

Sorry for the noise 😬
