Your weird Cousin Ernie drops by or maybe your snoopy Aunt Mildred comes to visit for a week. Either way, he or she urgently needs to check email or Facebook or tweet the latest news about Elvis' extraterrestrial baby, using your computer. Uh oh, who knows what they'll do? Look through your files and documents? Check your browser history? Accidentally delete the files for your work or school project?
With Linux, you can turn the computer over to them and tell them to knock themselves out.
Linux lets you organize both the users of your computer as well as its files and folders, thus keeping things tidy and secure. Each user gets his or her own private space for documents, images, videos, music, and other files plus Linux will keep the preferences and settings of each user safe.
Each user's work environment can be customized with a background image on the desktop, style effects for windows and other elements (called Themes in Mint), and similar preferences. Users can select preferred applications so web links open in Chrome and videos in VLC for one person but another can set them to open in Firefox and SMplayer, respectively.
So let's get started—Cousin Ernie or Aunt Mildred could show up at any time and we need to be ready.
Add a new user account
One of the first things to do is to create a new user account for guests. In the Administration menu of the main Menu, click Users and Groups. A window will pop up that says: “Enter your password to perform administrative tasks.” Linux will often present this or a similar window when you are about to do something that may significantly change or impact the system; it keeps you from accidentally doing things without considering if they're a good idea or not. In future articles, we will refer to it as authentication.
You will see a list of existing users, which probably consists only of your own account at this point. I'm sure you've already figured out that you want to click the Add button. In the popup window, be sure Standard is the selected Account Type, then enter a full name which will show on the Mint login screen (so don't put “People Who Are Snoopy”, use something like “Guest user”) and then a username, in lower case and no spaces (“guestuser” for example). Click Add and the new user account will be added.
Next, with the new account selected in the left column, you will see in bold letters that you have not yet set a password for the guest account. Click the words next to the Password label and a popup window will let you type and confirm the password for the new account; to change an existing password, you click the asterisks next to the Password label. Mint will tell you if your password is too weak and will show an indicator in the confirmation box if what you type does not match the upper password box.
You can personalize an account by clicking the photo silhouette and selecting one of the built-in generic images or browsing your files to find a personal photo or picture.
You can repeat this process if you want to add users for your family members, co-workers if this is an office computer, and so on. You can select Administrator for the Account Type of users whom you trust to be careful in the use and modifications of your operating system and files. We will discuss the administrator role in my next article.
You might even create a special guest account of the administrator type for tech support. If your computer dies unexpectedly, you can provide that account name and password to a repair person and then change the password after you get your computer back; that way you don't have to reveal (and later change) your own password.
So how does a guest account keep other people out of your personal files and such? Linux is very compartmentalized, giving users access to only the things they need, not anything they want. One example of this is your Home folder, similar to My Documents in Windows and where you typically will save your personal document files, photos, videos and so on. Each user account gets its own Home folder, automatically created by Mint when the user is added. Other users can see what files are there but they cannot open them, delete them, copy them, and so on; later we will see that you can make your Home folder totally private so that no one else can even see the filenames in it.
The Home folder has files and folder, usually “hidden” by the operating system, for many programs that you use, such as your browser. If another user starts Firefox, he or she will not see your browser history, bookmarks, or other information and data; instead, those settings and information will be drawn from that user's Home folder instead of yours. Each person's programs and activities remain private.
Using groups to organize users
That's good for your privacy but it kind of sucks if you want to share some files, or folders of files, with another user, right? Perhaps you work together on a project so it's important that everyone involved have access to the project's documents. Mint can let you do that by using groups.
If you look at the new user account you just added, you will see the label Groups and one group name listed there, the same as the username you gave that account (“guestaccount”, perhaps). Just like it automatically creates a Home folder, Mint also creates a new group for each user; however, you can also create groups yourself.
Let's say that you and two other users on your computer are working on the "Smith Project" and need to share its files. If you click the Groups tab in the Groups and Users window where we just added a user, you will see a list of groups—there will be many of them, all created by Mint for internal purposes and you should leave them alone. If you click the Add button, you can create a new group. Just type in smithproject and click OK.
Then go back to the user accounts of your colleagues and click the area to the right of the Groups label for each one. A window will pop up with all of the groups and you can check the box next to smithproject. Each user will already have a checked box next to the name of his or her personal group, automatically created by Linux Mint; leave it checked and click OK. They will now be members of that group. Don't add users as members of the many internal groups which Linux creates and uses for various purposes to run your computer properly. Only add members to group you have created (unless you have a good reason and know what you are doing).
You can create many new groups and assign members to them as needed. In the following sections, you will see how to use user permissions and group permissions to enhance both the privacy of files as well as easy sharing of those files when needed.
Do You have a permit to use that file?
Linux uses both groups and users to determine who can access the many thousands of files and folders on the hard drive. For example, the files and subfolders in your Home folder were marked as yours by the system when your account was created; Linux marked you as the owner of your Home folder and everything in it. If you create new accounts, their Home folders will be marked as theirs as well and you will not be able to modify or delete them.
These markers are called permissions in Linux and and are applied to both files and folders. File permissions and folder permissions are very similar but with a few differences that we will get to in a moment. The three permissions are:
Permission
|
Abbreviation
|
Numeric value
|
Read
|
r
|
4
|
Write
|
w
|
2
|
Execute
|
x
|
1
|
For files,
-
Read means being able to open a file to view its content but not edit or change it.
-
Write means being able to modify a file, including renaming it, overwriting the original content or deleting the file.
-
Execute means being able to run the file as a program, assuming it is a kind of file that can be executed.
For folders,
-
Read means being able to read or view the contents of the folder, as in listing the filenames there. Note that this would be like opening a drawer in a filing cabinet; you could see the contents with labels on each file tab but you could not see the content inside each file; for that, you would need the Read permission of the file itself.
-
Write means being able create, or write, a new file or subfolder in the folder as well as deleting existing ones. As above, this gives you the ability to write and delete files in general in the folder, but to delete an existing file you would need the Write permission for the file itself.
-
Execute means being able to enter that folder, for example by executing the command cd (change directory).
We will come back to file and folder permissions a bit later. For now, we're going to take a tour of Mint's file manager. Once we get comfortable using it for common tasks, we will see how to use the file manager to view and change permissions of files and folders.
Ahoy, Captain Nemo!
Nemo, the file manager in Mint, will seem familiar to most Windows users who have used Explorer. Most of us, with any operating system, use a file manager fairly frequently to double-click to open a file in a program, to organize our files by moving them to other folders, and to make backup copies to flash drives or other media. Nemo is extremely versatile, letting you set a wide array of preferences for its appearance and behavior.
To start Nemo, click the main Menu button. You should see an icon that looks like a file folder in the left column, which is known as the Favorites bar of the menu. If you hover your mouse over the icon, you will see a description of it at the bottom right of the menu.
Before you click it, let's find it another way in the menu. It's in the Accessories group of the menu but we can also type “files” into the search box to find it. If you right-click the icon in the menu, you will see a context menu that lets you add or remove Files (aka Nemo) to/from the Favorites bar. The context menu also lets you add it as a “launcher” to your desktop or to the panel (aka the taskbar in Windows) for quick access.
Launch (start) Nemo. You will see it is a lot like Explorer in Windows, but it has many extra tricks up its sleeve. One of its coolest features, which we won't get into in this article, is that Nemo can log you into a remote server—such as the host of your website—and you can drag-and-drop files and carry out other actions on the other server exactly like you do on your own computer; there's no need for an extra program like WinFTP or Filezilla to transfer files among computers because Linux was built from the ground up to understand and use the internet.
Like Explorer, you can click on a file and rename it by pressing F2, delete it using the Delete key, or double-click to open it. Using the View menu's Arrange Items choices, you can display the files in various orders (for example, ordered by file size).
The left column is the sidebar; it shows folders and drives that you probably use often and has various display options in the View menu. Beneath the drives (and partitions), such as File System, there appears to be an underline; it's actually a bar graph showing how much space is in use on that drive.
You can add a new bookmark for any folder; just double-click the folder to enter into it and click Bookmarks, then Add Bookmark in the top menu of Nemo. Then with a single click in the sidebar you can go straight to that folder in the future.
Copying and moving files with Nemo is made even easier than with Explorer, especially if change one of its settings. Click Edit in the top menu bar, then Preferences. Click the Display tab and at the bottom of the panel check the box that says Show all available actions in context menus. Close Nemo and then launch it again, with that setting enabled.
Now go to the View menu and click Extra pane. Suddenly you will have two file manager panes in the same window. Each can be navigated independently to any folder you wish. Then, you can use the mouse to select multiple files (Ctrl-click) and when you are ready, right-click to see the context menu. There you will see options to copy or move the selected files to the folder shown in the other pane of Nemo.
As well as side-by-side panes for easy copy or move operations, Nemo will let you have as many tabs as you like. You can drag-and-drop files from one tab onto another tab and they will be moved to the folder of the target tab. To open a new tab, select New Tab from the File menu; alternately, you can right-click any of the path location buttons (the parent-grandparent-etc folders shown just above the file list pane in the Navigation Bar area) and select to open a new tab in the designated folder.
You can search the current folder in either pane, and all subfolders of it, by clicking the Search icon in the upper right (it looks like a magnifying glass). Searches are not case sensitive so "linux" or "LiNuX" would match the same number of files in the search.
Nemo will let you search for more than one term. For example, I have quite a few image files for these DK articles on Linux. If I search in my Pictures folder for “linux” I will get a resulting list of dozens of files. If I search instead for “linux partition”, the list will be only those few files which contain both terms somewhere in the filename.
Some files are hidden from casual view to keep users from accidentally deleting them during other routine work. Windows has the same feature but handles it differently: you right-click the file and check the appropriate box to hide the file. In Linux, you simply name (or rename) the file using a period (dot) as the first letter of the filename; to show the hidden files, you can toggle the setting in Nemo's View menu.
If you set Nemo to show hidden files, you will see a number of hidden files and folders in your Home folder. These are typically your personal settings and configurations saved by various programs when you change your preferences in the programs.
Generally it is safer to leave the display of hidden files toggled off but one hidden folder that you may wish to use directly at times is .fonts. By dragging-and-dropping or otherwise copying a font file there, it is installed automatically for you to use in word processors, graphics editors, and similar programs.
Alternately, just double-click a font file wherever you downloaded it on your computer (often in Downloads of your Home folder); the font viewer program will pop up with an Install button. Installing it via the viewer will copy the file to your .fonts folder and you can freely delete the original downloaded file. If you want to uninstall the font later, you can double-click it in the .fonts folder and the button will now say Uninstall. Linux accepts both TrueType (ttf) and OpenType (otf) font files.
Whew, we've covered quite a bit today. Take a breather and digest everything and we'll resume tomorrow in the second half of this article, Part II, where we will learn how to put everything together—users, groups, and permissions—to ensure privacy as well as flexible sharing of files and folders when desired.
This is my fourth article in a series about Linux. In previous articles, we took a quick tour of Linux Mint to get an overview, learned how to test drive it on our computers free of commitment or cost, and then went step by step through the process of installing Linux Mint. If you missed those articles, you can catch up by reading our group blog of Linux users, Tuxville. Visit the blog regularly to keep abreast of future articles in this series.