Closing Windows

Today I finally made the decision to close down my Windows 7 machine and remove it from my primary computing location. It was February when I last used it and since then it has only been used for the occasional game or to run a PCB design tool.

The PCB design tool will run under WINE and there are other Linux based tools which I might transition to. The games haven’t been played very much so I’m not going to miss them. A few games run on Linux so I could continue with those. The hardware of the machine is old ,runs very warm and by today’s standards, not energy efficient.

Had Microsoft not decided to change the supported hardware for Windows 7 I might have continued using it on a new machine. Now my only upgrade path is Windows 10. Windows 10 is not going on my machines., I’ve already had enough of it trying to install itself.

From this point forward it’s Linux only for real computing. Windows is only a toy to play the occasional game on.

Windows 7 + CUPS – Problem Solved

I have been trying to get my Windows 7 (Pro) machine to connect to the CUPS printer on my Linux server. Whilst it used to work with Windows XP (Home) via IPP (Internet Printing Protocol) I was having no luck with Windows 7. One reason for the problem is my network security and firewalls. I lock down everything unless it is actually needed. This means that all the auto discovery services on the network can't talk to each other. Still knowing the IP address and ports of the relevant machine/service to connect to is normally enough to get things working. Not in this case however. For some reason either at the Windows or CUPS end the IP address was causing a problem. The problem being that the it wasn't being resolved to a machine name when trying to setup the IPP connection.

Machine "Server" with IP "" # Connection will setup but fails to communicate
# Connection established and working.

The solution to the problem in the end turned out to be quite simple. On Linux machines there is a file /etc/hosts in which you can specify a mapping between IP addresses and hostnames. It turns out that Windows has the same file, its just hidden away in C:\Windows\System32\drivers\etc\hosts. Copying in the hostname information gives Windows the information it needs which it cannot find out itself due to the network discovery restrictions.

Background Notes:
This has solved my problem but it was useful to be able to connect another Linux machine to the printer first confirming my CUPS setup was initially working. I had also tried disabling the firewall on the server to ensure that it wasn't a bad configuration, when that didn't work it was obvious that the problem was not in my case CUPS related. It is also a good idea to backup any working config files for future reference/use.

Experiences with Windows 7 & SSD

This week I took delivery of a 40GB Solid State Drive (SSD) an a copy of Windows 7 Professional to give a boost to my quad core box. Windows XP has had a good run and it is getting to the point where an OS upgrade is needed to get the best out of the underlying hardware. The system has 8GB RAM but the 32bit nature of XP meant that only 4GB of memory could be addressed. In addition Windows 7 supports newer versions of DirectX. There are games on the horizon which I plan on getting which will require a newer graphics card which will use the newer DirectX. So that is the reason for the upgrade, now onto the installation itself.

I had the option to upgrade my XP install but since it has been in use for a few years now it had alot of rubbish on it. So I opted for a completely clean install.
The SSD was installed and set to AHCI in the bios. Putting the installation DVD in the drive on boot and the process begins.

This was the first Windows installation I've done which has gone from start to finish without the need for any extra driver discs needing to be loaded. I was presented with a desktop at the correct resolution with all connected monitors detected and all the hardware aside from the sound card detected and setup. Well done Microsoft, its about time.

Thats the good bit, now for the bad. The formatted capacity of the SSD was around 37.5GB so I expected plenty of room for the OS and programs; I was wrong. I discovered that i had around 9GB of free space, this was a shock. A complete Linux installation with lots of software can fit into 10GB easily. So the task of discovering where all the space had gone began. The first big chunk of space was taken up by the pagefile. Due to the pagefile seeming to be slightly bigger than the amount of RAM there was 8GB of space. Moving the pagefile to a partiton on another drive solved this issue. Disabling the hibernation feature also saved another 6GB or so. I ended up with about 24GB of free space on the drive. A big chunk of the used space is taken up by the Winsxs folder, the purpose of which I have yet to fully determine for its 6.5GB size. This greedy nature of Windows is something that Microsoft should address, just because hard drives are bigger these days doesn't mean Windows should use it.

So now I have some space back on my SSD it is time to move on the the next lot of problems. I use the Synergy software to share my keyboard and mouse between machines. This has served me well for years and I had very few problems with it until Windows 7 is involved. As soon as the UAC dialog box pops up on screen I can't click on it as the mouse is frozen out. Luckily I have a hardware KVM switch but this isn't the convenient option and there is some lag in the switchover. Turning off UAC has solved most of the keyboard and mouse share issues at the moment and everything is usable. There are still things to get used to but it could be worse.

