March 16th, 2010
For many years now, Microsoft has had a technology that allows you to run UNIX commands within Windows. More importantly it provides an easy-ish way to port UNIX programs onto Windows. I say easy-ish because it's not without its issues and it's not safe to assume that something you built for Solaris or RedHat Linux will run on this Windows subsystem without further work. This means thorough testing becomes a must if you develop for UNIX and deploy on Windows.
The name of this technology? It used to be called Interix, then became Services for UNIX (SFU) as they added more bits on top of Interix, and is now known as Subsystem for UNIX-based Applications (SUA). The current name is more of a mouthful, but is a more accurate name.
Microsoft don't advertise SUA. Some of us have been using it, and its predecessors, for years. But, on the whole, it's a pretty well kept little secret. And, not surprisingly, it's only available on the server versions of Windows, or the desktop versions aimed at business users and IT professionals.
So, to run SUA, you need one of the following versions of Windows:
- Windows Server 2008
- Windows Server 2003 R2
- Windows 7 - Enterprise or Ultimate Edition
- Windows Vista - Enterprise or Ultimate Edition
To enable and install SUA:
- Go to the Control Panel.
- Click Programs and Features.
- Click Turn Windows features on or off in the left panel.
- Select the check box for Subsystem for UNIX-based Applications.
- Click OK.
- In the start menu, click All Programs > Subsystem for UNIX-based Applications > Download Utilities for Subsystem for UNIX-based Applications.
- Download the SUA installer from the Microsoft website.
- Once downloaded, double-click Utilities and SDK for UNIX-based Applications_X86.exe in your downloads folder.
- Step through the auto-installer.
I'd recommend you choose the custom setup and enable the GNU Utilities and then, in the following step, select all three check boxes to allow su to root, enable setuid and enable case sensitivity.
Now, you can go back to the Subsystem for UNIX-based Applications start menu item and launch a Korn shell or a C shell and, within that shell, run UNIX commands:
I know a lot of developers who don't like SUA, but personally I've always liked it. It's really handy sometimes to have UNIX commands available within Windows, and it's a great way to familiarise yourself with UNIX tools like vi.
An important resource for SUA users is the SUA Tool Warehouse:
http://www.suacommunity.com/tool_warehouse.htm
Potentially similar posts
August 23rd, 2009
There's a periodic problem with creating PDFs where the application you’re using to create the PDF (e.g. Word or FrameMaker) crashes or, worse, it completes, seemingly successfully, but the resulting PDF has chunks missing from it.
The example Microsoft gives is a document with three sections in it but the PDF that you generate ends up containing Section 1 followed by Section 3.
You might have encountered this problem if you’re a FrameMaker user and assumed it was an Adobe issue. It wasn’t, it was a Windows issue.
Here's the hotfix:
http://support.microsoft.com/?id=952909
Potentially similar posts
April 9th, 2009
Despite all the bad press it got, I’ve always liked Vista. I actually don’t think it was any great shakes. There are no huge benefits as far as I can tell. Being able to start an application by pressing the Windows key, typing the first few letters of the application’s name and pressing Enter is great if, like me, you like to keep your hands on the keyboard rather than using the mouse. Perversely, some might say, I like UAC, and over all Vista does look nicer that XP.
But one thing that’s always irked me is the fact that, for some reason, Microsoft decided to remove the Text Document option from the right-click > New option in Windows Explorer.
I quite often add little text documents here and there and I always found this shortcut in XP provided a handy way of doing this. You could just right-click > New > Text Document, then double-click the file that was created and edit the document in your default text editor.
Putting this shortcut back again involves editing your Windows Registry. Not for the feint-hearted. But fortunately, someone has done this for us and created a .reg file that you can just save and then double-click to add the settings (provided you have administrative privileges for your PC).
You can get this file here:
http://www.vistax64.com/tutorials/154554-new-context-menu-restore-default-menu-items.html
Scroll down the page to the heading To Restore Text Document and click the Download button.
Follow the instructions on the page. It says you need to restart your computer. In fact you can just end the Explorer process in Task Manager and start a new Explorer process and you’ll have the shortcut.
Potentially similar posts
March 12th, 2009
In this interview, from Channel 9, April Reagan (a Program Manager at Microsoft) talks about the up-coming Microsoft Help 3. This client-side help system will be used first in the MSDN Library within Visual Studio 2010, but will be made available for other software companies to use.
Note: I found the first half of the video the most interesting. After that the interview moves onto other things and only returns to help towards the end. Unfortunately there’s not a whole lot of detail about how the new help system will differ from good old HTML Help. There’s no demo, for instance. Still it’s interesting that Microsoft are still investing in the idea of client-side help.
Note: This video belongs to Dan Fernandez and Channel 9.
If you're having problems viewing the above video, try the orignal video on Channel 9,
or view it in Windows Media Player.
Potentially similar posts
March 7th, 2009
Disk defragmenter in Vista no longer gives you the graphical representation of a fragmented disk gradually becoming less and less fragmented. It doesn't even tell you how fragmented your disks are. Instead all you get is a message telling you that the disk is being fragmented and "This may take from a few minutes to a few hours."
This is annoying, because you have no idea where in that vague time range your defragmentation job will fall. Can you kick it off when you go for lunch and expect it to be complete by the time you get back? Or is it an overnight job? However, it's better than so many other progress messages that attempt to tell you how long you need to wait, but inevitably lie to you. For example, I've been having problems with Outlook recently. I had to kill and restart it twice today. The second time it came back it had the familiar message "The data file 'Personal Folders' was not closed properly" and a progress bar with a “seconds remaining” count.
Microsoft seconds obviously don’t work like normal seconds because after waiting for the count to work its way slowly down to "20 Seconds Remaining" I had to sit there for at least 30 seconds before it changed to 25 Seconds, then 30, then 35, then 40, then 45, then 50. From "50 seconds remaining" it took 2 mins 10 seconds before it finally finished and Outlook came to life.
If you don't know how long something's going to take, don't just make something up. And don't mislead the user into expecting something to take less time than it really will. The principle should be that software should not lie.
And don’t believe the Microsoft hype that disk defragmentation is now automated in Vista, so you don’t need to think about it any more. In fact, the Disk Defragmenter’s scheduler is set, by default, to kick off at 1.00 am every Wednesday morning. That’s fine if you leave your computer switched on every night. But if you never leave your computer on on a Tuesday night, it’ll never get defragged.
Personally, I liked the old Disk Defragmenter, with its coloured bands.

Potentially similar posts