Thursday, April 30. 2009
File system defragmentation is a not as obvious task in Linux/Unix as it is in Windows. Modern Unix file systems are designed to avoid fragmentation. However, in rare cases I explicitly want to defrag my favored XFS partitions, and it’s done this way: Check fragmentation percentage: # xfs_db -r -c frag /dev/sdaX Defrag: # xfs_fsr /dev/sdaX
Tuesday, March 3. 2009
Debian’s standard kernel 2.6.26 has a little drawback: The coretemp module doesn’t recognize Intel’s Core i7 processor. The sensor chip W83667HG of my Asus P6T Deluxe (LGA 1366 socket) is not yet supported as well. This is a typical symptom when using Linux on too recent hardware. However, if it’s enough for you to read an aggregated CPU temperature instead of eight individual core temperatures, you can force loading the w83627ehf module with # modprobe w83627ehf force_id=0x8860 and tune the /etc/sensors3.conf to get rid of false alarms. Luckily, for the current prerelease 2.6.29-rc6 there’s a very recent bunch of patches available that brings support for W83667HG into the w83627ehf module, whereas coretemp already finds the CPU. Follow this guide on how to compile and install a new kernel the Debian way. A drawback is that source modules from the official Debian repositories might not compile anymore, e.g. the MadWifi modules. You have to get them from the project directly (via SVN). You also need to build a current version of lm-sensors (via SVN) to correctly gather the values from w83627ehf. You could then visualize the values e.g. with gkrellm. Now have fun stress-testing your system with MPrime. Update 03/24: It appears that these patches didn’t make it into the final 2.6.29 release. Update 04/09: The patches went into 2.6.30-rc1.
Sunday, March 1. 2009
Because it’s a pain, a short reminder for myself on how to connect a Bluetooth capable cell phone with a Debian box: - Install bluez-utils.
- Read this (German) guide and follow instructions, but ignore the obsolete stuff about the pin helper; today it’s just an entry like passkey “1337”;
- For whatever reason, hcid doesn’t launch a passkey-agent automatically. For the very first connection, you have to do it by yourself:
- Get both the passkey-agent.c.gz source and its Makefile from the bluez-utils examples directory and compile it; you’ll need libdbus-1-dev.
- Launch it as /path/to/passkey-agent 1337 HA:RD:WA:RE:AD:DR and go to a different shell.
- cat < /dev/rfcomm0 and enter the requested pin on your cell. If nothing special happens, you’re done.
In your cell’s Bluetooth settings you could now permanently authorize your PC. The next cat < /dev/rfcomm0 shouldn’t initiate a pin request anymore.
Friday, January 16. 2009
About ¾ of a year later I did my next try with installing NVIDIA CUDA on Debian lenny, mainly because I wanted to try GpuCV, a GPU-accelerated computer vision library that’s partly compliant with OpenCV. Debian is still not officially supported by NVIDIA, but the finally upcoming release of lenny and NVIDIA’s support for the rather recent Ubuntu 8.04 (2008/04) have a very positive effect: CUDA 2.1 Beta works out of the box, and this with lenny’s GCC 4.3! The only thing I had to consider is to install libxmu-dev and libc6-dev-i386 (for my 64-bit CPU) to make CUDA’s examples compile. Also, in order to actually execute the examples, one has to rely on the NVIDIA driver version 180.06 that CUDA provides, whereas even NVIDIA’s version 180.22 fails to execute the OpenGL examples with the message cudaSafeCall() Runtime API error in file <xxxxx.cpp>, line nnn : unknown error. With CUDA working I could then think of compiling GpuCV from SVN. But the build relies on Premake 3.x, which is not available in Debian and has to be installed in advance. In addition, the package libglew1.5-dev is needed. Some more stumbling blocks were that I had to define the typedef unsigned long GLulong by myself. Also, and IIRC, the provided SugoiTools of GpuCV didn’t link, so I fetched and compiled them from SVN as well, and I replaced the .so-files in GpuCV’s resources directory. After that GpuCV finally compiled (except the GPUCVCamDemo, as I don’t have the cvcam lib installed). Including the lib/gnu/linux paths into the $LD_LIBRARY_PATH, the GPUCVConsole demo finally runs. The next step will be to actually use that lib.
Thursday, July 17. 2008
Sometimes I take AVI videos with my Canon PowerShot, and I process some
of them with a video editor and export them as MPEG. However, those
video formats can’t be streamed, and so I like to convert them to FLV
to enable a YouTube-like streaming in web galleries by a flash video
player. For convenience, I wanted to use a context menu entry for Nautilus, where I could right-click on a video file and select “Convert video to FLV”. Luckily, Nautilus supports to execute arbitrary scripts from the context menu if you simply place them into ~/.gnome2/nautilus-scripts/. The only disadvantage is that it doesn’t check the file type in advance, thus also showing the video conversion entry for non-video files. However, you can include that logic into the script itself. The script is a little more complicated, as I didn’t know how to better parse the file names. Probably I should have used Perl. Here is my ~/.gnome2/nautilus-scripts/Convert\ video\ to\ FLV:
#/bin/bash zenity --question --title “Convert video to FLV” --text “Really?” || exit IFS=$’\n’ for file in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do ext=$(echo $file | awk ’BEGIN {FS=“.”}; {print $NF}’) filebase=$(basename “$file”) path=$(echo $file | sed -e “s/$filebase//”) filebase=$(basename $filebase .$ext) if file -i “$file” | grep -i video >/dev/null; then ffmpeg -y -i “$file” -ar 22050 -ab 32 -b 564k -f flv -s qvga “$path$filebase.flv” & else zenity --error --title “Not a video” --text “Hey, $filebase.$ext is not a video!” fi done
Tuesday, June 10. 2008
Fotobuch-XXL.de is one of the few providers (if not the only one) that has a native Linux app to create and order photo books. It is annoying that most services only provide versions for Win or Mac, and even web apps are rare. Unfortunately, Fotobuch-XXL only provide their app for the Ubuntu and OpenSuse distributions. But, as Ubuntu is just a derivative of Debian, it should actually not be too complicated to also install the package on Debian. Indeed, it isn’t: One just has to take care that the Python version in Debian ‘lenny’ is 2.5, and not 2.4, thus forcing you to choose the corresponding package source for Ubuntu Feisty (7.1) and upwards: deb http://www.fotobuch-xxl.de/bin/ubuntu-py25 / After updating your package list, you can already find fotobuchxxl-studio. However, it also depends on python-wxgtk2.8, which is only available in Debian’s own experimental section. After activating this source, you’re finally able to install fotobuchxxl-studio.
Note that I just tried whether the app actually launches, I neither really used it nor did I order a photo book. Yet.
Thursday, June 5. 2008
Recently I wondered why Google Earth stopped working on my 64-bit Debian machine when I upgraded Google’s app to version 4.3. It claimed to find no internet connection (“Error code: 29”), although everything was working fine before. The web finally unveiled the solution: The app needs the lib32nss-mdns package. Installed that, problem resolved!
|