Skip to main content

Posts

Test code

This is only a test of formatting source code in Blogger. See http://code.google.com/p/syntaxhighlighter/ for details. Use Notepad++ when copying source over from clipboard. Option Explicit Sub Main() Include "Common.TWin32TreeView" Dim wtv As TWin32TreeView 'Window("Desktop Window").Attach Window("Application=Explorer.exe ClassName=CabinetWClass TypeName=Window").Attach Set wtv = New TWin32TreeView wtv.Handle = TreeView("Index=1").hwnd Dim sMsg As String sMsg = "Root item is " & wtv.GetRootItemText sMsg = sMsg & vbCrLf & "Selected item is : " & wtv.GetSelectedItemText 'MsgBox sMsg If wtv.IsSelectedItemExpanded Then MsgBox "selected node is expanded" Else MsgBox "it is not yet expanded" End If End Sub

Minimal Debian Etch install with X and open-vm-tools

World wide mirror sites ( link ) After installing the base system, do the following. For main Debian repository hostname:/# nano -w /etc/apt/sources.list #more entries from here of course from /etc/apt/sources.list deb http://ftp.debian.org/debian etch main contrib non-free deb-src http://ftp.debian.org/debian etch main contrib non-free deb http://www.backports.org/debian etch-backports main contrib non-free Hongkong is best for my case too: #more entries from here of course from /etc/apt/sources.list deb http://ftp.hk.debian.org/debian etch main contrib non-free deb-src http://ftp.hk.debian.org/debian etch main contrib non-free deb http://www.backports.org/debian etch-backports main contrib non-free Notice that we added backports URL in sources.list. That's where open-vm-tools are currently hosted. Continue with installing the rest of the software: :/# wget -O - http://backports.org/debian/archive.key | apt-key add - :/# apt-get update :/# apt-get install less  Depen

Fixing VBox guest lossing networking connection

When playing around with Virtual Box guests running Linux, the network connection my get lost on Debian Etch when the virtual interface's MAC changes. This is due to the fact that this version of linux is using udev and fortunately udev detects changes to MAC address. So basically, each new network interface with new MAC address gets its new ethx network interface device name. In my case, I got 3 ethx's already so I need to get rid of the unnecessary interfaces. As a root do this: $: su #: cd /etc/udev/rules.d #: mkdir ~/bak #: cp zxx_persistent-net-generator.rules ~/bak #: rm zxx_persistent-net-generator.rules #: /etc/init.d/udev stop #: /etc/init.d/udev start Note that we make a backup of the file just in case we need to go back. Also, for zxx_persistent-net-generator.rules, xx is any two digit number. So just go check the directory for a file that resembels *_persistent-net-generator.rules. Now to prevent udev to generate new interface for every new MAC address for Virtu