Saturday, September 23, 2006

Beagle, Evolution and Ubuntu



As a quick post, I noticed that Beagle doesn't index my Evolution mail by default. Examining my settings by using 'beagle-index-info' I realized there were no Evolution action going on whatsoever, and by when running 'apt-cache search beagle' I noticed there's actually a package called 'beagle-backend-evolution'. I installed it using

sudo apt-get install beagle-backend-evolution

and then restarted beagled with

ps -A | grep beagled

sudo kill

beagled

and lo and behold, all of a sudden my e-mail starts appearing in my desktop searches as well.

Ubuntu software installation using the command line

With the risk of sounding as an Ubuntu beginner's guide, I noticed that the procedure of obtaining software for my Ubuntu installation using the command line wasn't described as explicitly as I'd prefer anywhere, so here goes:

The tool you need is apt-get. What it does is it basically checks through your /etc/apt/sources.list file and queries all the listed repositories for new versions of your OS- and peripheral software - just like Windows Update - but with the added feature of listing and installing new packages, mostly straight out of the box.

Since there's usually lots of managing of system-level files and directories involved in installing, you'll want to run apt-get as super user, using sudo. Hence, the typical command line for e.g. installing Beagle, my favourite desktop search, would be:

sudo apt-get install beagle

And that's usually it! However, if you do come across a package that doesn't exist in any of the default repositories, you might be able to find a specific repository listed on the package's homepage or similar. Then you'd simply have to add a line in the /etc/apt/sources.list file, such as (for XGL stuff):

deb http://ubuntu.compiz.net/ dapper main aiglx

where 'deb' means the repo contains debian binaries (as opposed to source code, 'deb-src'), and 'dapper', 'main' and 'aiglx' mean which distributions you want to access. 'Dapper' and 'main' are the branches of the core Ubuntu files, whereas 'aiglx' holds stuff related to ATI and OpenGL.

So how to know which name a certain program has? Use apt-cache. Two quick examples:

apt-cache search opengl

lists any package related to 'opengl' (by name or description). Wow, that's a lot of packages. If you have a hunch about the name, just 'grep' the output as usual:

apt-cache search opengl | grep compiz

and to get a more detailed description of a certain package, do:

apt-cache show compiz-plugins

That wraps up this tiny - but hopefully useful - post on package installation in Ubuntu, using the command line.

Ubuntu desktop search

Since I was unable to find any straight and simple posts on desktop search in Ubuntu (or most other Linux dists for that matter) I decided to post a brief note on it here.

It seems that the only viable option today, at least if you're looking for a clean interface with enough of a powerful engine, is Beagle. The simplest way to obtain it is via an apt-get:

sudo apt-get install beagle

Now, before you start the indexing, you might want to enable extended attributes on your filesystems. Not doing this apparently slows the indexing down multifold, so it's highly recommended. This is documented somewhere on the Beagle site, but what ended up doing was adding 'user_xattr' to the options in /etc/fstabs, like:

/dev/hda2 / ext3 defaults,user_xattr,errors=remount-ro 0 1

Notice how everything else remains unchanged from the default settings. Then, I remounted the above partition using:

mount -o remount /

CAUTION: There are reports of incidents when adding extended attributes, so proceed with caution. For me it worked perfectly though.

The final thing is to start the indexing, by launching

beagle-search

and going to 'Preferences'. Under the 'Indexing' tab you can now add whichever directories you want indexed. Notice how e.g. adding a certain directory will remove any entries further down in the hierarchy, e.g. '/' will remove '/usr', since it will be included in the search anyway.

Now Beagle starts its work, and you can monitor its progress by issuing:

beagle-index-info

and to actually search, use

beagle-search

As a side note, the daemon is called 'beagled'. If anything seems fishy with your indexing, you can always try confirming your settings and manually killing and restarting the processes:

sudo killall beagled

sudo beagled --replace

That's about it. Stay tuned for more Ubuntu action.

Enter Ubuntu

So a couple of weeks ago I finally got around to installing a decent Linux dist. After a brief survey I settled for Ubuntu, most of all since I'm sitting on a HP laptop which I'd rather avoid tearing apart just to find specific part numbers etc. Also I happened to catch a glimpse of Ubuntu successfully running XGL and Compiz, i.e. OpenGL-accelerated window management for those of you who - like me - have spent the last couple of years living either under a rock or at the local pub.

Anyhow, after lots of work I finally have my sweet, whobbly, swooping, zooming desktop up and running, complete with sleek desktop search, fully working OpenGL development facilities and everything else that I've been looking for in an alternative to MS Windows.

Everything except Houdini that is, which I am to learn before my internship at Digital Domain starts within a couple of months. Hence I'm still bound to my old XP installation, although once I'm done with Houdini I might just throw it out the window once and for all.

My goal is to post a couple of brief walkthroughs or at least sketchy notes of my Ubuntu endeavors in this forum within the nearest future.