Lorenz Cuno Klopfenstein

Posts tagged "Windows"

More than a year ago I was working at my thesis using the wireless TMote modules and TinyOS on Cygwin. Today, since the whole TinyOS SDK was still laying around on my hard disk, I decided to compress everything and to back it up, in order to free some space.

But it seems that, as it was installed, Cygwin completely messed up the folder's permissions: the only user with access was the very familiar sounding user "S-1-5-21-3632630550-1273522795-1072632642-1004" (WTF?). Neither the standard user nor the administrator had any permission on the whole folder.

In this case, the only thing you can do is to launch a command promt as administrator (the GUI permission interface doesn't work at all):

Admin command prompt, taking ownership of the folder.

Launch the following command:

takeown /F <folder> /R

This will assign ownership of the entire folder (and its subfolders) to the current user (the administrator). However, you still have no permissions:

icacls <folder> /grant:r <User>:(F) /T

The /grant:r part tells Icacls to grant permissions and to revoke (:r) all previously assigned permissions. This will clean up everything. The (F) part tells the utility to assign "Full" permissions to the specified user. Finally, the /T option extends all changes to all subfolder recursively.

Posted on Friday, November 21, 2008
Tagged as
19 comments posted

As you might have noticed from the pictures I have been posting, I'm getting increasingly fond of creating panorama pictures: this is done by stitching together multiple overlapping shots from a regular camera, in order to recreate the feel of a large scene that cannot be fully captured without special (and very expensive) objectives.

Microsoft Live Photo Gallery logo For every panorama picture you see on this website, until today, I have been using Microsoft's Live Photo Gallery. The program is an evolution of the photo gallery app integrated in Windows Vista. It manages a database of pictures, much like Windows Media Player keeps a library of your music and relative metadata. Additionally, Photo Gallery also allows you to tag pictures, edit their metadata and alter them in some simplified way (like adjusting the brightness or so - don't expect photoshop-like features though).

Live Photo Gallery also includes a simple "Create panoramic photo..." option that lets you choose the pictures to stitch together and then automagically figures out all the rest.

Microsoft Live Photo Gallery panorama photo interface.

The results are surprisingly good in most cases, even if there's absolutely no customization of the parameters used to generate your panorama image. So, everything was fine until this morning I discovered...

Microsoft ICE

ICE, which stands for Image Composite Editor, is a full fledged panoramic image stitcher that can be freely downloaded from its website at Microsoft Research. It is a separate application, but I suppose that the Live Photo Gallery technology is largely based on a simplified version of ICE.

Anyway, using the composite editor, you'll be able to load a bunch of photos via drag 'n drop and the application will automatically try to figure out the relative alignment and the optimal parameters to create a nice panorama for you (exactly like in Photo Gallery).

Microsoft Image Composite Editor interface.

Apart from zooming in and out on the panorama preview, you can then customize a nice set of properties, like the camera motion used when shooting the source pictures, the projection parameters and the focal point of your final picture. You can also auto-crop the panorama picture to quickly get rid of the black borders around the picture, which you have to remove manually in Photo Gallery. By the way, the ability to choose the correct projection for the picture can be very effective in reducing the final distortion: try switching from a cylindrical projection to a perspective one (or viceversa).

After twiddling with the many parameters and finding the perfect composition, ICE offers many different export options. The most common ones are simple flat image formats, like JPEG, PNG or bitmap. The image below is the panorama stitch of the photos I shot of the Danube, from the fortress of Belgrade:

The Danube from the fortress of Belgrade.

The photo is composited correctly by ICE and the color is blended much better than in the same picture processed by Photo Gallery. However, the awesomeness of ICE doesn't end here: the application can also export tiled picture data that can then be used either by Silverlight DeepZoom applications or by the special HD View picture viewer.

Pictures in HD View format can be embedded in a webpage either using a special plug-in (which is available in all major browser, except Opera unfortunately) or using the HD View Silverlight viewer. The Silverlight version is slightly less powerful than the plug-in, but runs on every browser and every platform supporting Silverlight 2.0.

EDIT: please note, in order to make the exported tiles work with HDViewSL, you'll have to select the "Deep Zoom Tileset" export mode in ICE.

Here's the same picture of the Danube in HD View:

This page requires Silverlight 2.

Get Microsoft Silverlight

Quite impressive, don't you think?  :)
The only downside is that I'll have to throw away all the panorama pictures I made till today and export them again using HD View...

Posted on Friday, March 27, 2009
38 comments posted

The notes gadget One of the few really useful Windows Sidebar Gadgets I often used is the "Notes" gadget: just great to paste snippets of text or to keep a short to-do list. Unfortunately, if you close the gadget by mistake, you'll also lose all the notes you were keeping!

There is a simple solution that works as long as you leave the "shadow copies" enabled on your OS. You'll have to access the folder where all gadgets settings are stored:

C:\Users\<userprofile>\AppData\Local\Microsoft\Windows Sidebar

