ChaniBlog











{February 20, 2010}   the limits of virtual desktops

so… we’re going to be talking about activity stuff at tokamak this week. there’s a lot of things that aren’t final yet… but… one thing that’s pretty much settled is that the activity/context stuff is going to be separate from virtual desktops. regardless of whether we *should* do such a thing, it’s not possible to do it properly anyways. I’ve been asked about this a few times so I’m going to explain the whole thing in excruciating detail so that I never have to explain it again. :)

virtual desktops are a useful feature. they’re nice. I use them lots. however, they have their limitations. some of these could *maybe* be overcome; some not.

1) you can only remove the *last* desktop.
the way the spec works, you aren’t really removing a desktop, you’re reducing the number of desktops. perhaps you could hack around this by shuffling all windows from higher desktops over one and renaming all those desktops and then removing the last one. it’d be icky, though, maybe slow, and probably prone to glitches.

2) adding a desktop messes up their spatial layout.
if I have six virtual desktops in two rows, then desktops 3 and 6 are adjacent. so are 4 and 5. but when I add a seventh desktop, suddenly 3 and 4 are adjacent, but 3 and 6 are further apart, and so are 4 and 5. this is really annoying if you like to organize pairs of desktops (one for code, one for documentation). I’m not sure what could be done about that; you can’t just swap two desktops around (although perhaps you could implement a hack like in (1))

3) a window is either on one desktop, or all of them.
you can’t have a window on *two* virtual desktops. maybe you could lie to the window, tell it it’s on all desktops then just not show it on the desktops it’s not really on? but lying to the windows doesn’t feel like a great idea, and I don’t know what sorts of strange assumptions applications might make…

4) compositing exposes lies.
imagine that kmail has the ability to only show mail folders related to your current activity. now imagine the desktop cube showing kmail on two desktops at once. kmail doesn’t know you’re using a compositing effect; it’ll display as if it were in the current activity, both times.
we had this problem with the taskbar, and got a bazillion complaints. we ended up removing panels from such effects to hide the issue. but we can’t do that with apps.

So, there are four main problems; three could perhaps be hacked around, but the fouth isn’t really solvable. and I don’t know what other strange assumptions apps may make about virtual desktops.

There’s also the fact that the spatial organization of the desktops often clashes with contextual stuff. I use kmail for pretty much every sort of activity, but I don’t want it on all desktops; I have it on a separate desktop I set aside for that sort of global stuff. Forcing those together would suck. and there’s lots of people who do stuff like putting documentation on one desktop and code on another – those are part of the same activity, just spread over more space.

We’re most likely going to continue offering the PVDA option, so I guess you’d be able to continue making it look like your activities and virtual desktops are one… but the more contextual features are implemented, the more awkward that’s going to get.



Tom says:

OK …

so activities and VDs won’t be joined.
I can live with that as long the UI for adding and switching activities becomes a lot simpler and faster.

This unlock – add/remove – lock routine is really not elegant and quite cumbersome.



Supreme1012 says:

So will activities have the same functionality as virtual desktops? eg; having different wallpapers, different plasmoids, etc.? As well as having lists of applications for that activity. Because if so, I dont even see why virtual desktops would be needed anymore. Your biggest blowback from all of this will be from people who just want it to stay the way it is. But if you can make switching of activities as fast as switching desktops currently is (maybe release an “Activity Switcher” plasmoid that switches with just one click) than people will have little to complain about and the saving of applications will be a huge hit Im sure. I personally cant wait until the new Activities framework is working. Good luck and thanks for all of your hard work!



Supreme1012 says:

And as a side note; have you guys thought about pushing Activities even further by making it possible to have different plasma themes and appearance setups on different activities?



jospoortvliet says:

@supreme1012: pretty much everything you suggest has been possible at least since SC 4.3, and for sure in 4.4. Activities can be switched by a plasmoid since SC 4.1, activities have different plasma widgets & background (that’s what an activity currently IS: a different plasma desktop), they can be coupled with virtual desktops so each virtual desktop has a different plasma desktop layout.



Steve says:

About spatial layout: I used to have mine laid out vertically before horizontally (can’t remember of that was an earlier KDE or CDE or even VUE). Appending a new desktop would not alter the spatial layout, although changing the number of rows would. It would be nice to have an option to change that from the current horizontal-first layout.

Steve



In most tiling WM it’s possible to assign a window to several “tags” — which is basically a virtual desktop on a tiling WM.

Sometimes I do miss this in KWin, but not very often, to be honest.



illissius says:

Yeah, there’s probably a good reason why this is a bad idea, but if virtual desktops suck so much then maybe replacing them with equivalent-slash-better functionality outright should be given a closer look. You’ve very convincingly laid out why activities-unified-with-traditional-virtual-desktops really sucks. Given the degree of overlap in concept/functionality, and virtual desktops having already laid claim to the best available spatial metaphor, are you going to be able to make activities-orthogonal-to-and-complementing-traditional-virtual-desktops work in an intuitive way? Maybe you can. But if you can’t, then I think the activities-replacing-and-superseding-virtual-desktops direction would deserve more consideration.

One of the ramifications (just guessing) would probably be that you couldn’t use other window managers with KDE, or at least lose any integration with activities, but given that kwin is the best window manager anyways that doesn’t seem like a great loss. The other problematic point would (still guessing) be applications. How many applications have any explicit code to deal with virtual desktops at all? Of those, how many are there where it wouldn’t be sufficient to just tell them there’s only one virtual desktop and everything is on it? This would be more of an issue with non-KDE applications, for obvious reasons. But I can’t immediately think of any.



