After a Minimal Linux Install: Graphical Envionment and Users

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay welcome back everyone so this video is going to be on what exactly you're supposed to do after you install a minimal distribution of Linux so what I mean by that is a lot of distributions most famously probably arch and Jin too but other distresses well parabola or some things based on arch or just other distributions in general when you install them you get a nice black command prompt with nothing installed and a lot of people are often a little confused after you go through the whole rigmarole of installing the actual system what are you supposed to do to actually get everything set up get a graphical environment and stuff like that so in this video we're actually gonna be talking about this so I did an Arch Linux install video just I guess a month or so ago and so this is partially a follow up to that I'm gonna be focusing on Arch Linux I'm gonna be giving you pacman commands and stuff like that but in essence this isn't going to be very different for any Linux distribution even those that are not based on arch just because even though you're gonna be using a different program to install stuff it's still the same principles that's still you know dealing with the same idea so anyway I'll get into it but we're actually gonna cover a couple different things first off user setup setting up users and groups because I didn't cover that in my arch Linux install video usually depending on what you're doing on your insole your you might want a different kind of user configuration most people watching I assume just want to have I mean if you have a personal laptop or something like that at the beginning you're pretty much just gonna want one normal root user that can run commands as route if they need to so we're gonna talk about that we're also going to talk about graphical desktops display managers or how to live without a display manager which lots of people including myself do and basics of system D which you probably actually already know but it's worth at least talking about it in the context just in case you're totally new to Linux or something so first off users and groups so users you pretty much know what a user is there are also groups in UNIX based operating systems if you want to have settings for a whole bunch different users at the same time you can assign them them to different groups um so usually if you just want to add a user you use the user add command so what is this going on about so user rad of course you have a lot of different options so this command will create a user named Luke and it will put it in the group the group wheel and so this M option here this creates the home directory for the user G is group as you would expect you can also set the shell with S or something like that you can check man user rad for all the details but usually for most systems people will just add their own user create the directory and usually add it to the user or excuse me the wheel group and we'll talk about that in a second that's sort of convention but it's also already sort of built in this into the pseudo where's file but we'll touch on that in a second and once you create your user you are going to want to have a password so if you're running his route or anything else you can just type in password and then your username and that'll prompt you to add a new password and you know it'll give you two tries so nice and simple and that's really all you have to do to add a user it's not all you need to do to like get the permissions in sync but that's you know all you need for that so just so you know in case you make some kind of error if you misspelled the user's name if you want to add a new group if you want to change group settings you can check out the manuals for user add user del group ad group del there are a couple other ones that you can you know look at in these manuals but just know if you want to do something more complicated than just having a basic user that can run sudo commands you might want to check these entries out now after you've created your user your user doesn't actually have the ability to run route commands so you can't do something like you know pseudo shutdown now or something like that it'll chide you for even using sudo so I will say just so you know you do need to have sudo installed if you installed Arch Linux with the I think the base devel grew if you installed base devel when you installed arch that should have installed pseudo as well but you may need to install that manually if you haven't already but anyway - to give your user pseudo access all you have to do is edit the Etsy sudoers file now I'm going to open that up in my computer here so I'm gonna type in and of course my user right now but I'm gonna open up ed C sue doors so this file basically just lit lists out all the different permissions that you give to different users and groups now I'm going to scroll down here mine is gonna look different than yours and an at an initial startup this line will be uncommented but you also have the choice of which line what privileges you actually want to give your users now as I said we added that user to the wheel group now i've uncommented this line now as the the comments above it's say if you uncomment this it will allow you to run any command without a password that happens to be what I want a Mike computer like if I type sudo and a command I don't necessarily want to be prompted for the password just because I've already logged on that's my mentality but you don't want to do this on a less secure computer you may want to uncommon this which will it you have to basically ask for the password each time so instead of just you know the way I have it set up you'll never have with this line uncommented I never have to type in my password but that isn't necessarily secure now another option is if you have if generally you want let's say you want people to put in passwords for most everything but there are some commands like shutdown reboot whatever that you don't want to have to put in a password for in that case what you want to do is actually let me just do it here I'm gonna re comment these what you're gonna want to do for that situation is you want to uncomment this line which of course will allow you to run things as sudo with the password um and you can add a line that looks something like this this is a this isn't actually in here by default but it's something that I've added in and what this says is if you're part of the wheel group you can run these following commands without a password so for example shutdown reboot mount unmount these are the kind of things so in my in my larvas configuration the default is usually you have to put in a password but for these commands I don't really care if you have a password or not you can just run sudo and that's it so that's one option you can manually add in all these commands that you want to have users able to run without a kind of password additionally one thing that I really like it annoys me if I don't have but this is a little less secure as well is this line here which should be in the su doors via file by default I've uncommented so it's active but basically what this line says is if I've already used my password to activate sudo on another terminal window or something like that and if I open up a new terminal window I don't have to put in my password another time now for my setup right here it doesn't actually matter because I'm not putting in a password anyway but if you had one of those setups where you do have to put up in your put up your password multiple times or I mean whenever you run a sudo command this enables it so I can for examples start a window put in my password then start a new window and then not have to put it in when I run a CTO command so that's another option you might want to keep in mind so you can also check the other lines in here or check the man for it but in general that's all you need to know so once you've uncommented one of these lines you'll be able to run a sudo command as any user in the wheel group and of course you can add other commands for different groups and stuff like that or settings for different groups but that's pretty much all we need to deal with here so I'm gonna go ahead and go back so anyway once you've done that you will have a user you can log out as root and log back in as your user and you can comfortably run sudo commands with you know freedom to you pretty much do what you want so when it comes to graphical environments there are really two options in fact that the lines between these options are sometimes a little bit vague there are desktop environments and there are window managers so desktop environments usually we are fully featured they come with file managers they come with browsers that come with everything you need window managers on the other hand that's the stuff that I use I three is a window manager and the idea is a window manager is just literally what it says it manages windows and if you want to install the other stuff you can and you'll have to do that manually but the desktop environments usually want to give you sort of a setup where you don't have to worry about like installing everything from scratch or something so anyway in order to have a graphical environment generally you're going to want to install an X org server so there are two factors you're gonna want to install of course this is an arch command on different distros you're going to have you know a slightly different command or possibly different packages but you're gonna want xorg server and xorg X in it so this of course is the server and this of course is the this is the command that will allow you to run it and read X in it RC which we'll talk about in a second so this of course is the really the set up for all the different desktop environments and window managers you're going to need now sometimes I think some desktop environments will automatically pull these but let's say we want to install a window manager just so we know how to do it just because it's more complicated so we might as well figure that one out first so I'll just say the principles of X org or X you know and excuse me X and it is once you've installed these when you type in X in it or X start X this will start the server and it's going to read this file X in it RC to know what to start so this is gonna be where you put what you want it what desktop environment or what window manager you want it to start up so that's what that's about so again let's let's install a window manager or something like that so for the window manager that I use which of course is i3 gaps uh you're gonna want to install either gaps itself that package you also might want I three status that's the status bar that they have by the now most people end up replacing it but it's nice to have it at the beginning you're also going to want to install any kind of terminal emulator it doesn't matter most people use your our xvt Unicode for I 3 I use st but that's not you have to do that manually and you might also want to install d menu because that is the run prompt by default in i3 in addition to those files now keep in mind this this is more complicated since it's a window manager and not a desktop environment because desktop environments are going to do this stuff automatically window managers aren't but in addition to that you might also want to install something like a in M applet which is this is a network manager it's a little thing that usually appears in the corner of your screen and you know it allows you to choose what Wi-Fi to connect to or something like that so usually people want something like that so you might want to go ahead and install that additionally when you're running a window manager at least when you're installing a window manager on a bare system it's probably not gonna install fonts now there are some programs like for example Firefox which when you install Firefox it's gonna automatically install fonts because it needs them but window managers don't necessarily pull those even though you're basically gonna need fonts I'll just say that the ones I use people always ask so I'll go ahead and tell you the ones I use are TTF Linux Lieber team and TTF in console Atta this is so in console odda is the font I used for my terminals and this package here gives me the other fonts like the serif fonts the San serif fonts etc that I use in the rest of my system now there are also you can check out the fonts entry on the arch wiki page and that will give you a list of not just fonts but font packages so one common one that people use is Noto fonts and this is like I think it's a bunch of free fonts compiled by Google and that'll install a whole bunch of different stuff you basically don't need if you have this you don't need to worry about a lot of different fonts but I like having my own the that I happen to like so I just installed these now there's a possibility why not one of the things about Linux that's a little unfortunate is sometimes fonts don't work the way they should be working in the sense that font config sometimes has some problems so every once in a while you'll start up your machine and it might be trying to read serif font as a son as a sans serif font or a monospace font as a serif font or something like that it will get confused for some reason and that that can different from install to install like when I first installed Arch Linux I had this problem all the time nowadays I don't just I don't get it anymore but if you have those problems once you install your fonts you might want to go into editing your config slash font /font step comp file now this is an XML file I'll go ahead and show you what mine looks like but this is a file where you just manually can set all the fonts that you're using as this user so I want in console Auto to be my mono spaced font there is something like that so you can check mine out on my github if you have so many problems but usually this isn't necessarily an issue I'll just say that I had as I said I had it a whole lot when I first started running Arch Linux but usually once you install a big font package font config is usually smart enough to determine what's one every once in a while you might need to install something else or edit this file so anyway that's a very long-winded way of saying all the stuff you need to install manually for a window manager but once you've done all that all you need to do is put this one little line exact I 3 in your xn8 config if you're running i3 or if you're running some other you know if you're running awesome window manager you'd replace it with I think what is it awesome w-will I don't even know exactly what their command is but depending on whatever window manager you're using you can just look it up look up in the manual or on the arch wiki what command you need to run for i3 it's just exec i3 and so what happens is once I run start X it's gonna start the X Server and it's gonna start I 3 and that's gonna be that and it'll boot me into you know this nice blank screen I mean three you have some windows windows that pop up that you know you press n or two but then you can start pulling up windows and operating and configuring it however you want so that's of course a window manager that's the harder aspect that's the thing you you could just do something like a desktop environment and I feel like a lot of people maybe not most of my subscribers but maybe a lot of the people watching this video want to just have a desktop environment and that's a whole lot easier here is xfce this is what it looks like at the beginning so we have our nice browser and file manager and terminal all of the stuff is installed automatically so instead of doing all that stuff installing fonts and all that stuff usually to install a desktop environment all you have to do is say it's install xfce for all right so again this is xfce for all you and that packet well this isn't a package this is a package group I guess and it pull it doesn't just install xfce it installs all that you know and installs the file manager and the browser that at once and whatever fonts that it wants and basically everything all at once and again the division between desktop environments and window managers is desktop environments are for people who just want a cohesive experiment experience they want everything installed automatically whereas window managers are for people who want to configure things more anally and sort of have more control over the system now of course you still can change things in a desktop environment but you know that's that's another issue all together so anyway to install xfce just run exact or ad exec excuse me a tongue-twister just ad exec xfce session to your ex and NRC instead of exec i3 or something like that and that once you run startx it's gonna boot you into this environment so there are other ones as well there are other desktop environments as well there's no there's KDE there's a whole bunch of stuff you can check the arch wiki the arch wiki lists out all basically all the DS and WMS and all the special requirements they have you can check out their entries they they're I mean there are literally dozens of different choices that you can play around with and you can just install all of them frankly and play with them one by one if you want just by editing your X in it RC here are the window managers here's just the tiling window managers there are non tile there you know overlaying windows window managers as well so you can pretty much play around with that and get whatever you want so some general problems you may have just in general now if the X Server doesn't start if you type in start X and something you get some unambiguous error sometimes you have to install some other kind of package one common one is X f-86 video lintel that's for a lot of in devices that have Intel drivers you might have to install an extra package you can usually check the Archie wiki for that um and I will say just because a lot of new Linux users don't know about this at any time if something totally messes up in your graphical environment or just the terminal generally you can type you can hold down ctrl alt and type in like f2 f3 f4 and that'll take you to another tty another one of the blank screens where you can login and let's say you know I three totally messed up and you're trying to figure out what went wrong well you can log into you can press control alt f4 and you'll go to TTY four you can log in there you can type in kill all I three and that'll you know end I three and you can do whatever you need so you know is a lot of sort of new users sometimes have the idea that oh something messed up I have to totally reboot and go through all that you don't have to do that just get into another TTY and when you're in one you can hold down alt and move left and right to go to different TT wise that's just this is just a general note that I know some people don't know and it's just an important thing just to be able to do that if everything else goes wrong so anyway here are the login options now we already talked about this first one and that is you boot up you go to the tty and we've setup xorg and x in it so that we can type in starred x and it's going to run whatever window manager desktop environment we want but there's another option and that is what's called a display manager so display managers you can probably more intuitively think of display managers as just being like login screens and there are a lot of different options for this now most distros will install something like a login this well most districts will install one of these login screens these display managers by default now most people I think who use arch that I know about at lease or or other minimalist distres usually go without this they just like logging into the tty and pressing and typing and sardick's or something like that but you might want to have one of these login screens especially if you have multiple users or if this is a computer that you know you and your family are gonna be using it makes a lot more sense to have one of these now this is I think is LXDE or excuse me lxd M which is the desktop display manager for LXDE anyway let's install one just so you'd know how to do it one of them is light DM this is you know a relatively light on resources one and to install it all you have to do is install light DM and also a gtk greeter and pretty much once you do that you don't have to change any config for files or stuff you can if you want a different you know appearance or background screen but all you need to do is type in sudo systemctl enable light DM service right so this is just a system D command that tells system D to start light DM when you log in so what's gonna happen is instead of instead of you booting into the tty and getting a blank terminal screen you're going to get light DM light DM is gonna pop up and you can log in from there and the nice thing about display managers is as opposed to X and at RC or something like that where you have to manually change what you're booting into here you can pretty you can manually select when you're at the login screen it's going to automatically detect if you have a three gnome LXDE installed it's gonna automatically detect what window managers are to split or excuse me desktop environments you have and it's gonna give you a choice of those different choices or it's gonna allow you to select one and just automatically boot into that so that's what you're doing here and just as a reminder this of course is this command here a lot of times you you have to remember that when you're installing a Linux distribution from scratch everything you want to start up at the beginning you want it you have to overtly tell Linux to start this program or do this so one thing that you've probably seen from managing other distributions is if you want to start a program at startup you have to say sudo systemctl enable and then the service name or if you want to start a service right now not necessarily booted you haven't started a boot up but if you want to start it right now just replace enable with start just I mean a lot of times people email with me with questions like oh I installed this wise and it's starting usually you just have to run systemctl enable and start that and that that's really the basics of what you need to know now of course you can also run commands like restart or something like that check this systemctl manual for that but anyway so those are for system specific programs what if you want to have something specific to your users let's say you're booting in with XM NRC and you want to have some extra settings set or you want to have you know extra things running at the beginning when you boot into your machine or boot into your account whenever you're running now one thing that people usually do is you have a separate bash profile or profile now these programs are read whenever you log in so it's nice to be able to add some extra settings there or extra commands there let me show you for example what my profile file looks like so if I open up profile here here's what I have here so let me and these are just settings that whenever I log in these settings are gonna be read and run or you can put in any kind of arbitrary command here so up here this is just if I have bash our see run bash RC so I get all the settings from that I also do something like change my path variable so if you don't know this is something important to know if you're in sort of a newbie Linux user or UNIX user I guess there is this variable called path I'm gonna put in the there's this variable called path and path is just a list of all the different folders that your computer is looking to for commands at any given time so when you go right here I just changed path to add in my own scripts folder I also set some so well effectively what this does is I have a bunch of scripts in that folder and I can automatically you know start typing one up so I have a screencast command which is actually running right now but I can automatically just type that in anywhere and it's going to run other things I set is I set my editor to them my browser to Firefox my terminal to st and this is just because a lot of different programs will look to those variables for something to read like some some programs they don't want to force you to use vim they want to use your editor Vale variable so if you use vim or Emacs or something else or Nano it wants to know what to actually run or if I want to change my settings instead of changing them and a bunch of different programs I can just say okay I don't want to use Firefox as a default full browser only use cute browser now there's something like that and last but not least another thing that a lot of people want to have is let's say I don't want to use a display manager but let's say I want to log into the tty and I want a3 to automatically start I don't want to type start X or something like that this is what this command does this is what I have on my computer whenever I log in this command just says when remember this is running when I first log into any kind of terminal and it says if the tty I'm in is TTY one which is the default one you start on then start art start X basically so it's gonna automatically start the X server and of course this is just if I'm not running i3 already that's what that's for but anyway the idea I'm getting at here is you can add stuff to your profile file and have you have those settings automatically run across different window managers of stuff like that so that that's just a little addendum for those of you who are using startx or something like that and well that that's actually about it we covered a whole lot of stuff so there are specific questions you can have about different display managers different window managers but honestly the best I can tell you at this point is once you understand what I what we've talked about here how they have an X X server how it actually starts how you know how to change what it starts how to you know add stuff to start up the only thing you really need to work out is the details of what specific window manager or a desktop environment you want to use so I refer you again to the arch wiki all the different options they have they're all of all the different programs they have and that basically is it it's honestly that easy I mean for those of you who run desktop who want to run desktop environments it's as simple as just installing that and you know sudo systemctl enable that and that's basically it so if you have any other questions or things you want to see if there any things that are still anything that's still confusing be sure to say so and if there's enough outcry out I can do videos on specific stuff about this but this is just throwing this out here so people understand the basics of how you actually install a graphical environment on any kind of minimal install of Linux so anyway that's about it so I'll see you guys next time and hope you hope you learned something
Info
Channel: Luke Smith
Views: 285,314
Rating: undefined out of 5
Keywords: dms, libertine, sudo, installation, x11, wms, sudoers, graphical, de, des, not related, luke smith, dm, podcast, cli, minimalist, font, wm, gnu, enable, display manager, driver, managers, window manager, config, intel, void, gentoo, manager, xorg, parabola, vim, arch, linux, xinit, alpine, ttf, terminal, configure, startx, setup, environments, drivers, desktop environment, window, noto-fonts, fontconfig, systemctl, start, pacman, after, install
Id: nSHOb8YU9Gw
Channel Id: undefined
Length: 28min 5sec (1685 seconds)
Published: Sat Apr 21 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.