Thursday, September 27, 2012

CTRL-ALT-DEL

A couple of things arose today in connection with the university's new Windows 7 service. Our lab machines, for reasons I won't go into because I can only vaguely remember them, are set up as staff PCs rather than student PCs. This means you can do CTRL-ALT-DEL and lock the screen, which isn't what you want in a student lab (I remember this being a major cause of disputes in Charles Wilson labs during the Windows 3.1 days, when there was fierce competition for machines and students would lock the screen and then go off for an hour to a lecture). There's a simple fix: run gpedit.msc as an administrator, and enable User Configuration / Administrative Templates / System / Ctrl+Alt+Del Options / Remove Lock Computer. This also has the effect of disabling the "Lock" option in the Windows start button (it is still there, it just doesn't do anything).

I was accidentally switched to the new service a couple of days ago, and found that access to the Z drive from both my Linux PC, and the Windows 7 virtual machine I run on it, no longer work (the X drive still works, but that seems to still be on older file servers). Pending the resolution of that problem, a new PC fell off the back of a lorry and I am back to having two computers on my desk, one running Linux and one Windows 7 (which I think we are officially supposed to call "UOL" because there are no other things associated with the University of Leicester which might use the initials "UOL" and it will not be at all confusing). Linking them using synergy:

Linux

From this page. I had to install a newer version of synergy (1.4, the current Ubuntu version is 1.3).

In the instructions below, EG-PC845 is the Linux box which will be running the server, and EG-PC1184 is the Windows machine.

As root, create /etc/synergy, and put this lot into /etc/synergy/synergy.conf:

section: screens
    EG-PC845:
    EG-PC1184:
end
section: links
    EG-PC845:
        left = EG-PC1184
    EG-PC1184:
        right = EG-PC845
end

Then put this lot into /etc/synergy/startsynergys, followed by chmod +x /etc/synergy/startsynergys to make the file executable:

#!/bin/bash

/usr/bin/synergys -c /etc/synergy/synergy.conf -n EG-PC845

And finally, append this to /etc/lightdm/lightdm.conf:

greeter-setup-script=/etc/synergy/startsynergys

The synergy server will now start when the machine boots.

Windows

Install synergy as normal, setting it up to start as a client when the machine does, and connect to the IP address of EG-PC845. The only remaining problem is to do CTRL-ALT-DEL to log on to Windows 7, because you are no longer using the keyboard attached to the PC. The solution is to use gpedit.msc again, as described here: enable Local Computer Policy / Computer Configuration / Administrative Templates / Windows Components / Windows Logon Options, with the option "Services and Ease of Access applications". CTRL-ALT-PAUSE then works in place of CTRL-ALT-DEL.