KenP says:

What we desperately need, IMO, is a good tutorial on setting up activities and configuring them. At least before they get ready in GNOME shell and KDE will, once again, lose the advantage of being the pioneer in new concepts!

Anyway, flames on other DE’s aside, a walkthrough on using activities from lay-person’s point of view will go a long way in adoption of activities.

Right now, I enable “separate activites on each desktop” etc but I don’t know a thing about how to use them and what exactly am I supposed to do with them :-)

I am on KDE 4.4 SC, btw.



Chani says:

umm.. well I did do a screencast last week. it was a bit fast maybe but it shows how to switch between them and create them n’stuff.



Will Stephenson says:

If reconciling virtual desktops and semantic activities is so hard, it’s a good job the Plasma people and the KWin people are all in the same room this week :D.



HmpfCBR says:

There have been some comments here, which mention how hard it is to switch activities. Well imo it is not. Apart from the ZUI there are several other ways:

1) Activity Bar Widget
2) Keyboard Shortcuts
3) Mouse Actions
All three options can be added / configured via the cashew.

On another note, is it planned to provide a configurable spatial layout to activities?

Will there be virtual desktops per activity?



Chani says:

activities will not be spatial. they’ll have to be presented in a UI somehow, though, and I do hope that’ll let me set the order somehow. :)

you will definitely be able to have >1 virtual desktop per activity (many of us need this :)



HmpfCBR says:

Sounds great. Thanks for the information and happy hacking. :)



iain says:

“3) a window is either on one desktop, or all of them.
you can’t have a window on *two* virtual desktops. maybe you could lie to the window, tell it it’s on all desktops then just not show it on the desktops it’s not really on? but lying to the windows doesn’t feel like a great idea, and I don’t know what sorts of strange assumptions applications might make…”

Nonsense. Virtual desktops are a purely window manager construct, and the windows know nothing about where they are. A window manager has a list of windows, and when a virtual desktop is changed the window manager goes through that list hiding the ones that are not on the new desktop, and showing the ones that are. There’s nothing techical stopping the window manager having a window shown on 2 desktops and hidden on the rest.

The tricky bits are whether or not it is a good idea, and if it is, how you would expose this functionality to the user in a good way.



Wolfgang says:

Hi,

I am using 2 monitors with different resolutions. I have never managed to use more than one activity without messung up my desktop.

Will there some changes in towards handling more then 1 monitor in a sensible way?

Thank you, Wolfgang



DanaKil says:

I’m pretty sure my question have already an answer somewhere but I can’t find it…

Why can’t one have per-activity panels ? I love to embed my plasmoids in panels and the content, number and size of these panels may greatly varies between the context (I’m not a fan of the dashboard) :
ie, in my work activity, I want to have a really small taskbar at the top with just a few widgets like a color piper and no distracting Akregator in the systray.
In my free-time activity, I’d love to have a fancy task manager and several panels with all kind of widgets…

Is there a technical reason for this choice ? Can somebody answer me please ? :-)

(this is not a criticism, many thanks for all your hard work !)



Chani says:

perhaps because nobody’s implemented it. :)
but we’re going to be able to associate windows with activities, and technically panels are windows too, so… maaaybe it might happen. we’ll see.



Anne Wilson says:

My interest is similar to Supreme1012’s. I use the Activity Switcher Bar, so that’s easy, but I really would love to be able to tie applications to an activity. To be able to have on one activity only the plasmoids I want to see (yes, I know I already have this) in conjunction with the application(s) needed for the job would be absolutely wonderful. I suspect, though, that the panel limitations might mean that I still see launchers for the applications on the other activities.



jospoortvliet says:

You can get real close to this with activities coupled with virtual desktops… It does not allow for 2 activities on one virtual desktop or the other way around but it’s close :D



Ian Monroe says:

Okay so this is why you can’t implement activities with virtual desktops.

I’m completely unconvinced that you still need virtual desktops with well functioning activities. Though maybe that’s because I run at 3200×1080. :) Anyways I’ll turn off virtual desktops for sure.

I look forward to using activities, especially the part where applications can adapt to the current activity. It would help be a lot if Quassel hide all the non-work IRC channels when I’m working. And I could imagine fun stuff with an activity-enabled browser.



“1) you can only remove the *last* desktop.”
As long as the desktop has no exclusive windows, it should be possible to remove it.

“2) adding a desktop messes up their spatial layout.”
Disassociate the need to have them spatially together. I run separate sets of my virtual desktops for each of my monitors. However, the sets have no explicit order or arrangement at all. I could name/tag the desktops, but I prefer not to, rather just swapping or merging their contents sometimes. They are numbered simply incrementally otherwise. The Nth desktop that exists. Do look at the desktop tagging support in AwesomeWM’s shifty module too.

“3) a window is either on one desktop, or all of them.”
Umm, no. WM limitation here, as noted before. I’ve got some windows (that happen to be widgets or background data) that I have on a subset of my VDs, but not all.



[…] the limits of virtual desktops so… we’re going to be talking about activity stuff at tokamak this week. there’s a lot of things that aren’t final yet… but… one thing that’s pretty much settled is that the activity/context stuff is going to be separate from virtual desktops. regardless of whether we *should* do such a thing, it’s not possible to do it properly anyways. I’ve been asked about this a few times so I’m going to explain the whole thing in excruciating detail so that I never have to explain it again. […]



Comments are closed.

et cetera
%d bloggers like this: