Blog - Unity Behind Diversity

Searching for beauty in the dissonance

Tagged: howto

HOWTO: Redmine 3.0 with Debian Wheezy, Nginx, Thin

I spent a few hours troubleshooting a problem with Thin when I upgraded from Redmine 2.5 to Redmine 3.0 on a Debian Wheezy server. I found a solution that’s worked for me. I’m not confident enough with Ruby and this setup to make a HowTo on the Redmine wiki, but I found next to nothing on this specific problem when searching the web, so I figure it’s important to post this in case it helps anyone else.

I’m running Redmine on Debian Wheezy with Nginx and Thin. I’m also running Redmine on another Wheezy server with Apache (and mod_passenger, I think). The latter upgrade to Redmine 3.0 went fine, but when I ran the same steps on the thin/nginx server, I was getting a Bad Gateway 502 error from nginx and found this in the thin logs.

!! Unexpected error while processing request: uninitialized constant Rack::MethodOverride::REQUEST_METHOD

Yet, when I ran Redmine with webrick (per Redmine’s installation instructions), it worked fine. Since it worked fine with webrick and on my other server, it seemed like the problem was at the Thin layer.

This Stack Overflow issue was the closest I could find, though it was with a different Rack application. The problem was a mismatch between the Rack version and the one required by the application.

I couldn’t find Redmine-specific examples (hence this post), but this one Redmine guide did say “Rack 1.0.1. Version 1.1 is not supported with Rails 2.3.5”.

Finally, the Stack Overflow issue linked to this issue in the Passenger tracker which pointed me towards the answer:

Your system has two Rack versions installed. One is version 1.5.0, installed by APT, and is located in /usr/lib/ruby/vendor_ruby. The other one is version 1.6.0, installed by RubyGems, and is located in /var/lib/gems/2.1.0/gems/rack-1.6.0.

Before Passenger loads your app, Passenger calls require “rack”. Because /usr/lib/ruby/vendor_ruby is in Ruby’s $LOAD_PATH, Passenger loads the Rack 1.5.0 library installed by APT.

However Sinatra requires Rack 1.6.0 or later…

This was my problem. When I installed Redmine 2.5, I ran `apt-get install thin`. It pulled in ruby-rack 1.4.1 as a dependency. This “conflict” wasn’t a problem in Redmine 2.5, which has “rack (~> 1.4.5)” in Gemfile.lock — the versions are close enough. However, Redmine 3.0 has “rack (~> 1.6)” in Gemfile.lock… hence the error I was seeing, as Rack 1.4.1 installed via apt was probably being loaded in place of the 1.6.1 Gem.

I tried to `apt-get remove ruby-rack`, but it was going to remove thin as well. (And I checked the Jessie repos, but its ruby-rack is still only 1.5.2.) I identified two solutions:

  1. Uninstall ruby-rack and thin via apt, and reinstall thin separately (this worked)
  2. Create a dummy .deb using equivs to install thin via apt without really installing ruby-rack (I didn’t bother trying this, since the first solution worked)

To install thin separately, first I removed it and ruby-rack whiling marking a couple other dependencies as manually installed and keeping the /etc/init.d/thin file…

apt-get remove ruby-rack thin
apt-get install ruby-eventmachine ruby-daemons # not sure if this was necessary or advisable, just a guess

Then, following the thin installation instructions, I was able to install the gem:
apt-get install ruby-dev build-essential
gem install thin
# Update the path in /etc/init.d/thin from /usr/bin/thin (apt) to /usr/local/bin/thin (gem)
perl -pi -w -e 's/\/usr\/bin\/thin/\/usr\/local\/bin\/thin/g' /etc/init.d/thin

I was able to start thin again (`service thin start`), but I was getting a new error for which I found the solution here: add thin to your Gemfile.

So, somewhat reluctantly, I opened up Gemfile in the Redmine root directory and in between a couple other gem lines I added the line:
gem "thin"

Then, I restarted thin, and Redmine was working again!

