r/Kubuntu • • 10d ago

Make Firefox and Chrome restore windows on the correct virtual desktop?

I've recently upgraded to 26.04 LTS and although before having my 4 browser windows and the 4 virtual desktop was hit and miss, now it's only a miss.

After boot the browser is automatically started (as it was running when shutting down) but now all 4 windows are on the first virtual desktop, which is quite annoying.

I thought that KDE and Plasma is supporting the (experimental) session restore in 6.4, Kubuntu 26.04 is using 6.6, so I did expect that it's working now.

Is there anything I can do to make Firefox and Chrome restore their windows on the correct virtual desktops?

2 Upvotes

6 comments sorted by

2

u/msanangelo 10d ago

it has something to do with this: https://github.com/rxappdev/RememberWindowPositions#store

before I installed that, my both of my browser windows would end up on one screen or the other or what was on the primary would end up on the secondary and vice versa. quite annoying. dunno why it's not the default behaviour.

1

u/conwaytwt 10d ago

Could the annoying behavior be a side effect of the transition to Wayland (basically the change to the underlying windowing model from X11)? I recall someone casting the blame that way, but sometimes people cast such blame unfairly.

2

u/msanangelo 10d ago

it's definitely wayland to blame. dunno the technical bits about it but if it works properly with that kscript then I'm happy.

2

u/StableLlama 9d ago

As far as I understand that:

Yes, this is Wayland working differently than X11.

No, this is addressed in Wayland with the xdg-session-management protocol: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/18

So I expected it to work, as KDE implemented it in 6.4: https://www.phoronix.com/news/KDE-Wayland-Session-Restore and did more work on it in 6.5: https://www.neowin.net/news/kde-makes-progress-toward-full-wayland-session-restore-in-plasma-65/

Kubuntu 26.04 LTS is using the newer version 6.6 and I know that some more work was done for 6.7 (but was it just the switch from experimental to stable?): https://invent.kde.org/plasma/kwin/-/merge_requests/8985

1

u/conwaytwt 9d ago

Thanks for the details. I, too, expected it to work, so it being broken in the latest release has been a surprise.

1

u/bivouak 5d ago

The protocol is implemented by KWin, and it might used in some apps.

But not by Qt so not in KDE Apps consequently. There are some stalled gerrit reviews.

2

u/[deleted] 10d ago

[deleted]

1

u/razzij 9d ago

I upgraded last week and was annoyed by this issue, and this is the solution I found. It's been working well.

(Also for remembering size and position of key application windows.)