 So I'm a relatively recent convert to the Wayland way of doing things as you guys know if you've watched my channel for any Monatime, you know that for the longest time I was very very anti Wayland and it's only been recently within the last three or four weeks that I've actually switched full time to Wayland and While I have many thoughts on that transition I've already made one video and I have another one that I'm kind of contemplating in my brain hole. I have Overall been fairly happy with Wayland I have had some issues with it, but I think for the most part I'm have at least I've talked about how I'm ready to say Wayland is ready for me as well as everybody else So what I want to do today is talk about one of the key features or one of the key things you hear most when you hear people talk About Wayland specifically when you hear people talk about Wayland Compositors or Wayland window managers, which is what I like to call them So when you hear people talk about these things usually you hear them talked about in conjunction with something called the portal Or an XDG portal and if you don't know what the lingo means you're probably quite confused like what is a portal? Why do I need one? So that's the question we're gonna try to answer today is what is a portal? Why do you need one? Why is it good? What is the benefits of using this system and Why we're where we are as a community in terms of Wayland and portals and all that stuff So we have a broad range of topics to choose from and that's what we're gonna talk about today So let's go ahead and jump in but before we do if you leave a thumbs up on this video I'd really appreciate it would really help the channel. So so let's go ahead and talk about the main question What is an XDG portal and why do you need one? Well, the answer to that question really lies in the way that Wayland has been built Wayland itself and the compositors that are built on top of Wayland are all built with the idea that security is one of the primary concerns of The display stack so this is an in contrast to X org Which is this gigantic behemoth that controls basically everything outside of system D and it if you displays on the screen X org is in control of it Whereas with Wayland as I understand it. It's much more containerized now When we talk about containers things get awful confusing because there's many different types of containers and even in the realm of Containers oftentimes the word container doesn't mean what you think it means so Explaining what containers mean is kind of hard and because it can mean different things and also Just because something is containerized or sandboxed if you will doesn't necessarily mean that it has no access outside of that sandbox Which is to me very weird because the idea of something being sandboxed or containerized kind of implies the You know security of it being you know contained or Sandboxed if it's not actually sandbox then it shouldn't be you shouldn't use the word words actually have meaning But that's beside the point But the point of Wayland is just to kind of get back on the point is that Everything that runs and it is displayed on the system through the Wayland protocols and all the stuff that goes along with it Are sandboxed together they cannot talk at least in general to each other at all That's the whole point of the way they have sandboxed every application in terms of Display and user interaction so for example in your browser when you want to upload a file The first thing you do on xorg or the first thing you see on an xorg is a file picker That's the thing that you you know you It's basically a file manager But it's used for specifically choosing a file to upload or save on xorg Oftentimes that file picker or at least in the past Oftentimes that file picker was attached to the individual applications So you'll see this a lot with specific types of Applications things like GIMP they have their own file chooser it things like Firefox Oftentimes would have two different file choosers depending on which desktop environment you're in so it would have a QT file picker Or it would have a GTK file picker you get the idea right each application would be in full control of what that file picker Looked like and oftentimes it was contained with the application itself right so it had control over everything that the file chooser had Access to which usually included all of your files So that interaction basically between two different applications is what Wayland was trying to Prohibit when they came up with the system or when they designed the Wayland system right at least as I understand it It's not just pickers that have to do with this thing things like screenshots screen Sharing things like access to network status all that stuff is Stuff that happens outside of an application that an application oftentimes needs access to but in Wayland can't because in Wayland Applications can't access outside of their sandbox So their solution was to create different portals and basically each desktop environment in Wayland compositor basically has created their own portal which gives access from an application To a system level service or action So for example if you want to do screen sharing inside of OBS by itself without a portal on Wayland OBS cannot do screen sharing or screen capturing at all. It just can't be done Okay, because OBS is sandboxed with a portal basically It is a bridge between OBS and those system level functions allowing things like screen capturing So you install something like the XDG portal for KDE or GNOME or Hyperland or whatever And that runs as a system service in the background basically allowing any application Which is sandbox to access the features that those portals provide so things like screen sharing things like net network access Things like a file chooser all that stuff, right so basically To boil it all down a portal is simply a bridge between an application on Wayland and an underlying suite of services that allow it to do certain things like file picking like screen capturing and so on so I hope that I explained that fairly reasonably and I will also just note here that I'm a very much a Wayland noob So I'm trying to explain this from a noob's perspective because I am one I are one and Just if I got anything completely wrong, I'll try to correct it in the comment section below I'm sure someone will correct me if I'm absolutely wrong in the comments below as well So that happens. So that's basically what a portal is and it kind of goes a long way Towards explaining why they're needed because without them applications on Wayland do not have access To any of those services or capabilities that they would normally have on xorg things like screen sharing file choosing all that stuff Right. So the portals are what enable applications to function and Communicate with other services and applications. So without them Wayland would be not as useful So with all that said, let's then talk about My opinion on portals just because I can't do a video without me talking about my opinion on on Wayland or portals or whatever So earlier in the video, I talked about how Wayland was basically ready for me And I think that I am at that case. I've made a video about it recently I don't need to rehash all the reasons why I've switched why I thought now was the time all that stuff But what I want to talk about instead is that there is one part of the Wayland ecosystem, if you will That still doesn't feel quite ready. And of course, I'm talking about portals So I have been using Wayland now for about three weeks and I'm using hyperland so if I actually show you my hyperland desktop, this is hyperland here and I've been using this now for about three weeks. It's a very good window manager It's a very good Wayland compositor if that's the words you want to use to to describe it I've it's a very good experience. I've had very good interactions with a developer I've had had bugs that I've submitted and had fixed almost immediately Which is just unheard of and a project this big So I've had a very good time with hyperland But you've probably also heard me talk about some things where I've been unhappy Mainly when it comes to actually having my screen captured in obs That's where I have been having the most problems And all of that surrounds all of the problems that I've had are directly associated with the portal itself So I can't actually show you this because it's working right now But if you watch the previous podcast, you'll know that twice The screen capture that I was using to capture Tyler On the podcast froze and I had to restart the portal and Basically set it up to from the beginning in order to actually get it to work it froze twice I've also had this weird issue where the first time I open up obs For the day It will bring up the little picker for which screen I want to capture Which is the way it's supposed to work and I select The main monitor which is the one that I almost always want to capture because it's you know right in front of me But for whatever reason it won't capture that monitor right away It'll capture the other two monitors for whatever reason it does fine with two Won't do anything on the third. I have to restart the portal in order for it to capture that monitor It's really weird So my point here isn't to complain about the developers or the development of the portals It's just that for some reason oftentimes when you do have issues on Wayland Chances are The thing that's causing those problems at least in terms of Wayland compositors at least Is the portal the portal that you're using and I think that oftentimes the reason why that's the case is because the portals are Moving targets that are being developed as they go along. So not only do they have to Deal with changes inside of Wayland and the compositor. They also have to deal with changes On the applications part. So when OBS changes something really weird The compositor has to change in order to accommodate those changes. So All these moving pieces sometimes leads to bugs. It's the Way things go basically with anything. So it's not that surprising But I think that overall my experience has been brought down a little bit because of the bugs that are still in the portal system But my experience isn't the norm for most people Because I capture the screen a lot more than most people do. I mean some people take a lot of screenshots Most people don't make a ton of youtube videos That's just not a normal thing that people do So my experience with OBS and with certain parts of the portal are going to be different than everybody else's And from what I've heard from most people They usually don't interact with the portal outside of a file picker So as long as the file picker works, which he almost certainly always does They're not going to have any problems with the portal Whereas I because I interact with it in different ways than most people do I'm gonna kind of see Where some of the bugs still kind of lie So I hope that I did a fairly good job of explaining what a portal is And if you still have questions, you can leave those in the comment section below I'm sure there are technical details that are beyond me that someone else can explain But I'll still try to answer questions if you have them in the in the comment section below You can follow me on mastodon or odyssey those links will be in the video description You can support me on patreon on patreon.com slash the linux cast You can also support me on kofi or as a youtube member Via the button down below my face You can also find all of my merch over at shop.thelinuxcast.org There you'll find hats and t-shirts and desk mats and all sorts of stuff All the proceeds for that go directly to help me make more linux content So if you would be so kind just head over there shop.thelinuxcast.org I'd really appreciate it. Thanks to everybody who does support me on patreon and youtube because they're all Absolutely amazing without you the channel just would not be anywhere near where it is right now So thank you so very very much for your support. I can truly do appreciate it. Thanks everybody for watching. I'll see you next time