Things I don’t like about this solution or am unsure of:

  • Editing Redmine’s Gemfile sucks, because I’ll lose that change on every update and I’ll have to re-apply it. Since it’s a simple one-liner and updates are every few months, it works for me for now.
  • I don’t know yet whether those other apt thin dependencies are required or might cause other conflicts in the future… but since it’s working now, and I’m not familiar with Ruby, I don’t feel like spending more time to experiment and find out.
  • Maybe I should have looked at other options beside thin, like Puma or Passenger? But since I already had Thin working before, I just decided to see if I could salvage it rather than exploring alternatives. Maybe thin isn’t the best option in this circumstance though, but it’s working.
  • I’m assuming that /etc/init.d/thin was there and working because it was leftover from the apt thin installation (and because I didn’t `apt-get purge`). That may have been lucky that the init script happens to work (as far as I can tell for now) with the thin gem…

Hopefully this can help anyone else using Redmine(3.0)/Debian/Nginx/Thin seeing that error. I’d be happy to share configuration and fresh installation instructions once I have some confidence that this approach is sane, and in particular once I have a better solution than modifying the Gemfile.

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (1)

SOLUTION: gPodder 2.20.3 on N900: database disk image malformed

After some strange behaviour in gPodder 2.20.3 yesterday on my N900 (not responding to episode actions), I quit gPodder and tried to start it up again, but it would crash during startup everytime with an error about “database disk image malformed” from line 316 of dbsqlite.py on the query: “SELECT COUNT(*), state, played FROM episodes GROUP BY state, played”.

First, I opened up the sqlite database directly:
sqlite3 ~/.config/gpodder/database.sqlite

I could run that query and others no problem.

However, I found this guide on repairing a corrupt sqlite database, I ran the following integrity check command and it returned a couple errors along with the “database disk image malformed” message:
sqlite> pragma integrity_check;

So I followed the instructions from spiceworks, dumped my database to file and reloaded it into a new database:
cd ~/.config/gpodder/
echo .dump | sqlite3 database.sqlite > gpodder.sql # generate dump file
mv database.sqlite database.sqlite.bak # backup original database
sqlite3 -init gpodder.sql database.sqlite # initialize a new database from the dump file

And, voila, gPodder is working again.

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Post a Comment

HOWTO: Sync Notes Between Tomboy and Conboy with Snowy [UPDATED]

Updated: I’ve updated this guide to detail a proper sync with Snowy, rather than the old Unison hack (below), since Conboy now supports more than just Ubuntu One, and an experimental version Snowy is operational.

I’ve been a regular user of the fantastic Tomboy note-taking application since I replaced my Palm Pilot with a Nokia N900. With Conboy, a Tomboy client for Maemo, and Snowy, a web application for Tomboy notes, it seems like the perfect platform for uniting personal notes across the desktop, mobile and web (except for one drawback: Tomboy itself is a Mono application…). Initially, I used a hack with Unison to synchronize Tomboy files manually between my N900 and laptop, but I recently moved to proper, albeit still experimental, syncronization through my own Snowy server.

Installing Snowy

Snowy is a Djano-based, AGPL web service for Tomboy notes, currently under heavy development (and still labelled as experimental). I installed Snowy on my own Ubuntu web server using the official installation guides. I went with mod_wsgi, though I have Django running via mod_python on another server.

