Entries from September 2009 ↓
September 29th, 2009 — Other
I read on OSnews about the alpha release of Haiku. It’s been several years since I installed BeOS the last time so I decided to try Haiku.
I first tried it on virtualbox but I didn’t get the networking to work flawlessly so I decided to install it on libvirt. I expected quite a hassle but it was done in a whissle.
First download the raw image of Haiku and run something like:
sudo virt-install --name="Haiku" --ram=512 --hvm --accelerate --import --file=/media/second_disk/vm-images/haiku-r1alpha1.image --vnc --bridge=virbr0
Next I had to edit the Haiku libvirt xml to change the default nic model. I always stop the libvirt service just to be sure. Then edit this file: /etc/libvirt/qemu/Haiku.xml
Make sure the nic looks something like:
<interface type='bridge'>
<mac address='54:52:00:6a:14:17'/>
<source bridge='virbr0'/>
<model type='e1000'/>
</interface>
I first tried the rtl8139 interface but that isn’t supported by Haiku :s A list of possible interfaces can be found on the libvirt website.
I can now access it via vnc. But Ubuntu has some kind of bug in the vnc client of virt-viewer so it is sllooooooowwwww…
September 28th, 2009 — Linux
Too lazy to type something usefull here. Just for my own reference…
Useful links:
- http://alsa.opensrc.org/index.php/DigitalOut
- http://www.pulseaudio.org/wiki/PerfectSetup
Steps to take:
usermod -a -G audio $USER
sudo aptitude install pulseaudio
sudo nano /etc/pulse/default.pa
load-module module-combine
load-module module-zeroconf-publish
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.1.0/24
pulseaudio –start (or run pulseaudio in screen)
aplay ~/train.wav
September 24th, 2009 — Linux, Other
Tomato is a replacement firmware for Linksys’ WRT54GL and it rocks!
I’ve installed it on my home router and on the new router of my boss. Both had other routers ( a Belkin and a US Robotics) and a lot of troubles with the stupid things. After switching to Tomato we’ve had no troubles at all! Upgrading was a breeze.
At work we still have a D-link but the conncetion keeps dropping. If I set it to WPA1 OR WPA2: no troubles. But WPA1 AND 2 it can’t handle So one of these days I’ve got to pick up a nice blue Linksys and install Tomato on it.
September 24th, 2009 — development, python, Ruby
I’ve ditched Ruby for my mpd project and started using Python. Not that I like python that much more but the Gstreamer library for python is much more complete. I really wanted gapless playback and the Ruby Gstreamer libray just doesn’t support that. If it does by the time you read this: please let me know
The new Pmpd project (looking for a better name) can be found on github. The hardest part so far is having to restructure the sources. Python is not a difficult language to master at all but I’m very picky on how everything fits together. My ruby project felt right on that part. But the python equivelant has some things I just don’t like enough up to now.
September 11th, 2009 — Linux, PHP
Since a few version of virtualmin I had some problems with checking the server configuration.
The problem is that I have manually patched suexec and the php fcgid script is in /var/www and not /home.
I had this error for quite a while but last week I fixed it. It was quite simple. Just change this code in “/usr/share/webmin/virtual-server/feature-web.pl:
# Make sure home base is under base directory, or template CGI directory is
if ($tmpl->{'web_suexec'} && $suhome &&
!&same_file($suhome, $home_base) &&
!&is_under_directory($suhome, $home_base) &&
(!$cgibase || !&is_under_directory($suhome, $cgibase))) {
return &text('check_ewebsuexechome',
"<tt>$home_base</tt>", "<tt>$suhome</tt>");
}
<p style="text-align: left;">return undef;
}
To:
# Make sure home base is under base directory, or template CGI directory is
return undef;
if ($tmpl->{'web_suexec'} && $suhome &&
!&same_file($suhome, $home_base) &&
!&is_under_directory($suhome, $home_base) &&
(!$cgibase || !&is_under_directory($suhome, $cgibase))) {
return &text('check_ewebsuexechome',
"<tt>$home_base</tt>", "<tt>$suhome</tt>");
} return undef;
}
So just add “return undef;” to the top of that piece of code. Then it will step out of the function before the additional check is executed.
# Make sure home base is under base directory, or template CGI directory is
if ($tmpl->{‘web_suexec’} && $suhome &&
!&same_file($suhome, $home_base) &&
!&is_under_directory($suhome, $home_base) &&
(!$cgibase || !&is_under_directory($suhome, $cgibase))) {
return &text(‘check_ewebsuexechome’,
“<tt>$home_base</tt>”, “<tt>$suhome</tt>”);
}
return undef;
}