Open up the folder's "previous versions" dialog and cross fingers. If you're lucky you'll find a version of the Settings.ini file of before you closed the notes gadget. Search for a line that contains the "Notes.gadget" string. Just a couple of lines below you should find something like:

0=Note one.
1=Note two...

Copy the contents of the notes to your current Settings.ini or restore the file completely.

Windows 7 includes an improved version of "Notes", which now has been promoted to a full blown application instead of being a simple gadget. That should also prevent the loss of notes due to accidental closing.  :)

Posted on Saturday, May 30, 2009
Tagged as
132 comments posted

Three days ago Windows 7 was released. I have been running the RC version for some time, both on my laptop and my desktop computer, and I'm loving it so far. It certainly is more than a "better Vista", but nonetheless the amount of polish, stability and overall lightness are major selling points of the OS. Especially if compared with the previous edition which is still perceived as sluggish and bloated (for instance, all elements of the new control panel have a consistent visual style finally!).

I decided to get Windows 7 Home Premium edition today and in the next days my copy should ship from Germany (it's kind of difficult to get a disc of the English edition here in Italy).

Microsoft also released some funny "7 seconds demo" ads.

Posted on Sunday, October 25, 2009
Tagged as
66 comments posted

MacBook Pro Windows 7 installation ritual.

I never thought I'd ever own an Apple computer. Now I do, but still the Apple OS doesn't really cut it for what I have to do for work. Hence, shortly after it's arrival, I went looking for some chicken blood, scented candles and a mysterious black robe: ready to perform the iHeresy and install Windows 7 on the brand new MacBook Pro!

Thanks to Apple, the heretical procedure is quite easy: the Snow Leopard installation disc you get with your Mac contains all Windows drivers you'll need and Mac OSX itself can do the partitioning work for you and setup the EFI bootloader correctly. In most cases the official installation guide will be perfectly fine to install Windows on a Mac PC.

However, if you'd like to setup a triple boot with Mac OSX, Windows and Linux, you'll need a more advanced solution: rEFIt, a toolkit that lets you customize the bootloader and boot from almost everything. Just download the latest package and install it in Mac OSX (it's a simple .dmg package). Refit won't show up as an installed application, but at the next reboot it should already show up instead of the gray Apple logo.

Now you're ready to partition your Apple's hard disk and install any other operating system. To do so, I suggest this great guide (which is slightly outdated, but nonetheless valid and very detailed). Essentially you'll have to follow this three steps...


Posted on Monday, May 03, 2010
66 comments posted


Windows Vista introduced a very nice feature called “hybrid sleep” that simplifies power management and allows the PC to enter a deep sleep state (S2 or S3) while persisting the RAM contents to disk. In this case, even if the computer lost power it could always resume its state without data loss.

I like this feature quite much and it appears to have become the default “sleep” state on most operating systems (Mac OS X had it for some time and the latest Ubuntu appears to use Hybrid Sleep as well by default). In some cases however you'd perhaps want the PC to hibernate and skip the sleep state altogether (i.e. enter the S4 state directly). Unfortunately Windows hides the hibernate option: your only option is to enter sleep, wait until the RAM state has been written to disk and then power off the computer manually.

Needless to say, this is ugly and could lead you to powering off the PC before it had a chance to write all data to disk. In order to force Windows to enter hibernation directly (without having to disable Hybrid Sleep), you'll need to run the following command from the command line (no need to run as administrator):

%windir%\system32\rundll32.exe PowrProf.dll, SetSuspendState 0,1,0

This will quickly fade out the screen, save the RAM to disk and power off the computer as if you clicked on the old “hibernate” option.

Posted on Saturday, May 29, 2010
Tagged as
13 comments posted

As I wrote last time, I recently switched OnTopReplica's installer from ClickOnce to a custom NSIS installer. In doing so I was voluntarily dropping a lot of nice features of ClickOnce (user-level installation, simple interface, automatic updating and Visual Studio integration) for a set of features I had to implement on my own. It worked out surprisingly well, so here's what I've done.


Posted on Wednesday, October 06, 2010
1231 comments posted

GStreamer During the last months I have been working a lot with the GStreamer framework and Mono, running on Linux. The experience has been quite pleasant (mostly) and I really like how GStreamer is designed and its incredible extensibility.

A couple of weeks ago I decided to test GStreamer on Windows, which sounded strange but nonetheless feasible. In fact, the ossbuild project publishes recent GStreamer packages which can be easily installed on Windows and they work perfectly well. Not all plugins are available still, but the core framework works great.

Then I noticed there actually is a .NET binding for GStreamer among the ossbuild packages. Using GStreamer via .NET on Windows? Blasphemy!


Posted on Tuesday, February 22, 2011
25 comments posted
Back to Klopfenstein.net
Clemens Klopfenstein Serena Kiefer Lukas Tiberio Klopfenstein Lorenz Cuno Klopfenstein
English German