linux and windows tips, mathematics, and some recipes

Saturday, January 14, 2006

Windows XP Pro - tips and tweaks


One thing you may consider doing is converting your filesystem to NTFS. By default, most computers ship hard drives formatted for the FAT32 filesystem. This was largely superceded by NTFS, introduced with Windows NT. The primary advantages of NTFS over FAT32 are:
  1. Much stronger security model - with FAT32 every user has complete access to the filesystem, whereas NTFS permissions are more UNIX-like.
  2. Better performance for large volumes.
  3. Support for encryption and compression.
  4. NTFS is a journalling filesystem. All transactions are logged, which facilitates recovery after crashes. The practical upshot is that you won't be forced to run Scandisk each time your computer crashes!
NTFS has some disadvantages. It may lead to slower performance on small volumes (say less that 8Gb). You may also have difficulties working with NTFS from other operating systems. At the moment, there is no way to write to an NTFS drive from within Linux. At any rate, I considered the advantages to outweigh the disadvantages and decided to perform the conversion. The procedure is for conversion is given at the Microsoft support site.

Simple Sharing

If you want to be able to view and change the permissions of objects within Windows, you would be well advised to turn off simple sharing. To do this, go to:
Start → Control Panel → Administrative Tools → Local Security Policy

Then go to

Security Settings → Local Policies → Security Options

Choose Network Options. Find the key "Network Access: Sharing and security model for local accounts". Change the setting to "Classic - local users authenicate as themselves".


ClearType is a mechanism for producing high quality display on LCD screens, such as those found in laptops and flat panel displays. By default, ClearType is deactivated in Windows XP, but it is highly recommended that you turn it on! To activate ClearType, simply right-click on the desktop and select the Properties option from the context menu. In the Appearance tab, choose Effects..., and then choose the ClearType option for "Use the following method to smooth edges of screen fonts". In order to more finely tune ClearType, download and install the ClearType PowerToy. ClearType can then be tuned from Control Panel → Appearance and Themes → ClearType Tuning.

Friday, January 13, 2006

Tweaking the Acer - Part III, ePowerManagement continued

In Part II, we discussed how to get Acer ePowerManagement working for ordinary non-privileged users. Well, half-working at least. To go the extra distance, we need to make further changes. As well as the "Access denied" messages, you may also find that ePowerManagement stops if you log out and doesn't restart when you log in again. To fix these problems, we'll give the user the ability to start and stop the service at will, and then write a script to perform these operations.

First, you need to download subinacl from the Microsoft website. Having done this, run the following command:
subinacl /service epowermanagement /grant=billybob=STOP
where billybob is your username. This gives billybob the right to query, start, stop, and pause/continue the service.

Go back to the Service configuration tool. Right-click on epowermanagement and select properties. Change the Startup type to Manual. This means that the service won't be started automatically on bootup, but will be started only when called upon.

Now we need to write a script which will call the service. Create a file epm.bat in your home directory (or wherever). Type the following into the file:
@echo off
%windir%\system32\sc.exe stop epowermanagement
%windir%\system32\sc.exe start epowermanagement
Copy this file in your Startup folder. The simplest way to do this is to first copy the icon for epm.bat, then right-click on the start menu button and choose open. Navigate to the Startup folder and paste the file. This should do the trick, though you may want to log out and log back in again to get the full effect.

For further information on running applications as a non-privileged user, read the non-admin wiki, and Aaron Margosis' Weblog.

Thursday, January 12, 2006

Tweaking the Acer - Part II, ePowerManagement

One of the much touted features of the Intel Pentium M series is their ability to dynamically change processor speed in response to software demands. The upshot of this is that a laptop can 'run idle' when not connected to AC power, extending battery life. Windows XP supports SpeedStep and other power management features, but Acer provides its customers with a more advanced tool, called Acer ePowerManagement. Unfortunately, as with many Windows applications, ePowerManagement only works if the logged-in user has administrator privileges.

