Getting readline to work with Ruby Version Manager (RVM) on Linux Mint KDE
I couldn't get readline to be picked up using the 'rvm package install readline' command. So instead I had to install the readline development headers as a Debian package
sudo aptitude install libreadline6-dev
And then tell rvm about the /usr directory when installing ruby
(Note: I had run 'rvm package install zlib' and 'rvm package install openssl' before running this next command)
rvm install 1.8.7 -C --with-zlib-dir=$HOME/.rvm/usr --with-openssl-dir=$HOME/.rvm/usr --with-readline-dir=/usr
This solution should also work for Ubuntu.
Enabling mod rewrite on Apache
To see if mod rewrite is enabled just create a simple php page with the following content
<?php
echo phpinfo();
?>
When you browse to this page you should see mod_rewrite listed as a loaded module.
If not, then you gotta enable mod_rewrite for Apache
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
Now you can create a .htaccess file into the root of your site and start adding rewrite rules. Here's a simple example to make sure rewrites are working
RewriteEngine On
RewriteRule (.*) http://www.google.com/
When you browse to your site, you should now be redirected to Google - if not, don't fret! There's one other gotcha you should know about! Look in the configuration file for your site under Apache (eg. /etc/apache2/sites-available/default) and you will see a <directory> element for your site (careful, there could be a few different <directory> elements floating around, be sure to pick the right one). This will have an AllowOverride attribute which is likely set to None. This is the problem - if you want rewrite rules to take effect then AllowOverride should not be set to None. Try changing it to All. And hey presto, you should be good to go!
This thread on Ubuntu's forums proved invaluable in explaining this.
Awesome Linux Media Center using XBMC
One of things I have been doing lately is rediscovering my music - inspired by talking to the some of the Amarok guys at Akademy this year! So I decided to go on a search for an Open Source Media Center solution and up popped XBMC. Now this project isn't related to Amarok but that doesn't stop it being way too cool for school! I've being tinkering with it for just a few days and it just works like a dream.
Installation on Kubuntu is simple
- I just following the Install XBMC on Ubuntu HOWTO
- In (KDE's) System Settings -> Autostart, added XBMC Media Center to startup automatically on computer startup
- From within XBMC itself, went to System -> Settings -> System -> Video Output and set the Resolution to be Windowed (as I usually want to be able to access my KDE desktop at any time)
- Initially you will have no music library. Instead you will add a directory location containing your music via Add Source. Then you can browse the added location and choose to Scan Item to Library to build up your music library
- By visiting System -> Settings -> Network -> Services you can Allow control of XBMC via HTTP by setting Port, Username and Password. If you know the IP address of the machine you are running XBMC on then you can simply browse to http://YOUR_MACHINE_IP_ADDRESS:PORT from any web browser enabled device to control your media center (for example http://192.168.1.7:6666). Note: XBMC must be running on the machine for this to work
- Once you have your music library set up, you will notice that you cannot access it through the web interface. To enable this, simply edit
~/.xbmc/userdata/sources.xmlby adding the following to the <music> element<source>
<name>Library</name>
<path>musicdb://</path>
</source>
Of course, when I don't need to a complete Media Center solution and just want to rediscover my music I fire up my beloved Amarok
Simply adding a Linux Partition via fstab
Just add something like the following to /etc/fstab...
UUID=1208c5dc-d4a6-a7a2-8352-ab12ecd64412 /media/disk-1 ext4 relatime,errors=remount-ro 0 2
... where
- UUID uniquely identifies the partition you wish to add (you can get the UUID for you drive using
ls -l /dev/disk/by-uuid) - /media/disk-1/ can be changed to be location on your system - it's where the partition will be added
- I don't really have a monkeys of what the other settings do, but I think they are more or less the usual defaults. Works for me!
Bang! Short blog post! Goodnight!