Installation was very straightforward. Just a few notes:

  • The debugmail step in the INSTALL file within the Snowy source directory didn’t seem to work for me, but I’m not too concerned about email yet. I’m just running this for me and my family. I’ll likely revisit this later.
  • Between the time that I followed the INSTALL steps and when I went to first sync from Tomboy, I had decided to switch the installation to a slightly different URL. I couldn’t figure out why the sync didn’t work, but it turns out I still had the old URL in the Django Sites table. Just a silly mistake on my part.
  • When you log in to your new Snowy server, in the current version, it isn’t obvious where to click to see your notes. You can click on your avatar in the top-right corner, or simply add /<username> to the end of your Snowy URL (e.g. my username is balleyne, so http://<my-snowy-url>/balleyne brings me to my notes

Tomboy

Tomboy comes packaged with the web sync plugin in recent versions of Ubuntu.

  1. Backup your notes!
  2. Log into Snowy in your default web browser.
  3. Open Tomboy, and go to Edit > Preferences > Syncronization
  4. Select Tomboy Web as the Service, and put in the root URL of your Snowy installation as the server.
  5. Follow the instructions to authenticate, save your settings (I set Tomboy to automatically sync every 60 minutes), and synchronize!

Conboy

Conboy focused on supporting the proprietary Ubuntu One web service first, but it now supports synchronization to any Tomboy web service (though the feature is labelled Beta). The only problem I had setting this up was a strange error about a missing api-ref and local time, but it turns out Conboy just didn’t want a trailing slash in the URL (seems like the trailing slash prevented proper authentication at the sync stage).

  1. Backup your notes!
  2. Log into Snowy in your default Maemo web browser.
  3. Open Conboy, and go to Settings in the main application menu.
  4. Enter your Snowy URL — without a trailing slash — as the Synchronization URL
  5. Click Authenticate and follow the instructions.
  6. Synchronize!

Conclusion

I’m super happy that the Tomboy / Conboy / Snowy combination is now ready to use, but do pay attention to the beta nature of Conboy sync, and the experimental nature of Snowy — make sure to backup your notes regularly to avoid any data loss.

I’m happy to be a guinea pig myself.

Old Way: Sync Notes Between Tomboy and Conboy With Unison

Disclaimer: this is a hack from someone who doesn’t know Tomboy well. It worked for me, but YMMV. And I have backups. And, mostly importantly… why aren’t you using Snowy now instead?. The instructions below should be treated as a hack preserved for historical purposes.

I wanted a way to sync Tomboy on my Ubuntu desktop with Conboy on my Nokia N900, but Conboy only syncs to Ubuntu One—a proprietary web service. Snowy synchronization support is supposed to be on the way, but Snowy itself is still under heavy development, so this might be a great option in the near future, but not today.

A comment on maemo.org made me think that rsync over ssh was a possibility, and a quick rsync showed this to work (as far as I can tell). The trick is being able to sync changes back and forth; rsync can’t handle updates to both the source and destination—it’s unidirectional.

Hence, Unison—a bidirectional synchronization utility. In case it’s useful to anyone else, this is how I’ve setup Unison to sync notes between Tomboy and Conboy.

Step 0: Some things you should know

First, I want to be clear that this is a temporary hack while I wait for proper synchronization support through Conboy with Snowy.

Prerequisites: I already have OpenSSH running on my server, and I have key-based ssh access configured from both my laptop and N900. Unison syncs remotely over SSH.

What this does: It allows me to synchronize notes and changes to notes from my N900 to my laptop, and potentially to any number of other computers.

What this doesn’t do: Unison has support for handling conflicts, but it’s not the least bit Tomboy-aware. A proper Tomboy sync might give you the option of renaming a note that has been changed in more than one place, but with Unison, you’ll be looking at diffs and merges of cryptically named XML files. So, I don’t recommend relying on Unison to sort out conflicts. I plan to sync often, backup often, and avoid conflicts as much as possible. This is for advanced users.

Tomboy Concerns: I’m using Tomboy, but actually quite uncomfortable with the risk, since it depends on Mono. I’ve considered switching to Gnote, but haven’t yet because I’m concerned about losing data/synchronization compatibility. But, this solution might work for Gnote too, and I may well s/Tomboy/Gnote/g in the near future.

Step 1: Desktop

1A: Install Unison

Unison is cross-platform and available for a variety of operating systems

I have Ubuntu on both my laptop and server right now, and I’m syncing through that server (instead of directly to my N900, which would be another option).

In Ubuntu, you can install unison with the command:
sudo apt-get install unison

Or, if you want a GUI:
sudo apt-get install unison-gtk

1B: Create a Unison profile for Tomboy

I created a file called ~/.unison/notes.prf with the following text:
# Unison preferences file
root = /home/balleyne/.local/share/tomboy/
root = ssh://alleyne.to/.local/share/tomboy/

I decided to sync my notes with the Tomboy directory on my server, which is also a workstation.

Now, I can synchronize the notes on my laptop with my server by running the command:
unison notes

1C: Enable NoteDirectoryWatcher Add-in for Tomboy

Tomboy doesn’t automatically look for changes to notes on the file system unless you enable the NoteDirectoryWatcher Add-in: Edit > Preferences > Add-Ins > Tools > Note Directory Watcher > Enable. This way, Tomboy will accept any changes you get from the Unison sync.

Step 2: Mobile

2A: Installing Unison in Maemo 5

To compile Unison, you need the OCaml compiler. To compile OCaml, you need the gcc compiler. I began the process of compiling compilers, but then realized that there were some unison .debs available already:

These were compiled for an older version of Maemo, but the command line version seems to be working fine for me in Maemo 5. Note, that if you use the GUI, it’s standard GTK, not a Maemo port, so you might need the stylus to use it.

To install, I ran the following commands:
$ sudo gainroot
# wget http://www.bundyo.org/maemo/unison/unison_2.27.57-2_armel.deb
# dpkg -i unison_2.27.57-2_armel.deb

2B: Create a Unison profile for Conboy

Similar to step 1B, I created a file at ~/.unison/notes.prf:
# Unison preferences file
root = /home/user/.conboy
root = ssh://alleyne.to/.local/share/tomboy

Now, I can sync my mobile computer with the server by running the command:
unison notes

And there was much rejoicing.

Conclusion

With Unison configured, I now have a basic, low-level sync between Tomboy and Conboy. I’m getting into the habit of syncing every time I change anything, to avoid conflicts. This should tie me over until a Conboy Snowy sync is available.

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (5)

SOLUTION: Firefox Fails When Upgrading After Using Mozilla PPA

This is a quick fix for a problem I had when upgrading to Ubuntu 10.04, after having used the Mozilla PPA.

The Firefox upgrade failed during the distribution upgrade process (from 9.10 to 10.04). I was told to run `dpkg -a –configure`, and the same error occurred again (it’s in bold).

$ sudo dpkg -a --configure
Setting up firefox (3.6.3+nobinonly-0ubuntu4) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist.
dpkg: error processing firefox (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of firefox-3.5:
firefox-3.5 depends on firefox; however:
Package firefox is not configured yet.
dpkg: error processing firefox-3.5 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox-3.0:
firefox-3.0 depends on firefox; however:
Package firefox is not configured yet.
dpkg: error processing firefox-3.0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox-gnome-support:
firefox-gnome-support depends on firefox (= 3.6.3+nobinonly-0ubuntu4); however:
Package firefox is not configured yet.
dpkg: error processing firefox-gnome-support (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox-3.5-gnome-support:
firefox-3.5-gnome-support depends on firefox-gnome-support; however:
Package firefox-gnome-support is not configured yet.
dpkg: error processing firefox-3.5-gnome-support (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
firefox
firefox-3.5
firefox-3.0
firefox-gnome-support
firefox-3.5-gnome-support

A quick web search brought up a bug report, and I was able to figure out this fix with the help of one of the comments:

Update: Fixed.My original solution was only temporary, and had to be repeated for each Firefox update (all the way through every update with 10.04, 10.10, now 11.04…). I’ve found the root of the problem now, by comparing local dpkg diversions for Firefox on my affected machines against an unaffected clean Ubuntu install.

On my laptop:

$ sudo dpkg-divert --list | grep firefox
local diversion of /usr/bin/firefox to /usr/bin/firefox.ubuntu
local diversion of /usr/bin/mozilla-firefox to /usr/bin/mozilla-firefox.ubuntu

The clean Ubuntu install returned no results for the above command. (Also, note that in the full output for dpkg-divert –list, those were the only local diversion — another hint that they were from the PPA upgrade rather than Ubuntu itself.)

So, I ran the following commands to remove the diversions:
$ sudo dpkg-divert --remove /usr/bin/mozilla-firefox
$ sudo dpkg-divert --remove /usr/bin/firefox

Then, the most recent Firefox upgrades worked without a hitch on both of my affected machines. Finally fixed… *fingers crossed*

Updated: This isn’t a complete fix, as the problem reoccurs every time Firefox is updated. If someone knows how to fix this for good, let me know…

$ sudo rm /usr/bin/firefox
$ cd /usr/bin
$ sudo ln -s ../lib/firefox-<your-current-version>/firefox.sh firefox
$ sudo chmod 0777 firefox
$ sudo apt-get -f install

The symlink for /usr/bin/firefox had been pointing to /usr/bin/firefox-3.5, which no longer existed, so the commands above (1) remove the dead-end link; (2) add the proper link (YMMV depending on which version of Firefox you are upgrading to); (3) resume the upgrade process.

Hope that helps!

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (1)

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

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (11)

HOWTO: Installing Android on the Freerunner + Rogers APN

I’ve been using the Openmoko Neo Freerunner as my mobile phone for over two months now. The phone can run a variety of software distributions. I started off with the Om 2008.12 Update, but spent the first few weeks testing out other popular distributions: FDOM, SHR, Qt Extended and finally Android. When I first tested Android, I had some trouble connecting to the GSM network and it felt like there were still some issues being worked out, so I went back to Om 2008.12, with the intention of dual-booting Android. The dual-boot turned out to be a bit trickier than anticipated, and I kept putting it off. Om 2008.12 is a cool idea, but there were some really annoying bugs and little hope of future development [Update: Ben left a comment about the recent flurry of development, including progress on Om2009t5], so yesterday I took the dive and went to a single-boot Android setup.

I started off on the Openmoko wiki page about installing Android on the Freerunner, but the installation is quite simple if you’re going with Koolu’s Android images (though there are a few other options). They provide a near automatic installation with the latest beta releases. Simply visit the website to download the images, and the installation process is dead simple:

Installation Instructions for Beta4 and Later

  1. Unpack the files on to a FAT formatted SD card.
  2. Insert card into the Freerunner, and boot from NOR menu (hold AUX key, then power)
  3. Chose boot from SD Card (FAT and ext2)

The automated install process should begin. It installs the Qi bootloader, reboots, the kernel, reboots, then the system image.

NOTE: This install process overwrites *everything* on the NAND in the phone, including the bootloader. If this is not what you would like to do, please either look at the install process, and modify it to suit your needs.

I’m in the process and figuring out the APN settings for Rogers to make use of my data plan. Oliver Fisher has the details for how to setup the Rogers APN on a G1, which matches the details I got from calling Rogers tech support, but I haven’t been able to connect yet. Not sure if this is a problem with my APN settings or with my data plan. I’ll update this post with the details when I figure it out.

Update: I can’t seem to get connected, though sometimes it says connecting, but I’ve found two posts about the Android settings on the T-Mobile G1 with Rogers which match what I’ve been told when calling 1-888-ROGERS1 (internet.com, wapuser1 / wap).

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (2)

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

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (19)

HOWTO: Compile Unison (and OCaml) under Unslung 6.10 on a Linksys NSLU2

This is a pretty obscure and incomplete howto, but I was left to figure all this out without much help so I figure I might as well post what I learned in case it is of assistance to anyone else.

At the office, we’re running a Linksys NSLU2 with the Unslung 6.10 firmware as our file server. We wanted to use Unison to do a two-way sync between portions of the server and a laptop, so that we can access documents offline and out of the office (e.g. in a meeting off-site). The unslung NSLU2 has a lot of software available through the OptWare package system, but Unison is not available. Since the architecture is non-standard (I want to say “arm” or something? anyways, not x86), I figured we’d have to compile from source. Then, one more roadblock — it’s written in OCaml, which also lacks an OptWare package and would need to be compiled from source.

Obviously, make sure you read and follow all the instructions provided with OCaml and Unison, and be sure to pay attention to the documentation at the NSLU2 Linux wiki. The following are just some tips for things that weren’t in the documentation which we had to figure out along the way.

Compiling OCaml

This proved a bit tricky. First all, you’ll need to install a few dependencies, which thankfully have OptWare packages available: make, crosstool-native (for gcc), and gawk.

Second, make sure to use the prefix flag in the configure step to install to /opt/bin and /opt/lib, rather than the standard /bin and /lib (i.e. you want to install it on one of the NSLU2 drives, not the limited internal memory). So, for example:

./configure -prefix /opt

Last, there is one problem with the MakeFile generated — there is a reference to “awk” somewhere to needs to be changed to /opt/bin/awk (unless you’re luckier than me and somehow have /opt/bin correctly on the path, but trust me, I tried…). So, I did a `grep -n awk MakeFile` to find it and then you can use nano/vim to make the edit manually to the file before compiling.

If you do those things first, compilation should be easy (just be prepared to wait awhile):

make world opt 2>&1 > log.worldopt
make install

Compiling Unison

Don’t ask me what “etags” are, but the compiler will complain if you don’t have them, and I figured out it has something to do with emacs. Once you install emacs, it gets past that stage in the compilation, so:

ipkg update
ipkg install emacs

The emacs installation actually gave me an error with a file conflict of sorts, so I had to run:
ipkg -force-overwrite install emacs

For some reason, Nathan discovered that you need to set NATIVE=false when you make Unison. I didn’t see the command, but I gather it looked something like this:
make NATIVE=false UISTYLE=text

Lastly, you’ll want to put unison on your path, so something like…
cp ./unison /opt/bin/

And then, magic! Or tragedy, if you did something wrong.

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Post a Comment

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

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (1)