In UNIX, the obvious solution would be to set the SUID bit on the relevant application, but Windows has no equivalent concept, so I had to try a different avenue.

My plan was to run Acer ePowerManagement as a service. First, I downloaded the Windows server 2003 resource kit tools. I then created a service called epowermanagement by typing the following at the command prompt:
cd "C:\Program Files\Windows Resource Kits\Tools"
instsrv.exe epowermanagement "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
The service can be configured by going to
Start → Control Panel → Administrative Tools → Services
and then finding epowermanagement. Right-click for the context menu, and select properties. From the "log on" tab, select Local Account and check "Allow service to interact with desktop". In order to set the actual application to run, one needs to use regedit.

Go to
(where LM is short for LOCAL_MACHINE) and create a new key called Parameters. In this key create a new string, and call it Application. I changed its value to C:\Acer\ePM\EPM-DM.exe.

This is enough for most purposes, but as it is, you will see error messages of the form "Access violation at address xxxxx in module 'ePM.exe'" when connecting/disconnecting from AC power. Moreover, you will only be able to alter the settings when logged in as an Administrator. The resolution of these problems will be the topic of Tweaking the Acer - Part III.

Wednesday, January 11, 2006

Tweaking the Acer

In 2005, I bought an Acer Travelmate 4151LMi laptop (part number LX.T7606.068). It's a nice machine and more than adequate for my tasks (i.e. surfing and editing web pages, reading email, editing maths documents with LaTeX, and general word processing). The graphics subsystem (onboard Intel 915GM) is not fantastic, so I wouldn't recommend it if you are a serious gamer. Note also that the graphics system has no memory of its own and borrows 128Mb from the main memory.

To start with, I had some problems with choppy DVD playback, a good deal of noise, and generally slow performance. Ultimately, I found that the root cause was in a piece of software called Acer eRecovery, in particular, a subprogram called Monitor.exe. I disabled the software by starting regedit and editing the following key:
From this key, I removed the value name eRecoveryService which has value data C:\Windows\System32\Check.exe

Et volia! The performance suddenly shot up, the DVD playback became smooth and the noise disappeared — in fact, the laptop is very quiet. Reading the blog of Crippled Canary, it seems that the problem is due to the fact that eRecovery uses the D: partition, which must be of type FAT32. This will cause problems if you have a dual-boot system.

Monday, January 09, 2006


By nature, I'm a Linux man. My dalliance with Microsoft ended at Windows 95 after I discovered the beauty and power of Linux and it's command shell. Unfortunately, Linux suffers from poor hardware support, and the purchase of a new laptop in 2005 forced my hand. I couldn't install Ubuntu (Hoary Hedgehog) as the installer didn't recognise my spanking new SATA DVD drive. I managed to install Debian on the system, but found that it didn't properly support some of the newer hardware in my laptop; notably lacking was xv support for the graphics card.

I had a busy time ahead of me and didn't want to waste it recompiling the kernel and patching drivers. Since I knew Windows XP would be able to make best use of the hardware without having to edit a configuration file, I bit the bullet and ditched Linux in favour of the Redmond OS.

Not willing to completely give up on my penguin fix, I looked into Cygwin, a Linux emulator for Windows. In a previous incarnation, I had known Cygwin as a console-based emulator, and had used it to port a Connect4-style game to Windows. However, since 2001, Cygwin has shipped with a port of the X Window System. Essentially, Cygwin allows the user to have a Linux desktop environment running on top of Microsoft Windows.

At the time of writing, there exist beta ports of GNOME 1.4 and KDE up to version 3.1.4. However, I plumped for speed and stability over a fancy desktop and went with fvwm2. This window manager needs a bit of "config file editing", but I had a ready-to-go config file from my University account. A beginner may be better off with WindowMaker, which also comes with Cygwin.

In later articles, I'll write about my experiences configuring Cygwin for LaTeX, sshd, rsync, etc.