 As I mentioned in the last video, and this video is part of a series, be sure to check out the description of this video for the full playlist. A viewer asked, his name is Ray Viota, he said, I am curious about using GTK with shell scripts. I've used Xenity and Dialog, but would like to see other options, if any. And we are going to go over other options, but I thought I'd take this opportunity to go over some basic Xenity commands. Now I've gone over Xenity in the past, a couple years ago. To see those videos, you can go to my YouTube page and search, or if you go to Films by Chris, which even if I change the design in the future, I try to always have a search bar, type in Xenity and you'll get a few videos I've done on Xenity. But today, again, like I said, we're going to go over some basic Xenity commands. So I'm going to go through these really quick. So here is an example of a basic info box. So you type in Xenity, and by the way, Xenity is an external command, so you have to make sure you install it with your package manager. And this is going to be an info box. So we do dash dash info, and then we want to have some text in that info box, so dash dash text. And then inside quotation marks, the text we want to display. So when we hit enter, we get a nice little dialogue box. Since we said it was an info box, it automatically gives a little light bulb here, or whatever your default info icon is on your setup. And then there's the text that we had displayed there. Next we're going to go over an error box, basically same thing. So it's Xenity dash dash error dash dash text. And then we'll say installation failed, hit enter. And there you go. This time we get the error icon, whatever that is on your theme on your system and the text. And it says that it's an error at the top there, and I double clicked, which makes it full screen. Next we'll look at a text box. So we can take text, and so we can do like this. So we can say Xenity entry, ask a question, text where are you. And then we have entry text, which is basically, as you'll see when I enter here, basically default text inside that box there. And I can click OK. And it returns whatever was in that box. So if you don't want to have any prompting for in the box as a suggestion, you can just say that this is Xenity. The type of box, dialog box is an entry box. And the text we want to have, where are you, it will ask that and I can type in whatever I want. When I click OK, it puts that into the output here. If I want, I can do the other route. I should be able to just remove that text. And that way I get a dialog box, and if you don't tell it what text it says, enter new text. And then it has the recommendation that you put there. So again, if you leave out all those options and all you say is an entry dialog box, you get it where it says enter new text, which doesn't really tell the user very much unless you're just trying to get some random text from the user. So that's great. How do you use that text? As you can see, it's outputting what the user type. So what we can do is we can put this in parentheses, and quotations is also a good thing. And then put it into a variable, so I'll just call it my, or I can call it lock for location or whatever I want, and say equal. So this is saying run this command, and whatever the output is, put it into this variable. So now I can hit enter, and I can say work. And we don't get the output here, but it's saved to that variable. So now I can echo dollar sign lock, and it echoes whatever the user inputted there. So you can save that variable and run if then statements or other types of checks on it in your scripts. So that's a text input box. We can also do file selections. So I can go like this. I can say zenity, the type of dialogue again, which is in this case, dash, dash, file, dash select. And we're going to say that the type of dialogue, or file select is a save. And we can also tell it to confirm overwrite in case the file exists. So we can hit enter here, and there you go. We can list, and we can choose a file. It's asking if I want to replace it. We're not actually replacing it here. I'll click OK, and an output. So it confirmed it because of this part. If I just hit enter, now it's not going to confirm. In that case, it will continue the script. Either way, the dialogue's not overwriting a file. Your script will continue with however you write it. So that's doing a file select box. Next we'll look at, let's see, a question box. So we will say, in this case, what I'm going to do is I'm going to say zenity, and I'm going to say question, and I'm going to say, are you sure you want to shut down? And then you'll see here I have a semicolon, which indicates a new command. And we're going to echo dollar sign question mark, which I've mentioned, I believe, in the past in this series. Question mark is basically the exit code of the last command. So I'm going to hit enter here, and we get the dialogue a question. So you can see it has the question mark icon there. And it says, are you sure you want to shut down? I click yes, and we echoed out zero. If I run it again, and I hit no, it's going to give it exit code, a standard error out. So that way you can check. Again, you can put this into a variable like we did the output of the other command. Or in this case, since it's going to be either a zero or one, whether they clicked yes or no, as long as whatever your next command is, dollar sign will be that one or zero, dollar sign question mark that is. And then there are other options too. So I'm looking at here in my notes, you know, for checkbox lists, radio lists, and piping information to information boxes, picking numbers, that sort of stuff, calendars, a calendar I'll do. Let's do a calendar. So here, we got Zenit type of dialogue is calendar, again, text is whatever text is being displayed. The title again, any of these we can change the title of I don't think I've done that in any of the previous examples. We can tell it what day we want to have the default selection at. So here I can say 2008, the fifth month, the 23rd day we'll hit enter, and you can see it goes to May 23rd. And if I click OK, and now echoes out here actually ignore that last part because I'm not actually putting that into a variable. I don't believe there we go. So I can save that output to a variable just like the other examples. Again, there's other examples, and I can go more in depth. If you want to see more about Zenit, again, I'm going over it quick today. I've done videos on the past. If you watch those videos, and you've seen this video, and you want to know more about Zenit, I'll do some more videos on Zenit. If you would like, let me know by commenting below. Be sure to like this video. That will also let me know that people like videos on Zenit. There's a bit more to learn on it, but it's fairly simple and straightforward. Again, you can always use the man file to look at what the options are. Here it lists out all the different types of boxes. You can do color selection, scales, warnings, forms. You can set the title, the icon, the width, and height, and the timeout. So all these options in here for Zenit, you can see you can do lots of stuff. But I'll be glad to do more videos on it, but we're going to go over many other options over the next couple of weeks. But again, if you want to see more Zenit, let me know. Be sure to like, share, subscribe, comment below. And I thank you for watching. As always, I hope that you have a great day. Be sure to check out the playlist in the description of this video for more videos. Thank you for watching. As always, I hope that you have a great day.