Tuesday, February 26, 2008

Ubuntu Hardy Heron Alpha 5!

As a tech-enthusiast that I am, I couldn't resist trying out the alpha 5 of ubuntu 8.04, one of the early test releases for the most stable Ubuntu (they say that it will be supported for 5 years, woohoo!).

It's best not to try it out for production servers/desktops, it's not done yet, i.e. when I installed it, some applications were missing. Some of the most important (to my opinion) packages that weren't included by default were: bash-completion software-properties-gtk firefox-2

Mozilla's Firefox 3 beta is great, but it's missing add-ons, which add superior functionality to this wonderful internet browser.

It's a good thing that the maintainers at Ubuntu thought of adding it to the repositories. I know my way around things, so installing the missing packages was a breeze:
  • From the menu choose Applications -> Accessories -> Terminal
  • Enter this: sudo apt-get install bash-completion software-properties-gtk firefox-2
  • Type the password associated to your account
  • Enjoy!
If you can't find a package, try enabling the extra universe and multiverse repositories. Just install "software sources" aka software-properties-gtk then go to menu System -> Administration -> Software Sources, check the boxes next to multiverse and universe and hit the OK button and then the Reload button.

If this is too much hassle for you, try searching your packages at packages.ubuntu.com
Firefox-2 can be found here, or choose your architecture and a mirror afterwards: i386 (32-bit) or amd64/x86_64 (64-bit)
Finally, download the deb package, double click on it, and install.

Friday, February 15, 2008

How to backup deb packages

Say you've downloaded a .deb program and now you want to back it up on your AptOnCD, or even transfer it to a friend of yours. The problem are the dependencies. If you ever cleared your /var/cache/apt/archives/ using 'sudo apt-get clean' or 'sudo apt-get autoclean' and the archives cache is emptied, you probably know what I'm talking about.


apt-get is a bit limited for making backups, because it checks if you already have the package installed and it will eventually say that it is installed without downloading anything, so we'll use aptitude's "download" command, which is pretty straight-forward.
NOTE for Ubuntu Newbies: From the menu Applications -> Accessories -> Terminal

First, we check the dependencies of a package:
sudo apt-get update
apt-cache depends PackageName
Don't forget to change the PackageName to match the package YOU want to backup/download.

You'll probably have a big list. We need to convert all those into a single line using this handy command:
apt-cache depends PackageName | grep "Depends:" | sed -e "s/ Depends: //" | xargs -d "\n"

NOTE: This way you get the dependencies only. If you want the recommended, suggested and predepended packages along with it, use this:
apt-cache depends PackageName | grep "Depends\|Recommends\|PreDepends\|Suggests" | sed -e "s/ \(Depends\|Recommends\|PreDepends\|Suggests\): //" | xargs -d "\n"
We also need to create a directory where we'll download the packages:
mkdir debbackup
cd debbackup
Finally we do this, putting the multiple packages (obtained using the apt-cache depends command) in a single line:
sudo aptitude download Package1 Package2 Package3 Package4
or if you want to put everything into a line:
sudo aptitude download `apt-cache depends PackageName | grep "Depends:" | sed -e "s/ Depends: //" | xargs -d "\n"`

Wait for those lovely packages to arrive.
After that, if you want to use it with AptOnCD, you can take it from there to the apt archive.
Assuming you're still in the gnome terminal and still in the directory where you downloaded the packages:
sudo cp *.deb /var/cache/apt/archives/

All done! The packages are ready to be used with AptOnCD, or transferred to a friend :)

P.S. I've attached a screenshot to see how it's actually done.

Sunday, February 03, 2008

Serbian Presidential Elections - Round two, FIGHT!

The election countdown has begun while I am writing this post. After 31 days of presidential campaigns, unnecessary TV "air time" here we are. While they are bubbling in the television, with roughly the opinion of 64% of the population (around 4.3 million people), a person can think "Where did the rest of the population go or what where they doing all day?"
In my opinion, the result of the final round of Boris Tadić - Democrats - vs. Tomislav Nikolić - Nationalists? I'm not a politics freak - isn't much of a mystery for me, since the rest of the candidates that lost in the first round agreed to support Tadić. It's a disgrace how parties think they "give" their voters to someone, as if the voters don't have an opinion of their own. To make matters worse, I believe that people never really cared who was their "leader", as long as there is a shepherd that keeps the flock away from some wolves. The percentage speaks for itself.
On the other hand, the reason that ~36% of the people didn't reach a voting booth could be because they had to do more important things, like earn their income and I don't blame them, everyone has economic problems. But voting takes 5 minutes, come on!
One final excuse some stated was that the candidates didn't actually deserve their vote.
One thing I didn't like about the campaigns was that the candidates used the TV to broadcast their "message". OK, maybe there are immobile persons, but there are other persons that come back from their universities or work and want to sit in front of the television, watch a good comedy and relax.
I'd like to take the chance and thank online the RTS (Serbia's National Radio-Television network) for respecting our monthly payments and didn't approve any paid "air time".
We shall see who gets to roll the fancy limo!

P.S. Nothing like the good ol' democratic socialism and Tito as I've read and heard so much about those golden times :)

UPDATE: Boris Tadić won, who would've known! (if you read the post, you know the irony)