ubuntu

SOLUTION: Extract .exe archive with 7z in Ubunu 9.04, fix “Unsupported Method” error

Just posting a quick fix to a problem I had with using 7z to extract an archive. I could list the contents of the archive, but any attempts to extract gave an “Unsupported Method” error. Dan Jacobson posted a solution to the debian bug tracking system, which is to install the package p7zip-rar.

In Ubuntu 9.04, I ran:
sudo apt-get install p7zip-rar

Now, I can extract the contents of my file with 7z as follows:
7z e TekSavvyAM.exe

Solution: Amarok Won’t Play Anything After An Upgrade To Ubuntu 9.04

I was happy to discover earlier today that Ubuntu 9.04 includes Amarok 2. But once I figured out how to queue up some music (which took a little time), I realized that nothing would play.

This was the standard output when I ran it from the command line:
balleyne@balleyne-laptop:~$ amarok
amarok(14270) Phonon::KdePlatformPlugin::createBackend: using backend: "GStreamer"
Object::connect: No such slot MainWindow::showStatistics() in /build/buildd/amarok-2.0.2mysql5.1.30/amarok-2.0.2/src/MainWindow.cpp:692
Object::connect: (receiver name: 'MainWindow')
QLayout: Attempting to add QLayout "" to MainWindow "MainWindow", which already has a layout
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
amarok(14270) Plasma::Applet::save: saving to "1"
amarok(14270) Context::ContextView::setContainment: "" Line: 599
amarok(14270) Plasma::ThemePrivate::config: using theme for app "amarok"
amarok(14270) Plasma::Applet::save: saving to "2"
amarok(14270) Plasma::Applet::save: saving to "3"
amarok(14270) Plasma::Applet::save: saving to "4"
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) Context::ColumnContainment::insertInGrid: "" Line: 603
amarok(14270) Context::ColumnContainment::insertInGrid: "" Line: 603
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
Object::connect: No such slot FileBrowser::Widget::setDir( const QString& ) in /build/buildd/amarok-2.0.2mysql5.1.30/amarok-2.0.2/src/browsers/filebrowser/FileBrowser.cpp:112
Object::connect: (sender name: 'KBookmarkHandler')
Object::connect: (receiver name: 'FileBrowser::Widget')
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
balleyne@balleyne-laptop:~$ amarok(14270) MagnatuneConfig::load: load
QPainter::begin: Cannot paint on a null pixmap
QPainter::begin: Cannot paint on a null pixmap
QPainter::begin: Cannot paint on a null pixmap
QPainter::begin: Cannot paint on a null pixmap
QPainter::begin: Cannot paint on a null pixmap
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) CoverFetcher::CoverFetcher: ""
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) Context::ContextView::clear: "" Line: 165
amarok(14270) Context::ContextView::clear: "" Line: 165
amarok(14270) Context::ContextView::clear: "" Line: 165
amarok(14270) Context::ContextView::clear: "" Line: 165
amarok(14270) CoverFetcher::~CoverFetcher: ""

The “QString::arg: Argument missing: Amarok – No track playing., 0:00″ seemed to be the problem. I found the solution from Xavier Merino:

sudo apt-get install phonon-backend-xine

I restarted Amarok and now it works fine.

Update: People are reporting mixed results in the comments. This fix doesn’t work for everyone. Let me know if you become aware of a better solution and I’ll update here.

Another suggestion is sudo apt-get install libxine1-ffmpeg

Getting Started with the Openmoko FreeRunner: Installing Om 2008.12 in Ubuntu

Heather, my girlfriend fiancée, was kind enough to buy me an OpenMoko Freerunner in January. I went out to get a new SIM card (since there were known issues with my current one) and I experimented with it for a couple weeks, but had to leave it be lately as the past couple months have been very busy.

This morning I got back into the game.

One thing I wish I’d known from the outset is that there are a bunch of different distributions available. When I went into the IRC channel for help, I got several (polite) rtfms directing me to the Getting Started guide (which I was already looking at). Except, the Getting Started guide and FAQ provided a ton of contradictory information (which I’ve since tried to correct) about which distribution ships by default, nevermind a clear explanation that there are different distributions to begin with. Even worse, the FreeRunner ships with Om 2007.2, which is old, basic and not even supported anymore. (My mom asks, “so, would you say that it’s not quite ready for the average user yet?” Considering that the first order of business is to reflash it with a new distribution…) It took me a while to figure all that out. I hope to spend some more time soon trying to improve the documentation so that new users aren’t as confused as I was in the beginning.

I’ve decided to start with Om 2008.12 Update, the latest official distribution. I may consider FAT and Dirty Openmoko (FDOM) soon, which is just Om 2008.12 “updated with many ready-to-use applications.” Qt Extended is on my radar as the just-a-working-phone distribution (but where’s the fun in that?). Though, the next major step I think will be to dual-boot with Android, as that seems like it may be the best option in the long-run (though it’s very much a work in progress now).

Installing Om 2008.12 Update in Ubuntu

