Bug 446199 - kstart5 ignores --desktop option
Summary: kstart5 ignores --desktop option
Status: CONFIRMED
Alias: None
Product: kde-cli-tools
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.5
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-28 13:50 UTC by oscar.0
Modified: 2023-09-25 13:05 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description oscar.0 2021-11-28 13:50:04 UTC
SUMMARY
kstart5 ignores --desktop option

STEPS TO REPRODUCE
1. configure workspace to have have several virtual desktops
2. switch to some desktop other than 1
3. kstart5 --desktop 1 --windowclass kmail2 --application org.kde.kmail2 

OBSERVED RESULT
kmail opens on current desktop

EXPECTED RESULT
kmail opens on desktop 1

SOFTWARE/OS VERSIONS
Linux: 5.15.5.arch1-1
KDE Plasma Version: 5.23.3-1
KDE Frameworks Version: 5.88.0-1
Qt Version: 5.15.2+kde+r260-1
Comment 1 Dave D. 2022-02-15 15:31:02 UTC
Still shows in 5.23.5.  Looking at the source (Fedora 35, source RPM, kde-cli-tools-5.23.5-1.fc35), the line that sends the message fails:

     KXMessages::broadcastMessage("_KDE_NET_WM_TEMPORARY_RULES", message, -1);

Message being sent:

    types=33
    desktop=2
    desktoprule=3
Comment 2 Dave D. 2022-02-15 16:20:17 UTC
Forgot to mention:  using X11, same behaviour in Wayland but signal/slot architecture:

        connect(KWindowSystem::self(), &KWindowSystem::windowAdded, this, &KStart::windowAdded);

but KStart::windowAdded(WId w) is never called.
Comment 3 witchhunter 2022-04-15 13:05:12 UTC
The command is also ignoring '--alldesktops' argument.

KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.3
Graphics Platform: X11
Comment 4 tobias 2023-02-19 19:29:35 UTC
Bug still present.
Comment 5 S. Christian Collins 2023-03-23 15:32:12 UTC
Until it's fixed, does anybody know a workaround for this bug?
Comment 6 Erwan David 2023-03-23 16:58:13 UTC
(In reply to S. Christian Collins from comment #5)
> Until it's fixed, does anybody know a workaround for this bug?

I just use a & after the kstart5 command in my scripts. It lets the kstart process running, but otherwise it works.
Comment 7 Erwan David 2023-03-23 17:00:10 UTC
(In reply to Erwan David from comment #6)
> (In reply to S. Christian Collins from comment #5)
> > Until it's fixed, does anybody know a workaround for this bug?
> 
> I just use a & after the kstart5 command in my scripts. It lets the kstart
> process running, but otherwise it works.

Sorry I answered for the wrong bug...

For this one, I use wmctrl after kstart. The touchy part is that you must wait long enough for the window to have appeared
Comment 8 S. Christian Collins 2023-03-28 14:29:27 UTC
Thanks Erwan, I was able to make this work with wmctrl. However, it only works when using xorg. Does anybody know a workaround that works in Wayland?
Comment 9 Amand Tihon 2023-07-15 09:27:34 UTC
I don't know if this is the same bug or not, but the --alldesktops option seems to be ignored as well.

OS: Debian Bookworm
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-10-amd64
Graphics Platform: X11
Comment 10 Erwan David 2023-09-25 13:05:35 UTC
Bug is still present. I use wmctrl as a workaround on X11, but there is no equivalent tool on wayland. This makes wayland a very painful option for me so I'll stay with X11

Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Kernel Version: 6.5.0-1-amd64 (64-bit)
Graphics Platform: X11