Linux - Profile switch warning

When changing profiles on a Linux system the Joplin application suddenly closes and looks like a program crash (it isn't). It is suggested that when changing profiles on Linux the restart warning used for plugins is triggered.

shutdown

2 Likes

I noticed this some time ago, too. It's a little bit irritating. I have looked into it and it seems to be like this because the profile switching calls restart with a false argument

and thus doesn't open the message box here (because linuxSafeRestart is false):

3 Likes

Maybe we could actually remove this exception for Linux. I assume it was added because some distro somewhere didn't handle restart properly. If someone is willing to remove that exception and test I'd be happy to merge

1 Like

Hello
I'm not a developer, but I can't wait for you to make it quick and easy to switch from one profile to another

Hello
At the moment I'm not using this because of the problem of switching quickly.
Is it planned? next version?

FYI

1 Like

I changed the code to the following and it's working fine seemingly without any issue. I run it on Manjaro KDE Wayland.

Note I changed app.exit() to app.quit(). quit is supposed to do a graceful exit.

	public restart(linuxSafeRestart = true) {
		const { app } = require('electron');

		if (shim.isPortable()) {
			const options = {
				execPath: process.env.PORTABLE_EXECUTABLE_FILE,
			};
			app.relaunch(options);
		} else if (shim.isLinux() && linuxSafeRestart) {
			// this.showInfoMessageBox(_('The app is now going to close. Please relaunch it to complete the process.'));
			app.relaunch();
		} else {
			app.relaunch();
		}

		// app.exit();
		app.quit();
	}

Any chance you could create a PR with this?

Any chance you could create a PR with this?

Seems not easy to do at the moment without messing up my existing repository. This will be together in my upcoming PR.

But in the moment if anyone wants to make the change, the included code is the only modification needed, unless you would also want to remove the linuxSafeRestart parameters, there would be a couple other small changes.

Just to be clear, there can only be one feature or bug fix per pull request otherwise it's too difficult to review, manage reverts, etc. Please keep that in mind because as it is it seems we won't be able to merge any of your changes.

You may have to consider whether you're interested in collaborative work, or would simply prefer to create a new note taking app based on Joplin. Both options are fine, but of course the second option will have the consequences that we already discussed.

I'm not making small changes, and as I said, it's not in a good shape yet for a merge request. This small modification is not among the main things I look to do, so it's not worth my effort to juggle my repositories to send a PR.

But if you think my changes won't be merged into Joplin, then I'll arrange related adjustments accordingly.

If your pull request is to add a single feature, for example support for local mds files, it will be merged.

However if there are many other unrelated changes, it will be a lot more difficult. If you have changes, such as the ones above, that are self-contained it might make sense to create a pull request, then we can merge it and you can rebase. That way you won't have to keep various minor changes in your branch.