How To
Block Windows Shut Down
by Bob on 28 January 2010, under Hacks, How To, Why Sys Admins Hate Me, Win32 & MFC, Windows
It’s hard to describe just how much I HATE rebooting my computer. If I have to use a Windows computer for any extended period of time, then I always change update policies to disallow automatic reboots. In fact, I usually click the irritating “Remind me in ten minutes” button every ten minutes for three weeks before I finally allow Windows to restart (or until I stop the Automatic Updates service).
So you can imagine how annoyed I was to come into work twice this week to the blue Windows logon screen. Every time this happens it takes me twenty minutes to figure out what I was doing the day before, what I have to do today, and where I stopped with my work. And really what made this so much more painful was that it happened without any advanced warning.
(continue reading…)Building Amarok 1.4 on Leopard
by Bob on 30 June 2008, under Hacks, How To, Linux, OS X, Open Source
I love Amarok and wanted to install it on my MacBook. With Qt4 on the horizon, it will be possible to run Amarok natively in OS X without an X server. But I didn’t want to wait for Amarok2 to become stable, so I looked into compiling Amarok 1.4 and running it under X.
I tried following the On OS X guide with limited success. Apparently, ffmpeg won’t compile on Leopard and that caused the entire libxine compilation to fail. I tried various combinations of configure flags, but none seemed to help. I looked at the source to try and fix it, but unfortunately I’m not terribly familiar with x86 assembly.
(continue reading…)Custom Draw ListView with Double Buffering
by Bob on 30 May 2008, under .NET, C++/CLI, How To, Win32 & MFC, Windows
For one of my pet projects, I needed to add a graphic to certain ListView rows. I considered owner-drawing the control, but that seemed messy. What I really wanted was a way to draw on top of whatever Windows painted. I couldn’t find a nifty .NET way to do this, so remembering a technique from the MFC days, I decided to custom draw the ListView. This would let me inject my own drawing code and let Windows handle the rest. Perfect!
I had originally implemented the ListView using a control style to eliminate the annoying flicker every time the list was repainted. Once I started custom drawing the control, I saw odd artifacts in the ListView’s client area when I scrolled or moved the mouse. If I turned off double buffering, it worked fine.
(continue reading…)HOW TO: Samba as an AD Domain Member
by Bob on 4 October 2006, under Active Directory, Gentoo, How To, Linux, Samba
There are probably a million and one articles about how to make Samba 3 an Active Directory domain member. But with all of that, this process still seems to require hours of research. So I’ve decided to compile my latest experiences here.
The domain member box is running Gentoo Linux. So you may need to adjust the steps to fit your flavor. Make sure the USE flags kerberos, ldap, samba, ssl, and winbind are set. Start by installing an NTP client.
# emerge ntp(continue reading…)
HOW TO: Work Least-Privileged in Windows XP
by Bob on 25 February 2006, under How To, Security, Windows
Have you ever been the victim of a computer virus, worm, or other malicious software program? If so, then you understand what a pain it is to recover. Often times, the only way to fix the problems is to do a clean re-install of Windows. Of course you can buy anti-virus and anit-spyware products, but these programs are all meant for after-the-fact. Wouldn’t it be nice to be able to stop malicious software (malware) in its tracks before damage is done?
Enter the “least privilege” security model. This approach to computing is very simple — only give yourself enough privileges to accomplish the task you need to perform. For example: do you need to be able to delete all of your system files while you write a letter in Microsoft Word? The answer would be “no, of course not!” But running with full privileges, you would be able to do so.
(continue reading…)