 Hi guys, welcome back to another tech video, Linux video on my Medium and YouTube channels on Medium and YouTube. So today I'm looking at a quick video to show people those interested how to change a couple of config files on OpenBox. So what is OpenBox? This is the first question. So OpenBox is a window manager. So basically, if I just bring this over here, I'm going to call this green shot to be easier to explain. Or yeah, OpenBox basically is a window manager. So window managers fit within the hierarchy typically, typically because I say typically because you can use them just by themselves. But more typically they are a component of a desktop environment, which is also called a DE. And a DE is an integral component of a distro. A distro is a distribution. So you have many Linux distributions, Debian, Ubuntu, et cetera. And the Differency8, Differency8 themselves based upon really the desktop environment that they bring and that changes the whole look and feel. Of course, there's more to it. There's package management systems that are different. There are software that's installed by default with each distro that's different. This in in a very classic way, for example, if I just call up here, the main Linux DEs, you have stuff like Genome, KDE, CinnamonMate, XFCE. And the one I'm using here is LXDE, LXDE is used to be the default desktop environment in Ubuntu, and now it's moved to LXQT. But it's one of the lightweight ones in this group, XFCE would be lightweight LXDE. And you can even have something like i3 tiling window manager. And this is when, well, that's not exactly a window manager. You can see what this, I use this for a year. It's a pretty crazy, crazy setup. And this is what it looks like when you're running a window manager was basically without the extra things that make it into a desktop environment. You just have literally a kind of grid and you can use, there's one configuration file that you can use to manipulate move screens around in that grid. And a little thing at the bottom, I believe this is called conkey, if memory serves correctly, you can add little notifications into conkey. But it's not a, I mean, looking at that, that does not look like what most people recognize as a modern computing system. So I like LXDE because I think it's a nice mix between being very lightweight and just having enough stuff that I don't need to spend all my day filling around with configuration files and whatnot to get it to work. This is just a little bit too extreme for you and my liking. So basically, Openbox comes with the number, is the window manager of choice in a number of DEs and in turn a number of distros. You can have it running, you can have LXDE running in ARCH and in this documentation here we'll explain. But yeah, it's most associated with LXDE. And LXDE in turn can be put up on Fedora, can be put up on Debian, Lubuntu, that's not correct. It's now XQT, Slackware, et cetera. The whole world of Linux distros is a massive mess. I used to play around with this when I got into Linux. And now I've been using LXDE for 10 years and I'm very happy being, even though it's a little bit occasionally buggy, it basically stick with something you like and stick with it. But if you are a fan of LXDE, then you may want to, and let me just bring this guy across here, you may want to play around with creating key bindings. So that's the topic of today's video, if I can locate my Openbox file. So basically you have, this is where Openbox lives, it's home directory for it slash doc and fig for it slash Openbox. This is a very important directory doc and fig. If you are backing up just your home drive and I tend to just back up my entire full disk off-site incrementally because I try to store everything, including, I try to work in documents in Google Drive and do everything in the cloud. So that really it just minimizes the risk to me of, it makes it easier to work across different computer as it minimizes risk. But if you want to get up and running quickly, this config file there, as you can see, contains a lot of your configuration files. Atom, auto key is in here, very useful. And you can see it's at the level of just individual data entries, LibreOffice is in here as well, Git is in here. My dictionary, for example, so that's where this lives. And my point about backups was that if you are backing up the whole folder, don't exclude this because it begins in a dot, so it's a hidden folder. So if you go up a level here, just to my home directory, and we don't have, I'm just toggling control H so we can get the hidden files. So if you're using something like Clidberry, which I'm running at the moment, just make sure that you have the hidden files enabled. So stock config, forward slash open box, and I'm just gonna drop now into a terminal. And that's F4 if you're using PCman FM. And one thing I would recommend doing, I've just done it, but just to recreate that process, just before you work on your LXDE, it's good practice to take just a backup. So copy that file over to LXDRC, and I usually just append the date. So it's, I think, 0805, 080520.xml. So I've just created a little backup copy before I begin working on it, so that if the changes do something disastrous that I'll be able to just quickly reverse. So I'm just gonna open this in Adam. And this is what it looks like. It's one XML file that basically controls everything. It's not actually that complex when you kind of just like break it down. It's just creating a lot of behaviors of how the window manager actually behaves in terms of when you're moving the windows across and what various keys do. The basic structure, if I just go down to my volume key bindings, which should be there, why are they not there? This is a tricky question. Key bindings, let's bring in something that I know is here. And let me just check quickly. It's completely curious. Anyway, I won't get the video sidetracked. I'm trying to add some key bindings in here. But basically what you can do over here is add in your various custom key bindings. I'll show you how to do that. The basic structure is really, really simple. You have key binding key, and then you have a little command in here, as you can see. And there's a couple of good ones I wanna just kind of mention. Firstly, how to find keys. There's a utility here called, just bring the terminal back, X-E-V. It's a very interesting tool, as you can see as I move my mouse, or it should be. Bring it to focus as I move my mouse around the screen. It's capturing the different coordinates. And what X-E-V is used for is, I'm typing G, sorry, I'm typing H, and you can see H showing up here. With a couple more, H, J, K, and the last one, if you look at the third line in key release event, it's that after key sim, after the next thing, G. That's the basic thing you're gonna be using. So for example, if I do Kp in capitals and underscore, and then end, so that's the down left bottom of my numeric keypad, end, down next, end, down next. So I can even create a few key bindings now. Let's just do that. Let's create the volume ones that I'm missing. I'm just setting up this Linux again. I'm just gonna add a command here. I'm just gonna say, custom my custom volume key bindings. Whoops. And we're just gonna copy in one of these to save a little bit of typing. Kp end, down next, we set. So end, again, end, down. So I'm using X-E-V to find out the keys, the keypad key, and then I know there's other programs that do this, but this is a pretty easy, easy one, and then it's just the command. So I'm trying to remember the command for Alcimixer, toggling, reducing, et cetera, et cetera. There's a couple of floating around on the internet, some work, some don't. This is the toggle. So I'm just gonna put the toggle on. I'm gonna work left or right, volume down, volume up, volume toggle. And do, do, do, do, do, do. Yeah, this should do the trick. 50% off, that's too high a gap. So let's go for just 10%, 10% down, so that'll lower the volume 10%. This guy will raise it by 10%, 10% plus, and then the third key will toggle between mute and unmute it, the master channel and Alcimixer. So I'm just doing save, and then basically after you've done editing, the file, the configuration file, open box, minus, minus, tack, tack, reconfigure. You sometimes will get this OBT message. I'm not exactly sure what the significance of that is. It always seems to work for me. Let me just start a YouTube video here. Try to see if there's some way you can demonstrate this. Okay, so that's how to add a few volume cue bindings. The other ones that you might be interested in using, and you can see here, I've added Xscreen Saver, so that's the, it's kind of a basic screen saver tool, but you can use that for locking the screen at one click. This is a good one to use, Pseudo PM Suspend, and in order to have that work, you need a package called PMU Tills. This basically bundles some scripts just for manipulating the power state of the computer so you can use, if I type into my terminal, sudo pm, and it needs to root suspend, that will put the computer into suspend. So every time that I want to turn down my computer at night, because I'm in the practice for many years now of not actually really ever turning the computer off, instead of going through the traditional log out option, do I, I do have suspend there. I simply press roll lock on that button on the keyboard, and that will, with one click of the button, put stuff into suspend. This is a good one as well. The print, just print like that, keep as, is by default attached to, I'm not sure actually by default, but you can change it to Flameshot. Flameshot is a really good, is a really good screenshot tool that I'm fond of, so if I click print screen now, I get to this, and that's Flameshot GUI. If I just execute Flameshot without the GUI, I do not get to the, I do not get to the cross area. So Flameshot GUI, if that's attached to shutter, for example, or some other screenshot utility, you can just edit, you know, I would just search through this XML file for print, and if it's attached to some other, I think that's what I did. I deleted whatever was attached to add my own key binding. So that's basically an easy way to add, and the sky's the limit. You can see I've attached pause to some, I'm actually not sure what this is. It's probably, it's a relic of an old, relic of an old installation here, because I pulled this down from GitHub. What you can do is, for example, I'm looking at my Chrome apps currently, I'm looking at brain.fm, and if I go into, you can see the command that's running, so what I can do here is copy that, and I'm gonna type that so every time I click on the pause button, now, if I just replace that with that, and I run the reconfigure again, now this should work, so let me click pause, here we go, one, two, three, and now you can see pause is opening my, the custom Chrome app that I've created for brain.fm, which is just one of these kind of white noise things. So you get the idea, it's pretty simple. The tools that you need are the open box configuration file, you need XEV, which I will now close, and between those two things, you can just hand edit this file in order to create custom key bindings if you are using LXDE on Ubuntu. Thanks for watching, any feedback or thoughts or comments in the video, please drop me an email. That's my website, danielrosel.co.io. Thanks for watching.