Home » Posts tagged "Windows" (Page 2)

Sharing my mouse and keyboard on multiple machines

Whenever I want to do some paid work I have to do this on my laptop. I have a nice (well,┬ásometimes we argue) 17″ laptop with a screen resolution of 1440*900 which is fast enough to run all the software I need (although Vim does play up at times…). The reason I have to use my laptop for this is because it has a VPN client configured, network drive mappings and some other stuff related to my job.

I unfortunately only have 1 decent workplace at home to comfortably work at and it’s occupied by my desktop PC, its keyboard, mouse and a Full-HD 24″ monitor. Sure, I can get work done from the couch and there’s also a small table in the living room, but both aren’t really comfortable spots to work for a longer time. Besides, working at a Full-HD resolution gives me more space to work with than when I’m on a 1440*900 resolution. So my aim was to find a solution on how to share my mouse and keyboard on multiple machines.

Since my 24″ monitor had a spare HDMI input and my laptop has a HDMI output I wanted to connect my laptop to the 24″ monitor through HDMI. VGA and DVI weren’t an option for me since those were already occupied (VGA by my Xbox 360, DVI by my desktop PC). The added benefit from using HDMI would be having the sound from my laptop through the┬áspeakers of my 24″ monitor.

After searching for a couple of hours I couldn’t find any nice hardware solution. Sure, KVM cables with 2 USB connectors for your mouse and keyboard are available, but also come with VGA connections which, as far as I’ve been told, have to be used for it to function. Other dedicated hardware for sharing 1 USB device with 2 or 4 computers also exist, but meant I had to buy 2 of them.

Having wasted a couple of hours I finally gave up on it. A couple of days later I remembered a software solution existed as well. Within a couple of minutes on Google I found what I was searching for: a project called Synergy. Synergy is a very nice piece of software, which you can get for free, is open-source (GPL) and runs on Windows, Linux and Mac OSX.

Basically you’ll install Synergy on all systems you want to use your keyboard and mouse on (yes, systems, it supports multiple systems!). You run a server instance on the system which has the keyboard and mouse connected you want to use. The other systems simply run a client instance. When connected you can move from one computer to the other by simply moving the mouse to the other computer. Added benefit is that if you copy something to your clipboard on PC 1 and move the mouse to PC 2 the clipboard its content is available on that system as well!

My only complaint with it is that the initial setup was a bit confusing. It does have a graphical user interface but if you’re not used to the software it’s hard to figure out how to configure it. Another more annoying issue I’ve run into was that at some time Synergy (or my OS) switched keyboard language which couldn’t be changed. Only solution for that was to reconnect the client.

Aside from that I’m very happy with this solution. I can now do my paid work behind my 24″ monitor using the keyboard and mouse that are connected to my desktop PC. So all I have to do now is connect my laptop to my monitor through HDMI, start the Synergy server and client and change the display input on my monitor to see my laptop’s desktop.

Console2

One feature of Windows 7 I like is the new taskbar. At work I’ve configured it to only show the icons and this works surprisingly well. I can easily have multiple command line shells open. However, that is work. At home I’m using Windows Vista and the grouping feature in Windows XP and Vista at the toolbar is something I always turn off, as it annoys me to no end.

But when I’m working on some Perl related stuff I usually have multiple consoles open. One for my Catalyst test server, one for Gearman and another one for my Gearman worker. As mentioned earlier having multiple consoles open is a major pain in the ass on Windows Vista (or XP). So I’ve taken a quick look on the internet and found this lovely open source project called Console2.

Console2 is a simple but powerful tool. It allows me to have multiple consoles open with tabular navigation. Which results in only 1 window open. Yay!

Serving files with Apache on Windows from a network drive

After I installed Zend Server CE today I had to configure Apache to serve files from a shared network drive. Although these have been given a drive name serving files from it with Apache fails to work.

By default Apache under Windows (or generally any service) is being executed as a local user. This user doesn’t have network rights, and normally shouldn’t have any. But in my case it should. So to get this all working I opened the Windows administration tool for services and modified the Apache service to be run as some other user, in my case DOMAIN\username.

After having done that I configured my Apache configuration to serve files from a shared network drive. To my surprise it still didn’t work and my path was correct… For Windows that is. Windows use the backward slash, for example, \\MYSERVER\Projects\example.com. But for this to work with Apache you have to substitute the backward slashes with forward slashes, like this: //MYSERVER/Projects/example.com.

If you do this all should be well and you can serve files from your network through your locally installed Apache.

Configure Git on Windows to use KDiff3

Something I don’t do often and always forget is how to setup msysgit to use KDiff3 as its merge tool.

To get it done edit your .gitconfig and add the following:

  1. [merge]
  2.     tool = kdiff3
  3. [mergetool "kdiff3"]
  4.     path = C:/Program Files/KDiff3/kdiff3.exe
  5.     keepBackup = false
  6.     trustExitCode = false
  7.