Kuma's Lair

Pan newsreader and multi-part images in Ubuntu 9.10 Karmic Koala

There is an updated version of this tutorial for Ubuntu 11.10!

For years, I have been a big fan of the usenet newsgroups. I think it’s one of the best little niches left on the internet, and it has one of the best ranges in content…  On usenet, you can have civilized, academic conversation, or unruly flame-wars between fanatics. You can also find some of the coolest binaries available on the net…hard-to-find music, out of print books in e-text, and pictures ranging from serene wallpapers to…well just about anything.

When Ubuntu’s newest version, Karmic Koala, came out, I was very dismayed to find that the distribution of the Pan newsreader available via the Synaptic package manager was broken.  Basically, any image that was posted as multi-part refused to load in the default window.

With some help from the folks on the pan-users mailing list, I was finally able to compile the code from a source repository being kept up by K.Haley, pan’s volunteer coder.  But I thought it might be nice to provide a step-by-step guide for newer linux users, as the whole process of downloading source from a github repository, the tracking down of the necessary development libraries, and the entire compilation process can be daunting.  Therefore, I came up with the following list of commands to run to get a patched version of Pan running from a normal install of Ubuntu 9.10 (Karmic Koala).

$ sudo apt-get install pan git git-core gnome-common libgtk2.0-dev libpcre3-dev libgmime-2.4-dev

This command is meant to be typed on a single line.  It will download quite a few libraries and a bunch of necessary programs & components.  It also installs the version of Pan included in Koala’s distribution streams, so that you will have the Ubuntu menu items already in place to run it easily.  When you’re done you should have everything you need to proceed.  Continue with the following:

$ cd ~
$ mkdir src
$ cd src
$ git clone git://github.com/lostcoder/pan2.git
$ cd pan2
$ sh ./autogen.sh --prefix=$HOME

You shouldn’t have any error messages during the autogen.  If you do, they’re likely due to missing programs or libraries needed to build the application.  Please post your error messages here!  If you didn’t receive any errors, type:

$ make

This will take a while…so go treat yourself to a coffee, soda or your preferred method of caffeine distribution.  (I might recommend a nice chai!) If the compile completes without incident, continue with:

$ make install
$ cd /usr/bin
$ ls pan

For safety’s sake, let’s back up pan so that we can restore the package maintainer’s version later…:

$ sudo mv pan pan.OLD

Now let’s keep on going:

$ sudo mv $HOME/bin/pan .
$ sudo chown root: pan

And you’re done! You should now be able to use the Pan icon located in the “Internet” section of your main Ubuntu menus to run your newly-compiled application.

Have fun!

Digg this     Create a del.icio.us Bookmark     Add to Newsvine

