3 ms·
To make this work you need to set the XDG_RUNTIME_DIR environment variable to the same value it has in the environment Firefox is running in. For example:
by jorams 3y ago
To make this work you need to set the XDG_RUNTIME_DIR environment variable to the same value it has in the environment Firefox is running in. For example:
sudo -u desktopuser XDG_RUNTIME_DIR=/run/user/1000 firefox --new-window
- JonathanBeuys 3y agoPlease try this for yourself. It does not work. Gives the same "Firefox is already running, but is not responding." dialog.
- jorams 3y agoI did try it. It even works from a different VT directly logged in as root if I also specify DISPLAY: sudo -u desktopuser XDG_RUNTIME_DIR=/run/user/1000 DISPLAY=:0.0 firefox --new-window If I now switch back to the VT running my desktop, a new Firefox window has opened. Maybe your root terminal has other environment variables set that break it? A different DBUS session maybe?
- JonathanBeuys 3y agoOh wow, you were right! This solves it: sudo -u desktopuser XDG_RUNTIME_DIR=/run/user/1000 firefox Sorry for messing it up the first time I tried! Man, you solved it!! Thanks a 1000 times!
- jorams 3y agoNo problem! Glad it works now.