Archive for the ‘Ubuntu’ Category.

Ledger and Building It From Source on Ubuntu 10.04

So I recently started looking around for finance software that would run on Ubuntu and quickly found reasons to dislike suggested options. Then I found Ledger. Wow, did it seem awesome by comparison. So, I added the Ubuntu PPA (see the “Platform binaries” section of this wiki page), installed it, created a data file for my finances, and ran the ledger CLI executable on it.

Then I ran into a problem that appeared to be a bug: in a transaction with multiple postings and only one with a null amount, I was receiving the error, “Error: Only one posting with null amount allowed per transaction.” Checking the Google Group didn’t reveal any other reports of the issue, nor did searching the Bugzilla database.

So, I hopped onto the #ledger IRC channel on Freenode, which is the network I tend to frequent anyway. Within minutes, I was able to have the lead developer on the project confirm that the issue appeared to be a bug and politely request that I file a bug report for it, which I did.

I was also able to consult the README-1ST file for instructions on how to do a custom build from source, which I intended to use to ensure that the bug hadn’t already been fixed in the git repository. The only thing that this file lacked was a list of dependencies, but I was able to locate those through trial and error with the build tool and thought I’d post them here for anyone else looking to build ledger from source on Ubuntu 10.04.

sudo apt-get install libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-iostreams-dev libboost-regex-dev libgmp3-dev libmpfr-dev texinfo

Once you’ve executed the command above from the shell, you should be able to run the command below from the README-1ST file to create your build. The executable will be created in the root of the source tree and named “ledger.”

./acprep update

To create a debug build, which I did to be able to submit debugging output related to my issue, issue this command following the one above.

./acprep debug make

Update: As it turns out, the issue was not a bug, just a small formatting issue with my data file. However, the lead developer of ledger still plans on looking into make the issue more obvious in ledger’s output.

Update #2: It seems the ledger build tool dependencies command supports Ubuntu, CentOS, and OS X. The way the statement was positioned in the README-1ST file, I assumed that support was limited to OS X. So, rather than going through the lengthy process I did to install dependencies on Ubuntu, you can just do this.

./acprep dependencies

Sharing Files with Windows from Ubuntu Karmic

We got a desktop running Windows 7 over the Christmas holidays. I hadn’t been faced with the prospect of sharing files with it up until I wanted to play an MP3 file located on my laptop — which is running Ubuntu — from the desktop, which is connected to a better speaker system. As it turns out, sharing files with Windows from Ubuntu has gotten a lot easier with Ubuntu 9.10 Karmic Koala.

Open Nautilus and navigate to the parent directory of the one you’d like to share. Right-click on that directory and select the option “Sharing Options.” In the window that appears, check “Share this folder.” If Samba is not already installed on your system, this will prompt you to install it. The nice thing is that it handles all the interaction with APT and configuration of user accounts and shares for you versus the manual approach that’s been required in the past.

Once the service is installed, if you’d like to share the directory with users without requiring them to enter user credentials, check the box “Guest access.” Finally, click the “Create Share” button. You’ll receive a prompt to restart your session so the setting changes can take effect; go ahead and do this.

When I tried to access the directory from the Windows 7 desktop at this point, I still got prompted for credentials. I tried manually rebooting my laptop and at that point was able to access the files anonymously without further issue. I don’t know if a manual restart is always required, but it did the trick for me.

Hope this helps someone!

Running Spaz on Ubuntu Ibex 64bit

It took some digging to find it, but I finally found a way to make Spaz work on the Ubuntu Ibex installation on my Sony Vaio VGN-NR298E (with an Intel C2D 64bit processor). Up until I figured this out, I had been getting nothing but a non-responsive black box when I tried to launch Spaz.

Most of this comes from this tutorial on getting Twhirl and other AIR-based apps running on Ubuntu 64bit.

  1. Start by creating a new directory and and making it the current working directory. I just called it “Software” in my case.
    mkdir Software
    cd Software
  2. Install the AIR 1.5 SDK for Linux.
    mkdir air_1.5_sdk
    cd air_1.5_sdk
    wget -c http://airdownload.adobe.com/air/lin/download/latest/air_1.5_sdk.tbz2
    bunzip2 air_1.5_sdk.tbz2
    tar -xf air_1.5_sdk.tar
    rm -f air_1.5_sdk.tar
    cd ..
  3. Install Spaz.
    mkdir SpazAIR
    cd SpazAIR
    wget -c http://funkatron.com/getspaz
    unzip SpazAIR.air
    cd ..
  4. If you’re running 64bit, install the getlibs installer so you can easily get 32bit versions of libraries that AIR needs. Otherwise, skip this step. I believe the KDE equivalent to the libgnome-keyring0 package is kdewallet. Both should be installed by default on 32bit systems.
    wget -c http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs
    chmod +x ./getlibs
    ./getlibs libgnome-keyring.so.0 libgiogconf.so libgvfsdbus.so \
        libgioremote-volume-monitor.so
  5. Launch Spaz from the directory created in the first step.
    air_1.5_sdk/bin/adl -runtime air_1.5_sdk/runtimes/air/linux \
        -nodebug SpazAIR/META-INF/AIR/application.xml SpazAIR
  6. I didn’t find the default font used in the main tweet area to be very appealing, so I added this line to the User Theme CSS area of Settings.
    div.status-text { font-family: Tahoma; }

The only issue I ran into was receiving this error whenever I try to post: “An ActionScript error has occurred: Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.” Oddly, it doesn’t prevent posts from going through, though it is rather annoying. I have brought it up in a Spaz Google Group thread and hope to work with the developer to troubleshoot the issue further at some point in the future.