Bug 1650667 - firefox --new-window does not open a new window if firefox is already running
Summary: firefox --new-window does not open a new window if firefox is already running
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 29
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-16 19:09 UTC by Bryan Ischo
Modified: 2018-11-29 09:20 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-29 09:20:45 UTC


Attachments (Terms of Use)

Description Bryan Ischo 2018-11-16 19:09:04 UTC
Description of problem:

firefox --new-window does not open a new window if firefox is already running.
Instead, it gives an error dialog "Firefox is already running, but is not responding.  To open a new window, you must first close the existing Firefox process, or restart your system".

Version-Release number of selected component (if applicable):

63.0.1

How reproducible:

100%

Steps to Reproduce:
1. Run firefox
2. Try to open a new window by running firefox --new-window
3. Observe error dialog instead of new window

Actual results:

Error dialog.


Expected results:

New window.


Additional info:

This is a regression in the Fedora version of firefox.  I am running Fedora Firefox v63.0.1 and experience this problem.  If I download the 'stock' Firefox v63.0.1 from mozilla, this problem does not exist -- I am able to use firefox --new-window to open a new window on a running instance of firefox without problems.

Comment 1 Bryan Ischo 2018-11-16 19:52:23 UTC
Just to give some idea why a user would care about this feature ... I have bound Alt-F1 keypress in my window manager to execute 'firefox --new-window', so that I can press Alt-F1 at any time to bring up a new firefox window.  I have found this a very convenient way to open a new firefox window for those many, many times a day when I need to do some new task in a browser window, and it's become part of my muscle memory.  I hit Alt-F1 all the time and it's so ingrained in my work process that it's very jarring now that when I hit Alt-F1 all I get is an error dialog.  Sadness.

Comment 2 Bryan Ischo 2018-11-27 23:56:01 UTC
A new development: I just updated thunderbird via dnf update, and now thunderbird has the exact same problem.  I do not know exactly what version of thunderbird I had previous to the one that was just installed, but I do know that I did a net install of Fedora 29 and probably didn't update thunderbird until now, so the difference is probably somewhere between the net install image of Fedora 29 and the 60.3.1 version of thunderbird.

Is anyone from Fedora tracking this issue?  Any thoughts?  Thank you!

Comment 3 Martin Stransky 2018-11-28 07:36:56 UTC
I see. 

Do you have DBus service enabled and running? Because Fedora Firefox uses DBus to open a new Firefox instance but Mozilla uses XRemote.

You can also inspect that Firefox is active at DBus by d-feet, look at Session Bus and org.mozilla.firefox.* (or org.mozilla.thunderbird.* for Thunderbird).

Comment 4 Bryan Ischo 2018-11-28 18:08:44 UTC
Thank you for your response Martin.  Yes, I believe I am running dbus:

$ ps auxc | grep dbus
dbus       1229  0.0  0.0  41788  5000 ?        Ssl  Nov15   0:44 dbus-daemon
bji        1547  0.0  0.0  34756   756 ?        Ssl  Nov15   0:01 dbus-daemon
bji        6120  0.0  0.0  34432   492 ?        Sl   Nov15   0:00 dbus-daemon
bji       20413  0.0  0.0 236524  7488 ?        Sl   Nov27   0:00 flatpak-dbus-pr
bji       47193  0.0  0.0 236520  7364 ?        Sl   Nov27   0:00 flatpak-dbus-pr
bji       72397  0.0  0.0 236520  7320 ?        Sl   Nov26   0:00 flatpak-dbus-pr

$ systemctl status dbus
● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/usr/lib/systemd/system/dbus.service; static; vendor preset: disabled)
   Active: active (running) since Fri 2018-11-16 00:19:36 PST; 1 weeks 5 days ago
     Docs: man:dbus-daemon(1)
 Main PID: 1229 (dbus-daemon)
    Tasks: 2 (limit: 19660)
   Memory: 20.2M
   CGroup: /system.slice/dbus.service
           └─1229 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only

