Find fastest Ubuntu mirror from cmdline

ubuntu_logo_81x81It’s always advisable to keep your Ubuntu installation up to date with the latest packages and security patches. During installation Ubuntu sets the main repository as the source of latest packages. But what if the default is too slow for you because of your geographic location? Continue reading Find fastest Ubuntu mirror from cmdline

CheckInstall: record, remove files installed from source compilation

ubuntu_apps_compLinux users often install software packages by compiling from source. However, the Makefile doesn’t always come with a standard uninstall directive to remove the installed files using make uninstall. How do you feel when you find there is no way to clean up after installing the package for a test run? Continue reading CheckInstall: record, remove files installed from source compilation

Find package repository on Ubuntu

ubuntu_logo_81x81Sometimes you may want to know which repository or PPA is the source of a package on Ubuntu. More so when you have multiple PPAs added and more than one of those provide the same package. You may also want to know which repository provides the latest version. Continue reading Find package repository on Ubuntu

Mackup: cross-workstation app settings sync

cloud_compHow does it feel to install the same applications across several systems and them do the same configuration changes for a uniform experience? Boring, right? Mackup is the solution to this situation. Mackup syncs application setting files across several devices automatically so that users need not bother about it. Features:

  • Backs up the settings to Dropbox or Google Drive or even Git
  • Syncs your application settings among all your workstations
  • Restores your configuration on any fresh install in one command
  • Revert any synced config file to its original state
  • Supports many applications, both CLI and GUI based (shouldn’t be very difficult to add new ones)
  • Works on Linux and Mac

The application creates a directory under your Dropbox local directory and syncs the files to and from there.

USAGE

  • You need to install Mackup on all the systems you want to sync. Install Mackup on Ubuntu
     $ sudo pip install mackup
  • Backup settings in the workstation with base configuration
     $ mackup backup
  • Sync the settings on another device
     $ mackup restore
  • Revert any synced config file to its original state, and delete the Mackup folder in Dropbox
    $ mackup uninstall
  • Display the list of applications supported by Mackup
    $ mackup list
  • Get some help
    $ mackup -h

Webpage: Mackup

App Grid: discover, search, install Ubuntu apps

The Software Center is not exactly the fastest way to search and install software on Ubuntu. My personal favourite is the Synaptic Package Manager which for some reason is not installed by default on Ubuntu anymore. However, it is available in the repos and I gladly install it and purge Software Center.

App Grid is a faster and cleaner alternative to Ubuntu Software Center.

App Grid is a new option to discover, search and install software on Ubuntu. For users who do not want to sacrifice the Software Center experience App Grid is definitely the best bargain. Features:

  • Fast startup speed and responsiveness.
  • Clean and elegant design. No buttons or menus.
  • Fast search results.
  • View applications by category, sort alphabetically or by rating.
  • Browse the app store using navigation buttons.

App Grid deb packages can be downloaded from the project website.

Webpage: App Grid

Enable fancy apt colours and progress bars

ubuntu_logo_81x81apt has support for fancy progress bars with colours. To enable it in Ubuntu 14.04, create the file /etc/apt/apt.conf.d/99progressbar and add the following in it:

Dpkg::Progress-Fancy "1";

You can also play around with the colour of the progress bar by adding something similar to:

Dpkg::Progress-Fancy::Progress-Bg "%1b[40m";

Note that this is applicable only to apt and not apt-get as per man apt. More on colours:

Compile a package from source on Linux

ubuntu_apps_compLinux has many flavours. While it’s a good thing because you can always get the distro that meets your needs an inherent problem is the lack of a global installer format. You have the deb packages on Debian variants, rpm on Red Hat variants, pkg on Arch and so on… But if you are not on one of the major distros or their variants you may often find yourself in a situation that a software is not available in your distro supported format. Fear not!

