# Bash interpreter help needed setting up interactive desktop/apps on ood 3.1.1/Univa Grid Engine

**URL:** <https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398>\
**Category:** Get Help\
**Created:** [April 2, 2024, 3:21pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398 "2024-04-02T15:21:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbarstis](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@dbarstis](https://discourse.openondemand.org/u/dbarstis)\
**Post date:** [April 2, 2024, 3:21pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/1 "2024-04-02T15:21:36Z")

</div>

I’m trying to set up an interactive app in this case desktop with xfce. Everything appears to start up normally until it hits:

[websockify]: started successfully (proxying 53130 ==\> localhost:5901)  
Scanning VNC log file for user authentications…  
/opt/sge/crc/spool/d8civy030/job\_scripts/110: line 249: syntax error near unexpected token `<' /opt/sge/crc/spool/d8civy030/job_scripts/110: line 249: `done \< \<(tail -f --pid=${SCRIPT\_PID} “vnc.log”) &’

I set the following in clusters.d yml file:

```
batch_connect:
  basic:
    script_wrapper: |
      #!/bin/bash
      set +o posix
      . ~/.bashrc
      module purge
      %s
  vnc:
    script_wrapper: |
      #!/bin/bash
      set +o posix
      . ~/.bashrc
      module purge
      export PATH="/opt/TurboVNC/bin:$PATH"
      export WEBSOCKIFY_CMD="/usr/local/bin/websockify"
      %s
  script:
    queue_name: "ondemand"
    accounting_id: "crc"
    job_name: "desktop_interactive"
    native:
      - "-pe"
      - "sm"
      - "4"
      - "-S"
      - "/bin/bash"

```

But job\_script\_options.json shows:

{  
“job\_name”: “sys-dashboard-sys-bc\_desktop-crc”,  
“workdir”: “/project01/crcsupport/dbarstis/ondemand/data/sys/dashboard/batch\_connect/sys/bc\_desktop/crc/output/9fb3ae4b-920b-4f16-a7e9-9491fce4afe4”,  
“output\_path”: “/project01/crcsupport/dbarstis/ondemand/data/sys/dashboard/batch\_connect/sys/bc\_desktop/crc/output/9fb3ae4b-920b-4f16-a7e9-9491fce4afe4/output.log”,  
“shell\_path”: “/bin/bash”,  
“wall\_time”: 3600,  
“queue\_name”: “debug”,  
“email\_on\_started”: false  
}

How can I get UGE to enforce the interpreter?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 3, 2024, 1:37pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/2 "2024-04-03T13:37:44Z")

</div>

Looking at the docs - the `set +o posix` I believe is all you should need.

The `script` portion of what you’ve given though doesn’t do anything. The other portions will, but the `script` portion won’t be read/used. I think you’d need to duplicate that portion in all your apps’ `submit.yml` files.

I’d also ask for you to spot check to see if `set +o posix` and the others made it to the resulting file `job_script_content.sh` when you run the jobs.

Another thing you can check is your `/var/log/ondemand-nginx/$USER/error.log` for `execve` lines. These will show the actual qsub (? or similar I forget the UGE batch submit command off hand) command being issued.

---

<div class="post-metadata">

