Second bitmessage instance should pop up the window of the first one and quit, and not run in parallel #630

Closed
opened 2014-01-25 07:16:12 +01:00 by yurivict · 4 comments
yurivict commented 2014-01-25 07:16:12 +01:00 (Migrated from github.com)

I launched the second copy of bitmessage from the same user on the same display, and it launched. It showed two windows and two tray icons.

This shouldn't happen. It should locate the first instance, make its window active and quit. Chrome browser, for example, does this.

The second instance also shouldn't be allowed to launch off the same database on another screen, since this doesn't make sense.

It is possible to find the window of the original instance through the window manager.

I launched the second copy of bitmessage from the same user on the same display, and it launched. It showed two windows and two tray icons. This shouldn't happen. It should locate the first instance, make its window active and quit. Chrome browser, for example, does this. The second instance also shouldn't be allowed to launch off the same database on another screen, since this doesn't make sense. It is possible to find the window of the original instance through the window manager.
PeterSurda commented 2015-10-18 12:50:30 +02:00 (Migrated from github.com)

This is a very valid point.

This is a very valid point.
PeterSurda commented 2015-11-14 13:26:30 +01:00 (Migrated from github.com)

I did a quick test on Windows. It looks like when you launch it in a different way, for example, once from the command line using python, and once from the bundled EXE, it doesn't detect the second instance correctly. Only if you run two instances from python at the same time, or run the EXE twice at the same time, will it detect the second instance correctly.

I did a quick test on Windows. It looks like when you launch it in a different way, for example, once from the command line using python, and once from the bundled EXE, it doesn't detect the second instance correctly. Only if you run two instances from python at the same time, or run the EXE twice at the same time, will it detect the second instance correctly.
thelink2012 commented 2015-11-14 19:38:29 +01:00 (Migrated from github.com)

Perhaps using a UUID as the basename in singleton.py of the lock file would resolve the issue instead of taking it off argv.

Perhaps using a UUID as the `basename` in `singleton.py` of the lock file would resolve the issue instead of taking it off argv.
PeterSurda commented 2015-11-14 19:41:14 +01:00 (Migrated from github.com)

I think that a combination of current UID and configuration path would be better, or maybe even only the configuration path.

I think that a combination of current UID and configuration path would be better, or maybe even only the configuration path.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2025-02-27#630
No description provided.