Installing Om 2008.12 was actually pretty easy in Ubuntu: download the kernel and rootfs, then follow the instructions to flash the NeoFreeRunner. (I didn’t worry about a backup since I had nothing of value on there.)

I choose to use dfu-util instead of the NeoTool GUI because dfu-util is already in the Ubuntu 8.10 repositories.

sudo apt-get install dfu-util

I only encountered one problem when following the instructions. When I tried to run the dfu-util command, it detected two devices, even though I had nothing else plugged into my laptop but a power cord. The second one was named “UNDEFINED”, which wasn’t particularly helpful either.

$ sudo dfu-util --llist
dfu-util - (C) 2007 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Found Runtime: [0x1d50:0x5119] devnum=4, cfg=0, intf=2, alt=0, name="USB Device Firmware Upgrade"
Found Runtime: [0x0a5c:0x2110] devnum=3, cfg=0, intf=3, alt=0, name="UNDEFINED"

According to the comments on this ticket, it’s actually expected behaviour for dfu-util, and it could very well be my bluetooth interface that was showing up. Instead of disabling it, I just used the -d flag as suggested in the comments to specify which device to update. (Also, under Ubuntu, don’t forget sudo…)

sudo dfu-util -a kernel -R -d 0x1d50:0x5119 -D Om2008.12-om-gta02.uImage.bin
sudo dfu-util -a rootfs -R -d 0x1d50:0x5119 -D ./Om2008.12-om-gta02.rootfs.jffs2

… where 0×1d50:0×5119 is vendor/product ID of the FreeRunner (found via `dfu-util –list`).

The FreeRunner can boot from flash memory or a microSD card. I plan to try Om 2008.12 (or a variant) in flash and I’ll probably dual-boot with Android on the microSD card at a later date. So far, I’ve just turned it on and sent Heather a message and added her as a contact, but I hope to finally be getting some real use out of it soon!

HOWTO: ThinkVantage Button in Ubuntu 8.10

I’m pretty sure this is the same fix I used in Gutsy and Hardy, but I had to do it again to get my ThinkVantage button working on my ThinkPad T61 in Ubuntu 8.10 Intrepid. I just added the following line to /usr/share/hotkey-setup/ibm.hk and it worked after a reboot.

setkeycodes e017 148 #thinkvantage button

HOWTO: Thinkpad scroll button in Ubuntu 8.10

Overall, I’ve been pretty happy after upgrading to Ubuntu 8.10, but there were a few annoyances. I noticed my Thinkpad scroll buttons stopped working, and when I checked xorg.conf, all my changes were commented out with a note “HAL is now used.” At least wasn’t too hard to figure out how to configure it through HAL.

  1. Create a new file mouse-wheel.fdi at /etc/hal/fdi/policy : sudo gedit /etc/hal/fdi/policy/mouse-wheel.fdi
  2. Add the following lines to the file:
    <match key="info.product" string="TPPS/2 IBM TrackPoint">
    <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
    <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
    <merge key="input.x11_options.YAxsisMapping" type="string">4 5</merge>
    <merge key="input.x11_options.XAxsisMapping" type="string">6 7</merge>
    <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
    <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
    </match>
  3. Restart and it should all be working.

Now to get my ThinkVantage button working again… *sigh* Update: fixed.

Ubuntu Christian Edition: Don’t surf the web, walk on it

I found this a while back and it’s pretty old, but I just came across it again recently and had a good laugh. There’s an unofficial Ubuntu distribution called Ubuntu Christian Edition and this blog has a ton of hilarious[ly nerdy] “facts” about it, for example…

  • In Ubuntu Christian Edition, all documents are saved by grace through faith
  • With Ubuntu Christian Edition, you don’t need to surf the web — you can walk on it
  • For 40 days before Easter, Ubuntu Christian Edition works in text mode only
  • Ubuntu Christian Edition has the confess command that deletes your logs and caches

sox soxio: Failed reading : unknown file type

I began receiving this error in Ubuntu (after upgrading to Hardy 8.04 I think) whenever I tried to use the sox or play commands. Turns out the solution is pretty simple, sox had just lost its available format libraries.

sudo apt-get install libsox-fmt-all

Getting Hydrogen to work with JACK in Ubuntu Studio

I recently stumbled upon the Ubustu Feed when I began learning Ardour. They have a great tutorial on how to sync Hydrogen with Ardour:

This tutorial will show you how to sync up the digital audio workstation, Ardour, and the advanced drum machine, Hydrogen. This will allow you to have a full featured drum machine playing in perfect time with your Ardour session. Or, one hell of a fancy click track.

I ran into one complication on my system though — getting Hydrogen to work with JACK. The output sockets just weren’t showing up when I opened Hydrogen, even though JACK was running and working fine. Thanks to a post by schivmeister in the Hydrogen Forum, I was able to get it working by changing ‘alsa_pcm’ to ’system’ in the JACK portion of the ~/.hydrogen/hydrogen.conf file so that it reads as follows:

<jack_driver>
<jack_port_name_1>system:playback_1</jack_port_name_1>
<jack_port_name_2>system:playback_2</jack_port_name_2>
<jack_transport_mode>USE_JACK_TRANSPORT</jack_transport_mode>
<jack_connect_defaults>true</jack_connect_defaults>
<jack_track_outs>true</jack_track_outs>
</jack_driver>