**Author:** ![dbarstis](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@dbarstis](https://discourse.openondemand.org/u/dbarstis)\
**Post date:** [April 3, 2024, 3:30pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/3 "2024-04-03T15:30:26Z")

</div>

set +o posix does not appear in job\_script\_content.sh. I’ll see what I can find in error.log.

---

<div class="post-metadata">

**Author:** ![dbarstis](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@dbarstis](https://discourse.openondemand.org/u/dbarstis)\
**Post date:** [April 3, 2024, 5:53pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/4 "2024-04-03T17:53:01Z")

</div>

Found the following execve lines in error.log

App 1396 output: [2024-04-02 11:02:26 -0400] INFO “execve = ["git", "describe", "–always", "–tags"]”  
App 1396 output: [2024-04-02 11:02:29 -0400] INFO “execve = [{}, "/opt/sge/bin/lx-amd64/qsub", "-wd", "/project01/crcsupport/dbarstis/ondemand/data/sys/dashboard/batch\_connect/sys/bc\_desktop/crc/output/9fb3ae4b-920b-4f16-a7e9-9491fce4afe4", "-N", "sys-dashboard-sys-bc\_desktop-crc", "-o", "/project01/crcsupport/dbarstis/ondemand/data/sys/dashboard/batch\_connect/sys/bc\_desktop/crc/output/9fb3ae4b-920b-4f16-a7e9-9491fce4afe4/output.log", "-q", "debug", "-l", "h\_rt=01:00:00"]”  
App 1396 output: [2024-04-02 11:02:29 -0400] INFO “execve = [{}, "/opt/sge/bin/lx-amd64/qstat", "-r", "-xml", "-j", "110"]”  
App 1396 output: [2024-04-02 11:02:39 -0400] INFO “execve = [{}, "/opt/sge/bin/lx-amd64/qstat", "-r", "-xml", "-j", "110"]”

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 3, 2024, 5:55pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/5 "2024-04-03T17:55:44Z")

</div>

My point with the error logs is that if you wished to supply `-S /bin/bash` to the job, you’d see it here. I’ll try on my side to see what’s what with the `job_script_content.sh`.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 3, 2024, 6:27pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/6 "2024-04-03T18:27:06Z")

</div>

I just confirmed that those settings you have in your cluster definition file should show up in `job_script_content.sh`. Would you mind sharing the entire file? Maybe there’s some issue there with YAML formatting that we’re overlooking.

---

<div class="post-metadata">

**Author:** ![dbarstis](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@dbarstis](https://discourse.openondemand.org/u/dbarstis)\
**Post date:** [April 3, 2024, 6:36pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/7 "2024-04-03T18:36:41Z")

</div>

Here’s the original file:

v2:  
metadata:  
title: “CRC Cluster”  
login:  
host: “ood-dev.crc.nd.edu”  
job:  
adapter: “sge”  
cluster: “crc”  
bin: “/opt/sge/bin/lx-amd64”  
conf: “/opt/sge/util/install\_modules/crc\_configuration\_node.conf”  
#conf: “/opt/sge/crc”  
sge\_root: “/opt/sge”  
libdrmaa\_path: “/opt/sge/drmaa/lib/lx-amd64/libdrmaa.so”  
batch\_connect:  
basic:  
script\_wrapper: |  
#!/bin/bash  
set +o posix  
. ~/.bashrc  
module purge  
%s  
vnc:  
script\_wrapper: |  
#!/bin/bash  
set +o posix  
. ~/.bashrc  
module purge  
export PATH=“/opt/TurboVNC/bin:$PATH”  
export WEBSOCKIFY\_CMD=“/usr/local/bin/websockify”  
%s  
script:  
queue\_name: “ondemand”  
accounting\_id: “crc”  
job\_name: “desktop\_interactive”  
native:  
- “-pe”  
- “sm”  
- “4”  
- “-S”  
- “/bin/bash”

```
  #bin_overrides:
  #qsub: "/opt/sge/bin/lx-amd64/qsub_wrapper"
  # qstat: ""
  # qhold: ""
  # qrls: ""
  # qdel: ""
  #
# submit_host: "ood-dev.crc.nd.edu"

```

I’ve started pulling out the script section and /bin/bash references to mirror the results from a post from Apr 2020 so it would look like:

v2:  
metadata:  
title: “CRC Cluster”  
login:  
host: “ood-dev.crc.nd.edu”  
job:  
adapter: “sge”  
cluster: “crc”  
bin: “/opt/sge/bin/lx-amd64”  
conf: “/opt/sge/util/install\_modules/crc\_configuration\_node.conf”  
#conf: “/opt/sge/crc”  
sge\_root: “/opt/sge”  
libdrmaa\_path: “/opt/sge/drmaa/lib/lx-amd64/libdrmaa.so”  
batch\_connect:  
basic:  
script\_wrapper: |  
set +o posix  
. ~/.bashrc  
module purge  
%s  
vnc:  
script\_wrapper: |  
set +o posix  
. ~/.bashrc  
module purge  
export PATH=“/opt/TurboVNC/bin:$PATH”  
export WEBSOCKIFY\_CMD=“/usr/local/bin/websockify”  
%s

```
  #bin_overrides:
  #qsub: "/opt/sge/bin/lx-amd64/qsub_wrapper"
  # qstat: ""
  # qhold: ""
  # qrls: ""
  # qdel: ""
  #
# submit_host: "ood-dev.crc.nd.edu"

```

Nothing has been implemented yet.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 3, 2024, 6:41pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/8 "2024-04-03T18:41:51Z")

