Categories
Computers Linux

Install Ubuntu 7.04 on Thinkpad A20p

When installing Ubuntu 7.04 Feisty Fawn on a Thinkpad A20p the display is a mess. In addition power management does not work which means that it is not possible to make the computer go into standby when the lid is closed. This article explains how to fix both issues.

To fix the display, you will need to break out of the desktop (Alt+Ctrl+F1) so that you can see what you are doing. Log on and get root privileges (sudo su) to be able to write the changes below.

Edit xorg.conf (nano -w /etc/X11/xorg.conf) and add the following (the existing Monitor section can be kept):

Section "Monitor"
Identifier      "Monitor0"
VendorName      "IBM"
ModelName       "ITSX93"
HorizSync       30-100
VertRefresh     50-100
ModeLine        "1400x1050" 122.00 1400 1464 1784 1912 \ 
                1050 1052 1064 1090 -HSync -VSync
EndSection

N.B. There should be no line breaks in text after ModeLine.

Then change the reference to “Default Monitor” under the Screen section to Monitor0. Save the file with Ctrl+X Ctrl+Y. The setting will take effect when the system (or X-windows) is restarted.

The next issue was with the power management. The BIOS in the A20p is from before 2000 which is the cut-off year for ACPI support in Ubuntu 7.04. The computer has ACPI support but the kernel needs to be forced to load it. This is done by changing the boot options. To make the change persistent, edit the file /boot/grub/menu.lst.

nano -w /boot/grub/menu.lst
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=\ 12345678-1234-1234-1234-000000000000 \ ro quiet splash acpi=force

Reboot to make all changes take effect.

Categories
Computers Windows

Purge stale shadow copy data in Windows Vista

diskspace.gif

Some versions of Windows Vista comes with Volume Shadow Copy, a souped up version of the system restore function of Windows XP. Now, not only registry and core files are restored but any file on a protected drive can be restored to an earlier point in time.

If this feature is enabled on a drive, Windows Vista sets aside a significant amount of disk space to keep the old copies. Supposedly this space can be reclaimed by using the Disk Cleanup feature. I had partitioned my hard drive and installed Windows Vista. When reinstalling Windows Vista I only reformatted my system drive and later noticed that a large amount of disk space was not accounted for when adding the sizes of all folders on the drive.

It turned out that Volume Shadow Copy was not enabled on my data drive after the reinstallation, but the data was kept from the previous installation and just wouldn't go away. To see the shadow storage I opened a console as administrator and typed 'vssadmin list shadowstorage'. I enabled Volume Shadow Copy on the data drive and ran the Disk Cleanup, before I disabled Volume Shadow Copy. No luck.

From what I have been able to tell, the Disk Cleanup feature does not work in this case. When I did the same thing but instead of the Disk Cleanup function issued the following command (still in the administrator console) it worked:

vssadmin resize shadowstorage /For=D: /On=D: /MaxSize=300MB
Categories
Computers Windows

Put user data on another disk in Windows Vista

By default, Windows Vista, like all previous versions, insists on saving user data on the same disk as the system files. This may be fine for many people but I really don't want it to work that way. Before Windows Vista, you could edit the registry to move the folders around. Now in Windows Vista, Microsoft has added support to move the folders directly from within the file explorer which, in theory, should simplify matters. However, it doesn't always work and many applications fail to save in the new location. What is even worse, it appears to be impossible to change the location of the public folders from the GUI – even though the text in the GUI states that it is possible.

Realising that doing the changes via the GUI was totally worthless I tried to find another way. What worked very well for me was to change the two keys ProfilesDirectory and Public under HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ ProfileList.

The change to the key Public affects all users in the system whereas changing the key ProfilesDirectory only affects accounts that are created (or rather when the user first logs on) after the change was made. I recommend you create an Admin user at the end of the Windows Vista installation process, make the changes to the registry and then add normal accounts for the users who will use the system.

As always, be very careful when changing the registry as a mistake could potentially wreck your system.

Categories
Computers Linux

Use Ubuntu Live CD to backup partitions

After having run Windows Vista Ultimate unactivated for some time I decided it was time to install it properly and take a full backup of the system drive at intermediate steps along the way to be able to back-track later.

I could have used the built-in Volume Shadow Copy service, perhaps together with DriveImage XML. I did try that and even made a slipstreamed boot CD using Bart PE to be able to restore the system.