The best thing about open source is that you can always tinker around with the source code. If you can’t find the package available in the format supported by your distro you can always build it from the source code! There is a benefit too. A package natively built on your system is optimized for running on it. This is the same principle on which Gentoo works. A Gentoo installation may take several hours because it compiles all the packages from the source during the installation. This article will explain the step by step procedure to build and install a package on your distro from its source code. You may need to become the root user to install the package in the default location but not for compilation. For a true taste of the exercise, try compiling the subversion snapshot of the awesome media player MPlayer.

  • Download and extract the source code of the package. Most of the time they are in tar.gz or tar.bz2 archives. If you are not ready for the cmdline yet, your distro’s archive manager can surely handle these formats. Double click to open using the default archive manager and extract anywhere you want.
  • Navigate into the extracted directory and look for the files README or INSTALL. These are the regular instructive files on how to install the package and are a good starting point. If you find nothing of that sort check out the Wiki or Installation instructions in the webpage of the tool.
  • You are likely to find a file named configure.  If not, look for files like install.sh or autogen.sh etc. Otherwise you may need to run autoconf followed by automake. You can learn more on how they work here or from this procedural explanation.
  • By this time you should have the configure file generated. Run
    $ ./configure

    In case you do not have root permissions, you can install the package to under any directory as the root directory. Run

    $ ./configure --prefix=/path_to_directory

    configure supports many options. Run

    configure --help

    for all the options. configure will show you any missing dependencies on your system. As you are building the package from source, you need to have the source code for other packages or libraries on which it is dependent on. You can find them in your system’s default package manager. If you are not sure which package to install, try Google. Many have tried it before and many were puzzled, trust me!

  • The next step is
    $ make

    This is where the actual compilation takes place. In case you hit any issues, the best option is to contact the package maintainer for support as it means the package is broken on your distro. make --help shows you options supported by make.

  • If make is successful, you need to install the compiled package on your system as thefinal step. Run
    $ sudo make install

If everything goes fine, you have the package installed on your system!

Further reference: The GNU configure and build system

Aptik: PPA & package backup on Ubuntu

ubuntu_apps_compAptik is a brand new tool to simplify restoring your PPA configuration and packages post a fresh install or upgrade of Ubuntu. It makes things much simpler because you do not need to remember which software you installed and from where you installed them. If you are re-installing the same release you may not even need to download the packages again! Aptik works closely with apt and hence the name. Capabilities:

  • Backup themes and icons
  • Backup the current PPAs added in your system
  • Backup information on applications installed from those PPAs
  • Backup install packages if they are still present in apt cache (skip if upgrading Ubuntu)
  • Many cmdline options

Run the following to install Aptik:

$ sudo add-apt-repository ppa:teejee2008/ppa
$ sudo apt-get update
$ sudo apt-get install aptik

Webpage: Aptik

Zero Install: effortless app installation

zero_install_compZero Install is for app developers who do not want to bother about dependency hell and just want to do what they need to do – write their own software. Zero Install takes care that the app installs and runs on the target platforms. This is much more necessary for platforms like Linux which have diverse flavours with diverse package management mechanisms. Zero Install enables a developer to publish his software directly from his website. Zero Install is not a new packaging format. The author can specify necessary parameters in XML (e.g. packages and dependencies) and those will be taken care of on all platforms Zero Install supports. It also supports installation of multiple versions of the same library without conflict. This helps sandboxing, virtualization and development version testing without interfering with any standard version already installed in the system.

Zero Install supports various flavours of Linux and Windows. It can also be installed on a USB drive or for non-admin users.

Website: Zero Install

[Courtesy: Jester Raiin]

Install a package with dependencies

ubuntu_apps_compIt happens often – you like a package, download the .deb file to test it out, only to find that the package has missing dependencies and is installed in a broken state. You might just end up removing it without checking it out! But wait! There’s a very easy way to install the dependencies if they are already available in the repositories enabled in your system (otherwise you many have to add the repositories for the dependencies and update the repositories once). Here’s what I am trying to say:

$ sudo dpkg -i nice_app.deb
//installs but complains of missing dependencies. a broken install :(
$ sudo dpkg --configure -a
$ sudo apt-get -f install //save my day! install anything missing

If you want to do the same using a single command, install the gdebi package. gdebi can download and install (if available in your repos) the dependencies of a package. To install gdebi, run:

$ sudo apt-get install gdebi-core

Sample usage:

$ sudo gdebi nice_app.deb