Git and Windows Vista

I recently started using Git, the version control system now used for developing the Linux Kernel. While there is no native support for Windows at the moment, you can install it using cygwin. While this works reasonably well in Windows XP, I got into severe troubles when trying the same in Windows Vista.

First, I ran into troubles installing cygwin. I figured out, that it seems to work well if you run both the installer and bash in “Windows XP SP2 compatibility mode”. I needed to adjust the file system permissions of the cygwin folder to give me write permissions, though. (Note: you have to manually install the TK-libs if you want the GUI elements of git to work.)

But Git kept failing with “access denied” messages when trying to commit from command line. The failure message said it was denied access to git-update-index. I soon found out this is due to the “User Account Control” (UAC) default behavior of auto-detecting installers and prompting if you want to execute them with raised privileges. You can see if this is the case by running git-update-index manually from bash; if you get the UAC confirmation dialog you have this problem. It seems the substring “update” triggers this behavior. As the git-update-index is launched by git commit, it won’t display the confirmation dialog of Vista, so the execution will be denied.

There are two possible workarounds:

  • Run bash with administrative privileges (not recommended!)
  • Disable the auto-detection of installers by UAC.

I used the latter way. You can disable the auto-detection by following these instructions. Brief summary:

  • Open the Local Security Policies
  • Disable “User Account Control: Detect application installations and prompt for elevation”
  • Reboot (the security policy will not be updated before!)

It should work now. You can confirm this by running git-update-index manually again. If you do not get the UAC confirmation dialog now, it worked. Try git commit now, and verify it is working. Of course, you will from now on have to right-click and “Run as Administrator” every installer you want to install, as most installers will require administrative privileges.

Update 2007-08-22: Reader EGarcia posted an interesting comment below: using the Microsoft Manifest Tool you can add an according manifest to the git-update-index.exe and git-update-ref.exe

Update 2009-02-12: Reader Kevin Broadey points out the best solution so far: create a seperate .manifest file for the affected files. He has provided an example for git-update.exe.manifest.

Organize Your Ideas and Thoughts with wikidPad

wikidPad is one of the very few applications I recently got really enthusiastic about. It is a single-user desktop wiki, written in Python. It is really fast to use and you can write down your ideas, organize your information and much, much more. This is the way I want a Wiki to work!

I got so enthusiastic about it that I am currently writing anything down inside it, organizing my contact data, appointments, schedules, etc. Together with this great Getting-Things-Done extension, I am really, really happy that I finally found a way to organize my thoughts, ideas, and TODOs. It all is becoming to make more and more sense now 😉

I am so addicted to the system that I installed the whole application inside my shared data environment. I am using the old style file format, where every page is stored as a .wiki file, which makes synchronization using Unison very fast and easy, and additionally allowing (limited) conflict handling.

While still being a Python application, wikidPad was written for Windows and got Linux support added later during development, after wikidPad itself became OpenSource. At the moment, I find the Linux version being too buggy for my everyday use, so I use wine to run wikidPad there.

Sharing and Synchronizing Data Across Multiple Computers

I have several computers, one at the office (Windows Vista), one at home (Gentoo Linux), and one notebook (Windows XP). On most of them I want to share a common set of files, including letters and other documents, but also Miranda. This time I am going to tell you how I keep my shared data in sync using Unison, PuTTY, and OpenSSH, using a dedicated server as central hub.

(Note: this is a rather advisory level HOWTO, not a step-by-step, command-by-command tutorial. It might give you some ideas nevertheless.)

Continue reading “Sharing and Synchronizing Data Across Multiple Computers”

Life at Google

Interesting mail supposed to be from an internal mailing list of Microsoft about life at Google compared to Microsoft. Despite the discouraging blog title (“Just say ‘No’ to Google”) the published e-mail is rather balanced in my opinion. It just gives interesting insight in the work life at Google and Microsoft.

(Disclaimer: the whole thing could be a fake, I don’t know. But I suppose this to be true, it is no Google-bashing. Given the fact that it publishes an internal e-mail from Microsoft, I don’t know how long it will stay online.)

