It used to be that when I clicked on the external editor icon it would bring up a drop down box where I could select ghostwriter or retext. I removed retext from my system as I didn't like it. After that it automatically went to ghostwriter.
I decided I'd like to go to vim, however any time I put anything into the tools-options-external editor box it just hangs and nothing happens.
I even tried reinstalling retext but joplin no longer recognizes it and joplin still just opens ghostwriter.
Any help is appreciated.
OK, this gets weird. This morning I switched to my new laptop and when I clicked on the external editor icon it brought up the selection box like my other one used to. I selected gvim and it worked like it should.
Now when I click on the external editor it just goes to gvim like it is now the default and skips the selection menu.
Just like my other laptop when I put anything into tools-options-general path nothing at all happens.
It looks like once I make an editor selection it becomes the default and I see no way to change it.
Does any of this make any sense to anyone??
Yes, I do restart Joplin after every change.
I'm using Ubuntu 10.04 with gnome.
I liked it best when it opened the selection window but not a big deal. What I really don't understand is why when I enter anything into the text editor in options, it doesn't do anything at all. Doesn't matter if I use the full path or not, it just doesn't do anything.
Actually when I use browse it says that it can't read my /usr directory so I tried a soft link from my /home/bin directory but got the same result.
It sounds like you're using either Joplin as a Snap or Flatpak package, both of these would have similar behaviour. Being on Ubuntu, it's likely the Snap.
These packages as sandboxed, they can't access your normal user system which is why you can't access /usr and can't directly specify an editor. They also can't open other applications without arbitration. Practically, this means they both use a technology known as XDG desktop portals; which acts as a bridge between the sandboxed environment and the native system. Joplin in the sandbox makes a request via these portals, and it pops up on your screen as a dialog that asks you the external editor to use. Other versions of Joplin won't do this at all.
The prompt also tries be smart and remember the choice the user makes if they make the same choice 3 times in a row. Unfortunately there's no obvious way to reset it (the sandboxed app can't at all, and the native system doesn't make it obvious). There's two things I'd suggest to try get the prompt to appear again:
Change the default application that opens .md files on the system, such as to Gedit (and feel free to revert it), this should clear the remembered association.
If this doesn't work, run rm $HOME/.local/share/flatpak/db/desktop-used-apps in the terminal, log out and in, and this should clear all the associations entirely. (And yes, it's the same file for both Flatpak and Snap)
Unfortunately, since the dialogue and how it interacts with the system is entirely outside the Joplin process itself, it's not possible for the Snap/Flatpak maintainers themselves to influence it anymore than this. The flatpak can provide another avenue to specify the exact application without XDG portals, making use of flatpak-spawn, but otherwise it's work that needs handling by the distros themselves.
The official AppImage wouldn't have any problems using the external editor functionality, so if it's important to you then it could make sense to use it. You'd only realistically be losing automatic updates. You could either export your current notes as a .JEX and import them into it, use the sync functionality built into Joplin, or open the profile directories and copy them over (whilst they're both shut down ofc). The AppImage is also the only Linux choice that gets official support.
It's unrealistic for me to claim the packages make sense for everybody, they're fine for a lot of people but the external editor functionality is a weak point and it's unlikely to improve in the future. Though if you do appreciate the sandboxing and automatic updates these packages bring, the Flatpak gives much more control over the external editor than the Snap can.
Ultimately it's your choice based on your own circumstances.
Thanks very much, I think I'll leave things the way they are. Actually Gvim is my preferred editor any way so I'll just use it when I want an external editor in Joplin.
I really love Joplin and will be using it more and more.
I really appreciate all of the help but just want to add a little more to see if I can get what I'd like out of Joplin somehow.
I did have the snap version installed, I don't care much for appImage packages so I installed the flatpak version.
After the installation when I clicked on the external editor icon a list of editors poped up and I could select the one that I wanted. Ideally this is what would work best for me.
However after a few starts I got back to the point where it just went automatically to Ghostwriter.
Anytime I go to Tools,Options and put in a path to an editor, no matter which one, it does absolutely nothing, which is what was happening with the snap version.
Is there anything I can do to make the selection box pot up every time?
Edit: Just grabbed the AppImage Joplin and that at least lets me go into Tools Options and put the path to the editor in, a little more cumbersome than the simple popup but it will at least work for me.
I should also add that I do have XDG Desktop support installed but it doesn't seem to do much for me in this case.
The AppImage doesn't use the portals since it doesn't strictly have any real need to. They're primarily intended to work around issues caused by the sandboxing. It's not impossible that it might be added (people do seem to like being asked for the editor in the way it provides) but it'd still end up suffering from the hardcoded remember functionality.
If you could recompile the xdg-desktop package yourself you could set the arbitrary value of 3 to something ridiculous like 2 billion, which would effectively force it to always ask for your preferences. I do personally think that it's currently unfortunate that it doesn't have a specific "remember this choice" box and I'd like if didn't remember for the users automatically.
Thanks very much, I will take a look at that. For now I think I will stick with the AppImage,just got it all set up including the icon and even though changing the editor is a but funky, it's not something I'll need to do very often. I'll leave it at ghostwriter most of the time, I just need gvim when I need to do a lot of editing.
Thanks very much for all of your help and time.
Edit: I took a look at the link you posted and it works great, so I'll stick with the flatpak.
I do agree that it should allow a choice, hopefully that will happen at some point.