Nov 27 15:45:56 localhost.localdomain dbus-daemon[1229]: [system] Reloaded configuration
Nov 27 15:45:56 localhost.localdomain dbus-daemon[1229]: [system] Reloaded configuration
Nov 27 16:18:34 localhost.localdomain dbus-daemon[1229]: [system] Activating service name='org.freedesktop.problems' requested by ':1.4175' (uid=0 pid=19023 comm="/usr/bin/python3 /usr/bin/abrt-action-notify -d /v" label="system_u:system_r:abrt_t:s0-s0:c0.c1023") (using servicehelper)
Nov 27 16:18:34 localhost.localdomain dbus-daemon[1229]: [system] Activated service 'org.freedesktop.problems' failed: Failed to execute program org.freedesktop.problems: Permission denied
Nov 27 16:18:34 localhost.localdomain dbus-daemon[1229]: [system] Activating service name='org.freedesktop.problems' requested by ':1.4175' (uid=0 pid=19023 comm="/usr/bin/python3 /usr/bin/abrt-action-notify -d /v" label="system_u:system_r:abrt_t:s0-s0:c0.c1023") (using servicehelper)
Nov 27 16:18:34 localhost.localdomain dbus-daemon[1229]: [system] Activated service 'org.freedesktop.problems' failed: Failed to execute program org.freedesktop.problems: Permission denied
Nov 27 19:40:32 localhost.localdomain dbus-daemon[1229]: [system] Activating service name='org.freedesktop.problems' requested by ':1.4318' (uid=0 pid=44380 comm="/usr/bin/python3 /usr/bin/abrt-action-notify -d /v" label="system_u:system_r:abrt_t:s0-s0:c0.c1023") (using servicehelper)
Nov 27 19:40:32 localhost.localdomain dbus-daemon[1229]: [system] Activated service 'org.freedesktop.problems' failed: Failed to execute program org.freedesktop.problems: Permission denied
Nov 27 19:40:32 localhost.localdomain dbus-daemon[1229]: [system] Activating service name='org.freedesktop.problems' requested by ':1.4318' (uid=0 pid=44380 comm="/usr/bin/python3 /usr/bin/abrt-action-notify -d /v" label="system_u:system_r:abrt_t:s0-s0:c0.c1023") (using servicehelper)
Nov 27 19:40:32 localhost.localdomain dbus-daemon[1229]: [system] Activated service 'org.freedesktop.problems' failed: Failed to execute program org.freedesktop.problems: Permission denied


Is there some way that I can debug the dbus messages to see what is causing this?

Comment 5 Bryan Ischo 2018-11-28 18:16:44 UTC
Hm, I did not understand your comment about d-feet previously but I see this is a d-bus inspection tool.

I have run it, but I cannot select the session bus.  When I try to, I get a message on the terminal:

"g-io-error-quark: Could not connect: No such file or directory (1)"

After more reading I see that I can use dbus-launch to launch a "session bus", I assume this is some per-user bus.  This may not be happening for me because I still use twm (don't ask) with my own custom .xinitrc and do not avail myself of whatever standard X session startup scripting is a part of Fedora.

I have launched session bus, and exported the DBUS_SESSION_BUS_ADDRESS variable that dbus-launch printed out; and from that shell I can run d-feet and now I see a session bus.  But I still cannot use firefox --new-window.  Perhaps I need to also start Firefox with this variable set?

Comment 6 Bryan Ischo 2018-11-28 18:22:26 UTC
OK I was able to fix this for myself.  I found this in /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh:

eval `dbus-launch --sh-syntax --exit-with-session`

I added that to the front of my own .xinitrc and restarted X, and now the problem has gone away.

Not sure that I would call this a bug.  Certainly Fedora is set up so that the xinitrc stuff in /etc/X11/xinit/xinitrc.d is expected to be run, and it's my fault that I am not running those.  I've been using my same X configuration since 1992 (more or less) and so from time to time the world moves beyond me and I have to catch up ...

Thank you again for your help.  You can feel free to resolve this as WORKSFORME or however you handle this sort of bug at Fedora.  Best wishes.

Comment 7 Martin Stransky 2018-11-29 09:20:45 UTC
Thanks, I'm glad it works for you now. The DBus is pretty much expected to be present and running so closing.


Note You need to log in before you can comment on or make changes to this bug.