How to use AUR on any non-Arch distribution thanks to Distrobox

Ubuntu, Arch and Pamac thanks to Distrobox

Arch Linux may cost a bit to install and configure, but it is one of the favorite options for those who know everything they need and want to have their work environment the way they like it. It has the option of installing AUR software, which stands for Arch User Repository, and in it we find practically any program that exists on Linux. It is one of its best claims, and non-Arch distros look at it with some envy. Luckily there is distro box, which looks like a Linux Subsystem for Linux, saving the distance.

A few days ago we talked to you about what it is and how to use it, and today we are going to publish this tutorial to create an Arch Linux image and configure it to access AUR. It will not always be necessary, but it can come in handy. And since in Linux we are the users who have the power to decide what to do and what not, we are going to explain how to achieve it and each one to do what they think is appropriate.

Before we begin: What is AUR?

As we have already explained, AUR is the acronym for Arch User Repository, and is a repository whose software is maintained by the community. Arch Linux, like most Linux distributions that I know, has its official repositories in which we find software such as Distrobox, VLC, GIMP or LibreOffice in versions still y fresh, but there we do not find Spottube despite being open source. The same Spotube developer uploads his software to AUR ending in -bin, which means it is already compiled. We can also find in AUR some older software that we may need to do something specific, for example something that depends on Python 2.

When a community user sees it convenient, they upload the software to AUR, and anyone with something Arch based can install it. It can be done manually or using a wizard, such as yay, the one we are going to use here to install Bauh and Pamac.

It is not recommended to get excited and use AUR without making any sense.. The main reason is that what is there is usually software that someone from the community takes and uploads, that is, it has not been uploaded by a project itself. Also, a lot of it is uncompiled, and when you install something that needs to be compiled it takes longer. If we have a lot of AUR, some updates may take longer than expected.

But usually, It is a secure repository, and without it it would be more difficult to install programs like Visual Studio Code or Google Chrome on Arch-based systems.

Creating the Arch Linux image with Distrobox

  1. The first thing we will do is install distrobox on our Linux distribution. In this article We explain how to do it, but basically it is writing in the terminal sudo followed by the package manager of our distribution, then the command to install – like install - and then distrobox. It may also appear in the operating system's software store. For special cases, in this link It explains how to do it with curl and wget.
  2. With Distrobox already installed, we create the image with this command, where "arch" is the name we will give to the box (it can be any other) and what is behind -i is the Arch Linux image. If it doesn't work, this link from the official documentation puts the names of the compatible images:
distrobox create -n arch -i quay.io/toolbx/arch-toolbox:latest
  1. When finished, it will give us the command to enter to enter the created image. In our case it will be distrobox enter arch, which is the name we gave it in the previous step.
  2. Once entered, we will wait a time that will depend on the image and the power of our equipment. The first time you have to install the basic packages. When finished, in the prompt we will see our_user_name@image_name, as we explained in the link in step 1.
  3. As an optional step, we can install pending updates with sudo pacman -Syu.
  4. Now we have to activate support to install what AUR will manage. It will take very little time and in my case they were already installed, but reinstalling them won't hurt. We write the following:
sudo pacman -S base-devel git

Installing Yay

  1. Next we clone the yay repository, it will also do it quickly:
git clone https://aur.archlinux.org/yay.git
  1. We get into your directory with cd yay.
  2. Now we write the following and wait for the process to finish:
makepkg -yes
  1. You can now start using yay and install AUR software, so the process would be completed if that is what you were looking for.

Installing store with graphical interface to install Arch software

But we are going to continue installing a graphic tool, specifically Manjaro's Pamac. In the terminal, after typing cd .. To go back, we write:

yay -S pamac-aur

In the messages in which you ask us whether to carry out the installation, everything is yes. In the diffstat messages, we can put "n", none, and in eliminate dependencies with "s". We will launch Pamac by putting in the terminal pamac-manager.

Pamac on Ubuntu

As we already explained in the article on how to install and use Distrobox, we can export Pamac so that it appears in the app drawer of our distribution by writing:

distrobox-export --app pamac-manager

Pamac in the Ubuntu app drawer

If you look, it appears as Add/Remove software, but in parentheses it says "on arch", which means that it is installed in the Distrobox image/container with the name "arch", which is the one we created for this guide.

Another option is to do all this with Bauh (yay -S bauh), which also allows you to manage AUR software.

What have we done with Distrobox?

What we have done with all this is created a subsystem – I like to say it that way – of Arch Linux in Ubuntu, we have installed yay and from it Pamac, the graphical tool to install software in Manjaro, Arch base. Then we have added the store to the drawer of Ubuntu applications. And yet, now we have access to AUR from Ubuntu through yay, and with Pamac or Bauh we can install software from the official Arch and AUR repositories.

This is possible in any other distribution, so AUR is available in anyone.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.