Here is a tip that could make you much more productive: At home, I have a desktop computer with dual-monitors (via a HDMI connection and a DVI connection with 1920×1080 resolution. One monitor is 24-inch, the other 21-inch). I also have a laptop that I travel with and on that laptop is all my code for a client that I am doing BI work for during off-hours. I also have a second laptop that was given to me by the current company that I am working at as a contractor for during the day.
So how can I easily switch between all three environments? At first I thought of using a KVM switch, but then I realized a much better way that was also free: remoting into the two laptops. I was embarrassed I did not think of it first and almost wasted money on a KVM, which would have been a less-effective solution.
How do you set this up? First connect all three computers to your network. I’m sure like any good developer you have a wireless network, allowing you to keep the notebooks someplace safe and out-of-the-way. Then run Remote Desktop Connection (RDC), configure it for one of your laptops, then save the settings as a RDP file to your desktop. Repeat for the second laptop. Now, you can just double-click either of the new RDP files on your desktop to remote into the laptop of your choice.
You will want to right click both RDP files and choose “Edit” to modify the RDC properties. Here are some settings of interest:
- On the Display tab, select “Use all my monitors for the remote session” to allow the use of both monitors for the laptop. Cool! You will also be using the full screen, so it’s like you don’t even realize you are really remoting into the laptops
- Go to the Local Resources tab and select “Printers” and “Clipboard”. This will allow you to print to your local printer while remoting into your laptop, without even having to set up the printer driver on the laptop. Your printer will show up with a “(redirected 1)” after its printer name. And you can copy and paste between your computer and your remote sessions
- On the Local Resources tab there is a “Settings” button to configure the audio so you can hear the audio from your laptop on your desktop. Note I was forced to modify this setting to “Do not play” due to my remote session locking up whenever a sound was played
- Make sure to go to the Experience tab and choose your connection speed. If set incorrectly, you may see mouse clicks and window manipulation drag behind
The beauty of this is how you can use your dual monitors while remoting in. Trying to do that with a KVM would require one that supports three computers, supports DVI and supports dual-monitors. That would cost you some major cash.
With all these settings tuned, whenever I am remoted into one of my laptops, it does not feel like I am remoting in at all: It seems like the dual monitors are connected directly to the laptop.
The only somewhat annoying problem concerns VPN. On both laptops I use the Cisco AnyConnect VPN client, and by default that will not allow you to remote into your laptop and start VPN. Instead you will get the error “VPN establishment from a remote desktop disabled”. So you will have to jump on the laptop to start your VPN session before you remote in. You will also run into the VPN getting disconnected (loss of internet, max time excedded, etc), which means you will have to exit your remote desktop, jump on the laptop to start VPN, then start your remote desktop again. It is possible to update your Cisco VPN profile to allow for remote VPN: See the section “Allow AnyConnect Session from an RDP Session for Windows Users” in Release Notes for Cisco AnyConnect VPN Client. But for security reasons you are unlikely to get your system admin to make that change. Also, you may want to change the power options on your laptop. Obviously if you have it set to put the computer to sleep after a certain amount of time, you will lose the VPN connection. And even having the “Turn off the display” option set could cause problems: On my laptop when the display would turn off if would briefly interrupt the network connection and I would lose the VPN connection. Setting it to never turn off solved that problem.
Note there are many other programs you can use instead of RDC, some of which avoid the VPN problems described above as well as firewall issues, although most don’t support dual monitors unless the computer you are remoting into has dual monitors. A few of my favorites are TeamViewer, Terminals, LogMeIn, and RDCMan (which I use when I need to connect to many computers at once and don’t need to use dual monitors).