# Launch external editor (Linux, Ubuntu/PopOS, flatpak)

**URL:** <https://discourse.joplinapp.org/t/launch-external-editor-linux-ubuntu-popos-flatpak/16118>\
**Category:** Support\
**Created:** [25 March 2021 22:52 UTC](https://discourse.joplinapp.org/t/launch-external-editor-linux-ubuntu-popos-flatpak/16118 "2021-03-25T22:52:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fnl](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/fnl/32/8011_2.png) [@fnl](https://discourse.joplinapp.org/u/fnl)\
**Post date:** [25 March 2021 22:52 UTC](https://discourse.joplinapp.org/t/launch-external-editor-linux-ubuntu-popos-flatpak/16118/1 "2021-03-25T22:52:07Z")

</div>

Version: 1.7.11  
OS: Pop!\_OS 20.10

When I configure an external editor in the Joplin config, it never launches; According to the dev console, for example when using Typora, I get:

internal/child\_process.js:267 Uncaught (in promise) Error: spawn /usr/bin/typora ENOENT

Command was: "/usr/bin/typora" /home/fnl/.config/joplin-desktop/edit-b1cd0a6c21c3494480eb12f9af568255.md  
at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:267)  
at onErrorNT (internal/child\_process.js:469)  
at processTicksAndRejections (internal/process/task\_queues.js:84)

(To avoid potential questions, /usr/bin/typora is a softlink to /usr/share/typora/Typora on my system. And yes, even if I use the latter, direct path, I get the same problem.)

Interstingly, if I try to _browse_ to the binary to use as external editor, none of my Markdown apps show up; For example, Typora gets installed into /usr/share/typora/ but that typora directory doesn't even show up as a folder to open in the share directory.

Any hints what to do next would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![james-carroll](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/james-carroll/32/28844_2.png) [@james-carroll](https://discourse.joplinapp.org/u/james-carroll)\
**Post date:** [25 March 2021 23:14 UTC](https://discourse.joplinapp.org/t/launch-external-editor-linux-ubuntu-popos-flatpak/16118/2 "2021-03-25T23:14:04Z")

</div>

If using either the Flatpak or Snap packages, the sandboxing interferes with launching binaries outside of their containers. You can't see your normally installed editors because of mount namespaces (aka fancy chroots).

Both make use of xdg-desktop-portals by default, which means if you press control-e for example to open an external editor, you'll get a list of editors to use assuming that functionality is working (reliant upon having xdg-desktop-portals installed on the host system, which is often default these days, and the editors having .desktop files that actually claims it supports .md/jpg/pdf/etc

As a special case with the Flatpak, you can use `flatpak-launch` to potentially launch arbitrary programs on the normal filesystem, but I'm not honestly entirely sure how that works, the Flatpak repo has this example

```auto
Path: 
/bin/flatpak-spawn
Arguments: 
--host /bin/flatpak run --filesystem=xdg-config/joplin-desktop org.gnome.gedit

```

That's presumably launching gedit also installed as another flatpak, I don't know if this could point to the native /usr/bin/typora

Ultimately, the official AppImage doesn't have these problems and given this is the official forums, you're encouraged to prefer the AppImage if you're having problems as the other ones are third party support only.

---

<div class="post-metadata">

**Author:** ![fnl](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/fnl/32/8011_2.png) [@fnl](https://discourse.joplinapp.org/u/fnl)\
**Post date:** [25 March 2021 23:31 UTC](https://discourse.joplinapp.org/t/launch-external-editor-linux-ubuntu-popos-flatpak/16118/3 "2021-03-25T23:31:45Z")

</div>

> [@james-carroll](#):
>
> ```auto
> Path: 
> /bin/flatpak-spawn
> Arguments: 
> --host /bin/flatpak run --filesystem=xdg-config/joplin-desktop org.gnome.gedit
> 
> ```

Thank you for the explanations and the solution! I was not aware that flatpak chroots the apps it installs (I am new to PopOS and flatpak). And yes, your above suggestion works, with that I can span other flatpak apps from the (flatpak'd) Joplin. Thanks again!

---

<div class="post-metadata">

**Author:** ![fnl](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/fnl/32/8011_2.png) [@fnl](https://discourse.joplinapp.org/u/fnl)\
**Post date:** [26 March 2021 08:08 UTC](https://discourse.joplinapp.org/t/launch-external-editor-linux-ubuntu-popos-flatpak/16118/4 "2021-03-26T08:08:03Z")

</div>

One amendment for completeness, if others have a similar issue and if you want to spawn **non-flatpak** apps from a flatpak-installed Joplin, such as Typora (which in turn isn't using flatpak), you can use this configuration instead:

```auto
Path: 
/bin/flatpak-spawn
Arguments: 
--host /usr/bin/typora

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)\
**Post date:** [25 April 2021 08:08 UTC](https://discourse.joplinapp.org/t/launch-external-editor-linux-ubuntu-popos-flatpak/16118/5 "2021-04-25T08:08:53Z")

</div>

Closed on 25 April 2021 08:08 UTC

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