 My favorite universal packaging format available on Linux is app image app image you create this app image this package format that is a portable package that you should theoretically be able to take anywhere put it on a USB stick and it should work on any Linux distribution because the app image contains all the dependencies all the libraries that are needed to make that application run it's really a fascinating kind of packaging format but creating your own app images although it's not terribly complicated it can be a little bit tedious especially when you're trying to app image a really complicated program but there is a tool that can help automate this process for you here in the last few days I've noticed a lot of chatter on the internet and some articles being written about this particular application here this is called arch to app image and it's called arch to app image because what it does it takes a arch package and it converts it into an app image for you basically it finds a package that's in the standard arch repositories or in the chaotic a ur repository and it automatically converts that package to an app image for you this project is still relatively new so it's not fully fleshed out yet but already it works rather well I've actually been playing around with it the last couple of days building some app images just to see if they work and for the most part I would say nine times out of ten I choose a package and it does create app image that does successfully work when I try to execute it on my machine so this application arch to app image is written in python and you can install everything needed for this application to work on your machine using pip which is a python package manager essentially now to install arch to app image on your machine what you need to do is you need to get clone this repository so click on this code button here in github and then copy the url and now what I'm going to do is I'm going to go ahead and open a terminal and let me zoom in here and I'm going to run a get clone and then I'm going to clone that particular url that we copied and you see it's cloning into arch to app image so now we should have a directory in my home directory now called arch to app image let me cd into that directory if I do it ls there is a file called requirements dot txt now let me go back to the github page because their installation instructions says that after you get clone this repository and cd into that directory run the command pip three install dash or requirements dot txt so let's copy and paste that into the terminal and for me it didn't install anything because I had already had all of these installed but if they're not installed on your system it's actually going to install everything needed and now we should be able to run the program so if I run python three and then arch to app image dot pi you can see it's going to say converting any arch linux package from either the official repositories or a ur to app image and it says specifically it's loading the chaotic a ur package list so the a ur packages are not from the standard a ur it's actually from the chaotic a ur because probably they they're converting these binary packages that are in the chaotic a ur rather than some of these source built packages that are in the standard repository in the arch user repository now they're asking us to enter a package name to app image so one that I often install from the a ur the standard a ur is p zip I'm assuming p zip it's a archive manager I'm assuming they have a chaotic a ur build as well so let me hit enter on that and p zip comes in two different forms it comes in a gtk form and a cute form so I'm going to choose to app image the cute five version of p zip so I'm going to hit enter on that and as you can see it's downloading p zip now from here it's going to ask you a series of questions the very first question select the icon file to be used so p zip needs an icon associated with it and there are several that I could choose here in this list I'm just going to choose the very first icon listed in this list next it says these packages and their dependencies will be downloaded and then it says if you'd like to add any additional packages other than these specify those in the prompt here for me I'm just going to go with their suggested dependencies next it asks would you like to download the latest lib union preload so some kind of shared library that's needed here I'm going to assume yes I do need to download that so I'll choose yes here then it asks what would you like to do next would you like to build the app image or add more packages so I think we've already got the libraries and dependencies we need so let's just go ahead and build the app image then it says would you like to download the latest app image tool if you select no an existing one will be used let's download the latest app image tool though and then finally we get the question would you like to rebuild it I'm going to choose no because there's no reason to rebuild it unless of course there was some kind of error or something so I'm going to choose no and then finally it asks would you like to remove the app dear directory and if I open PC man FM you'll see what they're asking here let me navigate in my home directory to this arched app image directory that we cloned and inside this directory we now have app dear this is basically a directory that it created to help build that pzip app image the pzip app image is in this directory here out for output but really all I really want is the app image that's in the out directory this directory here after it's already built the package I really don't need it so getting back to the prompt here I would choose yes I would like to remove the app dear directory and that's it and as you can see getting back into the file manager we had pzip.app image here I double click it I'm going to get a prompt here asking would I like to execute this I would the app image launcher which is installed on my system is going to ask do I want to integrate and run this sure why not and pzip launches just fine and you can see everything looks normal here there's nothing really that looks out of place it looks like everything works the menu systems and everything of course I haven't played that much with pzip as this app image I created but at least it launches so I'm assuming everything worked just fine there so let's create another one just to verify that this works I'm going to do something a little more complicated this time so let's do emacs now emacs is in the standard arch repositories now it's asking us to select a dot desktop file to be used I it did not ask me for a dot desktop file for the previous application that we did this on pzip the reason it's asking about the emacs dot desktop file is because there is a problem with it it's not a valid dot desktop file meaning some line in the dot desktop file doesn't have an appropriate value so what we need to do is I'm going to still come back to this prompt but I'm going to go into that arch to app image directory here I'm going to go into app deer because it created a new app deer with the build information for emacs and I'm going to go into user I need to find the the dot desktop file I'm assuming it would be in share applications and here are the dot desktop files and the one I'm going to pick will just be this one here the emacs dot desktop I'm going to open this I'll open it with neo vm let me zoom in and if I go back to the terminal that had the error message it looks like it has a problem with the item text editor in key categories so text editor is not valid in the eyes of arch to app image so what I'm going to do let's just get rid of text editor because it had categories and it had two categories specified development which is a legit category but text editor I guess is not so I'm just going to edit that so I'm going to write and quit that dot desktop file in this app deer that it created so now it's asking again please enter a path to a valid dot desktop file because none of these were valid well now that I've edited this first one it should be valid so I'm going to copy it and then I'm going to paste the full path to it because now it should meet the criteria yeah and I don't get an error this time now it's asking about an icon I'm just going to choose the first icon for emacs in this list and now it hangs a little bit I'm sure it's building a package right now emacs is probably a little bit more of a substantial program than pzip so there's probably it probably involves a bigger download time but you can see it did eventually move on to the next question you can see it listed all the dependencies that are needed for emacs and then it also mentions about some dot so files some of these shared libraries that could not be found these are probably not going to be a problem because you know I'm building this emacs package for these arch based machines that I use that might be a problem not being able to have these shared libraries if I built this on my arch machine and then gave somebody this app image to use on their divion machine for example then it's likely we could run into an issue where my app image for emacs might not work on that divion machine but for me since all of my machines are arch based I shouldn't really have any issues it's once again asking me do I want to add any additional packages no and it's downloading the dependencies remember the dependencies all get bundled up into this app image this emacs app image together and just like the pzip app image at the very end it's going to ask do we want to download the latest libunion preload.so once again I'll choose yes for that once again do we want to build the app image or add more packages let's go ahead and build the app image do we want to download the latest app image tool sure why not and finally do we want to rebuild the package no because I'm assuming it built correctly so let's choose no to that would we like to remove the app dear and once again I'll choose yes to that and now let's get back into our file manager so let me go back to the arch to app image directory go to the out directory for output and there is our emacs app image so let me double click the emacs app image and integrate and run and if it works correctly we should see my doom emacs and it works correctly so it recognizes my local configs for doom emacs which are stored in my home directory dot config slash doom so it's not sandboxed in such a way that it's it can't read my local configs so the app image is just the core emacs package but my user's configuration file is still red so this works just fine so I'm really happy with this and you can see when I integrate and run with the app image launcher these created app images go away they disappear they don't disappear they actually go in your user's home directory in your applications directory with a capital a this is where all app images should live on your system in home slash applications with a capital a and if I go in here the app image launcher moved the pzip app image and our emacs app image into this directory so this is a really cool tool I love this tool and it's new and it's probably got some bugs it hasn't been around for long and if you go into issues there are some people that are having some issues and some people doing a lot of feature requests and it looks like the developer is open to adding new features one of the big features that people have asked and it looks like he's thinking about adding it is the ability to have a local arch package build or something that the script will work with because right now it depends on finding that arch package in either the core repositories or in the chaotic aur repository and sometimes you have your own locally built packages that you'd like to convert to an app image I know I do so if you guys are interested in creating your own app images from packages that are already listed in the arch repositories or in the chaotic aur check out arch to app image I think this tool is going to be responsible for an explosion in popularity of app images now before I go I need to thank a few special people I need to thank the producers of the show Dustin Gabe James Matt Maxim imitant michael mitchell paul west why you bald homie alex alan armor dragon chuck commander angry die okay dylan greg marsher maryon alexander paul peace arch invador polytech realities for less rate profit steven tools debler and willy these guys they're my high steered patrons over on patreon without these guys this episode about arch to app image would not have been possible the show's also brought to you by each and every one of these fine ladies and gentlemen all these names you're seeing on the screen right now these are all my supporters over on patreon I don't have any corporate sponsors I depend on you guys the community to help me out if you like my work want to see more videos about linux and free and open source software subscribe to distro tube over on patreon these guys somebody should make a snap to app image