In the comments there are other major-companies work-life experience blog entries linked:

Ubuntu 7.04 cryptsetup problem

I am using cryptsetup LUKS for storing encrypted office data on my USB memory stick (just in case I lose it). I recently installed Ubuntu 7.04 on one of my machines and wanted to open the encrypted partition using cryptsetup luksOpen, which failed with a rather strange

Unable to make device node for ‘temporary-cryptsetup-32733’

While searching around the net I found a lot of people asking the same question but hardly any answer, until I finally read this article
on the Ubuntu forum.

The solution to the whole problem is rather simple:

sudo mkdir /dev/.static/dev/mapper

With a little bit more verbose error message of cryptsetup I might have figured this out myself…

Google Shared Items

Inspired by erik (once more), I started to share some interesting items from Google Reader. I also included the shared items in the sidebar of this blog (this feature requires JavaScript to be turned on on your browser). As I am reading mixed English and German feeds, there sometimes can be German items too. (In fact, when posting this, there is only one shared item and it is German…)

You can browse the Shared Items Page or even subscribe the RSS feed.

How to Show Unattached Devices in Windows Device Manager

As I was searching again for this (I once knew it, but I keep forgetting it), I will simply write it down here: if you want to see all the unattached devices in the device manager, you have to set the environment variable devmgr_show_nonpresent_devices to value 1. If you then start the device manager, you have to also check “Show hidden devices“.

This is documented in Microsoft KB315539.

Fighting SPAM in phpBB – Part 2: First Impression

So the mentioned MOD for prevention of posting URLs in phpBB2+ has now been deployed in the tag2find forum for one week. What can I say? ZERO SPAM postings within this period. I had hoped it would reduce it a little bit, I didn’t expect it to eliminate the SPAM problem at all. I just hope it is not preventing “ordinary” users from posting.

Next step in this experiment will be to disable the CAPTCHA image for anonymous posting, just keep it for signing up. I am really looking forward how this works out. The CAPTCHA has kept a lot of posters from posting, so I’d be very happy if I can disable it for posting.

Fighting SPAM in phpBB

At tag2find, we are using phpBB2+ for our forum. This forum unfortunately is continuously being spammed by bots, despite the active CAPTCHA. Even at the strongest setting of the CAPTCHA, SPAM postings were coming through, but the CAPTCHA drove off a lot of potential forum posters which could not get past it.

Therefore I wanted to implement the approach I took for our blog: disable the possibility to submit postings containing links. Unfortunately phpBB out of the box does not permit this. After searching a while I found a promising MOD which I now added to the forum. Its not directly preventing posting links, but is more or less a RegEx-based blacklist of words which must not be used by users who are not registered for a certain number of days and have not yet posted a certain number of posts. The regular expressions supplied aim at preventing posting links, but I had to modify them, as they also contain “.net” which we must allow since our application is written in the Microsoft .NET Framework, so this term is going to turn up legitimately.

Let’s see if this measure will actually change the amount of SPAM being posted to the forum.

Simple Way of Fighting WordPress SPAM

As I am one of the developers of tag2find, I am also writing in the tag2find developer blog from time to time. This blog is a WordPress blog. One of our main problems there is fighting SPAM. We get literally dozens of SPAM comments a day. To limit the amount of SPAM visible on the blog itself, I found a very simple solution, which up to now did not produce any false positive: if a posting contains more than zero links, it will be held in the moderation queue.

WordPress offers this possibility out of the box, but the default is set to more than 2 links. I tried to limit it down to one, but this still missed to many SPAM attempts. Therefore I now have set it to zero. This works remarkably well. No SPAM postings anymore and we had just one or two false positives, which are not so bad as the comments are not deleted but just held for moderation.

I know, this is a very low-tech approach and puts some work on the maintainer of the blog, but it works almost out of the nature of SPAM, which most of the time wants to deliver links to pages to influence Google PageRank and/or lure people onto the website.