switching desktop via qdbus doesn't work?

In KDE4 I have used one of the following commands to start an application, e.g. tvbrowser, on a specific desktop and switch to that desktop:

  1. qdbus org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop 5 && tvbrowser
  2. kstart --desktop 5 tvbrowser

Both commands do not work in Plasma5 anymore.

The qdbus command, used in the launcher copied from my KDE4 installation, doesn’t do anything. Invoking the command in yakuake it shows:

~$ qdbus org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop 5 Cannot find 'org.kde.KWin.setCurrentDesktop' in object /KWin at org.kde.kwin

The kstart command switches to desktop 5, starts tvbrowser (start screen appears), switches back to the desktop where I invoked the command/clicked on the icon and opens the tvbrowser window on that screen…

What has changed in Plasma 5 that those commands do not work anymore/do not work correctly? How do I start applications on other virtual desktops now?

The name of the qdbus service changed to org.kde.KWin
This command works for me:

qdbus org.kde.KWin /KWin org.kde.KWin.setCurrentDesktop 2 && kate

Small change, big confusion ;). Thanks for enlightenment!

It seems to be a little more complicated…

When I start a KDE application like e.g. kate this command works as expected, it switches to the given desktop and starts the application.

But when I use a non-KDE application like tvbrowser, gimp, cherrytree, it behaves different: invoking the full command from yakuake or krunner/Alt-F2 it indeed does work as expected. But when I use any kind of launcher (modified entry in kickoff menu, launcher in the panel, quickstart launcher, invoking the launcher via krunner/Alt-F2) for a non-KDE application together with kstart or qdbus the desktop switches, the application starts (splash for gimp or tvbrowser), switches back to the desktop on which I clicked the menu or launcher entry and then opens the window on that desktop…

So I guess I have to combine the command with a special window setting for opening the application on a certain desktop.

Edit: I don’t even need the qdbus command at all in that case, just the windows setting… The splash starts on the current screen but after that the desktop switches and the application window opens on the chosen desktop.

Edit2: Same for KDE4 applications like Amarok - desktop switches back to where the launcher was executed…