However, I wanted a little more control and the potential of being able to boot off a USB stick when restoring. I also wanted to backup to and restore from a network based NAS (in my case a DNS-323). Besides, Volume Shadow Copy is only available on Windows Vista Business and Windows Vista Ultimate whereas this method will work for virtually any system.

For the time being I have settled on the following process.

a) Download and burn the Ubuntu 7.04 desktop CD and use it to boot your computer

b) Start a terminal window and change to root

  > sudo su

c) Add repositories by adding /etc/apt/sources.list and uncommenting the two lines for universe repositories.

  > nano -w /etc/apt/sources.list

d) Update the sources and install partimage and smbfs (answer yes when requested)

  > apt-get update
  > apt-get install partimage
  > apt-get install smbfs

e) Mount the NAS over the network using the samba file system driver.

  > mkdir /mnt/backup
  > mount -t smbfs -o username:[login] //[ip]/[share] /mnt/backup

Replace the parts within square brackets with whatever is appropriate in your case.

f) Run partimage and select the partition to save and the filename where the image should be placed (somewhere below /mnt/backup where the network NAS share is mounted).

  > partimage
Categories
Computers Windows

Stop capitalising 'i' in Outlook

For years I have been annoyed by the fact that Microsoft Outlook insists on capitalising the letter 'i' when I write email. In Swedish 'i' means 'in' and is not to be capitalised like the pronoun 'I' in English. It was not exactly apparent how to stop this AutoCorrect (bad name in this case) feature.

For me, the 'bug' didn't manifest itself all the time but only when I wrote mail in plain text.

One would assume that application wide options for Outlook could control this behaviour. I could uncheck the 'Replace text as you type' option but that removed all corrections which was not what I wanted.

It turns out that the way to change the behaviour is to change the AutoCorrect options from within a plain text email (i.e. not from the main Outlook window). Just remove the i/I pair from the list of corrections. After that, 'i' will not be changed to 'I' in future emails.

StopAutocorrect_3.gif

Categories
Computers Windows

ATL smart device development with IE7

VS_WM_IE7_bug_small.gif

If you have tried to write ATL based smart device applications under Visual Studio 2005 on a computer running IE7 you may have seen this error message. This error is due to changes in IE7. Apparently the upcoming service pack for Visual Studio 2005 (scheduled for Q3 2006) will fix this issue but until that happens, this is how to do it.

Run regedit.exe and add an empty key under HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Ext \ PreApproved. Name the new key “{D245F352-3F45-4516-B1E6-04608DA126CC}”. Then restart Visual Studio.

You may also use the attached file.

Attachments

Categories
Computers Gadgets

Importing certificates on Samsung SGH-i320

As I wrote in a previous article I have recently got a Samsung SGH-i320. One of the first things I wanted to do was of course to set it up for push mail with an Exchange server. As probably just about every company out there has done, we have created our own root certificate which is used to secure the connection to the mail system over the web.

To enable the smartphone to synchronise over the air I did as I always do – I tried to downloade the public root certificate directly from our web site. I then got an error that said that my “security permission was insufficient to update my device”.

The problem stems from the changes to the security model of Windows Mobile 5. Different OEM manufacturers are probably free to control this to some extent because I did not have the same issue with my Qtek 9000 device.

Anyway, to fix this issue the solution is to find an application called RegeditSTG.exe. Allegedly, this is a HTC signed application but it worked fine on my Samsung phone. Search for the application on the net and copy the EXE file to your device and run it from the File Manager.

You will want to change a setting under HKLM\Security\Policies\Policies. The value to change is 00001017. It will probably be set to 128 and it should be changed to 144. Make a note of the old value in case you need to revert the change later on.

When this value was changed I could then install the root certificate, directly over the web or by running the file on the device.

Categories
Gadgets

First impressions of Samsung SGH-i320

keys_small.jpg

I finally managed to get my hands on the Samsung smartphone SGH-i320. The size of this little beauty is 59x111x11,5mm but it was not until I held it in my hand that I felt how thin it really is.

The phones comes with a charger, a USB sync cable, two batteries and a stereo headset. Extra memory is not included so I recommend that one also buys a 1GB microSD. There is plenty of internal memory for basic operation so the extra memory would mainly be for music, podcasts and the like. After having synchronised the phone to my Exchange account I still had about 100MB of free memory in the phone.

i320.jpg

