# Interactive desktop: DISPLAY error

**URL:** <https://discourse.openondemand.org/t/interactive-desktop-display-error/152>\
**Category:** Get Help\
**Created:** [January 30, 2019, 1:06am UTC](https://discourse.openondemand.org/t/interactive-desktop-display-error/152 "2019-01-30T01:06:21Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [February 6, 2019, 4:53pm UTC](https://discourse.openondemand.org/t/interactive-desktop-display-error/152/8 "2019-02-06T16:53:58Z")

</div>

@emily.dragowsky I am glad you are making progress and sorry that this has been so difficult.

I’m not sure about the problem you are having with DISPLAY not being set, but I can tell you how to modify the environment of the desktop apps without having to copy and modify the job template directly. There are two options.

The first is modifying the cluster config files to add a `batch_connect:` section. There is some basic documentation [https://osc.github.io/ood-documentation/master/app-development/interactive/setup/modify-cluster-configuration.html?highlight=batch\_connect](https://osc.github.io/ood-documentation/master/app-development/interactive/setup/modify-cluster-configuration.html?highlight=batch_connect) and [https://osc.github.io/ood-documentation/master/installation/cluster-config-schema.html#batch-connect](https://osc.github.io/ood-documentation/master/installation/cluster-config-schema.html#batch-connect) of how these configuration options are managed. We use this to setup the environment properly for TurboVNC and WebSockify. Ours looks like this:

```auto
  batch_connect:
      basic:
        script_wrapper: "module restore\n%s"
      vnc:
        script_wrapper: "module restore\nmodule load ondemand-vnc\n%s"

```

Where the `module load ondemand-vnc` loads the turbovnc module and then sets `WEBSOCKIFY_CMD=/usr/local/novnc/utils/websockify/run`. The code that submits the interactive app job uses the `script_wrapper:` value with string interpolation to replace `%s` with the rest of the generated job script. So its a way to prepend or append code to it.

A second way is you can add another submit script with an arbitrary name like `slurm.yml.erb` file to `/etc/ood/config/apps/bc_desktop/submit/` and reference this in the desktop configs under `/etc/ood/config/apps/bc_desktop/submit/`. Then in this custom `slurm.yml.erb` file you can add to the `script:` hash a key value pair for each attribute listed here: [https://www.rubydoc.info/gems/ood\_core/OodCore/Job/Script](https://www.rubydoc.info/gems/ood_core/OodCore/Job/Script). The examples in the documentation show using `native:` but you can also do `job_environment:`. Here is an example in an earlier version of our Jupyter interactive app where we set the environment variables PYTHON\_MODULE and possibly CUDA\_MODULE: [https://github.com/OSC/bc\_osc\_jupyter/blob/a89c50706dc45ef01b035b8157ca8a46244e19d7/submit.yml.erb#L3-L7](https://github.com/OSC/bc_osc_jupyter/blob/a89c50706dc45ef01b035b8157ca8a46244e19d7/submit.yml.erb#L3-L7)

```auto
script:
  job_environment:
    PYTHON_MODULE: "python/3.5"
    <%- if node_type.include? "gpus" -%>
    CUDA_MODULE: "cuda/8.0.44"
    <%- end -%>
  native:
    resources:
      nodes: "<%= bc_num_slots %><%= node_type %>"

```

---

_[View the full topic](https://discourse.openondemand.org/t/interactive-desktop-display-error/152)._
