Bug 1070264
| Summary: | clicking on a mailto link in Firefox brings up a second Claws Mail window / Firefox overrides $TMPDIR | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Raphael Groner <projects.rg> |
| Component: | claws-mail | Assignee: | Andreas Bierfert <andreas.bierfert> |
| Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | agajania, andreas.bierfert, andrew, bugs.michael, ossman |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| URL: | http://lists.claws-mail.org/pipermail/users/2013-December/008000.html | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 956380 | Environment: | |
| Last Closed: | 2014-02-26 18:42:11 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Raphael Groner
2014-02-26 14:04:31 UTC
A work-around is described here: http://lists.claws-mail.org/pipermail/users/2013-December/008000.html Since you've found the work-around, which is also explained in the README.Fedora file included within the Fedora claws-mail package, how about applying that work-around in your ~/.bash_profile file? Nothing else can be done in Fedora claws-mail, if other applications mess with environment variables, such as TMPDIR. If to work around it in code, that would need to be done upstream, or else Fedora would deviate from upstream behaviour. I strongly doubt that we can not do anything about it and I think that upstream should be able to fix it by a patch. For instance, a script or any other factory helper should check if an instance is already running and delegate to that. http://en.wikipedia.org/wiki/Singleton_pattern Please do not change the bug resolution to UPSTREAM, if there is no upstream ticket for this issue that has been accepted. Please also read my analysis in bug 956380 comment 8 an onwards (e.g. above in the cloned parts). > For instance, a script or any other factory helper should check > if an instance is already running and delegate to that. Set $TMPDIR, then Firefox will respect that setting, and Claws Mail will use the same $TMPDIR. That's what Claws Mail tries to do by placing a runtime file in, well, uhm, a claws-mail-$UID directory in the system's temporary directory. > http://en.wikipedia.org/wiki/Singleton_pattern Can you elaborate why you think the "Singleton" design pattern would be relevant or helpful here? (In reply to Michael Schwendt from comment #4) > Please do not change the bug resolution to UPSTREAM, if there is no upstream > ticket for this issue that has been accepted. > > Please also read my analysis in bug 956380 comment 8 an onwards (e.g. above > in the cloned parts). > > > For instance, a script or any other factory helper should check > > if an instance is already running and delegate to that. > > Set $TMPDIR, then Firefox will respect that setting, and Claws Mail will use > the same $TMPDIR. Thanks. This helps. So no patch to the source is needed. > Can you elaborate why you think the "Singleton" design pattern would be > relevant or helpful here? It's possible to do it via GtkApplication and providing an unique identifier, or by help from (deprecated) libunique. The better documentation may be: http://stackoverflow.com/questions/19072161/preventing-multiple-instances-of-a-gtk-application Although, I would provide single instance mode as a feature for the user. On the other hand, multiple instances of claws-mail can crash the settings folder ~/.claws-mail/ . That has nothing to do with the "design patterns" Singleton, which is about class instantiation _within_ a program. What you really mean is a way to prevent a program from being started once more when it is running already. As pointed out, Claws Mail tries to do that via a socket file in the temporary directory. That works, provided that the temporary directory is the same for every launched instance of Claws Mail. Alternative solutions might hardcode the path or get broken if they also rely on env vars. |