How do i make activitiy switching keep the same virtual desktop?

back in plasma 5, this used to be the default behavior.
but now, it seems to keep a different virtual desktop selected per activity. for my use case this is very undesirable.

IE, if i am on virtual desktop 1 on activity A, if i switch to activity B i should remain on virtual desktop 1 rather than whatever i was last on in activity B

according the the help page, an option apparently exists. but i can find no such thing in the settings anywhere.

it would be greatly appreciated if someone could tell me where this setting actually resides!

The configuration setting to not remember virtual desktops was removed from the UI during the port of the configuration panel to QML. The comment says:

UI Changes:

  • Remove the VirtualDesktop switching setting, which was already
    getting dropped from KActivitiesManagerD.

The original “remember virtual desktop” function was created in 2012 without a configuration option - it was “the right thing”. The functionality was a bit later moved to a plugin and the configuration for that was simply enabling or disabling the plugin - the UI was just triggering that configuration.

As part of Plasma 6, and the change of the configuration panel to use the D-Bus API instead of directly updating configuration file (which was the reason the old setting required a restart - to re-read the configuration file), that configuration option was no longer exposed.

But the option is still in the configuration file, and you can go and change it yourself - this is one of those rare “we don’t think showing the configuration option makes sense, but we won’t remove the functionality” things that sometimes happen even in KDE.

To disable the “virtual desktop switching” Activity Manager plugin, open the file ~/.config/kactivitymanagerdrc in a text editor, locate the line that has

[Plugins]
org.kde.ActivityManager.VirtualDesktopSwitchEnabled=true

Change the word true to false, save, log out and log in again.

1 Like

no such line exists in my config file (plugins category also did not exist in my config file). i will attempt adding the lines anyways… here goes!

unfortunately, no dice. that did not do anything.

I can confirm that this fix doesn’t work for me. My kactivitymanagerdrc file was empty, adding these lines and changing it to false had no effect. On Kubuntu 24.10, Plasma 6.1.5, Frameworks 6.6.0, Qt 6.6.2

I checked that updating kactivitymanagerdrc worked for me - quite a while ago, and from looking at the source code for Plasma 5, by 5.27 the code that consults that configuration no longer exists.

According to the comments in bug 482892 – Feature request: allow disabling "remember virtual desktop separately for each activity" you can just remove the plugin file (/usr/lib/x86_64-linux-gnu/qt6/plugins/kactivitymanagerd1/org.kde.ActivityManager.VirtualDesktopSwitch.so on Neon) and that would also prevent the the switching of virtual desktop on activity switch.

1 Like