Home » Posts tagged "Ubuntu" (Page 3)

Use an alternative browser to open links in Thunderbird 7 (Xubuntu 11.10)

I’ve been using the latest Xubuntu (11.10) for a couple of weeks now on my netbook and must say I’m very pleased with it. I’ve only got a couple of issues with it, one of them Thunderbird not using my default browser (Chromium), but Firefox, to open external links. But no more! After searching a bit on the internet I got the suggestion for setting network.protocol-handler.app.http and network.protocol-handler.app.https to x-www-browser. Unfortunately this doesn’t seem to work anymore.

The right way to do it now is open your about:config (from the menu: Edit > Preferences > Advanced). Open the Configuration Editor and search for both network.protocol-handler.warn-external.http and network.protocol-handler.warn-external.https. These two are most likely to have a value of false. Change it to true and the next time you’ll try to open a link from some e-mail it’ll ask you which browser to use. Chromium isn’t likely to be shown in the list of choices, so use the navigate button. You can find Chromium at /usr/bin/chromium-browser.

Now to find a fix for my other two problems: netbook won’t recover from sleep mode and somehow it won’t let me use a 1080p resolution through HDMI on a external screen.

Touchpad not working after login – Ubuntu 10.10

This morning I had a nice surprise when I booted my laptop to Ubuntu 10.10. After the automatic login my mousepad had stopped working. My laptop, a HP Pavilion dv7, has a button to disable the mousepad. This button actually works under Ubuntu, albeit a bit slow. Pressing this a few times did not seem to help.

Apparently my mousepad was disabled before my laptop was shutdown. I did not do this and I still don’t know what caused it. After a little searching I came across a community docs page giving this solution:

  1.  

ps: The commandline options are double-dashes. My website template seems to convert this…

Using rsnapshot for daily MySQL backups

Now that I’m using a CloudServer I figured I had to do something about backups as well. I’ve been using rsnapshot at work for a few years now and it’s an ideal backup solution. Because rsnapshot (which uses rsync as its base) makes use of hard links backups are very efficient. Basically it means that if a file isn’t changed it’s not duplicated, but a hard link is created instead. This way only changed and new files get copied. Deleted files will eventually be removed as well as soon as one of the backups expires.

Using rsnapshot for file backups is easy and the configuration explains this easy enough. Backing up MySQL databases however is a different story. When using MyISAM tables you might get away with copying and pasting the database files. With InnoDB not so much. Proper backups can be made with mysqldump. In my case I don’t have many databases so I want one big SQL backup file.

First, lets set up our backup script. I’ve stored it under /usr/local/bin/backup_mysql.sh with permissions set at 0700. The reason for these permissions is that I store my password inside the script and only want root to be able to open it. It also needs to be executable. I know it’s better to use a configuration file and use source to include the variables, but for my current use it’ll do (do note at work I’ve done this the proper way!). I also use the root user instead of a special read-only user. I know this is bad practice, but again I’ve done this the proper way at work. It’s an exercise for you to do it properly (hehe, that’s another way to put that I’m lazy). Anyway, here’s the script.

  1.  

Nothing exciting. Change the credentials as required. Again, use source if you want to store the credentials inside a proper configuration file. Now, calling this script ./backup_mysql.sh will backup all databases inside the file mysqldump.sql in the current work directory.

Next is setting up /etc/rsnapshot.conf which is easy as well. At the end of this file you’ll find all the instructions of which directories to backup. Enter the next line. Do note that rsnapshot.conf uses a tab to separate values.

  1. backup_script   /usr/local/bin/backup_mysql.sh  mysql/

To enable daily backups uncomment the next line:

  1. #interval       hourly  6
  2. interval        daily   7
  3. #interval       weekly  4
  4. #interval       monthly 3

To make rsnapshot run every day update /etc/cron.d/rsnapshot:

  1.  

Finally, try running rsnapshot. After it has run check your backup directory, which on Ubuntu 10.04 defaults to /.snapshots/. Be sure to mount /.snapshots/ on a separate drive. Because what use is it if your data drive contains your backup and decides to commit suicide?

$ sudo rsnapshot daily

Your MySQL backup file should now be located at /.snapshots/daily.0/mysql/mysqldump.sql. You can restore this file with the MySQL commandline client, or through MySQL Administrator from the MySQL GUI Tools.

Ubuntu 10.04 with vmhgfs and open-vm-tools

In an earlier post by me I described how to get open-vm-tools working in Ubuntu 9.10. Turns out that this doesn’t quite work for the latest version of Ubuntu, 10.04. A few tickets were spent on it at Launchpad and finally last night someone, I presume the module author, said you also need to install open-vm-dkms. Which I did. After this the module vmhgfs is available again and can be loaded.

So, when you install open-vm-tools and you want to make use of the vmhgfs driver you need to install open-vm-dkms. Otherwise compiling it yourself with m-a will fail. Note that with this step you no longer need to compile it yourself, as apt-get does it for you.

  1.  

Change is coming

Which apparently is the slogan for launching Ubuntu 10.04. I think this is going to be a very nice LTS release. It’s too bad that they didn’t include Perl 5.12 in it, but that’s understandable as it just got released; although compiling your own is very easy. On the other hand, PHP 5.3 got in there thanks to the pressure of some fellow Dutchmen. Not that I’m a big fan of PHP, but PHP 5.3 has some nice additions such as closures.