Best. Metronome. Ever.

Canonical’s schizophrenia about FOSS

Last month, George Farris began a thread on the Ubuntu-devel-discuss mailing list questioning the license choice of Ubuntu training material. The training manuals are released under a Creative Commons BY-NC-SA license, which is non-free because it doesn’t allow commercial use. George asks, “why on earth would you not allow educational institutions to use this material in classes?” Billy Cina from Canonical responded:

The purpose of the license is to prevent the material being used for profit-seeking purposes. If you (or anyone else) is from a not-for-profit institution or running community classes etc., then this material is 100% intended for that. Charging students minimal fees to cover expenses is also ok.

The problem is that isn’t true. Neal McBurnett highlights the huge legal gray area surrounding the non-commercial clause. When George brings up a practical example of using the manual to offer a course on Ubuntu and charging a student fee ($50-$199.00), Billy confirms the problem: “Non-profit are key words. $50 – $199.00 sounds like profit seeking to me.”

Scott Kitterman retorted that “if this were packaged for inclusion in Ubuntu it would have to go into Multiverse because it does not carry a free license.” I added that there are other free licenses available which are better suited for documentation and inline with the Ubuntu philosophy and the philosophies of free software and open source software communities: CC BY, CC BY-SA, GNU Free Documentation License.

Billy Cina provided an unfortunately empty corporate response:

Ubuntu is a free distribution and will always continue to be free. However, this does not mean that every service provided to support Ubuntu or its further expansion must also be free. Both the Ubuntu community and Canonical have invested a lot of time and money in developing this course, it is therefore reasonable for: a. the community to be able to use the material (freely) to further spread the work of Ubuntu and grow the user base, and b. for Canonical to determine who should be seeking a profit out of its investment.

The problem is… well, the whole statement.

Billy muddles the two meanings of the word free. No one expects that every service provided to support Ubuntu will be provided at no cost, but one does expect Canonical to have a more consistent respect for the freedom central to the open source software it provides. Using a non-free license by choice seems inconsistent with Canonical’s stated mission of “facilitating the continued growth and development of the free software community” since it’s inconsistent with the community’s beliefs and restricts its development.

More importantly, the community isn’t able to use to the work freely. Community members are in a legal gray area, at best, if they want to be compensated for any time and money they spend on training if they make use of these materials because of the non-commercial clause. Nevermind the implications for business users in the community.

Yes, Canonical has the legal right to make this decision. But Canonical (and the community) would benefit from some consistency in their commitment to free software and free culture. If everyone in the free software world believed it was reasonable “to determine who should be seeking a profit out of [their] investment[s],” Canonical wouldn’t have a distribution.

Scott Kitterman says:

The exact same argument applies equally well to the Ubuntu distribution. I don’t see how it’s somehow better for documentation that the community contributed to than for the distribution.

Personally, I don’t expect there’s much more point in discussing this as this seems to me to be typical of Canonical’s schizophrenia about FOSS.

The non-commercial clause is counter-productive. It severely limits the use of the materials, when such use would only further the adoption of Ubuntu and by extension a demand for Canonical’s services.

If I were a small business considering Canonical’s distribution, I’d be concerned that Canonical thinks it ought to control profit-seeking within its community.

Encoding to Ogg Vorbis using a GStreamer pipeline – vorbisenc plugin quality property

I’ve been eager to transition my music library from the proprietary patent-ridden MP3 format to Ogg Vorbis, and since my iPod died a few months back, I’ve decided to make the move. I’ve read up on Ogg Vorbis and learned that it’s best to re-rip my CDs, since converting from one compressed audio format to another is a bad idea.

In Ubuntu 8.04, I tried using Rhythmbox and Sound Juicer to rip my CDs. They both use the same settings, making use of a GStreamer pipeline, and I encountered a problem with the quality setting. The Vorbis format uses a quality setting of -1 to 10, instead of measuring quality by bitrate. I wanted to use a Vorbis quality setting of 6. I went to Edit -> Preferences and clicked “Edit” under the “Format” heading. I selected “CD Quality, Lossy” (Ogg Vorbis) and the GStreamer pipeline read:
audio/x-raw-float,rate=44100,channels=2 ! vorbisenc name=enc quality=0.5 ! oggmux

0.5 seemed ridiculously low, so I changed it to 6. Which didn’t work. I googled around, sifted through man pages, baffled at what this quality setting should be set at… didn’t it use the standard Vorbis quality scale? It did, but in a stupid way.

Eventually, I went in search of the Gstreamer documentation, and found this description of the quality property for the vorbisenc plugin:

Specify quality instead of specifying a particular bitrate.

Allowed values: [-0.1,1]

Default value: 0.3

Who decided to make the scale one tenth of the actual standard? *sigh* Ah well, now I know how to use it and it’s working wonderfully! Here’s my new pipeline:
audio/x-raw-float,rate=44100,channels=2 ! vorbisenc name=enc quality=0.6 ! oggmux