Amarok cannot connect to MySQL database

I deleted all instances of ‘amarok’ in $HOME/.kde4/share, and dropped the ‘amarokdb’ database, and dropped ‘amarokuser’, and re-created everything, but it still wouldn’t connect.

It turns out the solution is simple. Just change the password in the Amarok settings page from ‘password’ to something else (e.g. ‘password123’). Change the ‘amarokuser’ password, too, in mysql. Restart Amarok, and they can connect.

This is a bug in Amarok, as it doesn’t have a default password configured, one must be explicitly set.  Source

Nmap on Cygwin

Installed nmap on cygwin. Dead easy!

  1. Download and install Cygwin
  2. Download and install WinPCAP
  3. Accept most defaults
  4. Do the default installation, typically C:\cygwin\
  5. Download nmap for windows (zip)
  6. Open the zip file
  7. Double click the folder inside the zip, a large list of files should appear
  8. Extract these files (and not the folder which contains them) to C:\cygwin\usr\local\bin
  9. Open cygwin
  10. Type
    • nmap --version
  11. Your nmap installation on cygwin is now complete

Update 3/May/2012: Try running the vcredist_x86.exe file found in the zip archive if nmap doesn’t seem to run.

For a general understanding of nmap, just type nmap. For a more detailed comprehension, read the manual, and search the web.

This is why we love you, Gmail: Priority Inbox

Gmail has always been pretty good at filtering junk mail into the “spam” folder. But today, in addition to spam, people get a lot of mail that isn’t outright junk but isn’t very important–bologna, or “bacn.” So we’ve evolved Gmail’s filter to address this problem and extended it to not only classify outright spam, but also to help users separate this “bologna” from the important stuff. In a way, Priority Inbox is like your personal assistant, helping you focus on the messages that matter without requiring you to set up complex rules.”

The Priority Inbox segregates Gmail into three different categories: “Important and Unread”, “Starred”, and “Everything Else”. Gmail automatically filters incoming e-mail into either “Important and Unread” or “Everything Else”, while the middle category is populated by those messages that have been flagged for future reference.

Credit

OpenMediaVault

OpenMediaVault is looking quite promising. Development is still underway, and author has provided no taste to his loyal fans. This is another project from the same developers that brought you FreeNAS, an OS designed to store all of your files safely and secure, and make them accessible via a wide array of different networking protocols. It was based on FreeBSD. However, OpenMediaVault will be based on Debian GNU/Linux.

Password-less Logins with OpenSSH, scp, and rsync

UPDATE: I changed ‘>’ (erase file, then write to file) to ‘>>’ (append to file). This avoids you overwriting your, or other peoples’, public keys.

Setting up password-less logins is both dangerous, and mighty. It allows one to authenticate to an OpenSSH server without typing in a password. Authentication is gained via knowledge of a private key.

Generate a Public/Private Key Pair

$> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/felipe/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): <ENTER>
Enter same passphrase again: <ENTER>
Your identification has been saved in /home/felipe/.ssh/id_rsa.
Your public key has been saved in /home/felipe/.ssh/id_rsa.pub.
The key fingerprint is:
d7:79:c3:01:ce:90:71:a2:a2:3d:83:26:fb:9a:1f:5b felipe@linux.local

You will then find two files inside your directory. Keep them safe, secure, and secret. The public key (the one with .pub at the end) can be widely disemmindated. It represents the antonym of secrecy and privacy. The private key, however, must remain private and secret at all times.

Copy the PUBLIC key to a remote OpenSSH server

You must copy your public key to a remote host. The host will verify that you own the private key by encrypting a “challenge” and forcing your ssh client to decrypt it. If successful, you are authenticated, and admitted entrance. A password isn’t required.

$> cat /home/felipe/.ssh/id_rsa.pub | ssh felipe@remote-host.com \
"cat - >> .ssh/authorized_keys"
felipe@remote-host.com's password: <PASSWORD>

This copies your public key the authorized_keys file (NB: authorized_keys2 is deprecated and no longer recommended for use. OpenSSH checks both).

Testing Phase

‘logout’ or ‘exit’ and try:

$> ssh felipe@remote-host.com

It should not ask you for a password. You should automatically be logged into the remote system.

Works with scp and rsync too!

‘scp’ and ‘rsync’ both use a ssh client at the backend, and so will also authenticate automatically utilising your public and private key pair. Try:

$> scp file_a felipe@remote-host.com:file_b

This should transfer without pausing to ask for your password. Likewise try:

$> rsync -r /backups/2010/Jan felipe@remote-host.com:/backups/2010

This should backup your entire directory to remote-host.com without pausing to ask for a password. You can put a line similar to this one in a shell script, and run it with cron once a week or so. It will automatically backup your system, using OpenSSH, and proven secure and safe method for authentication of human and machines across an untrusted public network, away from curious eyes.

No More Promises

I will never again buy a RAID Controller card from Promise again! They claimed to support GNU/Linux, and they don’t. They said they didn’t have drivers for Windows 7, and then suddenly they magically appear on their Downloads page. We weren’t even notified.

I’m going to go with mdadm and try my luck with software RAID on Mint. If I must buy another card, for whatever reason (namely software RAID is much too slow, and hardware RAID will offload the work to the card itself) I’ll go with Adaptec.

OGG Vorbis vs. MP3

I just ripped some of my CD’s to MP3, but I was just curious what OGG would do for me. I had never actually compared the two encoding formats, side-by-side, but today, I was simply stunned.

A song compressed with MP3 (VBR 128Kbps Normal Quality) was around 5.1 – 5.8 MB. It sounded good, but ‘clearly’ inferior to the actual CD Quality sound.

The OGG rip (VBR 128Kbps), on the other hand knocked my socks off! It was around 3.0 – 3.1 MB and sounded ‘nearly’ as good as the original CD!

I hesitated, at first, to rip them all to MP3, in case I wanted to share them (!gasp!) with others. However, now that I can see a 17% – 20% compression gain using OGG over MP3, I no longer feel that way. I wholeheartedly endorse the use of OGG Vorbis for ALL compressed lossy compression.

Most [good] audio/multimedia players already support OGG (except, MS programs, obviously!) so you should have no problem listening to them.

If you have a portable media player (PMP) without native OGG support there are two options

  1. Contact the manuafaturer and demand (request?) that they support OGG in future versions of their players
  2. Ask them to create a firmware update to include OGG support on currently supported players
  3. Install Rockbox: a Linux-based GNU open-source free software suite which allows many major PMP’s to play a huge variety of free and proprietary (i.e. non-free, patented, or otherwise ‘encumbered’) formats, such as OGG. It also allows you to play wide variety of video formats, as well. It included a bunch of interesting features such as backlight dimming, battery-saving features, audio enhancement features, and plenty of games (plays DOOM too!)

UTF-8 characters in FreeNAS with rsync and cygwin and Windows

I’ve been having some problems with charsets (character sets) when using FreeNAS, rsync, deltacopy, and cygwin.

The filenames on a Windows box are either in UTF-8 or ISO-8859-1 (Latin1). The FreeNAS uses rsync to backup the files on the windows box, and saves them to a RAID array. I wasn’t sure if it was rsync, or FreeNAS causing the problem, but all characters with more than 7 significant bits (8 or more) were being “escaped” such as \#303 instead of Ñ.

I found the solution by using the “-8” flag in rsync. Also, I overwrote the cygwin.dll file supplied by DeltaCopy with a UTF-8-modified cygwin.dll, restarted DeltaCopy, and the filenames appeared correctly and in UTF-8 (instead of ISO8859-1).

As always, remember to BACKUP before journeying on with this! Good Luck!