Opening a pdf with Okular, and Okular is in another Virtual Desktop, then it's opened another Okular instance instead of open Okular with a new tab. It seems this happens because Okular doesn't take virtual Desktops and Activities into account. As a reference, this bug also happens with Dolphin but has already been fixed (X11): https://invent.kde.org/system/dolphin/-/merge_requests/529 Original thread (same bug in Dolphin): https://bugs.kde.org/show_bug.cgi?id=408919
Don't add random people to the CC list, that's quite rude. They may not be interested in this report.
(In reply to Christophe Marin from comment #1) > Don't add random people to the CC list, that's quite rude. They may not be > interested in this report. Sorry, my mistake, I thought I was right adding the people who were already in the Dolphin related bug.
Okular always either opens a new instance or a new tab, depending on your settings, regardless of desktops or activities. I'm not sure I understand how you want it to behave. Do you want it to open a new tab when it's on the current desktop and open a new instance otherwise?
(In reply to Nicolas Fella from comment #3) > Okular always either opens a new instance or a new tab, depending on your > settings, regardless of desktops or activities. > > I'm not sure I understand how you want it to behave. Do you want it to open > a new tab when it's on the current desktop and open a new instance otherwise? Apps Running Virtual Desktop 1: Dolphin Virtual Desktop 2: Okular Let's say that if I'm in VD1 and it's opened a pdf, shouldn't it be opened in a new tab in Okular, which is in VD2? Currently, what happens is that a new Okular is opened in VD1
Do you have the "Open new files in tabs" option enabled?
Yes, I have that option enabled and it works in the same Virtual Desktop (I just tried it out) However when Okular is on another virtual desktop it doesn't
Cannot reproduce on okular 24.12.1, wayland. The behavior is as Nicolas describes. Can you still reproduce on the latest release?
(In reply to fanzhuyifan from comment #7) > Cannot reproduce on okular 24.12.1, wayland. The behavior is as Nicolas > describes. Can you still reproduce on the latest release? I just tested it in Wayland and it's true, it works!! Where it doesn't work is in X11 (which I still use) I don't know if it is worth fixing it in X11. My idea is to switch to Wayland in 1 or 2 years when my laptop works fine on it.
I can confirm the bug with Okular 25.04.1 on Neon with X11.
I recently switched to Wayland, and in my opinion, Okular's behavior is far less logical than under X11. Let's say I have two virtual offices, “leisure” and “work”. I'm on the “leisure” desktop and open several PDFs, using the “Open files in new tab” option. I switch to the “work” desktop and open a PDF: it appears on the “leisure” desktop, which I don't have in front of me. On the “work” desktop, I can launch a new instance of okular (“okular &”). But when I then run “okular my_file.pdf”, the files continue to open on the “leisure” virtual desktop while the okular instance on the “work” desktop, which I have in front of me, remains empty. I find this exasperating. The problem could be solved by one of two things: (1) More precise settings: ☑ Open new files in tabs when Okular is running on the same virtual desktop ☐ Open new files in tabs regardless of the virtual desktop where Okular is already running (2) More precise flags: --open-in-instance XXX We could then use a script and wmctrl to choose which instance to open a file in.