Worse then happened, BSOD (Blue Screen of Death). Not once but twice, data being lost in the process. The fault after some searching appears to be the SSD firmware. The Corsair F40 drive decides on occasion to give up being a drive and turns into a lifeless box. Soft rebooting the system the bios had trouble detecing the drive again. Only a hard power reset would allow the drive to boot again. After the second failure I lost all faith in the current SSD technology and moved Win7 back to a spinning drive. Since then all has been stable on the Windows side, just a bit slower on bootup.

So to sum up, Windows 7 is ok but could be alot better and SSD drives are going to be avoided by me in the near future until the technology becomes more reliable.

Portable Apps & Portable Python

So I wanted to do some programming in python whilst at work I could have used my netbook but its size can make it difficult to work on for serious code generation. So my decision was to use Portable Apps from a USB memory stick, Portable Apps does not include Python in its package listing. A quick scout about with a popular search engine showed Portable Python as a solution a current Python version bundled with some handy modules.

The easy bit is to use the Windows installer for each package to install them on the memory stick, Portable Apps installed first and then Portable Python into the root of the drive. Setting up the working environment is the next task. Portable Python includes a couple of Python Shells but what would be better is integrating them into the command line. Installing Command Prompt Portable is the answer, this is a command line on the USB stick to which the batch file it runs at startup can be altered to allow the Python Path to be set.

The batch file is located for me at M:/PortableApps/CommandPromptPortable/Data/Batch/commandprompt.bat.
This is my bat file.

@echo off
set PYTHONHOME=%~d0\PortablePython_1.1_py2.6.1\App\
set PATH=%PATH%;%~d0\PortablePython_1.1_py2.6.1\App\;%~d0\PortablePython_1.1_py2.6.1\App\Scripts;%~d0\Documents
color 07
prompt $p$g
title My Command Prompt

Lines 2 & 3 are the ones I added, they add the path to Python on the USB stick. Note the "%~d0" this picks up the drive letter from the location of the bat file. As its on the memory stick it takes that drive letter. Coding it in this way means that no matter what drive letter the USB stick is given it will always set the correct paths. The paths have basically been set to allow Python access to the Python executable itself, its scripts directory and the Documents location for user scripts.

Another One Bites The Dust

It's that time again when another peice of my IT equipment has died. When I say died it's more akin to requiring the replacement of several major organs at the same time. Thurday night I was going about my usual activities of checking email and surfing the web with my windows desktop and 24/7 linux server.

I have been using the linux box alot recently due it collecting my rss feeds for me, the windows box being used for emails and games. The screen for the windows box had gone dark, not a big deal the screen saver kicks in if it's not being used. The discovery of a problem came when it didn't wake up when I moved the cursor to that screen (I use synergy to share kb&mouse across 2 machines). Ok not a huge problem, sometimes an error occurs with the kb/mouse sharing so I used my Belkin Switch2 to connect directly to that machine, still no response.
Continue reading "Another One Bites The Dust"

I Hate Windows XP Home

Over the easter weekend I have decided once again to setup my network just the way I like it. Up to this point everything is going well, the Samba shares on the linux machines are at last accessible through the firewall and the Linux machines can access the Windows shares. Now the problems start.

It's all well and good being able to share the files but I want to restrict access to just me. The linux machines allow this to be done very simply in the configuration of the shares in smb.conf. XP Home on the other hand has none of this, it has "Simple File Sharing". This Simple File Sharing (SFS) is as it sounds, simple. It is to allow the users in the home to share a few files amongst machines and it achieves this. The major drawback is that it doesn't allow for any restriction of the share, its either available or it isn't.

Given the fact that the people attempting to use SFS probably have a weak or unsecured network this is a big mistake. XP Pro also has SFS but this can be disabled for "Advanced" sharing controls. Microsoft have basically released a crippled product whilst at the same time making it insecure. A novice user can in a few clicks share the C: drive and even make it writeable. If this novice user put the machine, a laptop perhaps, on a public network they could allow anybody access to copy/modify their system. There is a point at which things become too simple for their own good.

I am now posed with a problem I have spent alot of time and effort configuring my Linux machines to be very tightly secured with custom firewalls on each, do I really want XP Home to be the weak point? It's time for a rethink of my approach to the problem, ridding myself of XP Home or any version of Windows for that matter may ultimately be the best solution.