Right now, the user has to specify an executable path themselves.
This is not a good user experience — many users are simply not technical enough to know where an executable resides.
This is doubly true on Linux, where executables tend to be located in various places. It's even worse in the Linux Flatpak build, where the app is sandboxed from seeing other executables. There, the user has to know in advance to specify the Flatpak portal
/bin/xdg-open to choose an app to open. If they specify some other executable, nothing will happen and the user will have no idea why.
It'd be great if Joplin defaulted to showing an app picker rather than specifying an executable path for the external editor.
Welcome to the forum!
I agree an app picker would be great.
Barring that, would it be possible to have the dialog box that does pop up default to the standard executable file format? As it is, it is set to
If it is possible to have this set per OS that would be a big help to non-technical users. So for example on Windows it would default to Exacutable files like
That's a good point, specifying the extension on Windows would help a bit. It cannot be done on macOS or Linux though since there's no extension for executables.
I'm not sure it can be improved further though. How would we show only executables on Linux for instance - they can indeed be anywhere and it would take too long to scan the disk.
There should be a way. Maybe someone more familiar with Linux would know.
For instance if I right click a file in the file manager there's "Open With" that lists a few applications that can open the file. I doubt it scans the disk to show this list each time.
Its easier with Linux usually because basically everything worth using gets added to $PATH anyway so you don't have to specify the install location - you just write
vim in the external editor field and it works - I would say most Linux users looking to use an external application do know what they installed so can just add the word they need.
That being said I really liked the project that spawned this topic where instead of a single application being set it would allow you to pick from a list every time.
Right, there's something similar on Windows too, although we'd also need to support entering arbitrary paths, in case the app is not in that list. Maybe there's some Electron API that can be used for this.
Keeping aside the obvious unsupported nature of the Flatpak/Snap builds, they already by default show a list of applications to pick from. If that isn't the case on your system, they've either defaulted to picking the same option because they've remember it being picked before, or your system is misconfigured and lacks
And because of the sandboxing, you'd never be able to the list of installed applications without weakening the sandbox to begin with. The security model in place means that while you can technically open applications, you can't query what they are in advance or know what was even picked when it happens.
xdg-open on Snap/Flatpak is a wrapper to the
It's unfortunate for power users, but the vast majority don't seem to have a problem with it IMO. And the only option that makes sense for the Snap specifically is replacing the option to specify the path with an option that asks "do you want to be prompted which application to pick everytime (never remember)". Although Flatpak can technically use any arbitrary editor, in the ideal conditions, it'd be the same.
I haven't tried the Snap (I'm not a fan of the proprietary and centralized nature of the Snap back-end, so it's not a service that I use), but the application list is certainly not shown for the Flatpak by default. The README for the Flatpak specifies that one has to manually use
/bin/xdg-open as the path to show the application list.
I installed the Joplin Flatpak from scratch on a system that never had Joplin installed, so this is not the result of a previous configuration.
Perhaps the Snap build has this configuration by default, which makes the experience nicer, especially for non-technical users. I'm asking for all other Linux builds (including Flatpak) to have this better default as well.
The snap doesn't make any modications to default user settings (for better and worse), So I apologise if it really is the case that the manual selection of
xdg-open is needed for the Flatpak, but I do genuinely believe the default of
xdg-open is actually built into Electron itself.
I suppose the semantics here don't really matter, I do agree with you that it should be default, it's just that I'd struggle to explain why it isn't. I'd have to assume that it's due to some nuance in the Flatpak environment.