Flatpak Tutorial - Setting up Flatpak and installing Packages

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today's video is proudly sponsored by lenode the note has been doing cloud computing since 2003 which is actually before amazon web services was even a thing on the notes platform you can get your server up and running in minutes and they include all the popular distributions such as debian fedora ubuntu and get this even arch linux and let's be honest what could be better than a linux focus cloud server provider that lets you tell all of your friends i run arch the note has multiple server plans available to make any app scalable and flexible you could use it to host a blog a vpn server a minecraft server and much more in fact lenode is the platform of choice to host the entire web presence of learnlinux tv in addition the note offers 24x7 365 support regardless of plan size so you can get help from a live person when you need it new users can get started right now with one hundred dollars towards your new account and i highly recommend you check them out because lenode is awesome and now let's get started with today's video [Music] flap packs are awesome they're one of three different types of universal packages and a universal package in linux is a special concept around packaging where a developer can create one package and that one package can be deployed on pretty much any linux distribution and in a recent video i covered universal packages in general to let you guys know what they are and why you might want to consider using them and in this video what we're going to do is focus on flat pack specifically flat packs are available in some distributions out of the box like fedora and pop os so for distributions that do include flat pack by default you don't really have to do anything you could just install a flat pack but some distributions such as ubuntu they don't offer flat pack out of the box so you'll have to add that yourself and in this video what i'm going to do is use ubuntu as an example i'm going to show you guys how to set up flat pack support and then we'll install a package or two now one question you might have is why should i install a flat pack version of something rather than apt-install that same package and the answer is covered in that other video that i mentioned i go pretty much in depth about universal packages and why they're awesome but as a short aside a flat pack is going to generally give you the option of having a newer version of an application where some non-rolling distributions they actually lock the version to a specific version meaning other than security updates you'll never see a newer version and a flat pack is something that you can install to essentially override that and get a newer version of something like i said but it puts you in control you could use flat packs or you could ignore them but they're available and if the situation comes up where you need a newer version of something then a flat pack is a great way to go so let's go ahead and get started all right so here i have a fresh installation of ubuntu on my laptop and i'm ready to begin i'm going to show you how to set up flat pack support so let's get into it now what i'm going to do is use libreoffice as an example and currently it's already installed so if i open up libreoffice writer for example we can see that we're up to version 7.1 now the thing is this is not the flat pack version right here this is just the version that came with ubuntu i didn't actually install anything other than the updates to make sure that everything was up to date as an aside it's probably a good idea to go ahead and update all the packages on your system if you haven't already done that but that's always the case anyway we have libreoffice 7.1 on this machine right now that came with ubuntu and libreoffice itself is now up to version 7.2 as an aside every time libreoffice puts out a new release compatibility for microsoft office is improved so while you could argue that 7.1 isn't actually all that much out of date and it's not libreoffice is one of those applications where i recommend you should probably run the latest and greatest because again microsoft office compatibility is improved in every release and in addition on other distributions such as debian stable for example you'll probably be on an older version than 7.1 so let's go ahead and fix this now the first thing i'm going to do is uninstall libreoffice now you don't have to uninstall libreoffice you could actually have the flat pack version alongside the standard version that comes with your distribution the only quirk about that is you'll have two application icons for libreoffice but i want to make sure that anytime i launch libreoffice that i'm using the flat pack version so what i'm going to do is launch ubuntu software which in your case could be something else like gnome software essentially just launch whatever your distributions package manager actually is and what we're going to do is go to installed then we'll scroll down and find libreoffice and as you can see here it is i'll just go ahead and remove it and i'm going to remove each of the other components as well and now that's done now even though i installed all the updates for ubuntu it says that there's six updates available right here which is kind of interesting these are just snap packages so i'm not going to worry about that anyway libreoffice is now removed so it's time to go ahead and install the flat pack version now the first thing that we're going to do is open up a browser and i'll search for flat pack and then here i'm on the flatpack.org website and the reason why i'm here is because this is where the instructions are and yes i am going to walk you through the process but it's important to note that all the instructions that you need are actually right here on the site so if i go to complete list for supported distributions we have this page right here and what you'll do is just choose your distribution from this list now some distributions of course have flat pack already installed but what i'm going to do is install it in ubuntu which doesn't actually include flat pack by default so since that's what i'm running i'm going to click on the icon for ubuntu and we have all the instructions right here so essentially what you do is you just go to flatpack.org and then you go to the setup section click on the page for your distribution and then you just simply follow the instructions now we have some instructions here for older versions of ubuntu since i'm running the latest and greatest i'm not going to worry about that all we should need to do is copy this command right here and then i'll open up a terminal i'll just move it over to another workspace and then we paste the command right here simple so i'll just press enter to accept the defaults it's going to install some additional packages to meet the requirements standard stuff here and now flat pack is in fact installed and to prove it we have access to the flat pack command as you see here but there's one more thing that we can consider doing and if we scroll down you can see that it's recommending another package so what i'll do is copy that command i'll paste it right here i'll press enter next what we're going to do is add this flat pack repository and this is going to give us access to flat hub which i'll show you in just a moment so we're going to add the repository and i'll put in the password and that's it so again the first package that we installed gives us access to flat pack in general the second command gives us a plug-in for ubuntu software or gnome software so that flat packs will show up there and this last command registers flat hub as a repository to be available so we have somewhere to download packages from now here it recommends that we restart our system which is probably not necessary most likely there's a way to not restart the system but you know what i'll play along i'll just go ahead and restart right now and then i'll be right back alright so i've rebooted my system and now that we're back up and running let's go ahead and install a flat pack now here's something that's really interesting about ubuntu in particular if i open up the ubuntu software store and then i search for libreoffice and here it is right here and then if i scroll down we can see that the version is 7.1 and it's actually from canonical so this isn't the flat pack right here at the top of the screen you could drop this down and choose a different source and here well you don't have a flat pack source available that's pretty interesting so i'll close this and if i open up the app menu here and i search for software literally i type the word software we have gnome software proper right here so if i search again for libreoffice and here it is we can see that library office is available and if i scroll down we can see that the version this time around is 7.2 and the source is flat hub so we have gnome software proper and inside gnome software we have flat pack packages mixed in with the other package results as well so we can use a single application for installing software from the distributions repositories and we can use the same piece of software named software gnome software to install flat packs as well because flat pack packages will be among the search results in addition to the other packages so what i can do then is just scroll up to the top i'll click install and i'll give it a moment to finish okay so the installation of the libreoffice flat pack has finished so if i close out of here we should find libreoffice back in the menu and look at that here's libreoffice and if we check the version we are up to version 7.2 which is as of the time i'm recording this the latest version and we can also see right here that it is indeed a flat pack so we were able to use gnome software to install a flat pack package which is pretty cool now another thing that i want to show you guys is flat hub and this is really cool so if you go to flathub.org you can browse available packages right here from flat hub and this is great because you don't have to sort through gnome software to find a flat pack on this website right here all you'll find are flat packs so you'll immediately know what's available so for example we have spotify right here and i'll click the install button and i'll open it with the software install the default right here and how cool is that i found the application on the flathub.org website i clicked the button and it automatically opened gnome software like you see here so i can click the install button and i should be good to go and as we can see the install button changed to launch that should mean it's installed and sure enough here it is and also right here we have a remove button so if you want to uninstall a package that's pretty easy to do you just simply click on remove and it's gone it's that simple now in addition we can also install packages from the command line as well so discord is pretty popular nowadays so rather than clicking on this button right here which i could do because that's pretty easy to do what i can also do is scroll down and we have the command line option right here to install it via the command line so i'll just copy this command then i'll bring up a terminal and i can paste the command right here so it's flat pack install and then the name of the package and packages on flat hub actually have their own naming scheme so in my opinion it's easier to search the website and there's a way to search for packages via the command line as well but anyway i'm going to go ahead and run this command right here to install this particular flat pack and then it's telling me that there's some additional dependencies and that happens from time to time i'll just press enter you also see the permissions right here as well which is really important to pay attention to but anyway discord should now be installed and in the applications menu let's see if it is and here it is here's discord so i'll click on it and there it is as you can see it's working just fine so what i'm going to do right now is give you guys some additional examples of using flat pack via the command line so first of all let's see an example of searching for packages maybe you don't have access to a browser or you're already in a terminal so what you could do is type flat pack and then search and then finally a name of a package or some kind of keyword to identify the package that you're looking for so for example i'm going to search for we have quite a few examples here and the font size is quite large so i'm going to basically lower that and re-run the command and the one i'm looking for is the one on the top and it gives us the application id right here so what we can do is simply paste that right here and that's the application id and at the beginning what we'll do is type flat pack install and then the application id so wants to download it from flat hub it's asking us if this is okay and it is i'll just press enter and the flap pack needs a run time in order to function so it's okay to install this i'll just answer yes by pressing enter and then i'll confirm again i'll press enter and it's installing and it says that it's done so in the applications menu let's see and there you go here's so is installed it's working so far so good the next command that i'm going to show you guys is flat pack update just like that and there's nothing to do in my case because well i just installed ubuntu on this laptop today and i just installed these flat packs a few minutes ago during this recording so there isn't anything for it to update right now so if i did have flat packs on this system that had updates available then the flat pack update command would show me a list of the individual flat packs that do have updates available and give me an option to get those updated but again since i just set it up there's nothing to update right now but at the very least you have the command right here that you can use to update your flat packs now before we continue there is something else that i would like to mention and that's in regards to permissions the thing is you just saw me install a few packages via flat pack and it didn't even ask me for a password and i was able to remove a flat pack without entering a password as well so why is that if you are used to apt install dnf install yum install or something like that then you're probably accustomed to being asked for your password your sudo password root password or something like that if you install a flat pack package as your user meaning you didn't use sudo or anything like that then it's installing it here for your user so another user on your system will not have that flat pack installed they will also need to install that flat pack as well now if you have a bunch of people that are using your computer and if each one of them were installing the same package then you could argue that's probably a waste of resources you can actually install packages under root as well and that should make it available system-wide but i don't really recommend that unless you have a specific reason to need to do that it's probably better just to install it as a normal user now another thing that we can do is run flat pack list and just like you would imagine it gives you a list of the individual packages that you have installed that are flat pack packages i've only installed a few but we have more than a few here and again the font size is quite large here so let me go ahead and drop that down a bit and we could better see the list right here so a number of these packages actually have other packages or dependencies available for them as well and those are going to be installed as required for example i have an nvidia gpu on this system so it's going to install this runtime right here so that way these individual packages can take advantage of my nvidia gpu we also have the yaroo gtk theme and that's specific to me here on ubuntu because that's the name of the ubuntu theme yaroo so that's going to help make sure that the packages that i install via flat pack look right at home with the rest of the packages on the system we don't want them to stand out have a different theme or anything like that this is going to help that not be a problem but whether or not that's a problem on your end depends on your distribution but long story made short we have other prerequisites and we have run times and things like that that will be installed as needed when we install flat pack packages and finally if we want to uninstall a package we first run flat pack list like i just did and then we grab the name of the package and i like to do it like this because sometimes it could be a little difficult to predict the name of a package that's why we want to use flat pack search or flat pack list if it's already installed so what i'll do is type flat pack uninstall and then i'll paste in the name of the package so if i go to the applications menu we have right here let's go ahead and remove it i'll press enter to accept the default of yes and it tells me that the uninstallation has been completed and sure enough it's gone so that was pretty easy now there's plenty of other variations of the flat pack command but there is one that i definitely want to show you guys and that is this one right here i will run flat pack uninstall and then dash dash unused so i'll press enter and it wants to uninstall these two flat packs right here what's going on with that well the thing is the flat pack uninstall command that's what we can use to uninstall a package but if we give it the dash dash unused option right here what that'll do is search the system for any run times that aren't being used and give you a chance to clean those up so if you use app on a regular basis i guess you can kind of think of this like the app auto remove command it's just going to clean things up a bit so i'll go ahead and press enter and it's going to remove those packages and now it's done anyway flat pack is really easy to use and i just love it a lot especially flat hub because we can go here and scroll through all of the available packages and there's quite a few so for example we have firefox which may not seem like that big of a deal because every distro actually ships with firefox nowadays but when you consider that distros like debian actually ship a very old version of firefox the esr version which i guess may or may not be old depending on when it came out but anyway you have access to the latest and greatest firefox should you need it and of course we have all kinds of things here so we have some games and we have different categories here so you can click browse apps and that's where we get the total list of categories so under games you can see that we have quite a few things here developer tools there's quite a few things here that you can install so essentially if it's a popular application chances are it's probably available in flat hub on my end i install quite a few flat packs because i really love the technology and actually it's pretty much become my default i always have the newest versions of things that i do want the newest version for and it's just a very good technology overall and let me know what you think in the comments down below are you into flat packs or is it just not your cup of tea also let me know if you have any topic suggestions as well because i love creating content for you guys if you like this video please click that like button and i'll see you again very soon thanks for watching [Music] you
Info
Channel: LearnLinuxTV
Views: 4,437
Rating: 4.9882007 out of 5
Keywords: Linux, Tutorial, Review, Howto, Guide, Distribution, Distro, Learn Linux, operating system, os, open-source, open source, gnu/linux, LearnLinuxTV, LearnLinux.tv, flatpak ubuntu, how to, what is flatpak, flatpak install, flatpak apps, flatpak linux, linux distro, how to use flatpak, flatpak tutorial, flatpak explained, flatpak, ubuntu, flatpak permissions, ubuntu flatpak, flatpak review, install flatpak, linux commands, flat pak, flatpack
Id: 31WRiI1nk8Q
Channel Id: undefined
Length: 24min 2sec (1442 seconds)
Published: Wed Sep 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.