Thursday, 7 June 2007

Lost Menubar in Konqueror

When I was using Konqueror as my file browser today, I got all click-y and accidentally lost my menu. My entire menu was gone. Right-clicking gave me numerous options, including enabling toolbars. However, they didn't work (the menu is is not a toolbar, it's a menu bar). Apparently this syntactical nitpicking makes a difference.

Quick internet search: CTRL + M fixes it.

I wonder if there's a way to enable it with a mouse?

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:
Tools
Options
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
xkill
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 linuxquestions.org, 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.)

Sunday, 18 March 2007

How to Manually Force a Program to Close

Yes, programs in Linux can crash.

If you need to force a program to close, but are wondering what the heck Kubuntu folks use instead of Task Manager (CTRL-ALT-DEL), try using the terminal instead.

(I suspect there is a GUI like Task Manager kicking around somewhere that you can install, but that would require installing it or finding it. You already have a terminal).

What you need to do is find the Process ID of the program that is running, and then kill that process. First: open a Konsole window. In the window, type
ps -e | grep NameOfProgramYouWantToKill
or
ps aux | grep NameOfProgramYouWantToKill
Sometimes the name of the program not obvious or not what you expect it to be. In that case, you can just do
ps -e
or
ps aux
and scroll through the list to find it. Once you find it, you'll notice a number beside it, on the left. Type:
kill number
And hopefully you've shut the right program down. The program should disappear from the taskbar. As always, if you are consistently starting to experience problems with hanging programs, you should try rebooting the computer. If you still experience problems, Google for bugs or an update or patch for the software.

Monday, 12 March 2007

Getting International and Accented Characters in Kubuntu/Linux

I've been practicing my French again. One of my local friends grew up in Québec virtually all his life, and one of my local friends is studying French in Québec for a year. When I chat to them, I like to type the French words as they're meant to be written, which includes the accents.

Anyway, I had fun finding where to switch my keyboard so I could use the layout. In Windows, you do it by switching to an American English International Keyboard layout (Control Panel -> Regional and Language Settings, I believe... not in Control Panel -> Keyboard like you'd expect).

I found where to change it. There are lots of options. In addition to the language settings, there are variants in the language settings (dvorak, international...)

In Kubuntu with KDE, I found it in:
System Settings -> Regional & Accessibility -> Keyboard Layout
For reference:
Ubuntu U.S. International Characters Chart
I'm a Canadian with a normal American keyboard (Microsoft RT2300). I've added several keyboard layouts in the list as I want to mess around to see which one I'm the most comfortable with. I seem to be using U.S. English layout with the variant "international".

You can set up other options by using the tabs in the top (Switching Options Tab with "Show indicator for single layout" checked gives you the list in your taskbar so you can easily switch back and forth between keyboard layouts.

The only difference I notice from Windows is the cedilla. The comma key does NOT give the cedilla. You have to use the RIGHT ALT key, and then type comma. This gives you "ç"

Wednesday, 7 March 2007

Sometimes no audio in Firefox pages with Flash

After having my system up and running for a while, I noticed that if I use Amarok and then open Firefox, videos in YouTube would have no sound. I figured this was just a wonky Kubuntu feature until I decided to actually research the problem.

This problem was solved if I would reboot the system and open Firefox and watch videos first (before playing music). The problem still was recurring, though.

Apparently this is more than an ALSA sound driver fight between Firefox and Amarok. It's actually a bug (see link).

How to fix your Firefox audio: open a terminal/console, and type
cd /tmp
mkdir /tmp/.esd
ln -s /tmp/.esd-1000/socket /tmp/.esd/socket

Friday, 5 January 2007

CD and DVD Drive Hanging

On rare occassion, my CD or DVD drive will hang. The disc will show up on the desktop, but I can not eject it by right clicking. When this is the case, pressing the physical button on the drive often doesn't work either.

(I'm actually writing this post long after the fact... I think I did this to get it solved: )

In /etc/fstab, edit the line that looks like this:
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,ro 0 0
to this:
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,user,ro 0 0
Also try:
chmod 777 /bin/mount /bin/umount