# Struggling to run openrndr-template on Ubuntu via ssh

**URL:** <https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358>\
**Category:** Installation and setup\
**Created:** [April 2, 2022, 6:04pm UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358 "2022-04-02T18:04:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sourmike](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/sourmike/32/363_2.png) [@sourmike](https://openrndr.discourse.group/u/sourmike)\
**Post date:** [April 2, 2022, 6:04pm UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/1 "2022-04-02T18:04:53Z")

</div>

I’m trying to clone an openrndr-template project onto an ubuntu (20.04) machine. I’m trying to run the program directly without having to open the Intellij IDEA. I’m able to run some gradle commands but when I attempt to do `./gradlew :run` it fails with the following error:

```auto
$ ./gradlew :run

> Task :run FAILED
 INFO [main] o.o.Application ↘ no preload class found 'org.openrndr.Preload'
 INFO [main] ↘ Set -Dorg.openrndr.exceptions=JVM for conventional exception-handling

│ TemplateProgramKt.main(TemplateProgram.kt:-1)
├─ TemplateProgramKt.main(TemplateProgram.kt:9)
│ org.openrndr.ApplicationBuilderKt.application(ApplicationBuilder.kt:81)
│ org.openrndr.ApplicationKt.application(Application.kt:120)
│ org.openrndr.Application.Companion.run(Application.kt:66)
├─ java.lang.reflect.Constructor.newInstance(Constructor.java:490)
├─ jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
├─ jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
│ jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:-2)
│
↑ null (InvocationTargetException)
├─ org.openrndr.internal.gl3.ApplicationGLFWGL3.createPrimaryWindow(ApplicationGLFWGL3.kt:458)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s
3 actionable tasks: 1 executed, 2 up-to-date

```

These are the versions of Java I have right now:

```auto
$ java -version
openjdk version "11.0.14.1" 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

```

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [April 2, 2022, 6:36pm UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/2 "2022-04-02T18:36:20Z")

</div>

Hi! Were you trying to run the included example? Or a different program?

I just did these 3 steps and it worked:

```auto
git clone https://github.com/openrndr/openrndr-template.git
cd openrndr-template/
 ./gradlew :run

```

My version of java:

```auto
$ java --version
openjdk 15.0.1 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15.0.1+9, mixed mode, sharing)

```

Your version should work as well.

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [April 2, 2022, 7:02pm UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/3 "2022-04-02T19:02:15Z")

</div>

Do the same programs run inside Idea?

---

<div class="post-metadata">

**Author:** ![sourmike](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/sourmike/32/363_2.png) [@sourmike](https://openrndr.discourse.group/u/sourmike)\
**Post date:** [April 2, 2022, 7:24pm UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/4 "2022-04-02T19:24:11Z")

</div>

So that’s basically what I did, running the original programs. The only other salient difference that I can think of is that I’m using a remote terminal. I’m SSHing into this machine and running these commands. I have a virtual desktop of the machine on my computer as well but there’s no actual monitor hooked up. I seem to recall reading something about that.

Re: the IDEA, i wasn’t actually able to successfully install it on the machine. I’ll try that again.

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [April 2, 2022, 8:05pm UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/5 "2022-04-02T20:05:43Z")

</div>

If you’re SSHing into the machine then you may need to do something special. If you have a virtual desktop, does it work when opening a terminal on it? Try running `glxgears` on the command line. Do you see any gears? 🙂

Or maybe [headless applications](https://guide.openrndr.org/advancedTopics/headlessApplications.html) help?

I would add “via ssh” to the title of this post 🙂

---

<div class="post-metadata">

**Author:** ![sourmike](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/sourmike/32/363_2.png) [@sourmike](https://openrndr.discourse.group/u/sourmike)\
**Post date:** [April 3, 2022, 6:51pm UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/6 "2022-04-03T18:51:45Z")

</div>

I was fianlly able to install Idea after several hard reboots. I was also then able to run the project from the play button inside.

I’m now struggling to get OBS to capture the output as a smooth video. If you have any hot tips for that I’m all ears. Otherwise I may make another post in a few days if I can’t find a solution.

Thanks again for your help.

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [April 3, 2022, 8:28pm UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/7 "2022-04-03T20:28:20Z")

</div>

Little by little getting there 🙂

Is there a reason to use OBS to capture video? Do you want to do live streaming? To record videos I use the `ScreenRecorder()` extension…

If it’s not smooth, can you describe the symptoms?

---

<div class="post-metadata">

**Author:** ![sourmike](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/sourmike/32/363_2.png) [@sourmike](https://openrndr.discourse.group/u/sourmike)\
**Post date:** [April 5, 2022, 1:05am UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/8 "2022-04-05T01:05:31Z")

</div>

Yes, I’m trying to set up a livestream that runs indefinitely that includes an openrndr animation running constantly, and taking in data via OSC message to modulate the animation.

Then animation is smooth on the remote Ubuntu instance, but when I try to capture the output on OBS, it is just a completely still image of the animation, however if I modify any of the settings it refreshes the image and gets a shot of the animation where it’s currently at again. If I try it on Mac it plays but the frame rate is totally wrecked.

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [April 5, 2022, 8:38am UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/9 "2022-04-05T08:38:20Z")

</div>

And you’re doing all that via without a monitor attached? I remember struggling with that years ago, but not what I did to fix it. I know it can be an issue to not have a real display connected. But I think it’s not related to OPENRNDR, it’s about OPENGL / ssh / vnc etc so maybe searching for those terms may help? I found this: [run opengl application over ssh - Welcome](https://gachiemchiep.github.io/cheatsheet/opengl_over_ssh/) Another search that might help is “obs headless”.

I added “via ssh” to the title to make the issue more obvious 🙂

---

<div class="post-metadata">

**Author:** ![sourmike](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/sourmike/32/363_2.png) [@sourmike](https://openrndr.discourse.group/u/sourmike)\
**Post date:** [April 8, 2022, 2:26am UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/10 "2022-04-08T02:26:23Z")

</div>

for now the solution evades me. I discovered this repo however: [OPENRNDR + Kotlin running in JavaScript](https://xemantic.github.io/openrndr-js/)

I can render a browser in OBS no problem - this demo runs quite smoothly. Only this project seems to be quite different from native openrndr code. If there was a way to put what i had written in the browser directly, I’d have a solution.

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [April 8, 2022, 7:20am UTC](https://openrndr.discourse.group/t/struggling-to-run-openrndr-template-on-ubuntu-via-ssh/358/11 "2022-04-08T07:20:57Z")

</div>

Kazik (the author of that page) was the one who started making it possible to run OPENRNDR in JavaScript, which eventually became this [GitHub - openrndr/openrndr-js-template: OPENRNDR + Kotlin/JS template](https://github.com/openrndr/openrndr-js-template)

Some features may not be available in the browser (there are JVM specific orx extensions and some advanced OPENGL things that are not available in the browser) but maybe what you have in mind does work?

I heard it’s better to develop for OPENRNDR + JS step by step instead of trying to run a larger existing project all at once because if it fails to run one wouldn’t know which feature is misbehaving.
