Thursday, 14 May 2009

Running Komodo Edit Open Source Code Editor Under Windows 7

The open source version of Komodo's code editor and development environment Komodo Edit is a great tool for development. I use it for PHP, HTML, JavaScript and more.

However, I haven't done any serious coding for a while so I haven't needed to run it under Windows 7 even though I had it installed. When I did, I was disapointed to find it behaving very poorly. It wouldn't resize properly without messing up the screen. I tried with some of the compatibility settings that Windows 7 gives you but that made no difference. I also tried an upgrade to the latest version.

A quick search didn't reveal anything about Windows 7 specifically but I did spot a discussion about problems under Vista that were related to file permissions. Sure enough, making Komodo Edit run as Administrator fixed the issues.

I've had a few file permission issues under Windows 7, I'm fairly sure it is down to me messing around. However, it is clear that Windows Vista and Windows 7 are both rather sensitive to permissions issues which is worth bearing in mind.

Looking at %USERPROFILE%\AppData\Roaming\ActiveState\KomodoEdit, I could see that SYSTEM, my user and Administrators all had full access but that Administrator was the owner of some of the files. I can only summise that this is the issue.

As this needs rebuilding with Windows 7 RC, I haven't the time to test further but certainly running as Administrator does the trick.

By the way, Komodo Edit is available for Mac and Linux as well as Windows. It has a big brother "Komodo IDE" with additional features if you need them. Both are highly configurable, support many languages and are based on the Mozilla code (like Firefox and Thunderbird) & can easily be extended with JavaScript.

Update 2009-11-27: I've reinstalled Komodo Edit 5.2 under Windows 7RC and it now works fine. I still think that it is the best of the free IDE type editors.

Technorati : , , , Diigo Tag Search : , , ,

Tuesday, 12 May 2009

How-to show a Message of the Day (MOTD) at the Windows Command Prompt

One of the features available under UNIX is the Message of the Day (MOTD). This is run every time you start a command prompt and displays the content of a file. In addition, the UNIX shells allow all sorts of stuff to be run and configured every time you start a new prompt using the .profile and .bashrc command files.

Windows users don't generally expect that kind of flexibility from their command prompts. However, Windows does indeed support the use of an "autorun" into which you can shoe-horn any command you like.

So for my standard setup, I make the shell autorun run a ".profile.cmd" file that sits in the %USERPROFILE% folder. From that file, I can run anthing I like.

To set up a shell autorun, you have to edit the registry so the usual warnings to be careful and back things up apply. There are two locations you can set, one for the machine as a whole and one for the logged-in user.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor

If you want to set an autorun for another user, you need to go down HKEY_USERS and find the appropriate one, it's really easier just to log in!

In one or both of those locations, add a new "String Value" (REG_SZ) called "AutoRun" with the value:

%USERPROFILE%\.profile.cmd

Now create that file and put in a message such as:

@echo "Hello and welcome to my command prompt"

Save the file and open a new shell and you should see the message just after the Microsoft copyright.

This should work on all versions of Windows at least from XP onwards.

If you want to add this to a batch file to set up new machines, here is the command you need:

reg.exe ADD "HKLM\SOFTWARE\Microsoft\Command Processor" /v AutoRun /t REG_SZ /d ^%USERPROFILE^%\.profile.cmd /f

(Note that the above needs to go on a single line)

Technorati : , , , , ,
Diigo Tag Search : , , , , ,

Monday, 11 May 2009

How-to use WebDAV on Windows Vista and Windows 7

Windows is supposed to have a built-in WebDAV client. However, it doesn't ever seem to have been especially robust and certainly since Vista a lot of people (myself included) have found that it simply doesn't work on many supposedly WebDAV enabled sites.

Thankfully there are a couple of free (and some not free) options that, while not as nicely integrated into Windows Explorer, do enable you to transfer files back and forth.

The two that I found were:

I've tried the first of these two and it seems to work OK. It's not polished but it gets the job done. There is also an online version using a Java plugin if you don't want to install the client.

It seems that the second option is no longer in active development. Don't be fooled by the web site though, they have changed the license to freeware.

Now, at last, I can once again load multiple files to our corporate intranet on WebEx without having to switch to a Linux desktop!

Technorati : , , Diigo Tag Search : , ,

Update 2009-11-18: Many thanks to commenter igeoogle who pointed out another article on the ongoing problems of Vista, Windows 7 and Web Dav. That article recommends the Bitkinex software. I would still note that there will be no further development of this client though. At least it is now freeware. Unfortunately, I cannot get it to work with my company intranet at webexone.com so I'll cary on using AnyClient.