Closed
Bug 227486
Opened 21 years ago
Closed 21 years ago
MozillaFirebird -remote 'Ping()' returns incorrect value if thunderbird is running
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: adam, Assigned: bugzilla)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
It seems that the -remote functionality does not operate correctly (or atleast
as expected) in an enviroment where Thunderbird is running. It seems to interact
with Thunderbird, rather than correctly (or as expected) indicating that
firebird is not running.
Reproducible: Always
Steps to Reproduce:
------ If neither are running ------
[adam@persephone adam]$ /usr/local/firebird/MozillaFirebird -remote 'Ping()'
No running window found.
[adam@persephone adam]$ echo $?
2
------ If just thunderbird is running ------
[adam@persephone adam]$ /usr/local/thunderbird/thunderbird &
[1] 26290
[adam@persephone adam]$ /usr/local/firebird/MozillaFirebird -remote 'Ping()'
[adam@persephone adam]$ echo $?
0
------ After thunderbird exits ------
[1]+ Done /usr/local/thunderbird/thunderbird
[adam@persephone adam]$ /usr/local/firebird/MozillaFirebird -remote 'Ping()'
No running window found.
[adam@persephone adam]$ echo $?
2
------ With Firebird running ------
[adam@persephone adam]$ /usr/local/firebird/MozillaFirebird &
[1] 26328
[adam@persephone adam]$ /usr/local/firebird/MozillaFirebird -remote 'Ping()'
[adam@persephone adam]$ echo $?
0
Actual Results:
-remote 'Ping()' indicated firebird was running when in fact it was not, instead
Thunderbird was running.
Expected Results:
-remote 'Ping()' should not indicate Firebird is running when Thunderbird is
running, only when firebird itself is running.
This bug appears to be somewhat related to 170609. I'm sure they have the same
root cause (though that bug discusses it in the context of Mozilla and Firebird).
Reporter | ||
Updated•21 years ago
|
Flags: blocking0.8?
This bug hasn't even been confirmed. Why is it marked as blocking0.8?
Comment 2•21 years ago
|
||
I'm not sure what it takes to have this officially confirmed, but my testimony
is that this is a real bug. I'm using Firebird 0.7 and Thunderbird 0.4, and use
the -remote in a script fired off by an icon in my KDE task bar. I get lots of
new Firebird windows with no profile complaints. But as soon as I bring up
Thunderbird, regardless of how many Firebird windows are open, new Firebird
requests fail with "Failed to send command".
Please, somebody, fix this or post a work-around. Please.
per ben on IRC
Flags: blocking0.9?
Flags: blocking0.8?
Flags: blocking0.8-
Comment 4•21 years ago
|
||
(In reply to comment #2)
> Please, somebody, fix this or post a work-around. Please.
Very simple workaround:
In one of the startup scripts (either Firebird's or Thunderbird's) change the
LOGNAME env. variable prior to running the app, e.g.
---
export LOGNAME=$USER'2'
---
That should work
Bratac
Comment 5•21 years ago
|
||
A while ago, I tried to work around this by not using ping(); just run xremote
with whatever command is desired, and if it fails, launch a new
Firebird/Thunderbird. That works fine for Firebird, and would work for
Thunderbird if not for some nonsensical behavior by Firebird (bug 227786).
The LOGNAME trick makes that work too, but obviously a user shouldn't have to
know anything about LOGNAME, or even about xremote for that matter. They should
be able to run Firebird and Thunderbird without worrying about which ones are
already open. It sounds so simple -- why is it taking so long to get it to just
work?
Comment 6•21 years ago
|
||
I spoke too soon. For the workaround, LOGNAME must be set in *both* startup
scripts (even if one is just $USER). Otherwise it gets inherited when one
program calls the other.
Comment 7•21 years ago
|
||
Another problem with simply doing
mozilla-xremote-client ... || <libdir>/thunderbird/thunderbird
is that if you pass "xfeDoCommand(OpenInbox)" when firefox (firebird) is running
and thunderbird isnt't, an alert saying that "/content/messenger.xul" is
displayed and mozilla-xremote-client will return *without error* (exit status 0,
no message given.) Obviously, I'd rather have firefox ignore the request and
mozilla-xremote-client return with error.
"xfeDoCommand(OpenInbox)" is how I usually open the mailer window with plain,
old Mozilla. When thunderbird receives this command, its window will be raised,
which is exactly what I want.
As for the LOGNAME hack, has anyone verified that this doesn't have any nasty
side effects? I mean, if the app ever uses the login name from this variable for
other purposes, you may get unexpected results.
Also, I'm currently using a different workaround, which is simply to replace the
usual
$MOZILLA_FIVE_HOME/$MOZILLA_EX -remote "ping()"
in my startup script (a standard(ish) wrapper found somewhere on the net) with
ps -u $USER | grep ${MOZILLA_EX}-bin
This won't work correctly when using a remote display, though (so I'm wondering
if the LOGNAME hack would be better.)
Comment 8•21 years ago
|
||
Using firefox 0.8 on Linux,
firefox -remote "ping()" gives an exitcode of 2 no matter if an instance is
running or not.
Can it be that some fix broke it?
Comment 9•21 years ago
|
||
Does not happen for me.
/usr/lib/firefox/firefox -remote "ping()"
returns 0 when firefox is running and/or thunderbird is, 2 when neither are.
Are you sure you didn't get tricked e.g. by the startup wrapper hack described
above?
Comment 10•21 years ago
|
||
not going to block 0.9 for this, I think we may have this fixed in another bug
anyway.
cc-ing blizzard since he's pretty much the xremote guru and I think he's fixed
-remote to distinguish apps properly as of now.
Flags: blocking0.9? → blocking0.9-
QA Contact: mconnor
Updated•21 years ago
|
Flags: blocking1.0?
Comment 11•21 years ago
|
||
Yeah, this should be fixed now.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 12•20 years ago
|
||
Has this been fixed on the aviary branch or just the trunk?
Comment 13•20 years ago
|
||
no patch, not gonna block. need more info.
Flags: blocking-aviary1.0? → blocking-aviary1.0-
Comment 14•20 years ago
|
||
this should be fixed on branch, if you use the "-a firefox" arg to ensure you're
pinging the right mozilla app.
You need to log in
before you can comment on or make changes to this bug.
Description
•