24 Responses to “Pan newsreader and multi-part images in Ubuntu 9.10 Karmic Koala”

  1. gutsy Says:

    Well, I attempted your fix and everything seemed to be going well until the ‘make install’ command, when some error messages appeared and I got this final line:
    ’0 upgraded, 0 newly installed, 0 to remove and 166 not upgraded.’ which was not encouraging. The last few commands didn’t work after this. Thoughts?

    Thanks for your work on this. :)

  2. Scott Pettigrew Says:

    Hrm…that looks an AWFUL lot like a “apt-get install” response instead of a “make install” response.

    I have, out of pure muscle memory, made the same typo…. You might want to check what you typed.

  3. Scott Pettigrew Says:

    For more details, check out this screenshot:

    http://scottkuma.net/Media/ubuaptgetscreenshot.png

  4. eddie Says:

    Brilliant worked a charm.
    Thank-you

    Now to see what I did and how it worked….

    eddie

  5. tony Says:

    thank you a million times…worked great!
    ie: sudo mv /home/scottkuma/bin/pan .
    is meant to be
    sudo mv /home//bin/pan .
    lol, i figured that much out, i didnt think you had a folder on my machine!
    thanks again

  6. Jeff Says:

    Excellent – I miss compiling code. Worked like a charm. Thanks for resolving all the dependency issues for the rest of us!

  7. Scott Pettigrew Says:

    Tony – you’re exactly right, I did leave my username in there. That’s been fixed, and thanks for letting me know!

    All – Thanks for the great feedback!

  8. Scott Pettigrew Says:

    Based on some feedback from Olaf ‘Rhialto’ Seibert on the pan-users mailing list, I changed the references to your home directory in the code to the $HOME environment variable. This should be more portable, and require less changing around of the commands. Please let me know how it works!

  9. Boris Says:

    Thx a lot! Worked perfect even for newbie like me!

  10. G. Todd Says:

    Thanks a lot for making my Pan usage even more pleasant!

  11. JDifool Says:

    Huge thanks from France !

    My pan is working again (broken with gmime 2.4).

    I will propose your up-to-date version to Slackware developers.

    Cheers

  12. Bill Says:

    Very nice! I wish they would just update the program but this worked perfect.

  13. Marcel Says:

    Works with Lucid Lynx 64-bit also !

    One small change :

    Git and git-core have to be installed withe package gitk.

    so it would be something like:

    sudo apt-get install pan gitk gnome-common libgtk2.0-dev libpcre3-dev libgmime-2.4-dev

    cheers !

  14. alliebabaoopcat Says:

    OMG.. this worked so well! As Marcel says above, I got a couple of errors at the start, and was prompted to install git and gnome common separately, but after doing that, Pan ‘just works’.

    (Lucid Lynx 64 bit)..

  15. taxpro Says:

    After entering sh ./autogen.sh –prefix=$HOME, I got the following error message: “You need to install gnome-common from the GNOME CVS.” Would appreciate any help on what to do next.

  16. Adrian Booth Says:

    This worked great. ubuntu 10.04 lucid lynx (64 bit). Thank you!!

  17. Michael Gold Says:

    Thank you!! This has been a problem forever with Pan, finally fixed.

    p.s. Go Bucks!

  18. Chris P Says:

    tried the first line and after lots of output ended with

    Unpacking git-core (from …/git-core_1:1.6.3.3-2_i386.deb) …
    dpkg: unrecoverable fatal error, aborting:
    unable to install updated status of `git-core’: Read-only file system
    touch: cannot touch `/var/lib/update-notifier/dpkg-run-stamp’: Read-only file system
    sh: cannot create /var/lib/update-notifier/updates-available: Read-only file system
    E: Problem executing scripts DPkg::Post-Invoke ‘if [ -d /var/lib/update-notifier ]; then touch /var/lib/update-notifier/dpkg-run-stamp; fi; if [ -e /var/lib/update-notifier/updates-available ]; then echo > /var/lib/update-notifier/updates-available; fi ‘
    E: Sub-process returned an error code
    E: Sub-process /usr/bin/dpkg returned an error code (2)

    So stopped and posted

  19. Mark H Says:

    using ubuntu 9.10 w/ latest updates,
    I am showing errors after make. I think the autogen exited without errors. This is the end of the autogen …..

    Configuration:

    Source code location: .
    Compiler: g
    With GtkSpell: no

    Now type `make’ to compile Pan
    mark@laptop:~/src/pan2$ make
    make all-recursive
    make[1]: Entering directory `/home/mark/src/pan2′
    ……
    ……
    post-ui.cc: In member function ‘void pan::PostUI::set_message(GMimeMessage*)’:
    post-ui.cc:1562: error: ‘g_mime_header_list_get_stream’ was not declared in this scope
    make[3]: *** [post-ui.o] Error 1
    make[3]: Leaving directory `/home/mark/src/pan2/pan/gui’
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/mark/src/pan2/pan’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/mark/src/pan2′
    make: *** [all] Error 2
    mark@laptop:~/src/pan2$

  20. Stormson Says:

    It looks like no one has replied to it, but I have the same problem as Mark H above;

    post-ui.cc: In member function ‘void pan::PostUI::set_message(GMimeMessage*)’:
    post-ui.cc:1562: error: ‘g_mime_header_list_get_stream’ was not declared in this scope
    make[3]: *** [post-ui.o] Error 1
    make[3]: Leaving directory `/home/mark/src/pan2/pan/gui’
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/mark/src/pan2/pan’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/mark/src/pan2′
    make: *** [all] Error 2

  21. Scott Pettigrew Says:

    Caleb & Mark H:

    Sorry so long in replying…

    I just went through this process with Ubuntu 10.4, and aside from the git git-core to gitk change discussed above, I had NO issues.

    I’m not using studio, however, so I don’t have much of an answer for you.

    Mark H: If you could post what distro you’re using, and what kernel you have, it might make troubleshooting easier.

  22. trufflepig Says:

    This is a great work around for the multi-part PAN issue. I’ve now done this fix on an older Linux Mint distro, a Dell Studio running 10.10 Meerkat 64 bit, and now the latest, a triple boot mactel pro 8,2 running 10.10 32 bit using the same steps and all 3 have gone through without one error, no problems at all.

    Someone should bronze this article and keep it as long as PAN is still in the PPA’s.

  23. psantucc Says:

    Thanks. Works a treat!

  24. Kuma's Lair » Blog Archive » Pan’s at it again! Updating Pan Newsreader on Ubuntu 11.10 Says:

    [...] upgrade, another issue with Pan Newsreader! As I stated back in my post in 2009, I enjoy browsing Usenet newsgroups in my spare time.  This last week, I upgraded all of my PCs to [...]

Leave a Reply