# Fiji ImageJ App Deployment

**URL:** <https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101>\
**Category:** Get Help\
**Created:** [June 6, 2022, 6:15pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101 "2022-06-06T18:15:47Z")\
**Posts on this page:** 15\
**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:** [June 6, 2022, 6:15pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/1 "2022-06-06T18:15:47Z")

</div>

I am working to get Fiji imageJ deployed as an app through OnDemand. I have the app configured as a VNC app. When I launch the app, it gives me a noVNC session that shows only a black screen. I can run the app just fine through an interactive desktop session. My submission script is located below. The VNC and XFCE options were pulled from an example Matlab script.

```auto
#!/usr/bin/env bash

# Benchmark info
echo "TIMING - Starting main script at: $(date)"

# Add Caffe Unet Libraries to LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/share/apps/fiji/caffe_unet/lib:/share/apps/fiji/caffe_unet/extlib:$LD_LIBRARY_PATH

# Add VirtualGL to PATH
export PATH=/opt/VirtualGL/bin:$PATH

# Configure VNC and XFCE
export SEND_256_COLORS_TO_REMOTE=1
xfwm4 --compositor=off --sm-client-disable
xsetroot -solid "#D3D3D3"
xfsettingsd --sm-client-disable
xfce4-panel --sm-client-disable

# Purge the module environment to avoid conflicts
module purge

# Load the require modules
module load shared cuda10.2/toolkit cudnn7.6-cuda10.2

# List loaded modules
module list

# Benchmark info
echo "TIMING - Starting Fiji at: $(date)"

# Launch the Fiji desktop app
set -x
/share/apps/fiji/Fiji.app/ImageJ-linux64 --heap 1G --no-splash --dont-patch-ij1 --ij2

```

---

<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:** [June 6, 2022, 7:22pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/2 "2022-06-06T19:22:10Z")

</div>

My guess is you’re missing the `--deamonize` arguement for `xfwm4.

> <https://github.com/OSC/bc_osc_ansys_workbench/blob/0e4824078a6352b9cc3d50f2ab83bbd3f40b5c3b/template/script.sh.erb#L20>

My guess is, with a `set -x` you’d see it hang on that command.

---

<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:** [June 7, 2022, 3:02pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/3 "2022-06-07T15:02:04Z")

</div>

Jeff,

I had --daemon and --daemonize in the initial versions of my script (never together, either one or the other). Both of those flags came back as “unrecognized options” on the xfwm4 command.

---

<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:** [June 7, 2022, 3:51pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/4 "2022-06-07T15:51:52Z")

</div>

OK - do you know if you’re proceeding after that statement or is the script hanging somewhere?

What’s the OS of the compute node and the output logs of one of these jobs?

---

<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:** [June 7, 2022, 4:47pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/5 "2022-06-07T16:47:48Z")

</div>

It’s getting past that line. It looks like it’s hanging on the xfsettingsd command. OS is RHEL 8.3. output.log is below:

```auto
Setting VNC password...
Starting VNC server...

WARNING: talon35:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server talon35:1
Killing Xvnc process ID 2292940
Xvnc process ID 2292940 already killed
Xvnc did not appear to shut down cleanly. Removing /tmp/.X11-unix/X1
Xvnc did not appear to shut down cleanly. Removing /tmp/.X1-lock

Desktop 'TurboVNC: talon35:1 (brad.traver)' started on display talon35:1

Log file is vnc.log
Successfully started VNC server on talon35.ib.cluster:5901...
Starting before.sh...
Script starting...
Starting websocket server...
TIMING - Starting main script at: Tue Jun 7 11:45:08 CDT 2022
xfwm4: Unknown option --daemon.
Type "xfwm4 --help" for usage.
XFWM4 configured

xsetroot done

WebSocket server settings:
  - Listen on :23584
  - No SSL/TLS support (no cert file)
  - Backgrounding (daemon)
Scanning VNC log file for user authentications...
Generating connection YAML file...
xfsettingsd: No window manager registered on screen 0.

(xfsettingsd:2294433): xfsettingsd-WARNING **: 11:45:13.704: Failed to get the _NET_NUMBER_OF_DESKTOPS property.
Setting VNC password...
Generating connection YAML file...

```

---

<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:** [June 7, 2022, 5:41pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/6 "2022-06-07T17:41:14Z")

</div>

What’s the log from a job when `xfwm4` actually starts correctly?

---

<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:** [June 7, 2022, 7:44pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/7 "2022-06-07T19:44:48Z")

</div>

It looks like it never starts correctly. It seems to hang on the xfwm4 command. This is the only error I see:  
`(xfwm4:2326764): GLib-CRITICAL **: 14:40:43.777: g_str_has_prefix: assertion 'prefix != NULL' failed`

---

<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:** [June 7, 2022, 7:48pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/8 "2022-06-07T19:48:40Z")

</div>

> [@brad.traver](#):
>
> It looks like it never starts correctly. It seems to hang on the xfwm4 command

hang, meaning it doesn’t background itself. Maybe try an `&` to do so. Again - we haven’t upgraded yet so I’m sure there’s something on the internet about them removing that option and what to do instead. Maybe a simple `--replace`?

```auto
xfwm4 --compositor=off --sm-client-disable 2>&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:** [June 7, 2022, 8:01pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/9 "2022-06-07T20:01:31Z")

</div>

I’m getting a few more errors but it still hangs at the same command. The addition of --replace didn’t seem to do anything. Errors are below. The last error was printed three times. I only put it once here.

```auto
(xfwm4:2330423): GLib-CRITICAL **: 14:59:09.157: g_str_has_prefix: assertion 'prefix != NULL' failed
(xfsettingsd:2330425): GLib-CRITICAL **: 14:59:12.079: g_str_has_prefix: assertion 'prefix != NULL' failed
(xfsettingsd:2330425): GLib-GObject-CRITICAL **: 14:59:12.081: g_value_get_string: assertion 'G_VALUE_HOLDS_STRING (value)' failed

```

---

<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:** [June 7, 2022, 9:40pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/10 "2022-06-07T21:40:51Z")

</div>

Yea I’m not sure what, if any, of those errors are meaningful. Seems to me you need to background the process with a `&` or similar.

---

<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:** [June 7, 2022, 9:46pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/11 "2022-06-07T21:46:21Z")

</div>

I’ve added `2>&1 &` to the end of the command. It hasn’t done anything.

---

<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:** [June 7, 2022, 9:59pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/12 "2022-06-07T21:59:23Z")

</div>

I removed the 2\>&1 and just left the &. No dice.

---

<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:** [June 8, 2022, 10:10pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/13 "2022-06-08T22:10:32Z")

</div>

It turns out that the --daemon option needs to be moved to the xfsettingsd command. I’m now getting hung up on the xfce4-panel command.

---

<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:** [June 8, 2022, 10:23pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/14 "2022-06-08T22:23:49Z")

</div>

Adding the & to background xfce4-panel seems to fix it.

---

<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:** [December 5, 2022, 10:24pm UTC](https://discourse.openondemand.org/t/fiji-imagej-app-deployment/2101/15 "2022-12-05T22:24:38Z")

</div>

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