# Xfce error when launching interactive desktop

**URL:** <https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034>\
**Category:** Get Help\
**Created:** [April 28, 2022, 9:33pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034 "2022-04-28T21:33:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [April 28, 2022, 9:33pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/1 "2022-04-28T21:33:04Z")

</div>

I’m running into more errors. The following is the output in the output.log file:

```auto
Script starting...
Generating connection YAML file...
ERROR: Collection default cannot be found
Launching desktop 'xfce'...
Failed to init libxfconf: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11.
Failed to init libxfconf: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11.
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.
Desktop 'xfce' ended...
Cleaning up...

```

I’ve tried adding unset DBUS\_SESSION\_BUS\_ADDRESS to the cluster config file but that’s hasn’t done anything.

---

<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 29, 2022, 1:57pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/2 "2022-04-29T13:57:39Z")

</div>

Can you scroll up in that log file? There should be something about vnc server starting up and setting the `DISPLAY`.

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [April 29, 2022, 3:41pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/3 "2022-04-29T15:41:16Z")

</div>

That is the entirety of the output.log file. Below is the contents of the job output directory.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/c/c832759013fd925f2d0df2758d5720bf727294e5.png)

---

<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 29, 2022, 4:41pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/4 "2022-04-29T16:41:14Z")

</div>

Got it. You’re template is likely `basic` which is just http so the VNC server didn’t start.

Here’s how to specify that this is a VNC app in your `submit.yml.erb`.

```nohighlight
---
batch_connect:
  template: vnc

```

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [April 29, 2022, 5:47pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/5 "2022-04-29T17:47:29Z")

</div>

Ah that was it. Thank you! Side question, how do I put ruby logic into a form? Do I just add the logic and change the extension to .yml.erb?

---

<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 29, 2022, 8:13pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/6 "2022-04-29T20:13:47Z")

</div>

Yes with the ERB extension it will treat it as a ruby ERB template.

[https://docs.ruby-lang.org/en/2.3.0/ERB.html](https://docs.ruby-lang.org/en/2.3.0/ERB.html)

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [April 29, 2022, 8:54pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/7 "2022-04-29T20:54:03Z")

</div>

I’ve changed the form file extension to .yml.erb but the desktop option disappears from the interactive apps list. This is the only section that uses Ruby:

```auto
  queue:
    widget: "select"
    options:
    <% `sinfo -h --format=%r`.split("\n").each do |queue| %>
      - <%= queue %>
    <% end %>

```

Is there a formatting error?

---

<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 29, 2022, 9:30pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/8 "2022-04-29T21:30:19Z")

</div>

> [@brad.traver](#):
>
> ```auto
> <%- `sinfo -h --format=%r`.split("\n").each do |queue| -%>
> - <%= queue %>
> <%- end -%>
> 
> ```

I’d bet it is. Try it with dashes so it effectively erases the line (and doesn’t add new lines).

Also - if you know things up front you should just hard code them in the cluster.d file. This is not only easier, but much faster to render because you don’t have to execute a command.

[https://osc.github.io/ood-documentation/latest/app-development/tutorials-interactive-apps/add-custom-queue/global-static-list.html](https://osc.github.io/ood-documentation/latest/app-development/tutorials-interactive-apps/add-custom-queue/global-static-list.html)

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [April 29, 2022, 9:41pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/9 "2022-04-29T21:41:51Z")

</div>

I tried modifying as you suggested. The desktop still isn’t showing up. The reason I’m doing it this way is so that only the queues users have access to show up in the list. Queue access varies from user to user.

---

<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 29, 2022, 10:46pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/10 "2022-04-29T22:46:56Z")

</div>

OK 1 more try - on the left, not on the right. I had to look this up and verify this is how we do it.

> <https://github.com/OSC/bc_osc_jupyter/blob/5f272e0515bad5a24850f8ed66ad3d6ba0399e58/form.yml.erb#L44-L46>

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [May 2, 2022, 2:23pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/11 "2022-05-02T14:23:27Z")

</div>

No dice. Should I start a new topic?

---

<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:** [May 2, 2022, 5:17pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/12 "2022-05-02T17:17:11Z")

</div>

I don’t mind either way. Can you upload the actual file (you may have to rename to txt file). I’m checking for strange characters and/or Windows characters that the Linux system doesn’t like.

That’s my best bet – there’s something here very simple and silly like that or using tabs instead of spaces and YAML doesn’t like that and so on.

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [May 2, 2022, 5:44pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/13 "2022-05-02T17:44:27Z")

</div>

[form.txt](https://discourse.openondemand.org/uploads/short-url/4albv7dWTs3PLUGnMYQsh3j6B3x.txt) (788 Bytes)

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [May 3, 2022, 10:00pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/14 "2022-05-03T22:00:02Z")

</div>

@jeff.ohrstrom Any updates?

---

<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:** [May 4, 2022, 1:15am UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/15 "2022-05-04T01:15:49Z")

</div>

```auto
<%- `sinfo -h --format=%R`.split("\n").each do |queue| -%>

```

I think it’s the wrong format. Try `%R` - that worked for me.

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [May 4, 2022, 4:49pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/16 "2022-05-04T16:49:40Z")

</div>

I’ve made the change. That did not work.

---

<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:** [May 4, 2022, 5:20pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/17 "2022-05-04T17:20:04Z")

</div>

OK - let’s take step back, because both variations work (lowercase r just returned the one single `no`)

If you remove the ERB altogether, does the desktop show up then? The `talon` cluster has to exist for it to show up.

If you’re using root to edit the files directly in `/etc/ood/config` then be sure regular users can read the files.

Then I’d check what the command output is _on the web server itself_. These commands run on the same machine that you’ve installed OOD on, so when you’re checking for behavior parity, be sure to check _on that machine_.

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [May 4, 2022, 5:30pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/18 "2022-05-04T17:30:27Z")

</div>

If I remove the .erb extension and comment out the ruby lines then yes the desktop shows up and works. The config files I’m editing are in /var/www/ood/apps/sys/bc\_desktop (I’m trying to get this working on the interactive desktop form first). All of the files are owned by apache. The permissions for other users are read-only.

---

<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:** [May 4, 2022, 5:50pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/19 "2022-05-04T17:50:16Z")

</div>

Got it. That is not the file you want to edit. You want to edit a file in `/etc` or better still, an file in your $HOME directory first.

If you’re following this - you can see the file location is in `/etc`. Files in `/var/www` will be overwritten with new installs, where files in `/etc` won’t.  
[https://osc.github.io/ood-documentation/latest/enable-desktops/modify-form-attributes.html](https://osc.github.io/ood-documentation/latest/enable-desktops/modify-form-attributes.html)

After you move it to `/etc` and get it working in just the yml form - I’d suggest you commit it to git. Then edit it so we can really see the difference is. You can then share the `git diff` here with me so we can see what’s what because I got that to work directly so there’s something here we’re missing.

Also I just want to be sure you’re not making a new file with the erb extension. You’re renaming the existing file right? (there could be issues if there are 2 files there both named `form`.)

---

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [May 5, 2022, 5:51pm UTC](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034/20 "2022-05-05T17:51:49Z")

</div>

Should the /var/www/ood/apps/sys/bc\_desktop directory even exist?

[Next page](https://discourse.openondemand.org/t/xfce-error-when-launching-interactive-desktop/2034.md?page=2)