The phone is GPRS/EDGE based and does not come with either UMTS or Wi-Fi. But on the other hand I have been using a Qtek 9000 for almost a year and noticed that I don't use Wi-Fi that much anyway since it drains the battery. As for UMTS, those using operators whose network supports EDGE might not notice the difference. Unfortunately I am stuck with Telenor, an operator that seems totally unwilling to upgrade their GPRS network. In the absence of higher speed networks I am using bluetooth both at home and at work to stay connected at higher speeds at no cost and with low battery consumption.

swedish.jpg

Samsung has done a good job with the keyboard. I don't have that small fingers but even so I find the keyboard quite easy to work with. And being Swedish I especially welcome the fact that Samsung has placed our special characters (åäö) on the keyboard. Even Sony Ericsson hasn't managed to do that on their M600i.

The size of the SGH-i320 is where it really shines. Sure, it is a little taller and wider than my previous phones (see image below) but it is the thickness of the phones that has really annoyed my in the past. Not so any more. The Samsung phone easily slips into the pocket and with the weight of just 95g I hardly feel it, even when I have it in my shirt pocket. Sony Ericsson M600i and Nokia E61 are both competing in the same segment and they are significantly bulkier.

size.jpg
thickness.jpg

The phone is equipped with a 1.3MP camera. This is certainly not the type of camera you would want to use to photograph things you actually want to save for posterity. And, as always with phone cameras, there must be just the right amount of light and not too much contrast to make the images be even half-decent.

The image below of the art museum in Göteborg has been scaled down to a sixteenth of the size. At that size it looks alright but a portion of the image at 100% size shows just how limiting the camera feature is. Still, the camera can probably successfully be put to use for photo blogging since the image will be scaled down anyway and the keyboard is handy when it comes to write captions for the images.

camera.jpg
camera_part.jpg

If there is one thing that I wish that Samsung had done another way it is to use a standard mini USB connector instead of their proprietary one. Now, instead of being able to charge the phone just about anywhere I will have to invest in a car charger and bring along the USB cable wherever I go.

usb.jpg

Categories
Computers Windows

Enhancements for Windows Services for Unix

I found Windows Services for Unix by chance but has since got used to having a Unix-like environment on my Windows system, enabling me to more easily work with boxes running Linux.

If you have installed Windows Services for Unix (for a description of how to do it, please read this article) you might have realised that there are only so much you can do with the system out of the box. Many commands you take for granted in a Linux system are not there and some of those which are actually included don't behave quite the way you expect them to function.

Not to worry. The source code for most commands can be downloaded (www.gnu.org is a prime source) and compiled within SFU.

To save you the time to set up an environment with some tools that at least I found more or less necessary I provide a link to a set of scripts at the bottom of this post. The scripts automate the process of building the system by downloading and compiling the following applications:

To install, download the file below to a directory within your SFU installation (e.g. /tmp, normally c:\sfu\tmp from your Windows Explorer), then type the following from a C Shell window:

gunzip SfuPlus.tar.gz
tar -xvf SfuPlus.tar
cd SFU_Plus
./sfuplus.sh

The build process will take about 15 minutes on a modern computer. Slower computers may take more than an hour.

Attachments

Categories
Computers Windows

Install Windows Services for Unix 3.5

Microsoft Windows Services for Unix (or SFU for short) is a relatively unknown product. This is a shame since it can be quite handy for some people. And the price is definately right – free!

Contrary to other applications (e.g. cygwin) that attempt to provide a Unix/Linux envrionment under Windows, SFU is not an emulator running under Windows. Instead SFU provides a Posix subsystem that runs side by side with Win32 directly on top of the NT kernel. This should provide for better performance but I have not tested that myself. What I have found very nice, however, is that commands compiled and existing under SFU can be executed under Win32 anv vice versa.

Windows Services for Unix comes with a basic set of tools. Some of them are crippled in comparison with what you might be used to. In a separate post I will provide my setup script that adds a number of utilities (nano, wget, openssl, openssh etc) to the default setup.

To get started you need to download SFU from Microsoft and run the setup file. To help you I provide screenshots of all the steps necessary to set up SFU on your computer.

sfu_setup_1.gif

sfu_setup_2.gif

sfu_setup_3.gif

sfu_setup_4.gif

sfu_setup_5a.gif

sfu_setup_5b.gif

sfu_setup_6.gif

sfu_setup_7.gif

sfu_setup_8.gif

sfu_setup_9.gif

sfu_setup_10.gif

sfu_setup_11.gif

sfu_setup_14.gif

css.php