</div>

I think you need to reformat those because really I’m looking for format errors.

You can use ` characters like so:

```yaml  
my\_content:  
string: ‘yaml conent’  
with: |  
more yaml content  
```

shows up as

```yaml
my_content:
  string: 'yaml conent'
  with: |
    more yaml content

```

---

<div class="post-metadata">

**Author:** ![dbarstis](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@dbarstis](https://discourse.openondemand.org/u/dbarstis)\
**Post date:** [April 3, 2024, 6:44pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/9 "2024-04-03T18:44:28Z")

</div>

```yaml
v2:
  metadata:
    title: "CRC Cluster"
  login:
    host: "ood-dev.crc.nd.edu"
  job:
    adapter: "sge"
    cluster: "crc"
    bin: "/opt/sge/bin/lx-amd64"
    conf: "/opt/sge/util/install_modules/crc_configuration_node.conf"
      #conf: "/opt/sge/crc"
    sge_root: "/opt/sge"
    libdrmaa_path: "/opt/sge/drmaa/lib/lx-amd64/libdrmaa.so"
    batch_connect:
      basic:
        script_wrapper: |
          #!/bin/bash
          set +o posix
          . ~/.bashrc
          module purge
          %s
      vnc:
        script_wrapper: |
          #!/bin/bash
          set +o posix
          . ~/.bashrc
          module purge
          export PATH="/opt/TurboVNC/bin:$PATH"
          export WEBSOCKIFY_CMD="/usr/local/bin/websockify"
          %s
      script:
        queue_name: "ondemand"
        accounting_id: "crc"
        job_name: "desktop_interactive"
        native:
          - "-pe"
          - "sm"
          - "4"
          - "-S"
          - "/bin/bash"

      #bin_overrides:
      #qsub: "/opt/sge/bin/lx-amd64/qsub_wrapper"
      # qstat: ""
      # qhold: ""
      # qrls: ""
      # qdel: ""
      #
    # submit_host: "ood-dev.crc.nd.edu"

```

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 3, 2024, 6:57pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/10 "2024-04-03T18:57:51Z")

</div>

Welp there it is - `batch_connect` has the same indentation as `job`. So you need to shift that section left.

But again, the `script` section does nothing here.

---

<div class="post-metadata">

**Author:** ![dbarstis](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@dbarstis](https://discourse.openondemand.org/u/dbarstis)\
**Post date:** [April 3, 2024, 7:08pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/11 "2024-04-03T19:08:20Z")

</div>

Yup. That was it. I looked at that for days and I never would have caught it.  
Thank you so much for your help! I pulled out the script section and the /bin/bash lines.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [September 30, 2024, 7:09pm UTC](https://discourse.openondemand.org/t/bash-interpreter-help-needed-setting-up-interactive-desktop-apps-on-ood-3-1-1-univa-grid-engine/3398/12 "2024-09-30T19:09:12Z")

</div>

Closed on September 30, 2024, 7:09pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
