Saturday, 19 May 2007

Converting m4a files to mp3

I have some m4a files I would like to keep in mp3 or ogg format. From what I found, you need to do this via the command line in Linux/Kubuntu.

For a refresher, m4a file are propietary iTunes music files. They may or may not have DRM, so they may or may not convert properly.

To convert a m4a file to mp3, you need faad and lame installed. Use Synaptic Package Manager to get them. Install. In your konsole/terminal, type:
$ faad foobar.m4a # to convert to wav
$ lame foobar.wav foobar.mp3 # to convert to mp3
If you need to change it to ogg, you need oggenc. Then you can do:
$ for nam in *.mp4; do nice mplayer -ao pcm "$nam" -ao pcm:file="$nam.wav" && nice oggenc -q5 "$nam.wav" -o "$(basename "$nam" .mp4).ogg"; rm "$nam.wav"; done
That's all one line. See link here and here.

Monday, 14 May 2007

Frostwire won't shut down, exit or quit

No matter if I closed Frostwire in the menu or the window button (X), it would not shut down. It would stay in my title bar. It did not move to the process bar on the right (unlike Frostwire on Windows).

I tried to shut down the service using the terminal/konsole:
ps -e | grep frostwire
No luck. But if you do
ps -e
you notice something. Ah, that's right, Frostwire uses JRE and looks like "Java", so that must be it.
kill ProcessIdOfTheJavaThingy
Does not kill the process. Nothing happens. (Replace ProcessIdOfTheJavaThingy with the number beside the program you want to kill). For fun, I tried:
sudo kill ProcessIdOfTheJavaThingy
That doesn't work either. Well, I guess I'll actually Google it or something.

This is not a bug (though that may be a matter of opinion...); it's a feature. Frostwire will not shutdown if there are items still waiting to finish. To fix this lovely feature, go into the Frostwire menus:
System Tray (on the left)
Select Shutdown Immediately
Well, that was easy.


UPDATE: easily kill a process that has a window - use a weird combination of both graphical and command line to kill a window! In your terminal, type
and then the system will prompt you to click on the window you want to kill. Great method for those of you who don't want to remember ps options and pipes.

Or... kill a process by name (say... "amarok") using pkill.
pkill amarok
Great link here about that.

Wednesday, 2 May 2007

Newbies aren't mind readers

Internet message boards are ripe with people who are willing to help with technical problems but don't explain ideas fully. This is especially true of Linux helpers. Linux jocks are really proud of using Linux, and are really smart. They are very encouraging of new users "discovering" Linux. Unfortunately, many of these types are horrible at explaining to users how to fix their problem, despite all good intentions.

So what you see is speedy willingness to answer a question, and then an intimidating response that only frustrates the user further.

"Oh great, someone answered me! But I still don't have any idea how to fix my problem. And now everyone thinks my problem is solved, therefore I'll get ignored."

(I added the last post three years after the fact because I had the same problem and figured it out... and would like others to use this knowledge if needed. This post came up #1 on Google when I searched for the problem.)

What smart people fail to realize is newbies aren't mind readers. In Linux, many users are coming from Windows systems where the very concepts of how to solve a problem are different.
  • I have to use a command line? What is a console?
  • It looks like I click and download stuff, why isn't it there already? What do you mean, add a repository? How?
  • What do you mean, I have to compile it? Can't I just install it? What do you mean, I have to get the right one? It says it's for Linux!
When helping a newbie, you have to tell them
1) where to type any commands or look for options
2) exactly what to type, if it's command line

To newbies, it's not so obvious where to look. Did you even tell them what program you are talking about? Or if it's in their computer/system menu? They likely don't know every UNIX command out there.

Be direct and concise. You don't have to hold their hand for them, but don't take "the obvious" for granted. If you don't want to write too much, do a little legwork and find a couple URLs where the problem is already concisely spelled out.

This actually isn't so much a "newbie" problem as a "new to Linux or a piece of its software" problem.

Furthermore, if you really want to encourage newbies, you need to check back to a message you responded to to make sure you didn't confuse them any further.

Burning .nrg images with K3B

I downloaded a file and it was a .nrg file, which I know is an image file you can use to burn an image of a CD.

What I forgot is that .nrg files are images used in Nero. I don't have Nero, I use K3B.

Thanks to the folks at, they gave some insight as to the situation. If you strip the first 300 bytes of data off the .nrg file, the remainder is an ISO file.

So to change a .nrg file to an .iso file so you can burn it, open up a terminal/console/shell (Konsole) window. Change to the directory the .nrg file is in, and type:
dd bs=1k if=image.nrg of=image.iso skip=300
Replace image.nrg with then name of your .nrg file (something.nrg), replace image.iso with the name you want your outgoing file to be (something.iso)

Then burn the disc using K3b and the .iso file that you just created.

Uh... don't forget to burn the disc as an image, not as data.

Here's the link I found for the UNIX command dd.

Disclaimer: K3b did a checksum before burning and it was successful. So I guess the checksum is on the actual data and not the extraneous Nero data. I haven't actually installed the CD yet, though, so we'll see...

Tuesday, 1 May 2007

WindowsXP/Kubuntu Dual Boot video

I am considering installing a dual boot system (Windows XP and Kubuntu) on a friend's system. I have no idea how to get started nor do I know anyone who has done this before.

I'm reasonably secure in formatting drive, partitioning drives, and setting up Windows. However, despite finding some instructions, I would like to know what to expect. What actually happens? What does the screen look like at this point? What do I need to pay close attention to? This video explains exactly that.

How to set up dual boot Windows XP and Kubuntu in video. Great idea!

(I'm a little on the fence on the crack about women getting turned on by the install. On one hand, it is kind of funny because women tend not to be turned on by nerds oogling a Linux box. On the other hand, from watching the video you can see why. Point is, the comment wasn't very mature and didn't belong in this type of video. If you want to encourage women in computing, don't turn it into adolescent boys' club. Looks like someone needs to read HOWTO Encourage Women in Linux. I'm not really upset about this, but I'm saying it was a stupid thing to do.)