News for hackers. Stuff that matters.
Re:Why do people seem to prefer Chrome's devtools over Firef... by JonathanBeuys on Sunday August 20, 2023 @09:21AM (#37198877)
For some reason, new Firefox windows can only be launched from the same environment from which the first window has been started. Even the same user who started FF cannot launch a new window from a new shell. That constantly interferes with my workflow.

Example: Say firefox has been started from the Destop already and now I want to start a new Firefox window from a root terminal:

    su desktopuser firefox
It does not work. It gives me "Firefox is already running, but is not responding.".
Re:Why do people seem to prefer Chrome's devtools over Firef... by vagbesfen on Sunday August 20, 2023 @09:24AM (#37198906)
Use --new-instance.
Re:Why do people seem to prefer Chrome's devtools over Firef... by JonathanBeuys on Sunday August 20, 2023 @09:26AM (#37198923)
Gives me the exact same behavior:

    Firefox is already running, but is not responding.
Have you tried it?
Re:Why do people seem to prefer Chrome's devtools over Firef... by lightlyused on Sunday August 20, 2023 @10:22AM (#37199416)
Perhaps you need a different profile? (Not tested)
Re:Why do people seem to prefer Chrome's devtools over Firef... by megous on Sunday August 20, 2023 @09:53AM (#37199154)
Yeah, same here. Worked fine in the past.

https://megous.com/dl/tmp/b82a40ffb92bb11b.png

Console says:

    [GFX1-]: glxtest: ManageChildProcess failed
    [GFX1-]: glxtest: libEGL initialize failed
    [GFX1-]: glxtest: X error, error_code=2, request_code=152, minor_code=3
Re:Why do people seem to prefer Chrome's devtools over Firef... by Lapha on Sunday August 20, 2023 @10:08AM (#37199299)
I don't mean this as a dig, but I am curious to know what your use case is for launching new browser windows from different environments is. Something along the lines of remote debugging?
Re:Why do people seem to prefer Chrome's devtools over Firef... by JonathanBeuys on Sunday August 20, 2023 @10:26AM (#37199459)
Just my command line tool telling me "Now look at the following page" and open a browser window with a url.
Re:Why do people seem to prefer Chrome's devtools over Firef... by ysavir on Sunday August 20, 2023 @10:59AM (#37199807)
I'm not the GP, but for me it was an issue while wanting FF open for regular use and debugging, and another to run for automated feature tests.

It's been a few years since I've tried, so I might be forgetting the exact circumstance, but there was some issue like that.

Re:Why do people seem to prefer Chrome's devtools over Firef... by johnchristopher on Sunday August 20, 2023 @10:18AM (#37199367)
I think that would mess up your user profile if two instances tried to handle it at the same time.

Depending on your use case Docker may be a solution.

Re:Why do people seem to prefer Chrome's devtools over Firef... by JonathanBeuys on Sunday August 20, 2023 @10:24AM (#37199445)
I don't want "two instances".

I just want to trigger Firefox to open a new window. Just like it does when I press CTRL+n.

Re:Why do people seem to prefer Chrome's devtools over Firef... by johnchristopher on Sunday August 20, 2023 @10:44AM (#37199627)
Ah, I see now. Try: Try sudo -i -u $user firefox or sudo -E -u $user firefox ?
Re:Why do people seem to prefer Chrome's devtools over Firef... by JonathanBeuys on Sunday August 20, 2023 @10:58AM (#37199788)
Both don't work. Why don't you try before you post?
Re:Why do people seem to prefer Chrome's devtools over Firef... by johnchristopher on Sunday August 20, 2023 @11:21AM (#37199996)
I am working from memory, on my smartphone in public transit in a heatwave.

I'd sacrifice some karma but I am hesitant so go see yourself out and off to https://stackoverflow.com instead.

Re:Why do people seem to prefer Chrome's devtools over Firef... by Izkata on Sunday August 20, 2023 @04:44PM (#37202783)
It works if you use -E both when leaving the user environment and when reentering it. There's something in the environment variables that needs to be set for the new firefox instance to communicate with the old one to pass along the new window command, and using -E both times carries it along.

Also ssh is somehow able to load this from somewhere without carrying it along. You can "ssh desktopuser@localhost" to restore it, though this does mean you need to set "DISPLAY=:0" manually.

Re:Why do people seem to prefer Chrome's devtools over Firef... by rascul on Sunday August 20, 2023 @10:22AM (#37199424)
This does it for me:

    firefox --new-window google.com
Re:Why do people seem to prefer Chrome's devtools over Firef... by JonathanBeuys on Sunday August 20, 2023 @10:27AM (#37199477)
No, that does not work from a different environment.

You probably inherited the environment from the process that started FF.

How did you try to do it from a new environment?

Re:Why do people seem to prefer Chrome's devtools over Firef... by rascul on Sunday August 20, 2023 @11:03AM (#37199841)
No it's from a new environment. I had to set DBUS_SESSION_BUS_ADDRESS and DISPLAY and also allow it with xhost then it worked fine. I don't know how to do that with wayland though.
Re:Why do people seem to prefer Chrome's devtools over Firef... by paulryanrogers on Sunday August 20, 2023 @10:48AM (#37199670)
You may need --no-remote and/or -P
Re:Why do people seem to prefer Chrome's devtools over Firef... by JonathanBeuys on Sunday August 20, 2023 @10:56AM (#37199764)
--no-remote seems to have no effect

-P asks me to select a profile. That's not what I want. I simply want a new Firefox window.

Re:Why do people seem to prefer Chrome's devtools over Firef... by paulryanrogers on Sunday August 20, 2023 @12:47PM (#37200798)
You may need to combine them like "Firefox --no-remote -P myotherprofile
Re:Why do people seem to prefer Chrome's devtools over Firef... by JonathanBeuys on Sunday August 20, 2023 @01:48PM (#37201356)
I don't have (nor want) another profile.

I just want Firefox to launch a new window. No matter if there already are Firefox windows active or not.

Chromium has no problem doing so. So that is the reason I use Chromium and not Firefox.

Re:Why do people seem to prefer Chrome's devtools over Firef... by paulryanrogers on Sunday August 20, 2023 @03:29PM (#37202215)
That does seem to be a quirk of Firefox profiles. You could workaround with a secondary profile that uses Firefox Sync to make them nearly equivalent.