Zypper, the great featureful package manager for opensuse uses curl for downloading as default. On the other side, aria2, is one of the best multi-threaded download manager available for *nix. Zypper has a aria2 plugin for a long time but usually not activated by default.
Let's make zypper download packages in the speed of light using aria2
First install aria2. You can install it from repo,
sudo zypper in aria2or from software.opensuse.org
Now we need to tell zypper (libzypp to be technically correct) to use aria2, passing ENV Variable
ZYPP_ARIA2Cis needed for this. Open
sudo nano -w /etc/bash.bashrc
Cntrl + vfor scrolling down. At the end of the file, add this line.Save and Exit. (
Cntrl + X,
Now Zypper will use aria2 for downloading as root user, but when using sudo, that ENV variable will be striped. To fix this, edit
/etc/sudoersLook for this line
sudo nano -w /etc/sudoersAdd
Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"
ZYPP_ARIA2Cat the end of this line.
Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE ZYPP_ARIA2C"
Save and Exit.
Done. Restart terminal and try to download a package using zypper. Zypper will now use aria2. I noticed a bug though, you wont be seeing the download progress, but i can live with it, dont u ?
This guide is written in openSUSE 12.3 KDE, but the process will be similiar for other versions of openSUSE.