Announcement

Collapse
No announcement yet.

Open browser on different screens

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Open browser on different screens

    I hope to explain myself well

    I have two screens, and this "problem" I do not see how to solve it.
    There are two screens with different taskbars, but in both, the same browser launchers, if I click on a screen and then press Dolphin, it opens on that screen, if I click on the other screen and then on Dolphin, this opens on that other screen. That's perfect, just what I want.
    This is also the case with Firefox.

    But with other browsers (for example, Chrome, Edge, Vivaldi) it seems that they always open on the same screen, no matter where you click, before, for example, Chrome, I could open it on one screen, I would move it to the other , I closed it there, and the next time it opened to me on the screen that I had closed it. For a while (and without touching any configuration) it always opens to me on the same screen (and it is not the one that I have configured as the main one).

    I must say that the best integration is Firefox, I leave some tabs on one screen, other tabs on another screen, restart, when I return, the tabs appear on the screens that were, perfect.

    With the rest of browsers, it does not happen to me, if I restart, when restoring tabs, all on the same screen ...
    That could "sacrifice" it, but what really takes me on my head is that the browser or tab opens on the screen where I click.

    Is there a way to solve this or configure it?

    Thanks in advance.

    #2
    I would like to know the answer to this as well. On my system, applications seem to randomly decide which screen they want to open on and they don't even care if that monitor is powered off.

    Comment


      #3
      Chrome, and thus Chromium, Edge, and Brave and Vivaldi don't seem to follow the standards for this sort of thing. I don't think there is a reliable workaround, I definitely have not found one over the years.. Even setting custom window or application rules don't seem to hold if they even work.
      I use two monitors, but only one taskbar. I'd be happy if Chrome would open a login like everything else, or at least do so for my Activities when I turn them on.


      You might try looking at the window focus settings, in the Window Behavior section. The 'focus follows mouse' options *might* help. I will see if this is useful next time I am at my PC.

      Comment


        #4
        Apologies for the delay in answering, I had no email notification and for work, I had not accessed for a few days.


        Sure enough, the only browser that behaves the way I want is firefox, all the others don't (I guess / imagine it's plasma integration).


        The option of a single taskbar, for my way of working, is not valid for me, I like to have some things open on one screen and other things on the other screen, when minimizing, they would all go to the same taskbar.


        At the moment I see it complicated, although I have gotten used to it, and since I am one of those who suspend the pc and do not turn off ... I rarely restart.


        Although lately, I change something in the configuration that you indicate, and it seems that after restarting, it seems and I emphasize it seems, the browser instances are kept on the same screens.


        Of course, when opening a new instance I have observed that it opens in the last one I opened, to change where it opens, I open a browser instance, move it to the screen I want, and without maximizing (not minimized to the taskbar) I close , from that moment on, they open on that screen.


        Maybe it is a bit confusing to understand because of my bad English, I hope it can be of help or one day this works as we would like

        Comment


          #5
          There are some other interesting command line options to set a window for chrome, such as:

          --user-data-dir=XXXXXXXXXX --window-size=800,600 --window-position=580,240 --app="http://www.google.com/"

          You could try creating a menu entry using the above (edited to your preferences, obviously). You can have more than one menu entry per item so you could have 2 entries for Chrome with different names like "Chrome-left" and "Chrome-right"

          NOTE: I have not tested this so I suggest doing some research before attempting it.

          Please Read Me

          Comment


            #6
            Originally posted by oshunluvr View Post
            There are some other interesting command line options...

            --window-size=800,600 --window-position=580,240
            These work for me, using X11; I don't know about Wayland, but only for the first chrome window.

            Note that with X and screens arranged side by side positions are relative to the top-left corner of the leftmost screen, and extend across all the screens; so to get chrome on the second monitor, with the first 1920 pixels wide. I can use --window-position=1921,240, with the proviso that it won't open across the edge of a screen; the whole of it goes to the screen closest the centre.

            A second chrome invocation says "Opening in existing browser session." and opens exactly on top of the existing window. One can work around this as detailed on Ask Ubuntu by using --user-data-dir, but then you get a completely different, independent, chrome session. I suppose that might be good for some use cases.

            Another method with X is to use wmctrl, but timing might be tricky. For example:
            Code:
            google-chrome-stable --new-window 'https://en.wikipedia.org/wiki/Main_Page' &
            sleep 0.8
            wmctrl -r 'Wikipedia' -e 0,1920,0,1000,800
            opens and is moved to my second monitor, even if there's chrome already open. (If I make the sleep 0.5, it doesn't work, wmctrl tries too soon.)
            Regards, John Little

            Comment

            Working...
            X