Ask Slashdot: How Do You Organize Your Virtual Desktops?
hyphenistic writes: As a programmer I find myself switching between multiple projects on a daily basis. Virtual desktops have been a big help in grouping my related programs together. I try to have a virtual desktop open for each project I'm working on. Although I've used Linux in the past my currently preferred desktop OS is Windows 10. For the most part I have found the new virtual desktops to be easy to use. My primary issue (regardless of OS) is that I really don't want my virtual desktops to interact with each other. In the past I have accomplished this with a separate login for each project but that brings the hassle of managing multiple sets of OS and application preferences. Can someone suggest a better method for organizing my virtual desktops?
You are falling victim to a classic problem. You don't want to do the actual work, so instead you focus on instrumentation and environment. The fact that you are asking these questions is proof that the "virtual desktop" mania you have embarked on is more of a hindrance than a help.
I mean, procrastination is half the fun, but don't fool yourself.
"People are really this anal about window positions?"
But then I realized that I spend five minutes every Monday morning setting up my workspaces (I shut down my machine when I go home on Friday). I imagine that completely unproductive time only increases as a function of one's workload.
The easiest way to isolate virtual development environments is virtual machines. The same base image can be used for each environment and then a script to install project-specific applications and other resources.
If you stick with Windows, install Cygwin and tmux. tmux helps me cleanly separate my areas of concern. (I currently have 15 sessions open, all project-specific.) Even better? Add Emacs and learn to use it well. Start an emacs server and connect to it in tmux with emacsclient -nw.
When one gets so full I can't do the thing I need to do quickly, I move to the next one. I breathe. Then I do what I need to do.
The others do it too, they just won't admit to it.
Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
Windows has had the Desktops application and the PowerToys suite before that, which allowed for virtual desktops for decades now (since the NT 4.0 days.)
It is front and center in Windows 10, but it isn't really anything that wasn't able to be fetched before.
As for what I do, I use virtualization a lot, so instead of virtual desktops, I use the column selector to pick the VM I want to use, and go with that. Yes, there is definitely the performance hit (mainly I/O, which can be mitigated by a good amount of RAM and a SSD because multiple operating systems do lots of random reads/writes), but the advantage is separation and security. The VM holding Facebook, if that gets compromised, isn't going to affect the VM with Quicken/Quickbooks/TurboTax.
It's been a while since I used Linux as a work desktop, like nearly 10 years, but here's how I often did it:
One virtual desktop for the IDE/coding tools. That might be an actual IDE or maybe just a console with vim. Whatever the project was.
Another virtual desktop for database related stuff.
Another one dedicated to documentation, like just having the browser open to Javadocs, or Google, or whatever.
The fourth and final was for mudane stuff like email and/or an mp3 player running.
I never split them out by project. Even if you're only working on a project for an hour or so I don't see any benefit to keeping other stuff open. It'd be too easy for me to make a mistake and cross them. That might just be a "me" thing though.
One-third of the desktop goes on left monitor, one-third of the desktop goes on center monitor, and one-third of the desktop goes on the right monitor. If this is a Mac system, the right monitor would be rotated in portrait mode.
I use OS X, but I have great trouble using Mission Control's workspaces or desktops or whatever the fuck they're called. The whole setup is just so unintuitive, especially with multiple monitors.
I have years of experience with KDE and GNOME, so I understand how their virtual desktops work. Typically, it's all very sensible: you set the number of virtual desktops you want, each one spans all monitors, and you can rapidly switch between them using a dock control that shows the grid of virtual desktops. Running applications generally only appear on the desktop that was showing when launched, although they can be moved to a different virtual desktop, or even optionally shown on all of them. This approach is simple, comprehensible, and it works great!
The OS X approach is totally fucked up compared to that. There's no widget in the dock that shows the desktops that are available, so I lose track of how many there are and what's on them. I can press F3, but it wastes my time with stupid animations, and even then it isn't very clear which apps are on which desktop. By default it's like all apps are on all desktops or something like that! Of course that's fucking dumb, because it defeats the purpose of having running applications separated onto the different virtual desktops.
Does anyone know if there is anything like the sensible KDE and GNOME virtual desktops for OS X? All I want are separate desktops that are easily contextualized thanks to a widget in the dock, which also lets me switch between them instantaneously. And when I start an app, it only shows up on the desktop that I started it on, unless I explicitly tell it to move to a different desktop, or to show on all.
Why the fuck is OS X so goddamn backward?! Please, I beg of somebody to give me a better alternative for real virtual desktops on OS X!
First thing I do on any fresh install of Linux is to turn off virtual desktops. My experience has been that if I've got so much going on at once that it makes a single desktop instance seem too cluttered, that's a sign that I need to reconsider how I handle my time.
Having to close and reopen tools forces you to cut down on context switching. At least for me, that helps productivity.
Main task on the primary, secondary tools for the main task are on another, terminals/utilities in another (sometimes a couple), then low-importance things as far from me as necessary. Usually terminals/utilities are "left" and secondary tools are "right". Low importance things are the greatest difficulty to access as they are of low importance.
At least, that's how I've always done it with XFCE, fluxbox, and most other window managers I've used. Sadly, I suffer through using Win8 on most of my computers that aren't in VMs these days.
There's your problem. I have four (4) monitors on my desktop. No issues...
Karma: Bad
KDE has a solution called Activities.
You can set up a bunch of activities and assign individual windows to a particular activity.
When you swap activity you get the associated windows.
"The likes of Facebook and WhatsApp are free to those whose privacy is of zero value."
I guess I'll be "that guy". I've been using dwm for years and couldn't live without it. There are other options like awesomewm or i3. Your programs will automatically tile in a sane manner using up all the available screen space.
But, the really cool thing is that a window can exist in multiple "tags" which are kind of like "virtual desktops" but a lot more powerful.
I'd recommend at least trying out a tiling window manager and seeing what you think.
I use different workspaces for different applications. On top of that, I have different login accounts on the same computer for different activities - one for personal activities (banking, credit cards and bills) as well as emails to family, another for my job search related activities, one for entertainment videos and news, one for /., one for playing games and one for just admin work (for some reason, FreeBSD has disabled the ability to have a separate root account for just that). Within any session, I use a different workspace for each application that I run - FireFox in one workspace, Chromium in another, games in a third, and so on.
I use activities exclusively instead of virtual desktops. It works well and helps me keep focused. The other good thing about activities is you can stop and start them. when you start one it can spawn a lot of apps for you. I have a media activity that spawns my media locations, has amarok running all the time on it and shortcuts to various media apps on the desktop.
My programming activities have the env set for the project i am working on, spawns several consoles and loads up my coding playlist. Each has a different style, different set of widgets. all designed to keep me focussed.
Signature v3.0, now with 42% less memory usage.
I work on multiple projects as well and my VD layout has evolved over time and location. If I'm at home, I am hooked up to a single WUXGA display so everything is on one monitor and I use five virtual desktops for everything. In the office, I have two screens but I still use the same five VDs but in a different layout. When mobile, I use the same setup that I use at home. I have a Linux development environment on the main monitor (when I'm running multiple monitors). I will put different projects in different terminal windows. I have a Notes application that has pages for my projects so that I can quickly get back context when I'm moving from one project to another. My remaining VDs browser, email and short text notes and todo lists. I got to where I am by trying out different things and determining what works better (by finding the problems with other setups). Eventually you get to something that's optimal overall. Then you may have to tweak it for new tools or new features or new hardware. This overall approach seems pretty simple. I don't think that I'd set up a VD per project unless I needed multiple operating systems and then we'd have to play with VMs.
What do you mean "interact" in this context?
I use Linux, and I usually have a 2 monitor setup with 2x10 (i.e. 20) sized virtual desktop (and no disjoint ones---FVWM allows both modes you see). I tend to group stuff spatially with a blank desktop between projects.
As for interacting, most programs are OK, but ones like GIMP need to be told to run in a new instance if you want two instances open without them affecting one another. Quite a few programs can do this, but you'll need to investigate options.
One thing that I do find obnoxious is that many applications on Linux seem to forget $PWD, because apparently the last 50 years of OS developement are too old fashioned for the GNOME folks. So when you go into a project directory and start a new GIMP or inkscape or etc instance, it's file dialog defaults to the last place you were at, which is completely useless and a massive usability regression compared to old M*tif programs. Hell it's a regression compared to Xaw.
And if you've got a usability regression compared to Xaw, you have majorly fucked up in a quite impressive manner.
Well that went into a mildly off topic rant.
Back to the topic: you say your current preferred OS is Windows 10. Why? If you really want to tweak your GUI so it matches your preferred workplace for you, you're probably better off with Linux. There's a lot more options in terms of this sort of thing and much more room for customisation. But if you're stuck with some programs which only work on Windows, you're SOL unless you can restrict them to a VM.
SJW n. One who posts facts.
Somewhere at microsoft, there is a team of programmers learning by watching him type, keystroke-by-keystroke.
Multiple OS and application preferences .. what? Windows 10 has multiple desktop support. Even if he didn't mean that Windows 8+ have settings syncing (not necessarily going to save your bacon for apps but will at least for the OS itself). Some applications play nice with that model already. Ex. VS 2013: I use the same login at home and work so I get all my addons, font settings, etc synced over for me.
I'm not sure how desktops work in win 10 if apps "see" that they are already running or not. That was my problem with SysInternals desktop: Firefox open in one desktop would prevent it from opening in another and there's no way to move an app between the two. So I'd be coding and need a browser and need to go to my "communication" desktop close the browser back to my coding desktop and open it again etc. Or live with having to remember things going back and forth between screens. Mah. Wasn't worth it once I had more then one monitor to play with.
desktop 1 / screen 1: terminal
desktop 1 / screen 2 : IDE / text editor
desktop 2 / screen 1 : web browser
That's the global idea. Other apps usually start on desktop 1 / screen 1 and I move them around as needed.
On Windows, it's... a mess. It's basically all windows stacked on top of each other and a lot of alt+tabbing.
> Having to close and reopen tools forces you to cut down on context switching. At least for me, that helps productivity.
Good for you. For me, it guarantees that thoughts will be dropped before they can fully form, so it's deadly to productivity.
Maybe it's the fact that I don't always have control over context-switching. I don't control when somebody shows up in my face with a demand for attention; pushing what I've been doing aside, with all the contextual cues I can marshal, by switching to another desktop to bring up the tooling needed to service the interrupt, means a much greater chance that I can go back and resume what I was doing, without backtracking (or, worse, working through a context crash to retrace my own thinking up to where I left off).
The times when I do have control over context switching are often when vagrant thoughts coalesce suddenly into ideas which are potentially valuable but irrelevant to my current effort. I want those ideas securely noted somewhere appropriate (even if it's just in a loose-notes catcher) and dismissed quickly so I can resume the task I'm trying to keep my focus on. I keep text windows open on other desktops partly so I can bring up a notes editor for that. Sometimes those ideas need a quick look at my filesystem; I keep ytree poised in those text windows for that
Then there's the full-screen shuffle. I remember my Windows days, when I had to minimize and iconize and shuffle things out of the way to get a clear view of a browser or other Internet tool. These days, there's IM, an etherape viewport on my LAN, another browser pointed at intranet tools, and all of them maximized because bringing them up to full size takes too long when I need to respond to a situation. I couldn't do that on one desktop, in fact I use 8, and often fill them all (though some assignments, like 2 for synaptic, are reservations so my habits know where to put things so I don't need to consciously think about it).
Single desktop discipline works for you and your work habits. It's needless frustration for me and mine.
"As a programmer I find myself switching between multiple projects on a daily basis. Virtual desktops have been a big help in grouping my related programs together. I try to have a virtual desktop open for each project I'm working on. Although I've used Linux in the past my currently preferred desktop OS is Windows 10."
There was a feature in OS/2 where you could create a desktop folder and categorize it as a workspace. Anything you put in this folder would open when the folder was opened. From text files to applications. Somebody has to have replicated that functionality on an existing platform...
"A person is smart. People are dumb, panicky dangerous animals and you know it." - K
#!/usr/local/bin/bash # vdm - Virtual Desktop Management (using vdesk) by Root Sr # Do not use with window managers that already have virtual desktops! # Usage: simply bind this script in your window manager to a key/button # in the root window # This is the big idea: for every invocation, cycle through the # dynamically constructed set of all virtual desktops (vd's) that have # at least 1 window, plus one empty vd. # Read this until you understand this before reading further... # Set to "YES" to see what's happening (in .xsession-errors)
DEBUG="NO"
# Current virtual desktop (1-9, 0 contains any sticky windows)
cvd=`vdesk`
# Find highest virtual desktop. Don't start with 0 because the current
# vd will not been seen in the next loop if it has no windows. So start
# with the current vd.
hvd=$cvd
# Make array of virtual desktops and their windows.
# Don't use the obvious xlsclients! It gives the wrong level in the
# windows hierarchy. The next command should be tailored to your
# window manager. This is for twm. For Mwm it is different.
for w in `xwininfo -root -tree | sed -n 's/ \(0x[0-9a-f]*\) ".*/\1/p'`
do vd=`xprop -id $w -notype VDESK_DESKTOP | cut -b 19`
# If the vd is not found for a window, the window is new and hasn't been
# switched to or from. But we know that it's on the current desktop so
# we can set the vd explicitly.
[ "$vd" = "t" ] && {
vdesk $cvd $w
vd=$cvd
}
# Append the window to the list of windows on this vd
# or make it sticky if it's gkrellm or some clock
if xprop -id $w WM_CLASS | egrep -q 'Gkrellm|Clock'
then vdesk 0 $w
else wins[$vd]="${wins[$vd]} $w"
# Find the highest vd
[ $vd -gt $hvd ] && hvd=$vd
fi
done
# Count the number of empty vd's and show the content of nonempty vd's
# (if debugging)
evds=0
for (( i=1 ; i = hvd ; i++ ))
do if [ -z "${wins[$i]}" ]
then let evds++
else [ "$DEBUG" = "YES" ] && echo -n "vd${i}: ${wins[$i]}, "
fi
done
[ "$DEBUG" = "YES" ] && echo -n "evds=${evds}, hvd=${hvd}, "
# If there are no empty vd's, simply go to the next (possibly new and empty)
if [ $evds -eq 0 ]
then vdesk $(($cvd + 1))
# If the current vd is empty, search for a nonempty vd (if any!)
else i=$cvd
while [ -z "${wins[$i]}" ]
do i=$(($i % $hvd + 1))
[ $i -eq $cvd ] && break
done
[ $i -eq $cvd ] && i=$(($i % $hvd + 1))
vdesk $i
fi
[ "$DEBUG" = "YES" ] && echo now on `vdesk`
But it was fragile crap that seemed to fall over hourly. Matrox had a better implementation on MS and then Nvidia had one on MS, but they still fell a bit short of even twm and tended to stop working after updates.
When I was a developer 15 years ago I used gnome's virtual desktop with a 2x3 grid. Didn't have (m)any issues with cross contanimation. Mouse edge for .2 seconds for transition as well as hot keys. Today as an admin I use remote login to a server, same user account (hence same prefs) with multiple concurrent sessions. When a new problem interrupts my current tasks I open a new session.
I've been using JS Pager Virtual Desktop since the 1990's. It's a lightweight app which leverages existing windows capabilities to provide multiple "panes" in a grid. There's no support, but it has been working through multiple versions of Windows from 98 through 7.
I find virtual desktops helpful when working on a large single project which requires many files, webpages and applications to contribute to the final result.
For example, if I'm creating a scientific document in Latex, this is what I do:
4 desktops
1: (far left) - my working directory is open, with webpages and pdf files used for referencing
-I can drag files from my working directory to other workspaces and drop them into the relevant application from here.
2: usually an application like a spreadsheet or R (statistics) which will be involved in creating content in the document
3: graphics software (I use gimp, but I find graphics software is a bit of a hog with your workspace, so it gets one all for itself) for finishing off or creating figures
4: (far right) Latex source, terminal and output PDF for my document.
I then use alt-1,2,3,4 to flick between them and alt-` to call up my application launcher and obviously alt-tab to switch windows. That way the alt key is used for window management, the keys are in a similar place, and, visually and mentally, 1,2,3,4 represent my extended desktop.
Switching virtual desktops like this also helps with any neck strain - my neck is always facing forward and I'm not spending any time with my head at an angle.
Your use case sounds quite particular - I don't tend to have multiple projects open at the same time. If I did, I'd probably create several users and switch when I wanted to change projects. Another way might be to create a 4x4 array of workspaces with each row for a given project (if I did that I'd need to do something clever with keyboard input so I could still use alt-1,2,3,4). Using VMs sounds a bit resource-inefficient.
I personally find virtual desktops a good way of organising and compartmentalising parts of my workflow, and it solves the problems inherent when you have too many windows open on a single desktop (i.e. finding a specific window, or representing your applications on a taskbar or overview). However, it does have a cost in that it requires an extra thought process to be made when switching applications - which is whether your app is on your current workspace or another. Gnome seems to have a neat way of dealing with this, but I find their task-switcher overview, and vertically-limited workspaces to be too much of a hindrance.
I've heard you can do desktops on a Windows box, but it would be torture to have to set them all up again every time I reboot my Windows laptop, which is about every day or two. The Linux server, on the other hand, typically chugs along for a year or so between reboots.