Introduction to Linux: Lesson 1
Transcription
Introduction to Linux: Lesson 1
Introduction to Linux: Lesson 1 1 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... Introduction to Linux: Lesson 1 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less01.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less01.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Hello, and welcome to Introduction to Linux. My name is Rich Blum, and I'll be your instructor for this course. Before I talk about what we'll be doing, let me tell you a little bit about myself. Since 1988, I've been a network and server support person at a large (3,500+ user) organization. For more than a decade, I've worked with Linux-based network servers and desktop computers. My side job is tech writing, and I have written several books about Linux, mostly geared toward the server environment. I have a bachelor's degree in electrical engineering and a master's degree in management, specializing in management information systems. Needless to say, I enjoy being around computers! As a network support person, I work extensively with computer users. Every day I see the frustration on people's faces as they try to muddle through various applications to get their jobs done. I've always felt that something is wrong with this picture. Computers are supposed to make our lives simpler, not more complicated. This is why I'm a big fan of Linux. Linux is a software system that is an alternative to Microsoft Windows and Apple Macintosh. It can help simplify your life. How? Well, most likely, you could find a single Linux package that includes programs for all of the different things you do on your home computer. That would mean no more running around purchasing separate software packages the way you have to with Windows or a Mac. And you won't have to muddle through different programs that may or may not work together. Also, Linux applications are often available for free. That sounds pretty good, doesn't it? The purpose of this course is to help you get comfortable in a Linux environment. I have chosen to use the SimplyMEPIS Linux distribution for all our examples and assignments. This is one of the easiest Linux distributions for beginning Linux users to install and get working. (If you don't know what a Linux distribution is yet, don't worry—we'll talk about it shortly.) After the course is over, you'll be able to use what you've learned here to explore other Linux distributions and find the one you like best. Now let me give you a brief overview of what we'll be doing during our time together. Before we start working with Linux, we'll talk about what exactly Linux is and why there are so many different Linux packages available. After that, we'll explore the basics of navigating your Linux computer. While Linux may look similar to the Windows and Macintosh environments, there are a few differences you need to know about. Once you're comfortable with your Linux PC, we'll dive into the software packages available in SimplyMEPIS, seeing how they can solve your everyday tasks. You'll find out how to use the word processor, spreadsheet, presentation graphics, and desktop publishing features provided by one of the most popular free software packages included with Linux—OpenOffice. After that, we'll move on to the multimedia world of playing, ripping, and burning CDs and DVDs. Nowadays, it's not uncommon for people to have multiple PCs in their home. So we'll look at how to use your Linux PC on an existing home network, sharing files and printers with other PCs in the house (including Windows and Macintosh). Since virtually everyone wants to connect to the Internet, we'll find out how to do that with your Linux PC. You'll see 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 2 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... demonstrations of Linux software that you can use for all of your e-mail, Web browsing, and Internet chatting needs. Then, we'll end this course by discussing some of the basics of keeping your Linux computer running smoothly. While you may never have to worry about managing a 1,000-user Linux server, it's not a bad idea to know the fundamentals of how to manage your Linux PC—things like how to download and install new programs. All right, we'll spend the rest of Lesson 1 exploring exactly what Linux is. Even though I want everyone to use SimplyMEPIS for this course, I also want you to understand why there are so many different Linux packages available. So, today we'll walk through the features that separate the different Linux packages. And though you may already have SimplyMEPIS installed, we're going to discuss the various installation options. This way, the next time you want to install Linux, you'll feel really confident about what you're doing. Note: If you don't have the SimplyMEPIS Linux distribution installed yet and need more information about where to get it and how to install it, don't worry—just visit the first link in this lesson's Supplementary Material section. We'll also focus on it in this lesson's assignment. Okay, follow me to Chapter 2, and let's start our adventure! Chapter 2 What Is Linux? So you probably heard somewhere that Linux has many advantages over Microsoft Windows or Apple Macintosh. Now you want to try it. Unfortunately, when you went to the store to buy a copy (or got on the Internet to download one), you discovered that there is more than one Linux. I'm sure you're asking, "What's up with that?" Just like a Windows or Macintosh computer, a Linux computer contains several different pieces of software. Unlike those other computers, though, with Linux you don't have to go out and purchase the individual software applications separately to get a complete computer system. Instead, you get a Linux package that bundles various software pieces together for you. In other words, you purchase (or download) a single package that includes all the software you need. The problem is, different Linux packages bundle different types of software. So how do you know what package to get? Well, the first step is to learn the four basic categories of software that comprise a Linux system. So let's look at them. The Linux Software Again, a Linux system consists of four separate categories of software pieces that interact with each other. They are: The Linux kernel The GNU operating system utilities Windows management software Application software 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... Software parts of a Linux system Every Linux package (including SimplyMEPIS) contains various pieces of software from each of those categories. And, as you will see, the different packages contain many of the same programs from some categories (such as the Linux kernel and GNU utilities). Usually, the biggest difference between Linux packages is in the application software that is bundled. Let's examine each of the four software categories more closely. The Kernel The core of the Linux system is called the kernel. It controls all of the hardware parts of the computer system, such as the disk drive, memory, printer, monitor, and keyboard. A person named Linus Torvalds developed the Linux kernel while he was a student at the University of Helsinki. After developing the kernel, Linus released it to the Internet community and solicited suggestions for improving it. This enabled anyone in the world to suggest programming changes to the kernel. However, allowing just anyone to actually change it would create chaos. So now a core group of people handles change requests to the official release of the Linux kernel. Linus keeps ultimate control over the group and dictates what changes are incorporated into each new kernel release. The Linux kernel contains individual pieces of software (called hardware drivers) that interact with all of the hardware devices in your computer. As you may know from the Windows world, for each hardware device, a computer needs a driver to tell it how to talk to the device. In the Linux kernel, the specific hardware drivers are called modules. Modules can be inserted and removed from the kernel either automatically by the system, as different hardware devices are detected, or manually if the hardware is not autodetected. With the popularity of Linux growing, PC device manufacturers are including more and more Linux drivers for their products. The SimplyMEPIS distribution provides not one, but two different Linux kernels for you to choose from. When the boot screen appears, you have the option of selecting a newer kernel, which supports newer hardware, or an older kernel, which supports older hardware. It is best to try the newer kernel first and see if all of your hardware is supported. The newer kernel also includes some performance improvements, allowing you to work faster with the hardware you have. The System Utilities Besides having a kernel to control hardware devices, a computer system needs utilities to perform standard functions, such as controlling files and programs. While Linus created the computer system kernel, he had no system utilities to run on it. Fortunately for him, at the same time he was working, a group of people was developing a set of standard computer system utilities but didn't have a kernel to run them on. 3 of 12 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... The GNU organization (oddly, GNU stands for GNUs Not UNIX) developed a complete set of utilities that mimic the utilities found on the UNIX computer system, which, at the time, was a very popular computer system used mainly in larger computer centers. These utilities were developed under a software philosophy called open source software (OSS). OSS allows programmers to develop software and then release it to the world with no licensing fees attached. Anyone can use the software, modify it, or incorporate it in his or her own system without having to pay anything. Uniting Linus' Linux kernel with the GNU operating system utilities birthed a complete computer system. While the bundle of the Linux kernel and the GNU utilities is often just called Linux, you will see some purists on the Internet refer to it as the GNU/Linux system in order to give credit to the GNU organization for its contribution to the cause. But don't let this confuse you—it's still the same Linux system. While a GNU/Linux system might be all that Linux geeks need, we normal users require more software to be able to do useful things with Linux. Windows Management Software If you have been around computers for a long time, you may remember the old Microsoft DOS days. Back then, instead of a fancy graphical interface to start your programs, a simple text command line greeted you and waited for you to type something. This looked similar to the Windows command prompt window you see now in Windows XP. The Microsoft Windows XP command prompt To make computers more user friendly, developers created a graphical environment that allows users to start programs by just clicking icons or selecting them from menus. In the early days of Linux, it looked like Windows back in the DOS days—all you had to work with was text command lines. Only computer geeks could have known all of the possible commands that made a Linux system do things. Fortunately for us, it didn't take long for Linux developers to recognize that for Linux to make it big in the desktopcomputing world, it too needed a graphical interface. The software that provides this interface in Linux is called the windows management software. What you see on the screen is usually referred to as the desktop. It contains icons for your currently running programs as well as a menu system for accessing programs on the system. In the true spirit of open source software, several different organizations are working on windows management software for Linux. As a result, some Linux packages often include a few different windows management software packages, allowing you to test each one and decide which one you prefer. The SimplyMEPIS distribution only uses the KDE windows management software, which provides a desktop environment similar to Microsoft Windows. Here's an example of a SimplyMEPIS graphical desktop: 4 of 12 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... The SimplyMEPIS KDE desktop Application Software Of course, no operating system is complete without actual programs that do useful tasks. If you've been using Windows or Macintosh computer systems, you're familiar with various application programs for word processing, spreadsheets, graphical illustrations, playing and recording CDs and DVDs, browsing the Web, and reading e-mail. Each of these tasks requires some sort of specialized software. In the Microsoft and Apple worlds, many of these applications are sold as separate items (such as the Microsoft Office package for word processing). But as we discussed earlier, in the Linux world, applications are usually included in the same software package as the Linux system. That's right—one-stop shopping! This makes life much easier for the beginning computer user. There are programs for the Linux environment for just about every function imaginable—from standard office products such as word processing, to exotic digital signal processors. And true to the Linux world, the majority of these applications are open source software, allowing you to obtain and use them for free. Of course, the bad part about choice is that often there are too many things to choose from. This is sometimes the case in Linux. Too many applications can make it difficult to build a proper Linux system. But in the next chapter, we'll delve into how different organizations bundle Linux software together. Once you understand this, you'll find making choices quite a bit easier. Chapter 3 Linux Distributions A complete Linux package bundle containing the kernel, the GNU utilities, one or more windows management software packages, and a set of application programs is called a distribution. As we've discussed, there are many different Linux distributions to choose from. Most distributions are customized for a specific user group—such as business users, multimedia enthusiasts, or normal home users—and include application software commonly used by them. There are several big-name Linux distributions. These are complete sets that include just about every Linux application known. The following table describes some of them. 5 of 12 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... Popular Linux Distributions Distribution Name Comments Slackware One of the original Linux distribution sets, popular with Linux geeks. Red Hat Business distribution used mainly for Internet servers. Fedora A spin-off from Red Hat but designed for home use. Mandriva Designed mainly for home use (previously called Mandrake). SuSe Different distributions for business and home use (now owned by Novell). Debian Popular with Linux experts and commercial Linux products. In the old days (the early 90s), a distribution was released as a set of floppy disks. You had to download groups of files and then copy them onto disks. It would usually take 20 or more disks to make an entire distribution. Needless to say, this was a painful experience. Nowadays, with home computers having CD and DVD players built in, Linux distributions are released as either a CD set or a single DVD. This makes installing Linux much easier. But beginners still often run into problems when they install the main Linux distributions. Here's why. To cover just about any situation in which someone might want to use Linux, a single distribution has to include lots of application software. So they include everything from high-end Internet database servers to small home systems used for game playing. Plus, they often include software in a variety of languages for international audiences. Because of the quantity of applications available for Linux, a complete distribution often takes four or more CDs. While having lots of options available in a distribution is great for Linux geeks, it can become a nightmare for beginning Linux users. Most distributions ask a series of questions during the installation process to determine which applications to load by default, what hardware is connected to the PC, and how to configure the hardware. Beginners often find these questions confusing. As a result, they often either load way too many programs on their computer or don't load enough and later discover that their computer won't do what they want it to. Fortunately for beginners, there's a much simpler way to install Linux. Customized Linux Distributions A new subgroup of Linux distributions has started to appear. These are typically based on one of the main distributions but contain only a subset of applications that would make sense for a specific area of use. Besides providing customized software, customized Linux distributions also attempt to help beginning Linux users by autodetecting and autoconfiguring common hardware devices. This makes installing Linux a much more enjoyable process. The following table shows some of the customized Linux distributions available and what they specialize in. Customized Linux Distributions 6 of 12 Distribution Name Comments Linspire A commercial Linux package configured to look like Windows. Xandros A commercial Linux package configured for beginners. 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 7 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... SimplyMEPIS A free distribution for home use. Ubuntu A free distribution for school and home use. PCLinuxOS A free distribution for home and office use. dyne:bolic A free distribution designed for audio and MIDI applications. Puppy Linux A free small distribution that runs well on older PCs. That's just a small sampling of Linux subdistributions. More are popping up all the time on the Internet. No matter what your specialty, you'll probably find a Linux distribution made for you. Notice that the SimplyMEPIS distribution is a customized Linux distribution for home users. It's based on the Debian big-name Linux distribution. It uses the same files as Debian but packages only a small fraction of a full-blown Debian system. This allows you to concentrate on using Linux rather than getting stuck trying to install and understand a massive Linux distribution. Obtaining Linux Distributions There are two common methods for obtaining Linux distribution sets. Obviously, one way is to purchase a set of CDs or DVDs. If you don't have access to a high-speed Internet connection, this is the best route to take. You can buy the disks either as a stand-alone boxed set or by purchasing a Linux book that includes CDs (yes, many Linux books include a complete Linux distribution CD or DVD). On the other hand, if you do have access to a high-speed Internet connection, you can freely download most Linux distribution CDs to your PC. The files are actually CD image files (they have an .iso extension). Once you download the files, you can burn them onto CDs using standard CD burning software. Note: You must be careful when burning the .iso CD image files. Don't just copy them to a new CD as you normally would when you burn files to a CD. The .iso image file is a copy of a CD, so you have to do it differently. Most CD burning software has a feature to create a CD directly from a CD image file. This is the option you want to use to create the distribution CDs. When you're finished burning the new CD, you should see files and folders on it instead of just the .iso file. If you see the .iso file on the CD, you did not burn it properly. Purchasing vs. Downloading There are two business models for companies that produce Linux distributions. Some companies sell their Linux distribution sets. You pay them for CDs (or a DVD) of the distribution either as a boxed set in a bookstore or by downloading the product. The purchase price usually includes a period of time during which you can get customer support. Novell, Xandros, and Linspire Linux fall into this category. Other companies allow you to download their Linux distribution for free but offer customer support for a price. Mandriva and MEPIS fall into this category. Finally, many organizations offer their Linux distribution as a free download but don't provide any formal customer support. Instead, you must browse various user forums and newsgroups to get answers to your questions. Ubuntu, PCLinuxOS, and Puppy Linux are in this category. For the beginning Linux user, there are advantages to purchasing a Linux distribution rather than just downloading a free one from the Internet. For one thing, beginners often find that having someone available to help smooth out installation problems is a lifesaver. Also, by purchasing a Linux distribution from a company, you are helping contribute to the Linux cause. While the open source software community is all about sharing, there are still operation costs involved. Most Linux companies also use 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 8 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... the money to invest in more development work in open source software. So, once you find a Linux distribution that you enjoy, consider contributing to the cause either by purchasing the distribution or by helping other Linux beginners in user forums and newsgroups. Chapter 4 Linux Live CDs A relatively new phenomenon in the Linux world is the bootable Linux CD distribution. This lets you see what a Linux system is like without actually installing it. Most modern PCs can boot from a CD instead of the standard hard drive. So some Linux distributions create a bootable CD that contains either a complete or a sample Linux system (called a Linux live CD). The result is, you can boot your PC from the CD and run a Linux distribution without having to install anything on your hard drive! This is an excellent way to test various Linux distributions without having to mess with your PC. Just pop in a CD and boot! All of the Linux software will run directly off the CD. In fact, you could do all of the assignments in this course directly from a bootable Linux CD, without having to actually install Linux! There are lots of Linux live CDs that you can download from the Internet and burn onto a CD or DVD. (As with Linux distributions, remember to burn the CD image using the proper burning software to create the CD directly from the image.) Also, many Linux books now come with Linux live CDs, so you can follow the book directly on the CD Linux system without having to install Linux on your PC. Here's a table of some popular Linux live CDs: Popular Linux Live CDs Distribution Name Comments Knoppix A German Linux, the first Linux live CD developed. SimplyMEPIS Designed for beginning home Linux users. PCLinuxOS Full-blown Linux distribution on a live CD. Ubuntu A worldwide Linux project, designed for many languages. Slax A live Linux CD based on Slackware Linux. Puppy Linux A full-featured Linux designed for older PCs. You may notice that many Linux distributions also have a Linux live CD. Some Linux live CDs, such as SimplyMEPIS and PCLinuxOS, allow you to install the Linux distribution directly from the live CD. This enables you to boot with the live CD, test drive the Linux distribution, and then, if you like it, install it onto your hard drive. This feature is extremely handy and user-friendly. Linux Live CD Issues As with all good things, Linux live CDs have a few drawbacks. Since you access everything from the CD, applications run more slowly—especially if you're using older, slower computers and CD drives. Also, since you can't write to the CD, any changes you make to the Linux system will be gone the next time you reboot. But there are advances being made in the Linux live CD world that help to solve some of these problems. These advances include the ability to: Copy Linux system files from the CD to memory Copy system files to a file on the hard drive 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 9 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... Store system settings on a USB memory stick Store user settings on a USB memory stick Some Linux live CDs, such as Puppy Linux, contain a minimum number of Linux system files and copy them directly into memory when the CD boots. This allows you to remove the CD from the computer as soon as Linux boots. Not only does this make your applications run much faster (since applications run faster from memory), but it gives you a free CD tray to use for ripping audio CDs or playing video DVDs from the software included in Puppy Linux. Other Linux live CDs use an alternative method that allows you to remove the CD from the tray after booting. It involves copying the core Linux files onto the Windows hard drive as a single file. After the CD boots, it looks for that file and reads the system files from it. The dyne:bolic Linux live CD uses this technique, which is called docking. Of course, you must copy the system file to your hard drive before you can boot from the CD. A very popular technique for storing data from a live Linux CD session is to use a common USB memory stick (also called a flash drive and a thumb drive). Just about every Linux live CD can recognize a plugged-in USB memory stick (even if the stick is formatted for Windows) and read and write files from it. This allows you to boot a Linux live CD, use the Linux applications to create files, store them on your memory stick, and then access them from your Windows applications later (or from a different computer). How cool is that? The SimplyMEPIS distribution we'll be using allows you to use a USB memory stick for your personal data. This means you can boot any PC using the SimplyMEPIS live Linux CD and then work with your personal files from the USB memory stick. This is great for people who travel and use different PCs. Note: If you have a Dell computer, are using the SimplyMEPIS live Linux CD, and your screen resolution is stuck at 600 x 480, please see this lesson's FAQs for a solution to the problem. That's enough ground to cover for today. Let's move on to Chapter 5 and quickly summarize what we've learned. Chapter 5 Summary I hope you feel up to speed now on the basics of the Linux world. We discussed a number of important major concepts. Linux is an operating system that can simplify your life because you can get a single package that contains all the software you'll need. Many Linux applications are even available for free. While there are lots of Linux distributions around, they all have four components in common: the Linux kernel, the GNU utilities, one or more windows management software packages, and a set of applications. When choosing a Linux distribution, be sure you look for one that includes the applications you will be using most. If you choose a complete Linux distribution, it will include just about every possible application and hardware driver available for Linux. This means you have to be sure to answer all the installation questions properly so that the right applications and hardware drivers get installed. To avoid having to make decisions during installation time, you can choose a customized Linux distribution. The customized distributions include a subset of the complete distributions, customized for specific types of use. Customized Linux distributions can also help make your life simpler by autoconfiguring hardware found on your PC. In this course, we'll be using the customized Linux distribution called SimplyMEPIS. By far, the simplest way to test Linux is to use a Linux live CD. By booting your PC from one, you can run all of the Linux applications without having to mess with your hard drive. In our next lesson, we'll dive into the world of Linux windows management software packages. As mentioned in this lesson, there are lots to choose from. Lesson 2 will help take some of the mystery out of them and show you how to use and customize the KDE package included with SimplyMEPIS. 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... Next Steps When you feel like you understand the material we've covered in this lesson, I'd like you to take a short multiple-choice quiz. To access it, click the word quizzes at the top or bottom of any page in this classroom. When the quiz form comes up, select Quiz 01, and then click the Submit button. Once you've taken the quiz, I have a short assignment for you. To access it, click assignments at the top or bottom of any page in the classroom. Then, scroll down to the section for Lesson 1. (While all the assignments in this course are optional, I strongly encourage you to do them. They will reinforce and expand upon the many things you'll learn during our time together.) You'll find the link that goes to this lesson's Frequently Asked Questions by clicking the resources link at the top or bottom of any page in this classroom. Finally, be sure to come introduce yourself in the Discussion Area. Tell us why you're interested in Linux, and let us in on any struggles you're having with it. I'm hoping that throughout this course, you will post any difficulties you're having and also share solutions with each other. You can get to the Discussion Area by going to the top or bottom of any page in this classroom and clicking the discussion link. Supplementary Material Installing SimplyMEPIS Tutorial https://api.ed2go.com/CourseBuilder/2.0/images/resources/prod/ilx0/Installing_SimplyMEPIS.html Here are some directions for obtaining and installing the SimplyMEPIS Linux distribution. Linux Distribution News http://distrowatch.com Get up-to-date news on all Linux distributions. FrozenTech's Live CD List http://www.frozentech.com/content/livecd.php This is a regularly updated list of Linux Live Cds that are currently available for download. Don't take the popularity rankings too seriously, though—many of them come from Linux geeks! MEPIS Linux http://www.mepis.org Download SimplyMEPIS Linux, and find out what's new in the latest versions of it. MEPIS User's Forum http://www.mepislovers.org Discuss SimplyMEPIS problems with other SimplyMEPIS users and developers. FAQs Q: You mentioned a new kernel in the lesson. How often does Linux change its kernel? A: Linus is always modifying the Linux kernel to keep up with new developments as well as adding support for various hardware features. Different Linux distributions include different versions of the Linux kernel. If you are just starting out with Linux, it's best to stay away from beta versions of the kernel. These versions are still under development and may 10 of 12 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 11 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... contain bugs. Q: I can't get my Linux distribution to install properly. What can I do? A: Nearly all Linux distributions have user forums on their Web sites. The SimplyMEPIS user forum is located at www.mepislovers.org. First try searching the forum for your particular problem. It's possible that it is a well-known problem and the answer is already there. If not, try asking the question yourself on the forum. Most Linux communities respect beginners as long as they do their homework first. As a last resort, if a particular distribution doesn't work on your PC, try another one. Sometimes one distribution won't detect hardware that others can. Q: I'm using the SimplyMEPIS Linux live CD on my Dell computer. My screen resolution is set to 600 x 480 and I can't change it. How do I solve this problem? A: Here's how: Start your computer, and then while it's still displaying the boot-up screen, press F2 to enter the Bios setup. Then go to Integrated Devices > Onboard video buffer, and change it from the default setting to 1Mb to 8Mb. If you have a computer made by a manufacturer other than Dell and are having this problem, please see your manufacturer's Web site. Assignment As you know, for this course you need to have the SimplyMEPIS Linux distribution working as your PC's operating system. So, your assignment for this lesson is to get that set up (if you don't already have it). Your first step is to download or purchase the distribution from www.mepis.org. For instructions on how to do that (and more in-depth installation instructions than those below), please see the first link in this lesson's Supplementary Material section. Once you have your copy of the SimplyMEPIS live Linux CD, you can boot it from your CD drive. This usually requires that you start your PC and let it boot into Windows; then place the SimplyMEPIS CD in the CD tray, and then reboot the PC. When SimplyMEPIS starts, you must select which Linux kernel to use at the boot screen (remember to try the newest one first). After that, you will see SimplyMEPIS attempt to autodetect your hardware and start the KDE desktop login screen. If you choose, you can install SimplyMEPIS on your hard drive so you don’t need to use the CD every time. Here's how: Important: Be aware that with certain types of installations, you could lose all the files, documents, and data that the hard drive contains. So before you start installation, make sure that you have a backup copy of everything on the computer that you could not afford or stand to lose! At the login screen, log in as the demo user (the password is demo). Once logged in, click the Install Me icon on the desktop to start the SimplyMEPIS installation process. Then follow the instructions in the installation window, first by preparing your hard drive for Linux and then by copying all of the Linux system files onto the hard drive. You will find there are three different options for installing SimplyMEPIS on your hard drive. You can either: Replace the existing system on your hard drive with Linux. Share the hard drive between your existing system and Linux. 7/1/2012 11:47 AM Introduction to Linux: Lesson 1 12 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=1&classro... Add a second hard drive for Linux. For beginners, I strongly recommend getting an older PC and using the first option—replacing the existing system with Linux. You won't even have to worry about getting a PC that has a Windows license since you will be removing Windows (this will save you lots of money). This is by far the easiest of the three options. If you are a more advanced computer user, you may be able to play around with partitioning your hard drive and allowing the Windows and Linux systems to coexist (if you don't know what partitioning a hard disk is, I recommend you don't try it). One tip though: Before partitioning your hard drive, make sure you defragment your existing system. This ensures you have the maximum space available for Linux. Please post any problems, questions, or interesting discoveries in this lesson's Discussion Area. And if you haven't already done so, stop by the Discussion Area to introduce yourself and tell us why you're interested in Linux. Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... Introduction to Linux: Lesson 2 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less02.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less02.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Hello again, and welcome to Lesson 2. So far we've talked about the different ways Linux is packaged and the various methods you can use to run it. I hope you've been able to get SimplyMEPIS Linux working on your computer (either by installing it on your hard drive or by running it from a Linux live CD). Today we'll start off by learning how to customize your Linux installation to your liking (after all, what good's a Linux system if you can't make it look the way you want it to). The first thing to customize is the desktop—the screen you see when you first log in to your system (and from which you launch all of your programs). That will mean talking about Linux windows management software. As we discussed in Lesson 1, there are many different windows management software packages available for Linux. The SimplyMEPIS Linux distribution uses one called KDE, so we'll mostly focus on it. But we'll explore some of the other windows management software packages, too, and find out what they all have in common. By going through this lesson, you might discover a Linux windows management software package that suits your needs even better than the one used by SimplyMEPIS. Are you ready to start? Let's get going. Chapter 2 The Linux Graphical Environment After you log in to your SimplyMEPIS Linux system, a screen greets you with a background image, various icons for programs and devices, and a menu icon. This is your desktop—the gateway to your Linux system. It allows you to use your system's resources simply by clicking your mouse. To get to this point, though, your computer has to do a lot of things behind the scenes. Most of the time they happen automatically, so you don't have to worry about them. Unfortunately, sometimes they don't. So it helps to know a little about what goes on back there. Let's talk about your PC video environment and what enables Linux to work with it. The X Windows System There are two basic elements that control your video environment: the video card in your PC and your monitor. To run your computer, Linux software needs to know how to talk to both of them. What teaches it how to do that is something called X Windows software. The X Windows software operates underneath Linux. It's responsible for controlling your computer's graphical 1 of 11 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... environment. This low-level program informs Linux what kind of video card and monitor you have, telling it just what it needs to do to present fancy windows and graphics on your computer. Linux isn't the only operating system that uses X Windows. There are versions for many different operating systems. But in the Linux world, there are only two software packages that can implement it. That's right—now we're talking about a software package that implements the X Windows software, which in turn allows your Linux system to run. Right about now, you might feel like running. So let me remind you, you probably won't ever have to worry about this stuff—it's just a good idea to know a little bit about it. The XFree86 software package used to be the only X Windows package available for Linux. As its name implies, it's a free open source version of the X Windows software. XFree86 is notorious for being extremely hard to get working properly. It uses a cryptic configuration file to define the video features. However, since it was the only way to produce graphical windows on Linux PC's it quickly became quite popular. Recently, a new package called X.org has come onto the Linux scene. It too provides an open source software implementation of the X Windows system, but in a more user-friendly way. It is becoming increasingly popular. Many Linux distributions are starting to use it instead of the older XFree86 system. SimplyMEPIS now uses the X.org package to produce the graphical X Windows you see for your desktop. Both packages work the same way—controlling how Linux uses your video card to display content on your monitor. To do that, they have to be configured for your specific system. That's supposed to happen automatically when you install Linux. At that time, Linux is supposed to detect your video card and monitor and then create an X Windows configuration file that contains the required information. During installation you may notice a time when it scans your monitor for supported video modes. Sometimes this causes your monitor to go blank for a few seconds. Because there are lots of different types of video cards and monitors out there, this process can take a little while to complete. This is where many of the customized Linux distributions can be lifesavers. Most of them take great effort to automatically detect video hardware and settings without asking you any technical questions. SimplyMEPIS automatically detects most standard PC video cards and even quite a few nonstandard ones. Unfortunately, sometimes the installation can't autodetect what video settings to use—especially with some of the newer, more complicated video cards. And some Linux distributions will fail to install if they can't find your specific video card settings. Others will ask a few questions during installation to help gather the information. Still others default to the lowest common denominator and produce a screen image that is not customized for your video environment. Many PC users have fancy video cards, such as 3-D accelerator cards, so they can play high-resolution games. In the past, this caused a lot of problems if you tried to install Linux. But lately, video card companies are helping to solve this problem by providing Linux drivers. And many of the customized Linux distributions now include drivers for specialty video cards. In fact, now SimplyMEPIS can autodetect the three most popular brands of 3-D accelerator cards—Intel, nVidia, and ATI. If your PC uses one of these three brands of 3-D accelerator cards, you can use the Beryl 3-D desktop feature (more on that later). Screen Resolution During a Linux installation, you might get asked what screen resolution you want to use. This can be a confusing issue for Linux beginners. Depending on the quality of your video card and monitor, you may have several choices. Here are the most common ones: Common Screen Resolutions 2 of 11 Resolution Comments 1024 X 768 Best screen resolution for displaying programs or Web sites on your screen, but produces small icons and fonts. 800 X 600 Larger icons and fonts, but less screen space for applications. 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 3 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... 640 X 480 Extremely large icons, but even smaller screen space for applications. The 800 x 600 screen resolution often provides a happy medium for users. But if you're into games, you'll probably want to allow the maximum screen area for the display by choosing 1024 x 768 settings. To help you see the differences, here are screen shots of the same Linux desktop running at 800 x 600 and at 1024 x 768. 800 x 600 screen resolution Notice that just one open application takes up almost the entire screen. It wouldn't take much to have a mess of windows piled up on your desktop. 1024 x 768 screen resolution 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... As you can see, the application window is smaller when you use the 1024 x 768 resolution, but you can fit more things on the screen. Unless you're running an application that specifies a screen resolution, it's up to you to decide what resolution you prefer. Windows Management Software Now that the background info is out of the way, we can start the fun part: customizing your desktop. But before we actually begin working with the system we'll be using, I want to tell you a little about the wealth of options in the Linux world. Linux windows management software packages range from those that look amazingly similar to Windows to those with bare-bones graphical displays. For older PCs, it's nice to run a bare-bones windows management software package because it will take much less memory and thus run faster. The fancier packages can be memory hogs, often requiring as much memory as Windows XP. Here are some of the more popular packages: Linux Windows Management Software Packages Package Comments Fluxbox A bare-bones desktop ideal for older PCs. Fvwm Another common bare-bones desktop. Fvwm95 Derived from fvwm, but made to look like Windows 95. KDE A full-featured desktop environment, modeled after Microsoft Windows. GNOME Another full-featured desktop environment, made popular by Red Hat Linux. As mentioned in Chapter 1, SimplyMEPIS uses the KDE package. It provides a high-quality graphical interface that simplifies almost every task. The downside to KDE is that it's a memory hog. It's definitely not for older PCs. If you ever need to run Linux on an older PC, you'd be better off avoiding Linux distributions that use KDE or GNOME. You'd do better with fluxbox or fvwm95, both of which are commonly found on Linux distributions geared to older PCs. One of my favorite smaller Linux distributions, Puppy Linux, is designed specifically for old PCs. It uses fvwm95. But since most of us have computers that are new enough to do well running KDE or GNOME, I chose to use SimplyMEPIS and its KDE environment for this course. It has lots of great features we can use. So let's move on to Chapter 3 and start playing with the KDE Desktop. Chapter 3 The KDE Desktop As we talked about already, the KDE windows management software package is popular with Linux beginners because it provides a Windows-like interface for your desktop. When it was released in 1996, KDE stood for Kool Desktop Environment. These days, according to the KDE Web site, it just stands for K Desktop Environment. The KDE window consists of several parts, shown below. 4 of 11 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... The default KDE desktop from SimplyMEPIS The bar at the bottom of the desktop is called the panel. The panel contains (from left to right): The KDE Panel Panel Item Icon(s) The K Menu Program Shortcuts Virtual Desktop list The taskbar Applets Let's take a quick look at each of these parts on the panel. Note: You'll find the rest of this lesson easiest to follow if you read from a print version of this text and have the KDE desktop showing on your screen. KDE Panel Items On the far left of the panel is the K Menu. It's designed to look like and behave similarly to the Microsoft Windows Start menu. When you click the K Menu, a menu appears (not too surprising). It allows you to scroll through the different items, just like in Microsoft Windows. From there you can access just about every function you'll need in your Linux system—starting programs, viewing disks, managing users, even configuring your system settings. 5 of 11 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 6 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... You can customize the K Menu entries by adding or removing items. To do that, you'll use the K Menu editor. To access the editor, right-click the K Menu and select Menu Editor. The menu items appear, allowing you to remove items you don't want in your specialized menu. Just be careful when you remove preset menu items because you can't get them back automatically. As an alternative to using a menu, you can use Program Shortcuts. Program Shortcuts are icons on the panel for applications you use frequently. Since space on the panel is limited, you won't be able to add too many icons (which is why the ability to create a new menu can be handy). You should already have some program shortcuts on your panel. You can add more by right-clicking an empty place on the panel and then selecting Add Application to Panel. A list will appear, showing the standard programs installed in SimplyMEPIS. Select the one you want to add to your panel. You can remove existing Program Shortcuts by rightclicking on the Panel and selecting Remove from Panel > Application, then selecting the application you want to remove from the panel. Let's add a shortcut for the KMahjongg game: 1. Right-click an empty space on the panel; select Add Application To Panel. 2. Scroll through the standard menu items list, and find and select KMahjongg. Now you should have a new icon on your panel. When you click the icon, the KMahjongg game starts! You can move the button to a different location on the panel by right-clicking it and selecting Move KMahjongg Button. To remove the icon from the panel, you would just right-click the button and then select Remove KMahjongg Button. The Taskbar shows running applications, and it functions much like the taskbar in Microsoft Windows. You can minimize applications to the taskbar and then click the application's icon in the taskbar to maximize the application again. You can also press ALT and TAB to switch between running applications. Applets are quick tools and utilities that run on the panel itself. You may see different applets running on your default desktop, depending on your Linux distribution. SimplyMEPIS loads a few handy applets by default. These include the Kmixer program, which appears as a speaker on the panel, and the system clock, which shows the time and date on the panel. You can customize the applets to suit your needs. To do that, you right-click an empty space on the panel and then select Add Applet to Panel. A menu appears, showing the applets available for you to add. To remove an applet icon from the panel, click Remove From Panel > Applet. If you're removing an applet, a list of installed applets appears, allowing you to select the one to remove from the panel. If you decide to add it back later, it'll appear in the list of applets you can add from the Add Applet to Panel menu. KDE Desktop Items Above the panel, you should see a background image, along with several icons. The desktop shortcuts allow you to access applications, URLs, and devices directly from your desktop. Most Linux distributions automatically create shortcuts to your home folder and any removable media that the system uses (such as a CD or USB memory stick). There's one thing you have to be careful with in the KDE dekstop—by default you activate the icons on the desktop by single-clicking them. If you're used to the Windows environment, you will probably double-click them at first. But in KDE, that will launch an application twice. You can add new desktop shortcuts by right-clicking an empty space on the desktop. When you do that, a menu with several options appears. To create a shortcut, you'll want to choose the Create New option. But remember that this just creates a shortcut to the item; the item itself will not actually move to your desktop. You can also save files and folders directly on the desktop. While this can be useful if you need quick access to them, it can quickly lead to desktop clutter. So I wouldn't recommend putting too much on the desktop if you can avoid it. To create a new folder on the desktop, right-click an empty space, and then select Create New > Folder. A dialog box appears, asking you to name the new folder. After you do that, an icon for the folder will appear on the desktop. Clicking it opens the folder (in which you can then put files). 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 7 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... Let's experiment by creating a new folder on the desktop: 1. Right-click an empty space on the desktop. 2. Select Create New. 3. Select Folder. 4. In the New Folder dialog box, type Test Folder for the folder name. 5. Click OK A new folder icon should appear on your desktop with the name Test Folder. You can click the folder to open it (of course, there aren't any files in it yet). To remove the folder, you'd just right-click the folder icon and then select Delete. Chapter 4 Configuring Your KDE Desktop Every Linux distribution configures KDE with specific settings that determine how your desktop looks and behaves. But you can change them by using the System Configuration tool, shown here. The System Configuration tool The System Configuration tool incorporates the KDE Control Center. The KDE Control Center provides a single place to configure all of your desktop properties. Linux distributions that use the KDE environment always include the KDE Control Center. But how you get to the control center can vary. (Most distributions place a link to it in the K Menu, under the System section. Some also create an icon on the panel so you can access it directly from there.) In SimplyMEPIS, it's part of the System Configuration tool, which you access by clicking the System Menu and then selecting System Configuration (Settings). Once the System Configuration tool starts, you should see a list that shows things you can configure. To change how your desktop looks and behaves, you click the plus sign next to Desktop item. The Desktop entry produces a new sublist of items specifically for the desktop that you can configure Clicking Behavior from this list produces a configuration window. It lets you do many things, such as select which icons 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 8 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... automatically appear on your desktop or create a separate menu bar to appear at the top of it. Clicking Panels in the System Configuration tool allows you to configure the behavior of the panel. You can select where the panel is located on your desktop and how big it appears. By clicking the Hiding tab at the top, you can configure the panel to disappear when you're not using it. If you do that, it'll reappear whenever you move your mouse to the panel area. The System Configuration tool Panels configuration page The Appearance and Themes section of the System Configuration tool allows you to customize the colors and layouts of windows, change the screensaver, and modify many other items. The Appearance and Themes page 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 9 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... If you're an art lover, you'll enjoy playing with these settings to get your desktop just the way you want it. KDE Applications The KDE windows management software package is much more than a desktop. It provides a complete environment for application programmers. Many programmers have taken advantage of this and created applications specifically for the KDE desktop. A lot of these come bundled together with KDE in Linux distributions. Others you can find on the Internet and download. Here are some of the most popular: KDE Applications Application Description Konqueror File and Web browser Kedit Text editor Koffice Full-featured word processor, spreadsheet, and presentation graphics Kontact Personal information manager Kpilot Interfaces with Palm Pilot devices KsCD CD and mp3 player We'll talk much more about the KDE desktop and applications as we move through this course. Virtual Desktops One of the neatest features of KDE is called Virtual Desktops.It allows you to have multiple copies of your desktop running at the same time. This is a handy feature that you don't get in Microsoft Windows. Of course, you can only see one desktop at a time. The other virtual desktops are hidden. There are two ways to use virtual desktops in SimplyMEPIS: 1. Use the Multiple Desktops feature in the System Configuration tool. 2. Use the 3-D desktop feature. The 3-D desktop feature is available when you first log into SimplyMEPIS only if you have a compatible 3-D accelerator card (Intel, nVidia, or ATI). Before you enter your userid in the login window, select the Session link, and select KDE with 3D. This starts KDE with the Beryl desktop feature. The Beryl desktop is a 3-D cube. Each side of the cube contains a desktop. You'll only see one side of the cube at any one time, but you can switch between desktops by holding Ctrl-Alt and hitting an arrow key. If you don't have a fancy 3-D accelerator card, don't worry. You can still use virtual desktops. You just need to enable multiple desktops in the System Configuration tool. You'll do this is under the Desktop section, with the Multiple Desktops entry. Just enabling multiple desktops isn't enough though. You need an easy way to switch between them. You can do this by adding the Desktop Preview and Pager applet to your panel (you remember how to do that from Chapter 3, don't you?). Each virtual desktop shows on the panel as a shaded square. You click the squares to activate them. Desktops are numbered, starting with desktop one—the default desktop you see when you first log in. When you click a virtual desktop square, it becomes the active desktop. Notice that the desktop icons and the panel appear no matter which desktop you're using. However, the taskbar only shows applications running in the currently active desktop. In any active desktop, you can open applications just as you would in the default desktop. Applications stay in the desktop in which they were opened unless you choose to move them. You move an open application to another desktop by left-clicking the title bar of the application window and then selecting Move to Desktop. A menu will appear, listing all the available desktops. Then you just choose the one you want to move the application to. 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 10 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... This means, if you have lots of different applications open, you can divide them between multiple desktops to help organize things better. This can be a big help in reducing desktop clutter (from your computer, that is). Chapter 5 Today we learned that underneath the Linux desktop is the X Windows system. It controls how Linux works with your PC's video card and monitor. Fortunately, most Linux distributions do an excellent job of autodetecting your video hardware. But you still might need to decide what screen resolution you want. We discussed the KDE windows management software package included in SimplyMEPIS. The KDE desktop provides a simple Windows-like interface to all of your Linux programs and devices. We also saw how easy it is to customize your KDE desktop, making it look and behave just the way you want it to. In our next lesson, we'll start working with files in Linux. In the meantime, have fun with the assignment, and don't forget to take the quiz. Supplementary Material KDE Home Page http://www.kde.org Stay up-to-date on recent developments in the KDE world. This site also includes a comprehensive tutorial on using the KDE desktop. GNOME Home Page http://www.gnome.org Although we're not using GNOME in this course, it's a very popular Linux distribution you might like to know about. At this site, you can learn all about its features and applications. FAQs Q: Why can't SimplyMEPIS detect the expensive custom video card installed in my PC? A: One sore spot with Linux is that it doesn't yet support many newer video cards. The Linux distribution install won't autodetect them and instead will install a lower-quality default video driver. If you are an experienced PC user, you may be able to download a Linux driver from the video card vendor and manually install it. Otherwise, you may be better off using a standard video card. Check the supported hardware list for your particular Linux distribution. Q: Am I stuck with the screen resolution settings I choose at installation time? A: Most Linux distributions allow you to change the screen resolution at any time after the install. SimplyMEPIS allows you to change your screen resolutions using the System Configuration tool. Click Peripherals,, then select Display. You can change the screen resolution and then test it to see if it will work. Q: Can I install more than one windows management software package? A: Yes, there can be multiple windows management software packages installed on a Linux system. In fact, many distributions will do just that and allow you to select which one to use at login time. 7/1/2012 11:47 AM Introduction to Linux: Lesson 2 11 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=2&classro... Q: Are there applications that work with only one type of windows management software package? A: Yes and no. Each windows management software package includes a unique set of program libraries that applications need to interface with. For the programs to work, the specific program libraries must be present. However, most Linux distributions install libraries from both KDE and GNOME, so applications designed for KDE work in GNOME and vice versa. Assignment Today’s assignment is to customize your desktop. (Like all our assignments, it assumes you're using SimplyMEPIS with the KDE desktop.) Open the System Configuration tool, and play around with the settings. Change how the mouse buttons work. How does changing the mouse button actions affect your Linux experience? Try changing the background and screen saver. Now look at the shortcuts that are created by default in SimplyMEPIS.What happens if you place a data CD in the CD-ROM drive and click the CD/DVD icon? See what happens when you click the Documents icon. Open several applications at the same time. It can be confusing trying to keep track of which applications are running on the desktop. So take a couple of applications and move them to a different virtual desktop (either using the 3-D desktop, or create multiple virtual desktops). Does that help clean up clutter? Can you switch between virtual desktops and keep track of your open applications? Finally, try making some changes to your panels. Maybe you have a favorite game that you can add to your panel for quick access. How about modifying the applets? If the default KWeather applet is not working properly, can you remove it from your panel? Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:47 AM Introduction to Linux: Lesson 3 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... Introduction to Linux: Lesson 3 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less03.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less03.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Hi! Welcome to Lesson 3. Now that you're comfortable with your KDE desktop, it's time to look a little deeper into your Linux system. So in this lesson, we'll discuss how to work with files in Linux. Almost everything we do on a computer requires some type of data file—whether you're creating spreadsheets, typing letters, storing pictures, or listening to music. To get the most out of your PC, you have to know how to create, read, and manage files. Unfortunately, Linux is significantly different from Windows or a Macintosh in the way it handles them. The way Linux manages files can be a bit confusing. But fortunately for us, the KDE desktop hides some of the confusing parts. We'll start today with a brief overview of how Linux manages files. Then we'll take an in-depth look at how the KDE desktop handles storage devices. Finally, we'll end by discussing the KDE Konqueror file browser and some tips and tricks to make your file browsing experience more enjoyable. Let's get started! Chapter 2 The Linux File System The Linux file system is one of the most confusing aspects of Linux for beginners. Trying to locate files on hard drives, floppies, and USB memory sticks can sometimes be a challenge. For example, if you start a project in the GIMP graphical application and then try to save it, the following window will greet you: 1 of 11 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 2 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... Saving documents in GIMP When you open the Save As feature, a window appears with a specific folder (usually a folder called Documents). If you are trying to save the file to a floppy disk, you will have to do some hunting. This is where things get strange because of the odd way Linux handles files and folders. Let's take a few minutes to examine what is happening here. As you can see from the Save As example above, one thing that's different about Linux file paths is that they do not include a drive letter. In the Windows world, the physical drives installed on the PC determine the name of the file path. Windows assigns a letter to each physical disk drive, and each drive contains its own directory structure for accessing files stored on it. For example, in Windows you may be used to seeing the file paths such as c:\documents and settings\rich\test.doc. This indicates that the file test.doc is located in the folder rich, which is contained under the folder documents and settings, which is located on the hard disk partition assigned the letter C (usually the first hard drive on the PC). The Windows file path tells you exactly which physical disk partition contains the file named test.doc. If you wanted to save a file on a floppy disk, you would click the icon for the A drive, which automatically uses the file path a:\test.doc. This path indicates that the file is located at the root of the drive assigned the letter A, which is usually the PC's floppy disk drive. Unfortunately, this is not the method used by Linux. Linux stores files within a single directory structure, called a virtual directory. The virtual directory contains file paths from all the storage devices installed on the PC. The Virtual Directory The Linux virtual directory structure contains a single base directory, called the root. Folders and files beneath the root directory are listed based on the folder path used to get to them—similar to the way Windows does it (notice that Linux uses a forward slash (/) instead of a backward slash (\). For example, the Linux file path /home/rich/test.doc only indicates that the file test.doc is in the folder rich, which is contained in the folder home. It doesn't provide any information as to which physical disk on the PC the folder is stored on. At this point you may be wondering how Linux gets all of the storage devices into a single directory. The first hard drive installed in a Linux PC is called the root. It contains the core of the virtual directory. Then on it, Linux creates folders called mount points. For each additional storage device, Linux creates a specific mount point in the virtual directory. Files and folders will appear to be within these mount point folders (on the root hard drive) even if they are physically stored 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 3 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... on a different drive. Often the system files are physically stored on the root drive, while user files are stored on a different drive—as shown in the illustration below. The Linux file structure In the image above, there are two hard drives on the PC. One hard drive is associated with the root of the virtual directory (indicated by a single forward slash). Other hard drives can be mounted anywhere in the virtual directory structure. In this example, the second hard drive is mounted at the location /home, which is where the user folders are located. A Word About Hard Drives Instead of associating letters with hard drives (or hard drive partitions), Linux uses names that indicate the type of drive. A typical PC uses a type of hard drive known as the IDE drive. But Linux assigns the name hdx to IDE devices, where x is a letter indicating the position of the device. The first IDE hard drive in the system is called hda. If the drive is split into partitions (such as if you installed SimplyMEPIS along with your Windows install), the first partition drive is called hda1, and the second, hda2. If you have an IDE CD-ROM drive in your PC, Linux calls it hdc. SimplyMEPIS uses the KwikDisk applet to provide an easy roadmap for you to explore your disk drives. The KwikDisk applet appears on the Panel as a set of three stacked boxes. Click the icon to see what drives are available. 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 4 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... The KwikDisk window Each hard drive partition is shown as an icon. To mount the partition in the virtual directory structure, just right-click the icon and select Mount. KwikDisk shows the location of the mount point for each partition. After you mount a partition, KwikDisk shows some basic information about the partition, such as the size and amount of free disk space. Linux creates a separate mount point for every hard drive in the PC. Any folders and files stored on a particular hard drive appear under its mount point folder in the virtual directory. The trick, of course, is to know where each of the hard drives is placed within the virtual directory. Fortunately for us, our friend KDE helps us out here. In Chapter 3, we'll see how. Chapter 3 Accessing Drives Using KDE If the idea of virtual directories is starting to sound confusing, don't worry. The KDE windows management software package used in SimplyMEPIS tries to hide most of this unpleasantness. Instead of making us worry about the virtual directory, KDE uses simple desktop icons to represent storage devices found on the Linux system. SimplyMEPIS chooses not to display hard drive icons on the desktop by default. It's an easy process though to enable this feature: 1. Click the System Menu and select System Configuration. 2. Click the Desktop drop-down box (the plus sign), and select Behavior from the new list of options. 3. Click the Device icons tab at the top of the right window pane. A listing appears in the right windowpane, showing all of the storage device icons you can have on your desktop. You should at least have the icons for mounted and unmounted hard disks, floppy disks, and CD-ROMs selected. After you've made your select, you'll have to log out then back in for the icons to appear on your desktop. Here's how my SimplyMEPIS desktop looks: 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 5 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... The SimplyMEPIS desktop with hard drive icons In my desktop example, you should notice that there are three hard disk icons. If a hard disk partition has a label, KDE uses it to identify the icon. If no label is present (such as in a Linux partition) the disk size appears under the icon. As mentioned in Chapter 2, Linux assigns the first physical hard drive the name hda. It assigns a number to each partition on the drive. This particular hard drive has three partitions. If you rest your mouse pointer over the hard disk icons, you'll see lots of information about the hard disks, including their names (called device nodes). The first is named hda1, and the second, hda2, and so on. If there were a second physical hard drive in my PC, its name would be hdb. There's something else you should notice about the hard disk icons on the desktop in the image above. The icon assigned to the 10G Media drive has a green arrow next to it. This indicates that the drive has been mounted at a mount point in the virtual directory. This means its contents are accessible via the virtual directory. The Base URL information shows the mount point, which for this hard drive is the root of the system. The other hard disk icons do not show an arrow, which means they're not mounted, and the data on those disks is not accessible. But clicking the hard disk icon automatically mounts the drive at a mount point in the virtual directory. An arrow will appear on the icon, showing that the drive is mounted. Also, a directory-listing window will appear, showing the folders and files on the hard drive. The file location in the directory window will indicate the path of the newly mounted hard disk partition: /mnt/hda1. Special folders in the virtual directory are reserved as mount points. Most hard drives are mounted under the /mnt folder. This is an important thing to remember. While you can access files on the hda1 hard drive via the file browser, most applications reference the drive by its path name—/mnt/hda1. To help you out some, the file browser identifies the hard drive as a media device (such as media:/hda1) on the drive listing. While this is usually not too bad for hard drives, it can become confusing for removable drives. Removable Storage Devices CD-ROMs, floppy disks, and USB memory sticks fall into a category called removable storage devices. These are obviously devices that you can remove from the PC, allowing you to easily transfer data between computers. Linux treats these types of devices a little differently than it treats standard hard disks. When you insert a removable storage device into the PC, Linux must first detect its presence. Once Linux knows the device is there, it must mount it in the virtual directory. Fortunately for us, KDE does that part automatically. The KDE desktop helps you keep track of which removable storage devices are mounted and where they have been mounted. Different icons indicate mounted and unmounted storage devices. When you insert a USB memory stick, a new 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 6 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... hard disk icon appears on your desktop. By default, the device is not mounted, so you won't see the green arrow on the icon. Here's a screenshot from a KDE desktop that has a USB memory stick inserted into a USB port but not mounted: Unmounted USB memory stick KDE shows the USB memory stick (hard disk sda1) as a special icon (that looks like a memory stick) without an arrow. If you single-click the icon, the storage device becomes mounted, a file browser window appears showing the data it contains, and the desktop icon for the storage device will show a green arrow. Then you can access the data on the memory stick, just as any other storage device. The file browser window will indicate where the storage device is mounted. In the example above, the memory stick is mounted in the folder media:/sda1. A Warning About Removable Storage Devices Here's the tricky part about Linux and removable storage devices—you can't remove the device until it is unmounted. You just can't close the file browser window and remove the device. If you do, there is the possibility that you will corrupt data on the device. This applies to USB memory sticks, CD-ROMs, and floppy disks (while the data on a read-only CD-ROM won't get corrupted, you won't be able to eject the CD-ROM until it is umnounted). You must manually unmount the removable storage device before trying to remove it. Here's how to do that: Close all windows and applications that access data on the storage device you want to remove. Right-click the storage device icon on the desktop. Select either Unmount or Safely Remove from the menu list. Unmounting a removable storage device You can tell when the device is unmounted by the desktop icon—the green arrow will go away. When that happens, it's safe to remove it from the PC. If you are using a USB memory stick with an LED light on it, the light won't turn off. That's okay—as long as KDE shows the device is unmounted, it's safe to unplug it. Once you remove the removable storage device, its desktop icon will disappear. A Word About Linux Storage Formats One thing that you don't usually worry about in Windows is what format you save data in that's on a storage device. Actually, Windows uses two types of storage formats—FAT32 and NTFS. The FAT32 storage format comes from older versions of Windows (back in the Windows 98 days). The NTFS storage format is popular on Windows 2000 and XP machines, and allows for better access-control features. Linux has several types of storage formats that it recognizes (including FAT32 and NTFS). When you create a new Linux hard disk, you must specify what format to use. By default, SimplyMEPIS uses the ext3 format, which is a standard Linux disk format. However, Windows can't read this format. So Windows won't read any data you save on a Linux ext3 formatted drive. 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 7 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... This is important to know, especially when you use removable storage devices. If you want to copy a document from your Linux system to a Windows system, you must ensure that the removable storage device uses a Windows format. The easiest thing to do is format the storage device (floppy disk or USB memory stick) on the Windows system using the FAT32 format. Once you format the device in Windows, Linux will be able to read and store documents on it just fine, and Windows will be able to read and store data on it as well. If you have a Windows partition on your hard drive, you may be wondering what Linux can do with it. The answer is, it depends. Linux can mount, read, and write a Windows hard drive if it's formatted in FAT32. However, if the Windows hard drive is NTFS format (which Windows XP uses), Linux can mount the drive but only read data on it. You won't be able to write new data to the drive from Linux. Now that you know about the different storage devices, its time to explore one of the most versatile tools in KDE—the Konqueror file browser. Chapter 4 The Konqueror Browser Trying to manage files is one of the toughest tasks on any computer system. This is no different in Linux. Fortunately, the KDE desktop comes with an excellent utility to help us out—Konqueror. If you've been clicking the various storage device icons on your desktop, you have already seen Konqueror in action. KDE launches Konqueror by default when you click a storage device icon. On the surface, Konqueror looks very similar to Microsoft Windows Explorer in Windows (the Windows Explorer program is not available in Linux), but there is a lot more to it than meets the eye! File Management The Konqueror main window has two panels—the left side, which shows all devices on the PC, and the right panel, which shows the folders and files contained in the selected device from the left side. This window allows you to browse through each of the devices, folders, and files (remember that in KDE, a single-click expands a device or folder). Konqueror can display files and folders in eight different modes, divided into three categories. You can change the view mode by clicking View from the menu bar at the top of the Konqueror window. Then select the view mode you prefer from the drop-down menu list. You can also change the view mode by clicking one of the view mode icons on the toolbar. In icon view mode, you'll see an icon for every file and folder. You can modify the size of the icons by clicking the plus or minus sign on the toolbar. For graphics files (such as .jpg or .gif), you'll see a thumbnail picture of the file contents. Here's an example of the icon view. 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... Konqueror icon view The tree view mode provides a detailed listing of the files and folders. You can see the file size as well as the time and date the file was last modified in this view. The file size view mode shows a graphical view of the relative sizes of the files in a folder. This can give you a quick look into what files are taking up space on a hard drive. Working With Files Right-click a file icon to see a menu of options you can perform on it. To copy a file, select Copy from the menu list. You can also select the Copy To option, which produces a series of directories to follow to place the file in a specific location. If the directory listing isn't your style, you can paste the file into another Konqueror window using these steps: 1. Open another Konqueror window for the device where you want to save the file. 2. Click the folders until you find the folder you want to save to file in. 3. Click that folder to open it. 4. Right-click an empty space in that folder. 5. Select Paste from the menu list. If you single-click a file, Konqueror will either display the file contents within its own window (if the file is a graphical image), or it will launch the appropriate application to display the file, based on its type. Multiple Viewing Windows One of my favorite features of Konqueror is its ability to have tabbed panes within the single Konqueror window. Instead of opening multiple Konqueror windows to copy or move files, you can perform the task in a single window with multiple views. When you press CTL + T, Konqueror opens a new tab pane in the right window. This allows you to select another location (either another device or a network location) in that tab and easily copy files from one tab pane to another, all within the same Konqueror window! This is shown in the following image. 8 of 11 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... Using tabbed panes in Konqueror Searching for Files The file management features in Konqueror also provide an easy method for searching for specific files on the Linux system. When you select the Search icon from the tool bar, a window appears prompting you to enter information about the file you are looking for. After you enter the information, Konqueror searches the specified range of folders and produces the search results. You can also get to the search function by selecting K Menu > Find Files/Folders. The search automatically begins in your home folder. The Konqueror search feature Other Konqueror Features As I mentioned earlier, Konqueror is a lot more than just a file browser. You may have noticed the tabs on the left side of the main window. These allow you to access the other features available in Konqueror. The tabs are described in the following table. 9 of 11 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 10 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... Konqueror Tabs Tab Description Bookmarks Lists any Web bookmarks set while browsing with Konqueror. Amarok Lists songs on a music CD. History Lists all URLs previously visited while browsing with Konqueror. Home Folder Lists the files in the user's home folder. Network Lists FTP and Web sites visited with Konqueror. Root Folder Displays folders under the root folder. Services Displays Devices, fonts, and printers. The Root Folder is used to view the entire virtual directory on the Linux system. It gives no indication as to which storage device the individual files and folders are stored on. The Network tab is possibly the most versatile feature of Konqueror. From that tab you can browse to other FTP and Web sites, just as if you were inside a Web browser such as Internet Explorer. This feature allows you to list network files alongside your local files, providing a platform for easily copying files across a network. Chapter 5 Summary We are starting to go deeper into the Linux world, so things are picking up speed. We covered a lot of information today about how files are stored in Linux and what you need to think about to access them. Linux uses the virtual directory system to store files. The virtual directory combines file paths from all storage devices on the PC into a single directory. Linux adds hard drives and removable storage devices to the virtual directory at mount points. It also automatically detects removable storage devices, and KDE does the mounting for us. Speaking of the KDE desktop, we saw how KDE makes our lives simpler by helping manage our disks for us. The KDE desktop includes icons showing what hard drives, CD-ROMs, floppy disks, and USB memory sticks are available on the PC. When you click a device icon, a browser window appears showing the files and folders stored on the device. Finally, we talked about the Konqueror file browser. This is a multitalented application that not only allows us to easily manipulate files on the PC but also to browse the Web and FTP servers using multiple tabbed panes within the window. This is a great feature for manipulating files and folders on your Linux system. Next lesson we will start to explore the world of Linux security by talking about user accounts. If you have a family who shares your computer, Linux user and group accounts will make it a breeze to help restrict file access as well as set up file-sharing areas. As always, don't forget to take the quiz and do the assignment before moving on to the next lesson. Supplementary Material Konqueror Homepage http://www.konqueror.org Obtain complete information about the Konqueror file browser. 7/1/2012 11:49 AM Introduction to Linux: Lesson 3 11 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=3&classro... FAQs Q: I don't want to see icons for unmounted drives on my desktop. How can I get rid of them? A: Open the KDE Control Center by clicking the K Menu and selecting Control Center. In the Control Center, expand the Desktop menu item by clicking the plus sign, and then select the Behavior item from the drop-down list. In the right window, click the Device icons tab, and clear the appropriate check boxes for unmounted drives. Q: Can I use Konqueror as a Web browser? A: Yes, Konqueror can be used as a Web browser. You just enter the desired URL into the file location textbox, and press the ENTER key. Konqueror doesn't match the features of larger Web applications such as Mozilla Firefox, but it is a handy Web browser that doesn't take much effort to learn. Q: I can't eject the CD in my CD-ROM drive once I view it in SimplyMEPIS. I press the eject button, but it won't eject. What is wrong? A: Remember that all removable storage devices must be unmounted before removing them from the PC. Right-click the CD-ROM icon on the desktop, and select either Eject or Unmount. If you select Eject, the CD will be unmounted (assuming no applications are using it), and the CD will automatically eject. Assignment It's time to dig around inside your Linux PC file system. For this assignment, let's practice getting comfortable with the Konqueror file browser. First, open Konqueror, go to the Root Folder tab, and click the Root Folder entry. Next, click Tools > Find Files. For the file to search for, type hosts. Make sure that the finder starts at the root folder or you won't find it. Was Konqueror able to find the hosts file on your system? Where is it located? Now that you found the file, what size is it? (Hint: one of the view modes will give you this information.) After determining its size, copy the file to your documents folder. Try doing that by creating another tab pane in the same Konqueror window. Once the hosts file is copied to your Documents folder, try viewing it by clicking the document icon. Did the file open in a separate application? Experiment with viewing and opening files on your system using Konqueror. Make sure you are not logged in as the root user, though, because you don't want to accidentally move or delete any important files! Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:49 AM Introduction to Linux: Lesson 4 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... Introduction to Linux: Lesson 4 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less04.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less04.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Welcome back--you've made it to Lesson 4! Today we'll talk about how you can have multiple people use your Linux PC and still keep everyone's data safe. This is done with user and group accounts. After discussing the basics of Linux user and group accounts, it'll be time to start creating some. As usual in Linux, there are a couple of ways to do that. SimpyMEPIS provides an easy-to-use graphical interface as well as a standard application on the KDE desktop. While it's good to protect your files from other users, sometimes you're in a sharing mood. So to close out today's lesson, we will walk through exactly how you can enable other user accounts on the system to view and (if you're really in a good mood) modify files in a shared area you create on your PC. Chapter 2 Linux User and Group Accounts Linux controls access to folders and files based on user accounts. So whether or not you have access to a particular folder or file will depend on what user account you logged in to the system with. In addition to individual user accounts, Linux provides a method for combining multiple user accounts into groups. You can assign privileges to specific folders and files for specific groups, just as you do for individual users. This feature allows you to share files and folders among several user accounts. Let's first take a look at how Linux handles user accounts. User Accounts If you are running SimplyMEPIS from the live CD, you will see three default user accounts on the login window: demo onthego root You can log in using any one of these three accounts. Demo and onthego are normal user accounts for accessing the system. They have restricted access to folders on the system. Normal user accounts can only write to their home folder and any removable storage devices mounted by them (unless specifically given permissions by another user). 1 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... The root user account is special (have you noticed that Linux geeks like using the word root?). It has total control over the entire system. The root user can access any file, anywhere on the system, as well as start or stop any program that's running. I strongly recommend avoiding logging into the system as the root user. Mistakes can happen, and you don't want to make them while logged in as root. For times when you need to run programs that require special privileges, the KDE desktop has a feature that will ask you for the root password and automatically switch you to the root account to perform the function. When you are finished with the function, KDE will return you back to your normal user account. If you installed SimplyMEPIS on your hard drive, by default you only have three user accounts—the standard root and onthego accounts, and the user account you created for yourself. When you install the software, one of the install screens asks for a user name to configure into the system as a normal user. This user account will have normal user privileges on the system—being able to run programs and access data files in the home folder created for the user account. The same install screen also asks you to set a password for the root account. Please remember (or at least write down) the password you set for it. If you lose the password, you won't be able to make any changes to your SimplyMEPIS system. User Home Folders I've mentioned that each user account on the system is assigned a home folder. It contains folders and files associated with the particular account—things like application preference files, KDE desktop files, and the Documents folder. A user account has complete control over all files and folders located in its home folder. Normally the Linux system creates home folders when it creates user accounts (you will see this in Chapter 3 when you create a new account). All home folders use the name of the user account and are located in the virtual directory under the folder /home. Here's an example of a few user home folders on a SimpyMEPIS system. Home folders in SimplyMEPIS SimplyMEPIS provides an easy way to get to your home folder—you just click the icon that looks like a house in the panel. Then the Konqueror application starts and uses your home folder as the default location. Depending how many applications you've run on your system, you should see lots of files and folders in your home folder. Two of the most important are the Desktop and Documents folders. The Desktop folder holds the contents of your current desktop. Any links, files, or folders created on your desktop are stored in this folder. The Documents folder is a convenient place to put (yes, you guessed it) documents. Many applications, such as the OpenOffice.org Writer program, use this as the default folder for saving documents. 2 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 3 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... By default, only you have permissions to modify the data in your home folder. If you want others to have access to files and folders in your home directory, you will have to create a group. Group Accounts If you're in a setting that has different categories of users (such as in a school, where there are teachers and students), you might need to restrict access to some folders for one group but allow access for another group. This is where the Linux concept of groups comes in. A Linux group allows you to assign multiple user accounts to a common group and then use that group to provide a common set of permissions to files and folders. Different Linux distributions handle user groups differently. Some Linux distributions automatically create a single group called users and place all user accounts in this group. SimplyMEPIS uses this technique. The downside to this is that, by default, SimplyMEPIS allows the users group to read all of the files and folders in your home folder. But we'll learn how to remove this permission in Chapter 4. To help control access, you can create your own groups and add all the users to whom you want to give access to specific files and folders. You can create as many groups as you need and add any users on the system to them. However, unlike with individual user accounts, Linux doesn't automatically assign a default folder to a group. So you must manually create folders and assign privileges to groups (we'll be doing that in Chapter 4). Now that the theory part is out of the way, its time for you to start creating some user and group accounts. As mentioned in the introduction, SimplyMEPIS provides two different tools to do this. In the next chapter, we will take a look at both of them. Chapter 3 Adding Users and Groups If you're running SimplyMEPIS from the LiveCD, you can only use the user accounts configured on the CD. However, if you installed SimplyMEPIS on your hard drive, you can add as many user accounts as you want. In the past, adding users and groups was a painful experience that required manually editing text files. Fortunately, fancy graphical applications have removed most of the pain from the process. In SimplyMEPIS, there are two graphical applications you can use for working with user accounts—the MEPIS User Assistant and the KDE KUser program. In this chapter, we will use both of them to create new user accounts. Creating Users With the MEPIS User Assistant The MEPIS User Assistant allows you to do basic user account management. It is available in the K Menu as System > MEPIS > MEPIS User Assistant (you can also get to it from the System Menu on the Panel). When you start the MEPIS User Assistant, a dialog box will appear asking you for the password to the root user account. Remember, only the root user can create and modify user and group accounts. Type the root password in the box and press ENTER. (You remember it, don't you? The default password is root.) 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... MEPIS User Assistant The MEPIS User Assistant dialog box contains four tabs: MEPIS User Assistant Tabs Tab Description Repair Restore default values for user group membership and common application files Copy/Sync Copy or synchronize files and folders from one user to another Add Create a new user account Delete Remove an existing user account The Repair tab is a great new feature added to the MEPIS User Assistant. If you're playing around with any KDE or FireFox settings and mess things up, come here to reset the values back to their defaults. The Copy/Sync tab can be a handy way to copy common files or folders between users, especially if you just created a new user and need to copy lots of data from another user account. The Add and Delete tabs pretty much do what they say. They're an easy way for you to add or remove user accounts on your system. Let's add a new user to our SimplyMEPIS system. From the Add tab, type test in the User login name: text box. For the password, type testing (and the same for the Confirm user password text box as well). When finished, click the Apply button at the bottom of the window. A dialog box should appear, telling you the new user account was created. That's all there is to it—you just created a new user on your system. To see what's happened, start Konqueror, and click the root folder tab on the left pane. 4 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 5 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... From the root folder, select the home folder. You should now see the home folders for all of the users on the system. There should be a new folder for the test user. This is the home folder SimplyMEPIS created for the new user account. If you look inside it, you will see all of the default files and folders SimplyMEPIS created for the new user account. Here's what it looks like on my system: Contents of the test user's home folder Now log off from your current session. When the graphical login screen appears, go ahead and log in as the test user (remember, we made the password testing). You will see the default desktop for the test user account. Any changes you made to the desktop under your normal user account will not appear on the test user's desktop. Now let's start the MEPIS User Assistant again and select the Delete tab. The drop-down menu on the Delete User pane includes all of the configured user accounts on your system, except for the root account (because the root account should never be removed). Also notice that there is a check box for if you want to delete the user's home folder along with the account. If the home folder of a deleted user account contains important files, you can opt to save it when the user account is deleted. But remember that you will have to change the permissions to the home folder (more on that shortly). Creating Users With KUser The second application that can be used for manipulating user and group accounts is KUser. This is an application that comes standard with the KDE desktop and is available on any Linux distribution that uses KDE. You can get to the KUser application by clicking the K Menu, selecting System, then More Applications, and then selecting User Manager (KUser). Just as with the MEPIS User Assistant, you must type the root password before the KUser program will start. Once it starts, you will see the main KUser window. 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 6 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... Main KUser window The first thing you will notice in KUser is that there are lots of user accounts listed, not just the few you saw in the MEPIS User Assistant. This is because, behind the scenes, Linux uses various user accounts to run system applications, such as e-mail and databases. This is a security feature, ensuring that if a hacker compromised a system application, he or she wouldn't automatically gain root access to the system. So please don't mess with any of these preconfigured user accounts. The Linux system will not work properly if you remove the special accounts. The MEPIS User Assistant automatically hid these special accounts from you. The KUser program shows special accounts in blue. Besides the default special user accounts, SimplyMEPIS also creates other special accounts for controlling installed applications. Each user account shows the UID (or user id) Linux assigned to it, the user account name, the location of the account's home folder, and the assigned system shell. In addition to the list of user accounts, you will see two groups of icons at the top of the window. The first three (with a picture of a single head) are for user account functions, while the following three icons (with a picture of two heads) are for group account functions. Let's add a new user account using KUser. Click the first Add button, and type the name of the new user account (let's use test2). When you click OK, another dialog box appears, looking for lots of information. 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 7 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... KUser User Properties dialog box The Add User function automatically assigns a new UID value for the new account, and it suggests the location for the account's home folder. However, you'll see lots of other fields that are blank. In KUser you can customize the new user account and provide additional information for it. One field that is crucial is the Login shell. We won't mess with login shells until much later in the course, but for now, just know that all user accounts must have a default login shell. As you can see from the entry in the field, the default is to provide an empty login shell. But you can't log in to the system with that. This is a safety feature of KUser—preventing you from creating a user account without providing a login shell. For your test2 user account, click the drop-down arrow in the text box, and select the /bin/bash shell. This is the standard Linux login shell. Also notice that, by default, the Account disabled check box is enabled. In order for you to use the new account, you must clear this box. You also have the option of creating a home folder for the new user, and copying the default system files and folders (called the skeleton to the folder. Finally, note that you must also click the Set Password button to create a password for the new user account. The KUser program also provides advanced password management features. Clicking the Password Management tab at the top of the window lets you see all of the password features you can assign to the account, such as when the user must choose a new password and when the account expires. The last tab in the Add User window is the Group tab. Using this window, you can assign the user account to groups configured on the system. By default the user account is added to the users group. After selecting all of the features you need, click OK, and Linux will create the account. You will see the test2 user account appear in the user listing window. Double clicking the test2 user account entry brings up the User Properties window, allowing you to make changes to the user account. The Delete User functions are similar. After selecting the user account you need to remove, click the first Del button in the toolbar. A dialog box appears, asking if you also want to delete the user account's home folder and mailbox. Now that you have seen how to create user accounts, let's take a look at how we can use them to protect and share files and folders on the Linux PC. Chapter 4 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 8 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... Changing File Permissions You can use the user accounts configured on your system to control access to files and folders. But before we start doing that, we need to talk a little about how Linux handles file and folder restrictions. Each file and folder has three sets of access groups. An access group is a category of users that is assigned a set of access permissions. The three access groups are: The file or folder owner A group assigned to the file or folder Everyone else on the system The user account that creates a file is the owner. When you save a document on the system, by default your user account becomes the owner of the file. Only the file owner and the root user can assign or change privileges to a file. Also by default, the group assigned to a file is always the group that the file owner belongs to. The everyone access group restrictions apply to all user accounts on the system that aren't in the same group as the file owner. The everyone folder access group provides an easy way to grant privileges to a specific folder for all users on the system. There are also three access permissions that can be applied to each access group: Read access Write access Execute access Read access allows the access group to read the file. Write access allows the access group to write to (or modify) the file. Execute access allows the access group to (no, not kill, but) run the file. Linux uses this permission to restrict access to specific applications. Viewing File Permissions To better see (and I hope understand) file permissions, let's try looking at a few examples. The Konqueror application provides an easy way for us to view permission settings on files. Here's the first example: 1. Click the house icon on the panel to start Konqueror in your home folder. 2. Right-click the Documents folder, and select Properties from the menu. 3. From the Properties window, click the Permissions tab. From the Permissions window, you will see all of the configured permissions for the folder. By default, the folder owner (you) can view and modify content (read and write permissions). Also by default, anyone in your group (the users group) and everyone else on the system can view your documents. If you are trying to keep your documents private, you can modify these privileges. Click the drop-down box for Others, and select Forbidden. Do the same for the Group drop-down box, and click OK. Now you'll be the only one able to view your documents. Cool! That's all there is to file permissions. You can restrict access to any file in your system. Now let's talk about the opposite of restricting access—allowing others to modify files and folders in your home folder. Creating a Shared Folder There is a middle ground between opening your documents to the world and keeping them private. You can create shared folders and share files with specific users on the PC. A shared folder provides access to allow multiple users to save and read files. There is a multistep process for creating shared folders: 1. Create a user group to have access to the folder. 2. Add users to the new user group. 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... 3. Create a folder to share. 4. Set access permissions on the folder for the new group. Let's see these steps in action. First, you must have a group to use to control access to the folder. So let's create a group using the User Manager (KUser) program. 1. Start User Manager (KUser), type the root password, and click the second Add button at the top to add a new group. 2. Type in the name of your new group. For this example, let's call it: testers. 3. Select user accounts to be members of the new group. From the list on the right side of the window, select your account, and click Add. Do the same for the test account you created earlier in this lesson. 4. Click OK to create the new group. You will now see the new group in the list of groups. Now it's time to create our shared folder. 1. Log in as the test user account you created previously. 2. Start the Konqueror application in the home folder (remember, you can use the house icon in the panel). 3. In the test account's home folder, create a new folder by right-clicking an empty space and selecting Create new > Folder. Name the folder test in the dialog box. 4. Right-click the new test folder icon in Konqueror and select Properties. Click the Permissions tab. 5. In the Ownership section, click the group drop-down box, and select the group testers. This makes the testers group the default group for the folder. 6. In the Access Permissions section, click the Advanced Permissions button, and check the Group Write Entries and Set GID checkboxes. This sets any files stored in this folder to default to the folder group and not the user's group. Next, uncheck the Others Show Entries checkbox. This prevents others from viewing files in this folder. Click the OK button. The permissions should look like the following image. Creating a shared folder Create a text file in the test folder as the test user account. After saving the file, look at the permissions on the file. Notice that the default group for the new file is the testers group, not users. However, even though you made the folder shared, the file you created isn't. You must still set the permissions for the group to write to the individual file. Now log off, and then log in as your normal user account. Open a Konqueror window, and browse to the new test folder (remember, it's under the test account's home folder, not yours). If everything worked correctly, you should be able to access everything in the test folder, and modify the text file you created. Congratulations, you created a shared folder! 9 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... Chapter 5 Summary Today we examined how Linux controls access to files and folders stored in the virtual directory. You saw how important user accounts are and how to create and modify them. Next, we talked about putting sets of users together in groups and using those groups to assign common privileges for files and folders. Remember that SimplyMEPIS has a common group called users to which all user accounts belong. If you want real security on your system, be sure to revoke the users group permissions on your home folders. Finally, we walked through the steps of changing permissions on files and folders. The Konqueror application makes assigning permissions to folders a snap. In our next lesson, we'll talk about printing using your Linux system. There are lots of options you can work with in setting up a printer, and we'll explore all of them. In the meantime, have fun working on today's assignment (and, as always, don't forget the lesson quiz). Supplementary Material File Security http://www.faqs.org/docs/linux_intro/sect_03_04.html If you need to be serious about file security on your Linux system, this is an excellent article to read and follow. FAQs Q: Are there any restrictions on the user account name? A: Yes. Linux user accounts can't be longer than eight characters. They also must start with a letter but may contain a number within the name. You can't use special characters (such as #, $, or %) within the user account name. Q: Can a user account be a member of more than one group? A: Yes, you can add a user account to as many groups as you want. However, the more groups a user account belongs to, the harder it is to track permissions. Try figuring out what folders an account that belongs to a dozen or so groups has access to. That can get tricky. Q: Can a folder belong to more than one group? A: No, Linux allows a folder to belong to only one group and have only one owner. Q: Can I prevent someone from logging in as a user account without deleting the account? A: Yes. The User Properties window in the KUser application provides a check box to disable an account. Once an account is disabled, no one can log in with that account. Re-enabling the account is as easy as clearing the check from the check box. 10 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 4 11 of 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=4&classro... Assignment For today's assignment, you will need to create some user accounts on your PC. You can use either the MEPIS User Assistant or the KUser application. Try creating user accounts for everyone who might use your PC. If you are the only one using the PC, create some user accounts for fictitious users. After creating some user accounts, use the KUser application to create a couple of groups. Add a few user accounts to each group, making sure that you note which user accounts belong to which groups (you'll need this info later). Then, log in to your PC using one of your newly created accounts. Change some of the desktop features on the account (you remember how to do that, don't you?). Add some items to the panel, and create a few desktop icons for the new user account. Now log off, and then log back in using a different account. Did the desktop changes you made apply to the other user account? Does this mean that each user account has its own desktop layout? Next, create a new folder in the home folder of a user account. Give permissions to one of your newly created groups to write to the new folder. Log off, and then log in as another user account within the same group. Can you save a file in the new folder? Finally, log in as a normal user account, and try to save a file in the /etc folder. Did Linux let you do that? Look at the permissions of the /etc folder. Who is the owner of the folder? The assigned group? What permissions do the group members have for the /etc folder? Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... Introduction to Linux: Lesson 5 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less05.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less05.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Welcome to Lesson 5! Today's topic is printing. You might be wondering how we could spend an entire lesson discussing printing. If you are familiar with Microsoft Windows, you know that it does an excellent job of setting up printers automatically for you. Unfortunately, printing is one of the areas in Linux that is not quite yet standardized and simplified. Linux distributions have made great advances in simplifying printing over the years, but there is still a long way to go. That said, I don't want to get you scared about printing in Linux. The SimplyMEPIS distribution does provide a relatively easy way to set up and use printers from Linux applications. During this lesson, we'll walk through all the required steps. We'll open with a brief explanation of why printing tends to be complicated in Linux and explore some of the different ways of printing. Then we'll take a brief look at the latest development in Linux printing: CUPS. It's software that attempts to simplify the whole process. After laying the groundwork, we'll examine the system that SimplyMEPIS uses—the KDEPrint utility. It provides a great interface for helping you configure a printer on your PC. Finally, we'll close by discussing how to troubleshoot and solve printing problems. Chapter 2 Linux Printing Methods One of the reasons printing in the Linux world is complicated is that, like everything else in Linux, there is more than one way of doing it. But before tackling how to do it, let's first look at how printing works in Linux. This information may not be the most exciting up front, but it will help immensely later when you need to troubleshoot printing problems. So please don't fall asleep! Direct Printing The most basic type of printing involves an application sending information directly to a printer that's connected to the PC. This is called direct printing. With direct printing, printer data is sent from an application to a printer handler, then directly to the printer. No data formatting or manipulation is performed by the Linux system. In Linux there are two different printer applications you can use for direct printing: System V, and Berkeley LPD. Both of these systems have their roots back in the old UNIX days, so you know they are complicated. In the past, you had to know exactly which print system your particular Linux distribution used and had to manually edit configuration files 1 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... to get a printer to work. That was painful (to say the least). But even today, in Linux you still need to know two things. First, you must know what port on the PC your printer is connected to. And, second, you have to know what data format your printer uses. In Windows you don't have to know these things, because the operating system usually figures them out automatically. But in Linux we are not so lucky. Linux does not automatically detect printers, so you must configure them manually. Now, there are several ways to connect printers to a PC, such as through the standard printer ports LPT1 and LPT2, and through standard USB ports. Also, to make life more interesting for you, in Linux, parallel printers are called lp0, lp1, and so forth (note that the first printer starts at 0, not 1). When a Linux application uses direct printing, it needs to know exactly where the printer is connected. Of course, if you move the printer, you must also configure the application accordingly. With the thousands of different types of printers available, it's hard to know the data format a specific one uses. In fact, most use proprietary languages to format print data. So each application on your PC needs to know what format to use when sending data to a specific printer. Luckily, Linux geeks developed a solution to this problem. Filtered Printing The geeks' solution to direct printing problems in Linux was to create a middleman between printers and applications. It's called a filter. The job of the filter is to convert raw data sent from an application into data that a printer can use. Each type of printer requires a unique filter configuration. So, in order to work, filter configurations have to contain information about the connected printer. Therefore, Linux systems often include many different filter configurations for different types of printers. The input of the filter requires a standardized generic printing language. Linux uses one called PostScript. Business-class printers typically can print PostScript data without any data conversion, making the job of the filter quite easy. Unfortunately, most home printers do not utilize the PostScript language. So Linux had to incorporate a more advanced filter system to cover them. GhostScript The most popular filter program used in Linux is GhostScript—an open source application that converts raw data into printer language. It uses individual printer drivers to convert the raw data into the proper format for each printer. There are lots of GhostScript drivers available for various types of home printers. The Scheduler Okay, so we've talked about printers and how Linux formats data for them. There is just one more issue to consider. What happens if you are in the middle of printing a 10-page document and also want to print something else—for example, a copy of an e-mail message? With direct printing, you'll get an error message because the printer is busy. To solve this problem, there needs to be another front end to the filter that allows multiple applications to send data to the printer, hold the data as it comes in, and pass it off to the filter when it's time to print. This front end is called the scheduler. The scheduler uses a concept called spooling. Spooling provides a queue for printer data to accumulate on its way to the printer. Multiple applications can send data to the scheduler at the same time with no problem. Each time an application sends data to the scheduler, it's called a print job. The scheduler handles each print job separately and can remove individual print jobs from the print queue if necessary. Confused Yet? When you are used to the good old Windows Plug and Play method of using printers, this whole process may seem confusing. Let's look at it visually. 2 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... Flowchart of printing in Linux Now here's the printing process again in a nutshell. You select to print a document within an application. The application sends the print data to the scheduler as a print job. The scheduler places the print job in the print queue associated with the desired output printer. The filter software (GhostScript) processes each print job, in order, from the print queue. GhostScript formats the printer data into the proper language for your installed printer and then sends it to the configured printer port. That's a lot of things to do just to print a document! And, of course, with that many steps involved, there are lots of opportunities for things to go wrong. Once again, we're lucky that Linux geeks have made much effort to help simplify things for us commoners. The result is CUPS. CUPS to the Rescue CUPS (which stands for Common Unix Printing System) is open source software that was created in an attempt to tie all of the steps required for Unix printing together in one package. The CUPS system uses the standard Internet Printing Protocol (IPP) to provide a standard method for interfacing with printers, whether they are on a local PC or on another system on a network. The CUPS system includes: a scheduler that runs continuously in the background on a PC, print queues for each printer, and a customized version of GhostScript to work as the filter. The CUPS filter contains loads of printer drivers to support many business and home printers currently on the market. CUPS also contains various utility programs that allow you to configure printers, easily submit print jobs, and monitor print jobs waiting to print. The SimplyMEPIS distribution uses CUPS as the default printer control package. It automatically starts the CUPS scheduler when you boot the system. It also contains configuration files that create the default CUPS environment to support some common printing functions. Chapter 3 KDEPrint Even with CUPS, setting up and configuring a printer is not so simple for most computer users. But the KDE desktop helps out (as it so often does) by providing a terrific graphical interface for CUPS. Actually, you can use the KDEPrint interface with lots of different Linux printing systems (including the old System V and Berkeley ones), but for our purposes in SimplyMEPIS, we will stick to using it with CUPS. SimplyMEPIS places most of the required printer utilities in a single place on the K Menu. To see them, click K Menu > Print System. You will see several printer functions available for use. The following table describes them. SimplyMEPIS Print System Items 3 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... Item Description Add Printer KDEPrint add printer utility. KDE Print Settings Configuration items for KDEPrint. Configure Server The CUPS server configuration editor. Print Manager The main KDEPrint window. Print Browser The Konqueror printer browser. Print File Prints the currently open document. You don't have to worry about configuration settings for KDEPrint or the CUPS server—the creator of SimplyMEPIS has already done that for you. You will have to configure your specific printer into the KDEPrint utility. Let's do that now. Adding a Printer You can easily add a new printer to your system by clicking the Add Printer item from the K Menu. However, before we do that, let's take a look at what's already preconfigured on the system. Click the Print Manager item. The KDEPrint main window appears. It shows all of the configured printers, allows you to control printers, and lets you create new ones. The KDEPrint main window In SimplyMEPIS there are five pseudo printers already configured for you. They are shown in this table. KDEPrint Default Printers 4 of 11 Printer Description Mail PDF File Converts document to PDF and makes an attachment in Kmail. 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... Print to file (PDF) Converts document to a PDF file. Print to file (PostScript) Converts document to a PostScript file. Send to fax Send document to generic fax driver. As you can see, the KDEPrint program has some great tools. Imagine being able to convert any document into PDF format just by printing it—no extra software to purchase! You'll save lots of money with just this feature alone. Now let's use the KDEPrint program to add a printer connected to the PC. Click the Add menu item at the top of the window, and select Add Printer/Class. This starts the KDEPrint Add Printer Wizard. Clicking Next starts the process, which first asks you what type of printer you are trying to connect to. Add printer choices As you can see from the list, there are lots of options available for connecting to a printer (including using network printers). Select the Local Printer option if your printer is connected via an LPT or USB port, then click Next. KDEPrint shows a list of the available printer ports on your PC. Select the port your printer is connected to and click Next. The next step is to choose the printer driver for your printer. KDEPrint displays a list of its known printer drivers (remember the filter part of the process). There are also two check boxes at the bottom of the list for if you are using a PostScript printer or want to send raw data directly to the printer (direct printing). Select the printer driver that matches your printer. If your printer is not in the list, you may be able to select a driver for a similar model printer by the same manufacturer. When you have made your selection, click Next. If more than one driver is available for your printer, another window will appear, asking you which driver to use. KDEPrint flags one of the drivers as the recommended driver for your printer. It is usually safe to select that driver. Although that might not necessarily be the best driver, it is usually guaranteed to work. At this point the printer installation is mostly over. A window appears, allowing you to test the configuration you have selected. If you click the Test button, a test page should print out from your printer (after asking you for the root user password). Click Next when you are ready to move on to the final part of the configuration. Printer Control Items After the basic printer configuration is completed, there are a few housekeeping items you need to configure. These 5 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... items mostly apply to a multiuser situation where you need to tightly control your printing environment. If this is your situation, you can control who has access to the printer, how much they are allowed to print per day, and whether or not they use print job banners to identify their print jobs. For a typical desktop environment, you can just accept the default values of the remaining wizard windows by clicking Next at each dialog box. This configuration allows any user on the PC to print unlimited amounts of data. When you get to the General Information window, you must choose a unique name to call this printer. Type the printer name in the text box and click Next. When you select your printer name, keep in mind that there are a few rules: The name must start with a letter. The name may contain numbers and underscores. The name must not contain any spaces. The maximum size of a printer name is 128 characters. It is also important to know that the printer name is not case sensitive. This means you can't use the same name in a different case for different printers. These rules are primarily intended to control network printers that are shared between computers on a network. However, even if this is just your own desktop PC, the rules still apply. When you're done with the configuration, click the Finish button. If you did not print a test page, a dialog box appears, prompting you for the root user password. Only the root user has the ability to add and modify printers on the system, so you must temporarily switch to the root user account to add the printer. After you add the printer, the main KDEPrint window appears and should include the new printer in the list of printers. Using the New Printer You should now be able to print to the new printer from most applications on the system. Let's do a test using the KDE KWrite application. 1. Click the K Menu, All Applications > Browse All > Apps > Editors > KWrite. 2. 3. Type in some test text in the open document. 4. Click File > Print. The Print dialog box appears, with some options you can select for printing. The new printer should appear as the default printer in the Print dialog box. If you click the drop-down arrow, you'll see the list of printers configured in KDEPrint. You can select any of these items to print your document. Note the State line in the dialog box. This will tell you if the printer is ready to accept new print jobs or has been stopped or put on hold (you'll learn how to do that in Chapter 4). Click Properties next to the printer name. From the Properties dialog box, you can select the orientation of the document (portrait or landscape), use special banners, and set the margins and other document features. When you have made your selections, click OK to return to the Print dialog box, then click Print to print the document. If all goes well, you should see your test document come out of your printer. Unfortunately, there are lots of times in printing when all doesn't go well. So in the next chapter, we'll discuss what to do when printing goes badly. Chapter 4 Troubleshooting Printer Problems 6 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... Printing is one area in Linux where plenty of things can go wrong. But if you have a basic understanding of how to control the printer, you can troubleshoot printing problems. The KDEPrint manager window provides all of your printer control features in one handy location. There are multiple ways to get to it. You can get there directly from the K Menu, from a Konqueror window, or from the System Configuration tool. After you open a Konqueror window, select the Services tab in the left window frame. From the resulting list of options, expand the Print System Browser. This feature provides options for controlling printers. The Konqueror Print System Browser The options within the Print System Browser are described in this table. Print System Browser Options Option Description Classes Displays defined printer classes. Jobs Displays pending print jobs for each printer. Manager Shows the KDEPrint printer manager window. Printers Shows the KDEPrint printer manager window. Specials Shows information for the pseudo printers. The Manager option starts the KDEPrint manager program. The Printers and Jobs options show information about the printers but do not start the KDEPrint manager. You can also access the KDEPrint manager from the System Configuration tool by expanding the Peripherals item in the options list, then selecting the Printers item. This starts the KDEPrint manager. Let's start the KDEPrint manager now by clicking K Menu > Print System > Print Manager. To manage printers, click the Administrator Mode button, and then enter your root password. Next, click your printer from the list of printers. This highlights the printer entry and enables printer control for that printer. All of the functions available on the printer menu will apply to that printer. Click the Printer button at the top of the window. The drop-down menu provides functions you can perform on the printer: 7 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... Starting and stopping the printer Enabling and disabling the print spooler Remove the printer Configure the printer When you stop the printer, you're preventing the scheduler from sending print jobs to it. This is an excellent troubleshooting tool. Let's try it. Click Printer > Start/Stop Printer > Stop Printer. You should notice that a red X now appears on the printer icon in the window list. This means that applications can still send print jobs to the scheduler, but the scheduler won't forward jobs to the printer. Let's test this. Open the KWrite application again, create a test document, and try printing it. This time, when you go to print the document, you should see that the state of your printer is now Stopped (accepting jobs). Now click the Print button. The application behaves as normal, sending the document to the printer and going back to the document screen. However, nothing comes out of the printer. Instead, you should see a printer icon in your desktop Panel. This indicates that there is a print job waiting in a printer queue. You can quickly view the print job by clicking the printer icon in the Panel. If you still have the KDEPrint application open, you can also click the Jobs tab in the middle of the screen while the printer is highlighted (remember, each printer has its own queue). Either way, you will see a listing of print jobs waiting for the printer. Viewing printer jobs All of the print jobs waiting to happen appear in the print queue list. You can test that by opening another application and sending another print job to the same printer. You will see that job appear in the print queue list as well. The scheduler lists print jobs in the order it will print them. When you start the printer, the spooler prints jobs starting at the bottom of the list. Click the top job in the list. You will see that the set of icons at the top of the list becomes active. You can control the print jobs using these icons. The following table describes the different print control icons. 8 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... Print Job Functions Job Icon Description Hold Prevent the print job from being printed. Resume Allow the print job to be printed. Remove Delete the print job from the queue. Move to Printer Move the print job to another printer queue. Restart Restart the print job. Job IPP Report Display detailed information about the print job. Increase Priority Make the print job be printed sooner. Decrease Priority Make the print job be printed later. Edit Attributes Change information about the print job. Toggle Completed Jobs Cause a print job to appear to be printed. Show Only User Jobs Display only print jobs submitted by a specific user. Job Priority You may notice the Priority field in the job queue. When I said that the scheduler prints jobs in the order they were placed in the job queue, that wasn't entirely true. By default, applications send all jobs to the print spool with the same priority. The scheduler prints them in the order it receives them, as long as they are all the same priority. However, once a print job is in the scheduler, you can increase its priority to make it print sooner. This does not change its location in the list, but the print spooler knows to take it next in line due to its higher priority. Of course, the opposite applies to decreasing a print job's priority. The scheduler prints all pending print jobs with a higher priority before going on to lower-priority jobs. Disconnected Printer When a printer becomes unavailable, the print job queue will exhibit the same behavior as if you manually stopped the printer with the print manager. To see this, turn off your printer, and start the print queue (click Printer > Start/Stop Printer > Start printer). Notice that the state of the bottom print job is changed to Processing This means that the print spooler is attempting to print the job, but the printer is not available. If you try to print another document from KWrite, you will see that the printer is accepting jobs but is in the Processing state. This tells you that the scheduler is taking jobs but that the printer is currently unavailable. Stopping the Print Spooler There are times (especially in a multiuser environment) where it is necessary to prevent new print jobs from entering the scheduler. The printer may become overwhelmed with them, so you want to stop new jobs from coming in until it can catch up. You can do this by stopping the spooler. Go ahead and click Printer > Enable/Disable Job Spooling > Disable Job Spooling. Now try to print a test document from KWrite. When you click File > Print and the Printer dialog box appears, you should notice that the state of the printer shows that it is rejecting jobs. Click Print in the Printer dialog box and see what happens. An error message appears, telling you that the printer is not currently accepting new print jobs. That's exactly what you wanted. To release the spooler, from the KDEPrint window click Printer > Enable/Disable Job Spooling > Enable Job Spooling. This enables the scheduler to accept new print jobs. 9 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... Chapter 5 Summary While Linux printing is a complicated process, we have lots of help. The CUPS program helps control printers and provides a common configuration location for setting up printers. The KDEPrint utility provides a simple graphical interface for the CUPS program. It allows you to add, delete, and modify printers on your system without having to mess with configuration files. The KDEPrint utility can be accessed by clicking K MENU > Print System > Print Manager, as well as from Konqueror and the System Configuration tool. Once you configure a printer into KDEPrint, you can view and control print jobs destined for the printer. You click the Jobs tab to view pending print jobs for the printer. When you click a specific print job, the control icons activate, allowing you to remove, hold, or modify individual print jobs in the queue. You can use the KDEPrint utility to monitor and troubleshoot common printer problems on your system. Now that we have the basics of the Linux system out of the way, we can start digging into applications. So in our next lesson, we'll cover the world of Linux office automation. The OpenOffice.org suite of applications provides an excellent alternative to most of the common Microsoft Office products. There are also several excellent KDE applications that provide other office features, such as desktop publishing, time management, and graphics. In Lesson 6, you'll learn how to use them. Supplementary Material CUPS http://www.cups.org Lesson 5 just scratched the surface of the CUPS system. If you are thinking about setting up multiple printers on a network, you'll get a lot from this Web site's advanced information about the CUPS printer server. KDEPrint Homepage http://printing.kde.org This is the support Web site for KDEPrint. Here you'll find documentation (including the KDEPrint handbook), screenshots, user forums, and tutorials for KDEPrint. Linux Printing http://www.linuxprinting.org This Web site provides a clearinghouse for Linux printer driver information. It details what printers are fully supported by Linux and provides drivers that can be downloaded and plugged into CUPS. FAQs Q: Do all applications use the KDEPrint manager to control printing? A: All of the applications installed in SimplyMEPIS are configured to use the KDEPrint manager. If you install other Linux applications yourself, some require a configuration entry to use the KDEPrint program. In these applications, there is usually a Printer dialog box, which allows you to configure the required printer command. Change the default printer 10 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 5 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=5&classro... command in the application to kprinter. This causes the KEPrint dialog box to appear whenever you print from the application. Q: Can I control my printers from Konqueror? A: Yes. The Print System Browser feature in the Services tab allows you to browse through the configured printers and view any print jobs waiting in the queue. Q: Can I control my printers from the System Configuration tool? A: Yes. Expanding the Peripherals item in the menu list and selecting the Printer menu item starts the KDEPrint window. Assignment If you haven't already guessed, today we're going to do some printing! I hope you have a printer handy that you can connect to your SimplyMEPIS PC. But if you don't, you can still go through the assignment using the Print to file (PDF) printer configured in KDEPrint. This feature converts your printed document into a PDF file. Open the KDEPrint window, and create a new printer. Hopefully your printer is in the list of available printer drivers. If it's not, select a driver for a printer similar to yours. Chances are the manufacturer uses the same printer language for multiple printers. After creating a new printer, go into KDEPrint and stop the printer. Then open a few different applications, and print some test documents to the printer. Go back to KDEPrint, and view the job queue for the printer. Can you see the different print jobs in the job queue? Look at the various sizes of the print jobs. What applications create the largest documents? Change the priority values of the print jobs, and then start the printer from KDEPrint. Did the jobs print in the order you expected? Which constitutes a higher priority—a higher priority value or a lower one? If you have not already done so, try printing a document to the Print to file (PDF) printer. After creating the PDF document, open Konqueror, find the file, and click it. Does the PDF file open? What are the contents of the document? Easily creating PDF documents is definitely one of the nicest features of SimplyMEPIS! Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 11 of 11 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... Introduction to Linux: Lesson 6 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less06.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less06.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Hi again! We're up to Lesson 6! Up to now we've been talking about the Linux operating system's features. But today we're going to change gears. We'll start getting acquainted with some of the applications that are available on the SimplyMEPIS Linux system. Office software is one of the most misunderstood software categories. This is in large part thanks to Microsoft's popular Office software package. Word processing, spreadsheets, and presentation graphics are important office software tools. But most people don't realize that there are lots of other functions that also fall under the office software category. One advantage of Linux is that lots of people write software for it. So by using Linux, you benefit from thousands of independent developers around the world, busily working on improving applications to make your life easier. Nowhere is this truer than in the office software world. Both amateur and professional developers have made great efforts to produce commercial-quality Linux office software solutions. Today we'll discuss some of them. The most popular office software suite available in Linux is the OpenOffice.org (abbreviated OO.o) office suite. We will explore how to use the various OO.o components and see how each one is similar to its Microsoft Office counterpart. We'll also talk about efforts made in the KDE community to provide office software. SimplyMEPIS includes a few extremely useful office tools from the KDE suite. And, finally, we'll take a look at some of the more exotic office tools available in Linux. If you use (or are thinking about using) advanced desktop publishing or graphic design software, Linux has just the tools for you. Let's start looking at software! Chapter 2 The OpenOffice.org Office Suite Without a doubt, the Microsoft Office product has revolutionized the world of office software. It has become the de facto standard in word processor, spreadsheet, and presentation graphics programs. Computer users compare all other office software packages against the Microsoft Office products. Unfortunately, there's not a version of Microsoft Office that runs directly on Linux. There are commercial packages that can be used in Linux that run Windows applications (including Office), but Office itself does not run directly in Linux for free. Instead, if you want Microsoft Office products in Linux, you have to use an open source look-alike package. 1 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... The most popular Office look-alike used in Linux is OO.o. The OO.o software suite contains a similar product for each of the Microsoft Office products. OpenOffice Versus Microsoft Products Function OpenOffice.org Microsoft Office Word Processor Writer Word Spreadsheet Calc Excel Presentation Graphics Impress PowerPoint Besides the standard Office look-alike products, OO.o also includes a few other goodies that might come in handy. OpenOffice Additional Products Product Description Base Design full-featured database applications. Draw Create simple and complex drawings. Math Write complex math formulas using special expressions. Writer/Web Create Web pages. Starting OpenOffice.org Products You can find the three core OO.o products on the K Menu. Click the K Menu, and then select Office. You will see entries for the Presentation, Spreadsheet, and Word Processor OO.o products, plus a few additional office software products that we'll talk about later. Unfortunately, you'll have to look in the All Applications section of the K Menu to find the OO.o Draw and Math products. The SimplyMEPIS installation doesn't install the OO.o Base and Writer/Web products by default, but you can install them yourself from the repository using the techniques you'll learn later on in this course. If you find yourself using the OO.o products frequently, you can add your own Panel icons for the office products. (You do remember how to do that, don't you?) Go ahead and start the OO.o Writer program. When the application starts, you'll see the main Writer editor window with a blank document, waiting for you to start typing. Type some text, and then save the document on your hard drive by clicking File > Save As. Select a file name and location for the document. Notice that there is a text box indicating that you can select several file types to save the document as. The OpenDocument Text format is a new Open Source standard format for saving word processor documents. In the future, many different types of word processors will support this format, allowing you to work on documents from any word processor. OO.o Writer also has its own format that you can use (called OpenOffice.org 1.0), as well as supporting the Microsoft Word document format. Now that we saved a test document, let's open it so you can see how to open an existing document. Close the Writer program, and start Konqueror. Once Konqueror starts, go to the folder where you saved your test document. By the way, the best place to save documents is in your Documents folder. You can directly access this folder from the Documents desktop icon. Once you open the Documents folder, Konqueror displays the files and folders that it contains. When you pause over your test document with the mouse pointer, Konqueror produces a pop-up window showing some information about the document. 2 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... Writer document information in Konqueror When you single-click the document icon, the appropriate OO.o product for the document starts (Writer in this case), and the document becomes the default document, ready for you to edit. Printing from OpenOffice.org Before we get too far into OO.o, I need to say a few things about printing. Because OO.o was created to work on any operating system (yes, there's even a version of it that runs on Windows), it tries to do things as generically as possible. This is especially evident when it comes to setting up printers. When you click File > Print from an open OO.o document, you won't see the standard list of printers you are accustomed to seeing with KDEPrint. Instead, OO.o shows only the printers that you configure in KDEPrint, not the KDEPrint pseudo printers. To print your documents, you must create a printer object in KDEPrint so OO.o will recognize the printer. Once you create the printer object in KDEPrint, you can modify the printer setup within OO.o. Just click File > Printer Settings to view and modify the printer properties. OpenOffice.org Printer Setup Using OpenOffice.org Writer I should point out that the main goal of OO.o is to create commercial-quality office software products, not necessarily to mimic the functions of the Microsoft Office counterparts. Nevertheless, you'll find many of the interfaces in the OO.o products similar to those in Office. Open the Writer document you saved earlier. You will see toolbars on the top and sides of the editing window that 3 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... contain many buttons, menu choices, and options that are similar to those found in Microsoft Word. Default Writer window Writer allows you to set the font type and size from a list of fonts installed on the system. SimplyMEPIS includes many different font types for you already, so you don't have to worry about loading fonts yourself. Scroll through the font name drop-down box, and see the different fonts available. As you can see from the main toolbar at the top of the window, Writer provides many of the familiar Word features, such as auto indents, bullets, font colors, highlighting, and inserting graphics. You can select blocks of text, modify the font, style, or color of the text, and cut and paste text, just as if you were using Word. Try using a few of these features on your test document. A great feature of Writer is that it has the ability to both read and write Word documents, as well as a few other popular word processing formats. This means that you can use Writer to open an existing Word document created on a Windows PC, edit the document, and then save it in Microsoft Word format. This enables complete compatibility with Word documents in the Windows environment. You can now create and share Word documents from your Linux and Windows systems! If you have a Word document that you created in Windows, try it out. Just copy the document to a USB memory stick or floppy disk, and then open the document from Konqueror. By single-clicking the document, Konqueror knows to start Writer to edit the Word document. Writer does a great job of converting Word documents into Writer format. Most fonts, symbols, and special formats convert over just fine. If you do lots of work with Word macros, though, you will have to be careful—some macros convert over, while others may not. Another great feature of Writer is its ability to save documents in Adobe PDF format. You can use this to convert Word documents into PDFs. Return now to the test document you created earlier in Writer. Click the Export Directly to PDF button found on the toolbar (the one with the red A symbol), and save the document on your system. Now, from Konqueror, click the saved document icon. Konqueror opens the PDF document using the KPDF application. You can save the document directly to a removable storage device (like a USB memory stick) and read the document from Adobe Acrobat on any system—Windows, Mac, or Linux. This is the ultimate in portability! Using OpenOffice.org Calc The OO.o spreadsheet application, Calc, has many of the same features as Microsoft Excel. Let's start Calc by clicking 4 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... it in the K Menu list. An empty spreadsheet appears, ready for your work. The OpenOffice.org Calc program You will notice that Calc contains most of the same functions as Excel. Try adding some numbers, text, and equations in some of the cells in the blank spreadsheet. You can format cells just like in Excel to create your special spreadsheet presentations. Just highlight the cells you need to format, right-click the mouse button within the highlighted area, and select Format cell from the pop-up menu. You can save your Calc spreadsheet in OpenDocument Spreadsheet format, OO.o format, or Excel format. If you choose to save your spreadsheet in Excel format, you can open it on a Windows PC using Excel. Also, you can open an existing Excel spreadsheet using Calc. Unfortunately, Calc does have some limitations with its compatibility with Excel. Calc does a fairly good job of reading and writing standard Excel documents. I've used several semicomplex Excel spreadsheets in Calc with no problems. But if you do a lot of fancy graphs within Excel, you may be disappointed with the results when Calc converts them. However, it doesn't take too much effort to clean the converted graphs up. Using Impress It seems that Microsoft PowerPoint is becoming one of the most popular business tools in the Microsoft Office arsenal. These days it's hard to attend a meeting or seminar that doesn't use PowerPoint slides. The OO.o Impress application performs many of the presentation graphics functions that PowerPoint provides. 5 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 6 of 14 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... OpenOffice.org Impress When you open Impress, a project wizard starts, asking you lots of questions about how you want your presentation to look. Choose the options that you are interested in, and start editing your slides. When you start a new presentation project, Impress guides you through the process of creating your slides, providing lots of different layouts, animation, and transitions. As you would expect, Impress is capable of reading and writing standard PowerPoint presentations. When you open a PowerPoint presentation in Impress, all of the backgrounds and clip art are automatically converted for you. However, if you create a new presentation with Impress, you'll notice that it doesn't have the same quantity (or quality) of background and clip art that PowerPoint does. This has become the limiting factor with Impress. I'm hoping that as Impress matures, more of these features will become available, making it as good as PowerPoint in presentation graphics. Chapter 3 KDE Office Software Like OO.o, the KDE project has created an entire suite of office software. This includes full-blown word processor, spreadsheet, and presentation graphics applications. However, the SimplyMEPIS Linux distribution chose not to include the KDE Office pieces that overlap with OO.o applications. It would be somewhat redundant to have two Microsoft Office replacements on the same system. What SimplyMEPIS does include, though, are the pieces of the KDE Office suite that don't overlap with OO.o but complement the tools already available. These include Kate, KWrite, KNotes, and Kontact—great tools to have in your office software toolbox. So in this chapter, we'll talk about how to use them. Kate and KWrite You can find the Kate and KWrite applications in the Editors section of the SimplyMEPIS K Menu (which you get to by clicking K Menu > Office > Editors). SimplyMEPIS classifies them as editors because they are not quite full-blown word processor products. When you think of a text editor, it's likely that the first product that comes to mind is Microsoft Notepad. 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... The KWrite editor main window Both Kate and KWrite have lots of great features that make them much more than simple text editors. The Kate editor When you open Kate, you'll see two tabs on the bottom of the window. The Kate editor interface includes a search window and a console editor window. The console editor allows you to quickly jump out onto the system and type system commands (we'll learn more about those later on in this course). Both of these are great features to have in an editor. The KDE project designed both Kate and KWrite mainly as an editor for developers to use while editing program code. They have some great features for writing programs, such as colorized syntax for C, C++, Perl, Bash, and Java programs. Colorized syntax means that different parts of the text, such as code definitions and variables, are color-coded to easily identify them. Of course, for nonprograms this is not such an important feature, but there are plenty of other features that do help us. 7 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... Both editors allow you to customize the editing environment. You can select both the background and font colors, the font type, indentation, and other editing features by clicking Settings > Configure Editor (in KWrite) or Settings > Configure Kate (in Kate). The Configure Editor dialog box allows you to choose your settings and save them so they are the default the next time you start the editor. If you have a sample text document handy, look at it with the Konqueror file browser (there are a couple of SimplyMEPIS text documents in the Documents folder). Notice that as soon as you place your cursor over the file, a small thumbnail window appears, previewing the contents of the text file. How cool is that! When you single-click the document icon in the Konqueror window, Konqueror opens the document using the default text editor, which in SimplyMEPIS is KWrite. You can open the document with another editor by right-clicking the document icon, selecting Open with, and choosing the editor of your choice from the list. KNotes The KNotes application provides a unique way of letting you put sticky notes on your monitor—it places them directly on your SimplyMEPIS desktop! Click K Menu > Utilities > Desktop > Popup Notes (KNotes). A little yellow dialog box appears on your desktop, waiting for you to write a note to yourself. Go ahead and type in a message for yourself on the note, and then open another application window. A KNotes sticky note on my desktop When you start an application, the note stays in the background on the desktop, not covering the application window. You can have as many of these sticky notes on your screen as you need, quietly sitting in the background for you to see when you look at your desktop. When you created the note, you should have seen a new icon added to your Panel—a little yellow pad of notes. Clicking this icon causes any notes on your desktop to come to the foreground. Right-clicking the icon brings up the KNotes menu. From the menu, you can create a new note or configure how KNotes behaves. One of the configuration items allows you to accept incoming notes from other network users. That's right, if you have a home network, you can configure KNotes to send and receive notes from other users on your network. If you right click an individual note, there are a few options for you to choose from. You can set an alarm with the note, making it a convenient way to remind yourself of important tasks. You can also print a copy of the note or send the note as an e-mail message. Try doing that with the real yellow sticky notes! The Kontact Suite Also in the K Menu Office menu area, you will find the Kontact program. The Kontact program is a compilation of several KDE applications rolled into one personal information management package. The Kontact suite of applications includes programs for e-mail, scheduling, address book, notes, and newsgroups, as shown in the table. Kontact Applications 8 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 9 of 14 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... Application Description KMail A full-featured e-mail program. KOrganizer A graphical calendar and appointment book. KAddressBook A complete address book database. KNotes A message notification program. KNode An Internet News Reader program. You've already seen KNotes in action. We'll cover the KMail and KNode programs later on when we talk about Internet applications. Let's take a quick look at the KOrganizer and KAddressBook applications now though, as they are great tools as part of our office software suite. They're great tools to have available to help organize your life. Working With KOrganizer Let's start Kontact either by clicking its icon in the K Menu Office area, or by the special icon in the Panel (the pages with the green star). The individual components within Kontact are shown as icons in the left window frame. As you click a component, it's application appears in the right window frame. Click the Calendar icon to start KOrganizer. When the program starts, a window appears with your default calendar view. You can use the icons in the top toolbar to set the calendar view to show a single day, a week, a workweek (Monday through Friday), the next three days, or an entire month. One of my pet peeves is that the KOrganizer calendar is setup to start the week on Monday, and shows Saturday and Sunday at the end of the week. I'm sure that makes sense to some programmer out there, but for me that's just weird. If you agree, don't fret—you can change the calendar layout. To change the calendar layout, close Kontact, right click the time and date icon in the Panel, then select Date & Time Format. In that dialog box, select the Time & Dates tab, select Sunday as the First day of the week, then click OK. Now when you start Kontact the calendar in KOrganizer looks more like what you may be use to. Within the calendar, you can click a day to schedule an event. After clicking the day, the event editor window appears, allowing you to type in the details and exact time of the event, and to associate an alarm to remind you about it before it happens. The main KOrganizer window 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 10 of 14 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... Notice that when you started KOrganizer, an icon of a clipboard with a green checkmark appeared in your KDE Panel. This shows that KOrganizer is running as a Panel applet. If you close the main KOrganizer window, the applet continues to run in background. This allows your reminders to appear, even when you don't have your calendar open on your screen. Click the KOrganizer Panel icon to view your calendar (notice that just KOrganizer appears, without the other Kontact applications). When you right-click the Korganizer Panel icon, a menu appears with some calendar options. If you choose the option to quit the KOrganizer Panel applet, it asks you if you want to start the KOrganizer applet automatically each time you log into the system. This allows you to set alarms for later days and ensure they will work, even if you don't start your calendar that day. Working With KAddressBook The KAddressBook program provides an easy way to store personal information such as phone numbers, addresses, and e-mail addresses. You start it by selecting the Contacts icon in Kontact. The KAddressBook program The address book feature allows you to place contact information—names, addresses, phone numbers, e-mail addresses, and so on—in one handy location that can be used by both your KDE e-mail and calendar programs. To view the address book, click the Contacts icon on the left of the window. To add a new contact, right-click in the contacts list, and then select New Contact. A window appears prompting you for all of the pertinent contact information. We'll see lots more of the features of Kontact when we talk about using e-mail in Linux, later in this course. Chapter 4 Extras In addition to OO.o and KDE office suites, SimplyMEPIS includes a few extras to enhance your Linux experience. In this chapter, we'll cover three of the most popular: Xata Xtreme, KPDF, and GIMP. Xara Xtreme 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... Graphical drawing tools have been a mainstay of office software ever since Microsoft Paint came out. Having the ability to draw diagrams and symbols is crucial to any presentation. If you've been involved with PC graphics, no doubt you've heard of (if not used) the popular Corel suite of graphics programs. In the old days, CorelDraw was the workhorse for may graphical designers. Well, through somewhat of a checkered path, the Xara Xtreme software package is the Open Source version of the old Corel packages. Start Xara Xtreme by clicking K Menu > Graphics > Xara Xtreme. The main Xara Xtreme window appears with a blank canvas area. The Xara Xtreme main window workspace If you've ever used CorelDraw, you'll feel right at home with Xara Xtreme. The toolbar on the left side of the window contains the tools necessary to create your masterpieces. Select the desired tool, then start drawing on the canvas. The color selector is on the bottom of the window, and it allows you to change your color scheme. The top toolbars contains icons that allow you to fine-tune your tools. By default, if you save your work, Xara Xtreme saves it in its own format (.xar). If you want to save your creation in another format, you must select the Export option under the File menu bar. This option allows you to save the drawing in PNG, JPEG, or GIF format. Likewise, you can use the Import option to edit a graphics file stored in one of these formats. KPDF If you have been using the Internet, no doubt you have come across PDF documents. This is the most popular format for publishing information, especially long documents, on the Web. Nowadays it's not uncommon to see owner's manuals for appliances published on the Web as PDF documents. You will not be disappointed that SimplyMEPIS includes the KPDF application. This product allows you to display PDF documents whether they're saved on your hard drive or published on a Web site. The Web browser in Linux—Mozilla Firefox—will automatically open KPDF when you want to view a PDF document on a Web site. You can also start KPDF by itself in stand-alone mode. To do that, you just click the KPDF icon in the K Menu Office menu list. If you have a PDF file saved on your disk, Konqueror will use KPDF as the default application to view the document. Note that this is just a PDF document reader, so you can't create new PDF documents using this software. However, as we've discussed, you can easily create PDF documents with the OO.o products, so you're covered if you need to create 11 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... PDF documents. GIMP The GNU Image Manipulation Program (GIMP) is one of the most versatile graphics programs you will ever see. It goes far beyond what the standard Microsoft Paint program provides. It is somewhat similar to the Adobe Photoshop program, popular with professional graphic artists. GIMP allows you to edit many different types of existing image files, such as GIF, JPG, PNG, Windows icons and BMP images, Photoshop files, and PostScript files. Editing an image with the GIMP program When GIMP starts, it opens the main toolbar window. This shows the different tools available for drawing images—pens, paintbrushes, shapes, and so on (similar to the tools in Microsoft Paint). The menu allows you to open an existing image or create a new image. Besides creating and editing images, GIMP also has a screenshot function. This allows you to take snapshots of individual application windows or the entire desktop and save them to an image file. Start the GIMP application by clicking K menu > Graphics > Image Editor (Gimp Image Editor). Next, click File > Acquire > Screenshot. The screenshot dialog box appears, providing two different options for you to choose from. Select whether you want to capture an active window or the whole screen and how long you want to wait before GIMP takes the snapshot. When you click OK, GIMP acquires the screen image and displays it in an editor window. In this window you can make changes to the image, then save it in any number of different image types. By far, one of the most exciting features of GIMP is the ability to apply special effects to images, creating some pretty fancy artwork. To see a list of special effects, open an existing or new image, then click the Filters item in the GIMP toolbar. There's everything from blurring to distorting to altering color schemes. Any special effect you apply can easily be undone, so feel free to experiment. If you're not an artistic type, don't worry—GIMP can still help you out. GIMP provides for scripting special effects to combine commonly-used features into a single artistic operation. It even includes a few popular scripts, such as the weave effect shown in the sample image. You can have hours of fun playing around with your family photos and GIMP! 12 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... Chapter 5 Summary In this lesson, we examined what Linux has to offer in the office software world. There are lots of applications available, and we spent a little time in most of them. The OpenOffice.org office suite provides some of the best office applications available on the Linux platform. We saw how Writer, Calc, and Impress can be used to read and write Microsoft Word, Excel, and PowerPoint documents as well as create documents in their own formats. We also saw how the KDE office suite provides some additional programs, such as text editors (Kate and KWrite), and personal information managers, such as Kontact. Finally, we looked at some specialty programs. The Xara Xtreme application is a great tool for creating graphics images, while the GIMP application works wonders with image manipulation. In our next lesson, we will continue our discussion of Linux applications. Lesson 7's topic is the world of multimedia. We will find out how to listen to music on CDs and view DVDs from your Linux computer. Also, we'll talk about burning new CDs and interfacing with MPG players and digital cameras and scanners. Supplementary Material OpenOffice.org http://www.openoffice.org Learn more about the OpenOffice.org project, and get updated information about each OO.o office product used in SimplyMEPIS. Kontact http://kontact.kde.org See how Kontact can help you organize your life. Learn more about the different features and how to use it more productively. Xara Xtreme http://www.xaraxtreme.org This is the official Xara Xtreme home page. Get more information on how to use Xara Xtreme, and keep informed of new features. The GIMP http://www.gimp.org This is the place to find information and ideas about how to use GIMP. FAQs Q: How can I learn more about using each OpenOffice.org application? A: Each OpenOffice.org application contains a help file that describes how to perform different tasks. Click Help from the menu, and select Content. In the Content window, you can select from the standard manual pages, a topical index, or search the manual for a specific topic. Q: How can I learn more about each KDE office application? A: Each KDE office application contains a handbook that describes how to use features within the application. To use it, 13 of 14 7/1/2012 11:50 AM Introduction to Linux: Lesson 6 14 of 14 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=6&classro... click Help from the menu, and then select the Handbook item within the help menu. Assignment For today's assignment, I’d like for you to write a 2,000-word report on the history of Linux. Okay, just kidding! You don't have to write 2,000 words, but I would like for you to try out the OpenOffice.org Writer, Calc, and Impress applications. If you have any Microsoft Word, Excel, or PowerPoint documents available, try copying them to your Linux system and opening them with the equivalent OO.o product. See if everything converts over correctly. If not, note what went wrong. Try to figure out how to fix the things that didn't convert. If you have never used Word, Excel, or PowerPoint before, try creating a few new documents with Writer, Calc, and Impress. In your documents, use some different types of fonts and font sizes. In Writer, try importing an image and see what happens. After you have created your documents, try saving them in the equivalent Microsoft Office formats (.doc for Word, .xls for Excel, and .ppt for PowerPoint). If you have access to a Microsoft Office package, try reading your new documents in Microsoft Office. Do they work as expected? Export your document in PDF format. Once the document is saved, close OO.o, open Konqueror, and find your saved PDF document. Single-click the file icon. What application opens to display the newsletter? Does the newsletter look the same in PDF format? If possible, copy the PDF file to a removable storage device, and open it on a Windows PC. Does the PDF file look the same in Windows? It should. Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:50 AM Introduction to Linux: Lesson 7 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... Introduction to Linux: Lesson 7 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less07.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less07.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Welcome to Lesson 7! Today's topic is multimedia. It wasn't all that long ago that people used computers only for typing documents and creating financial spreadsheets. But nowadays you can use desktop computers to perform a whole world of multimedia functions. This is one area in which the Microsoft Windows operating system has gained a strong foothold by providing many robust applications. But Linux is not too far behind. Programmers have been busy creating multimedia applications for Linux. So today we're going to look at the multimedia programs included in the SimplyMEPIS distribution and discuss how to use them to support your multimedia needs. You might be wondering exactly what multimedia is. With just about everything going digital these days, it's not so easy to define multimedia any more. But we're going to talk about Linux applications that support these functions: Playing audio CDs Using video CDs (called VCDs) Showing DVDs Playing audio files (MP3, OGG, WAV) Showing video files (RA, AVI, MOV) Detecting PC sound cards Using scanners Using iPods and MP3 players Using digital cameras Now let's move on to Chapter 2 and start exploring audio programs. Chapter 2 Audio Programs Before we can talk about the various audio programs in SimplyMEPIS, I need to point out a couple of related programs that run behind the scenes to help control the audio environment—ALSA and KMix. 1 of 12 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 2 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... You might have seen the ALSA program (ALSA stands for Advanced Linux Sound Architecture) start when your SimplyMEPIS system boots. This program is a crucial piece of the multimedia puzzle in Linux. You see, one big problem in the past has been getting Linux-based applications to support the wide variety of sound cards PCs can have. The ALSA program solves this problem by automatically detecting the sound card installed on your PC and creating a standard interface for applications to access it. (This is similar to how the X Windows system provides Linux video support—a concept we discussed earlier.) Audio programs need only know how to talk to the ALSA interface—they don't have to worry about every type of audio card available on the market. The second key to the puzzle of audio in Linux is the KMix program. It allows you to configure the input and output sound levels from multiple devices on your PC. If you are used to the sound mixer in Microsoft Windows, you will feel right at home with KMix. When your desktop starts, the KMix program runs in the background as a panel application. You will see the KMix speaker icon in the panel (note that it looks somewhat similar to the Microsoft Windows speaker icon). When you left-click the speaker icon in the panel, the KMix master volume control appears. This allows you to control the overall volume of the sound, using the slider provided. To close the window, you simply left-click the speaker icon in the panel again. Start the KMix window again now, and then click Mixer under the slider. The full KMix control window appears. The KMix control window You can control the volume levels of a full range of both output and input devices from the KMix control window. The bottom slider controls the left and right balance between the speakers. Playing Audio Files With the popularity of MP3 players, there are lots of digital audio files available to play on your PC. These include MP3, OGG, and WAV files—all used in popular digital music players, such as the famous Apple iPod, along with the more generic MP3 players. You can play most types of digital audio files using the Amarok software in SimplyMEPIS. Start Amarok by clicking K Menu > Multimedia > Audio Player (Amarok). The first time you start Amarok, a wizard runs, walking you through a configuration process. You can select the window format for Amarok and the disk location where Amarok keeps your music library. After the wizard completes, the main Amarok window appears. 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... The Amarok main window Much like a standard MP3 player, Amarok allows you to create playlists of music files. You can scan your music library or even a connected MP3 player or audio CD for music files to add to your playlists. Once you create a playlist, you can listen to it using Amarok. Playing Audio CDs In addition to Amarok, SimplyMEPIS includes another application that plays audio CDs. The KsCD application is an extremely versatile audio CD program. Start it now by placing an audio CD in your CD tray and then clicking K Menu > Multimedia > CD Player (KsCD). The main KsCD window appears. The KsCD window Besides the application running in the window, you should also notice that a new icon appears in the panel—a picture of a CD with a music note on it. This means that KsCD can play a CD in background mode on your desktop, not interfering with any other applications that are also running. Now close the main KsCD window. Notice that the KsCD panel icon remains active. Right-click the icon, and the KsCD buttons appear in a pop-up menu, allowing you to control the CD without having to launch the KsCD program. Another great feature of KsCD is its ability to connect to Internet CD databases (assuming you have Internet connectivity) to get information about a CD, including the track song names. By default, it uses the freedb.org music database. But you can get it to use a commercial CD site instead by clicking the Extras icon in the KsCD main window. Playing Audio Files from Web Sites The default Web browser in SimplyMEPIS, FireFox allows you to play many types of audio files embedded in Web sites 3 of 12 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... via the use of plug-ins. Plug-ins are small external programs that hook into the Firefox browser to handle specific file types. To see a list of plug-ins installed, start FireFox by clicking the Panel icon (the globe with the fire around it), then type about:plugins in the URL window. The SimplyMEPIS FireFox plugins list As you can see from the list, SimplyMEPIS supports several different types of audio, as well as video, file types. Ripping Audio CDs In this world of hi-tech MP3 players, a very useful multimedia tool is the CD music ripper. You can use ripper applications to copy songs from audio CDs into digital music files and then download them onto your MP3 player. Unfortunately, there has been a recent development that has caused serious problems in the Open Source CD ripping community. Due to a patent infringement litigation, most Linux distributions have stopped distributing MP3 ripping software. SimplyMEPIS has joined these ranks and doesn't install CD ripping software by default. You can play MP3 files to your heart's content, but you can't create new MP3 files. This has become a sore point in many Linux distributions. There is Open Source CD ripping software available that can create digital files in the older WAV file format or the newer OGG file format. If your MP3 player supports either of these file types, you can install one of these packages using the techniques we'll talk about later on in the course. Modifying MP3 files Oddly enough, while it's legally questionable whether you can create new MP3 files, most Linux distributions have no problem with software that modifies existing MP3 files. One such package is the Kid3 program. The Kid3 program allows you to modify the ID tags present on an MP3 file. These tags identify the artist, album, and song title of the MP3 file. This is an extremely handy tool to have if you want to organize the MP3 files in your MP3 player (such as give them different titles). Start the Kid3 application by clicking K Menu > Multimedia > More Applications > ID3 Tagger (Kid3). The main Kid3 window appears. 4 of 12 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 5 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... The main Kid3 window After opening an MP3 file, you can modify (or add) the ID tags for the song. Okay, that's an introduction to working with and listening to audio in your SimplyMEPIS Linux system. In the next chapter, we'll tackle video programs. Chapter 3 Video Programs It's becoming commonplace to use desktop PCs for watching and editing videos. As mentioned earlier, this is an area in which Microsoft Windows really shines (especially the new Windows XP multimedia edition). However, Linux has some applications to help you in your video endeavors, too. Let's take a look at what SimplyMEPIS provides in the video category. KMPlayer The Swiss Army Knife of Linux multimedia players is called KMPlayer. KMPlayer is yet another popular program provided by the KDE people. It's a versatile multimedia player that can play many types of audio and video files. Start KMPlayer by clicking K Menu > Multimedia > More Applications > Media Player (KMPlayer). The main KMPlayer window appears. 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 6 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... The KMPlayer main window To open a video file, click Source > Open. You can browse your system, including any removable storage devices such as CDs and memory sticks, to select a video file, such as an AVI or MOV. You can also directly access DVDs and VCDs from the Open menu. The KMPlayer is so versatile that it's the default multimedia player in SimplyMEPIS. If you click a multimedia file in Konqueror, SimplyMEPIS launches KMPlayer and attempts to play the file (both for audio and video files). A Word About Commercial DVDs and Linux There is one problem with playing DVDs on a Linux desktop. Many movie distributors create DVDs with a special encryption scheme embedded in the DVD. The MPAA has added this to DVDs to prevent unauthorized copying and viewing of movies. The MPAA licenses the ability to decrypt the DVD's encryption scheme. When you buy either a commercial DVD player or commercial DVD software for Windows, you are paying a licensing fee as part of the purchase price. Unfortunately, with free Linux systems, there is no way to pay the appropriate licensing fee to decrypt DVDs. So, by default, the KMPlayer application does not play encrypted commercial DVDs. Sorry. Some commercial Linux distributions do allow you to play encrypted DVDs because the distribution purchase price includes the licensing fee. There is also a hotly debated open source decryption program available for free Linux systems. However, the legality and ethics of this software is still being debated, and the SimplyMEPIS distribution does not include it. That said, I have successfully played many commercial DVDs on my SimplyMEPIS system with no decryption required. If you plan to view many commercial DVD movies on your PC, Linux may not be the best choice for you (or at least not one of the free versions of Linux). However, if you do have a DVD player in your PC and are curious, try out a few DVDs lying around to see which ones work and which ones don't. RealPlayer Another popular video application in the Windows world is RealPlayer. The RealPlayer video application is a commercial product that plays RA formatted movies. This is a popular video format often used in Web sites because it requires less bandwidth than a standard AVI or MPG movie clip. SimplyMEPIS includes a free version of the RealPlayer software. It doesn't have as many features as the commercial version available on Windows systems, but it can play RealPlayer-formatted movie files. To start RealPlayer, click K Menu > Multimedia > More Applications > RealPlayer 10. The main RealPlayer window appears. 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... The RealPlayer main window Kino Video Editor The Kino application provides basic video clip editing for the Linux environment. Kino can handle AVI, MOV, DV, DIF, and SMIL-formatted video clips. Start Kino by clicking K Menu > Multimedia > More Applications > Video Editor (Kino). The main Kino editing window appears on your desktop. The main Kino editing window There are two main sections to the editing window. On the left side is the storyboard. The storyboard shows the captured scenes from the video in sequential order. The right side is the viewer, which shows the completed video as it runs. 7 of 12 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 8 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... Kino uses a subtractive form of video editing. What this means is that you add video clips to the storyboard and remove (or subtract) the parts you don't want in your final product. While this doesn't compare to advanced commercial videoediting software packages, it does provide a simple way for you to quickly edit home videos. Video Files and Web Browsing Firefox requires plug-ins for video files just the same as how it handles audio files. The KMPlayer and RealPlayer programs both include FireFox plug-ins for handling most media types. A glaring exception that you'll run into is Windows media types (WMV for video and WMA for audio). Since these are proprietary Microsoft Windows media types, most Linux distributions don't have a license to play them. This can be somewhat of a bummer when you're surfing the Web. I hope this chapter has given you a good sense of what you can and can't do with video in your SimplyMEPIS Linux system. Next we'll look at some more advanced and specialized applications. Chapter 4 Extras Besides the basic music and video playing applications we've looked at, SimplyMEPIS includes a few more sophisticated multimedia applications. In this chapter we'll walk through some of them. K3b While not specifically a multimedia function, creating both audio and data CDs and DVDs is a common activity. The K3b application is a commercial-quality program that provides full CD and DVD burning capabilities. If you want to see the default settings, you can start K3bSetup by clicking K Menu > System > CD & DVD Burning Setup (K3bSetup). If you are not logged in as the root user, a dialog box will appear asking you for the root user password. Type the password (see, I told you it was important to remember the root user password) to continue with the setup. Most of the setup process involves configuring the behind-the-scenes programs used to burn the CD—things that you shouldn't need to worry about for normal CD and DVD burning on your PC. To start K3b, click K Menu > Multimedia > CD & DVD Burning (K3b). The K3b main window 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 9 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... There are six large icons in the middle of the main window, each one for starting a different project—New Audio CD, New Data CD, New Data DVD, Copy CD, Burn CD Image, and Burn DVD ISO Image. These quick-start buttons help you easily burn the specified project. In addition to the quick-start buttons, there are more options available if you click Tools on the toolbar—the following table shows what they are. K3b Tool Options Tool Description Copy CD Create a duplicate of a data or audio CD. Copy DVD Create a duplicate of a data or video DVD. Erase CD-RW Erase a rewritable CD. Format DVD+RW Start a blank rewritable DVD. Burn CD Image Create a CD from an .iso image. Burn DVD ISO Image Create a DVD from an ISO image. Encode video Encode video If you select one of the quick-start projects, a new window appears. The New Data CD window The top part of the window allows you to browse through the folders to select files and folders (or audio tracks) to copy onto a CD. The bottom window shows the layout of the files on the CD. Once you've dragged a file or folder to the bottom window, you can move, rename, or delete it by right-clicking the file name in the window. As you move items to the CD window, the indicator at the bottom shows how full the CD will be. When you have moved the appropriate files and folders to the work area, you click the Burn button to create your CD or DVD. Kooka For those of you who are into scanning, SimplyMEPIS has just the thing for you. The Kooka application, while having a 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 10 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... weird name, is an excellent program for interfacing with your scanner. Start Kooka by clicking K Menu > Graphics > Scan & OCR Program (Kooka). Before Kooka starts, it shows a list of scanners detected on the system. It's able to detect most common scanners. It had no trouble finding my all-in-one printer and scanner. After detecting the scanner, the main Kooka window appears. The Kooka main window There are lots of options for configuring the scanning process, including selecting a color or black-and-white scan. One hint though&@#8212;change the size of the internal window frames by dragging and dropping the edges. The default Kooka window hid the Scanning buttons when I first started it! When you've made your selections, click the Preview Scan to get a preliminary view of the scanned document. After making any changes, click Final Scan to produce the final file. DigiKam SimplyMEPIS didn't forget about you camera buffs. The DigiKam application (K Menu > Graphics > Photo Management (DigiKam)) interfaces with digital cameras, allowing you to download your digital photos directly from your camera into album folders on your Linux PC. The DigiKam program can autodetect lots of different digital cameras. Of course, for most of the newer digital cameras, autodetection is not even needed because they are USB compatible. This means that they can plug into a normal USB port, and the PC can access the camera disk as a normal USB disk device (similar to a USB flash drive) and then transfer photos directly to the DigiKam album. All right, we've explored enough new programs for one day. As you can see, SimplyMEPIS includes applications that enable you to do quite a bit in the multimedia world. Chapter 5 Summary Today's lesson demonstrated the multimedia features available in SimplyMEPIS. SimplyMEPIS uses the ALSA Linux sound software to detect and interface with PC sound cards. The KMix application provides an easy way to control the 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... speaker volume on your PC. You've seen that SimplyMEPIS provides a wealth of audio applications for your enjoyment. The Amarok program plays many different audio file types, as well as audio CDs. The KsCD program provides an excellent interface for playing audio CDs. If you have an Internet connection, it will even contact the Internet music database to find information about the CD you're playing. The multimedia support in SimplyMEPIS also includes applications for handling various video formats. Your Linux system uses the KMPlayer application to play most video files. SimplyMEPIS uses the KMPlayer application as the default for all multimedia files. You can use it to play DVDs, audio CDs, and audio and video data files. If you are into video clip editing, the Kino application is a great friend. The K3b program allows you to burn CDs and DVDs. The Kooka application interfaces with your scanner to produce digital copies of your pictures and documents. Finally, photography buffs should be thrilled with DigiKam, which allows you to download and manipulate all of your photographic works of art. In our next lesson, we'll move from multimedia to another topic that's very popular with home users. We'll discuss how to connect your SimplyMEPIS PC to the Internet so you can access Web pages and files and chat with your friends. Supplementary Material Advanced Linux Sound Architecture—ALSA http://www.alsa-project.org This site provides information about what sound cards ALSA supports. Check here if you find that SimplyMEPIS doesn't instantly detect your sound card. Amarok—Rediscover Your Music http://amarok.kde.org The Amarok Web site provides updated information and tips for using amaroK. It includes an excellent FAQ section for troubleshooting any problems you might have with the system. KMPlayer Homepage http://kmplayer.kde.org This is the KDE KMPlayer home page, where you'll find answers to all of your Linux multimedia player questions. Kooka—Scan and OCR Suite for KDE http://kooka.kde.org The Kooka Web site provides detailed information on how to get various scanners to work with Kooka (if yours wasn't automatically detected). It also contains in-depth tutorials on how to use the various features found in Kooka. DigiKam http://www.digikam.org This site provides a list of digital cameras that DigiKam supports and offers hints on how to best interface with your digital camera. FAQs Q: If I am running the Live CD version of SimplyMEPIS, can I still play CDs and DVDs? 11 of 12 7/1/2012 11:51 AM Introduction to Linux: Lesson 7 12 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=7&classro... A: If your PC only has one CD drive, then the answer is no. Some Linux Live CD distributions load into memory, allowing you to remove the live CD after booting. Unfortunately, SimplyMEPIS doesn't use this technique. If you really want to play CDs and DVDs from a live CD, try the Puppy Linux distribution. It provides a way to run without the live CD and includes the versatile xine program to play CDs and DVDs. Q: Can I use K3b to copy a DVD? A: If a DVD is not encrypted, you can copy it to either another DVD or to an AVI video file. If a DVD is encrypted, the SimplyMEPIS installation of K3b will not allow you to copy the DVD. The K3b application requires the same decryption library file that KMPlayer uses to play encrypted DVDs. The SimplyMEPIS distribution chose not to include this file in the distribution. Assignment Today we'll try out a few of the SimplyMEPIS multimedia features. Depending on your PC setup, there are lots of different things you can do. The most common setup is a simple CDROM drive. If your PC has a CDROM drive, place an audio CD in it. Did anything happen? By default, SimplyMEPIS doesn't autostart audio CDs. Open KsCD and see what happens. If you have an MP3 player, try plugging it into a USB on your PC. Does it show up on your desktop as a removable storage device? Open it and copy one of your MP3 files over. Did it work? If you were able to copy an MP3 file from your player, click it in Konqueror. What application opened? Now find the same file in Konqueror, right click it, and see what options appear in the Open with menu item. If you have a DVD drive on your PC, try playing a movie DVD. Did it work? Were you able to maneuver through the menu system on the DVD? Try any other multimedia products you have on your PC, such as a digital camera or scanner. Stop by the Discussion Area and let us know about your experiences (good or bad). Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... Introduction to Linux: Lesson 8 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less08.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less08.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Welcome back! Today we'll discuss the Internet capabilities of Linux. Since you're taking this course, I assume that you're somewhat familiar with accessing the Internet—probably using either Microsoft Windows or an Apple Macintosh. As you might imagine, your new Linux system provides this capability, too. We'll spend the first part of this lesson talking about how to get your Linux PC to connect to the Internet. Most of the access methods you've used with Windows or a Mac will work with Linux, but there are a couple of things you'll need to be aware of. As you probably know, once you're connected to the Internet, there's a lot you can do. SimplyMEPIS provides programs to help you accomplish most of them. Probably the most popular Internet activity is Web surfing. SimplyMEPIS gives you not one but two Web browsers you can use for this. We'll cover both of them. Instant messaging has become popular, and SimplyMEPIS doesn't disappoint here, either. We'll walk through the Gaim application and see how you can use it to connect to your current Instant Messaging system. Another hot topic in the Internet world is news feeds. SimplyMEPIS includes two programs for accessing them, and, of course, we'll explore both. Finally, downloading files is an important function of the Internet that every user should be able to do. We'll see how SimplyMEPIS lets you download to your heart's content. Okay, let's get our Linux PCs connected to the Internet. On to Chapter 2! Chapter 2 Connecting to the Internet The most important thing for Internet access is, of course, an Internet connection. There are basically three types of Internet connections that are commonly used today: Dial-up access: Using a modem and a phone line Cable modem: Using your cable system DSL modem: Using your digital phone line The last two methods are usually lumped into the same category, called broadband access or high-speed Internet. They provide higher connectivity speeds than dial-up access. SimplyMEPIS contains software for all three types of Internet 1 of 15 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 2 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... connectivity. Let's see how it works with each one. Dial-up Access Dial-up is the most basic and still the most common method for connecting to the Internet. It requires that you contract with an Internet Service Provider (ISP). The ISP provides you with one or more phone numbers and a user ID and password combination for logging in to their system. Your computer then uses a modem to dial the number, connect to the ISP's network, and get you on the Internet. Note: Some commercial ISPs require that your computer has special Windows software. Unfortunately, Linux is unable to work with these ISPs. This includes the popular AOL and Juno services. Please check with your ISP to ensure it supports Linux PCs. Obviously, if you're using dial-up, your computer has to have a phone modem. Fortunately, these days almost all PCs include one, and luckily for us, SimplyMEPIS does an excellent job of detecting most of them. When you start SimplyMEPIS, it detects your modem automatically and assigns it to a device named /dev/modem. There is one caveat to this process, though. Many PCs contain a special type of modem, commonly called a WinModem, which handles a lot of common modem functions using software rather than hardware. Manufacturers designed WinModems specifically for Microsoft Windows (thus, the name). In the old days, these types of modems never worked with Linux. But many Linux programmers have worked tirelessly to provide support for WinModems. So, today, Linux is able to work with many of the WinModems found on the market. But the process is not foolproof. You can still find some WinModems that Linux doesn't support. If you discover that your computer contains one of these, you can always purchase an external modem and connect it to a serial port on your PC. Connecting With a Phone Modem Let's say you have an ISP and a modem that will work with Linux, and you're ready to connect to your ISP. Here are the steps. You'll want to use the KPPP application. You start KPPP by clicking the K Menu > Internet > Connection > Internet Dial-Up Tool (KPPP). The main KPPP window appears. The KPPP window The Configure button is used to change the default settings. SimplyMEPIS automatically detects your modem, but to connect to your ISP, you'll need to configure KPPP to see your modem and tell it the phone number to dial. Go ahead and click the Configure button. The KPPP Configuration dialog box has four tabs for configuring your dial-up connection: Accounts: Defines the logon information for your ISP. Modem: Defines your modem properties. Graph: Defines how to display connection statistics. 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 3 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... Misc: Defines various behaviors for the KPPP application. Under the Modems tab, SimplyMEPIS already defines a default modem entry, called MyModem. Select this entry, then click Edit to view and modify the modem entry. The modem device should already point to your /dev/modem entry. You can test the modem configuration by clicking the Modem tab and the Query Modem button. When you are done, click OK to return to the main configuration window. After configuring your modem, you must configure the ISP settings. In the Accounts tab, again SimplyMEPIS already defines a default ISP entry, called MyAccount. Select the entry, and click Edit to view and modify the account information. Configuring the ISP account You'll need to add the phone number for your ISP. Click the Add button, type the phone number for your ISP, and then click OK. The number will appear in the list. If your ISP provides other numbers, you can add them to the list as well. Consult your ISP to determine the authentication setting for the connection and any of the other configuration settings required. When you're done, click OK to get back to the main configuration window. You're now ready to connect. Back at the main KPPP window, type your ISP user name and password, and click Connect. KPPP dials the number, connects to the ISP, and logs in with your user name and password. When KPPP establishes a connection with the ISP, it places an icon in the KDE Panel, showing the active connection. To stop the Internet connection, right-click the Panel icon, and select Disconnect. Using Broadband If you have a broadband connection to the Internet, your computer doesn't use its internal phone modem because it doesn't need to connect to a regular phone line. Instead, you plug one side of a special networking cable (often called an RJ45 cable) into your computer's network interface (which looks like an overgrown phone jack in the back of your computer). You plug the other side of the cable into an external cable modem or DSL modem. Then when your PC boots, SimplyMEPIS should detect the network interface and configure it to communicate with your broadband modem. Then you're all ready to get on the Internet. Pretty simple, huh? In the off chance that something goes wrong, examine the network interface configuration using the MEPIS Network Assistant. You start the MEPIS Network Assistant by clicking K Menu > System > MEPIS > MEPIS Network Assistant. Once it starts (after you type the root password), you'll see the MEPIS Network Assistant main window. 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... The MEPIS Network Assistant main window The MEPIS Network Assistant has three tabs for controlling your network interface(s): General: For starting or stopping the network, configuring a system DNS server, and enabling the ndiswrapper drivers (more on this later). Wireless: For entering configuration values to connect to a wireless network. Interfaces: For entering configuration values for all network interfaces on the PC. The Interfaces tab is where you must configure if a network interface is active. SimplyMEPIS names the first wired network interface eth0, the second eth1, and so on. The wireless interface is a little different, so we'll discuss that later. Besides being active, a network interface must have a valid IP address assigned to it. Most cable and DSL modems assign IP addresses automatically. SimplyMEPIS detects that and gets an address from the modem. If for some reason you need to manually set the IP address, you can do that on the window referenced by the Interfaces tab at the top of the MEPIS Network Assistant window. You would just select the eth0 entry and enter your IP address. 4 of 15 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 5 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... Manually entering the IP Address A Word about Wireless Wireless networking has taken the home networking world by storm. Nowadays it's common to find homes with either cable or DSL Internet connections and a wireless network router. Linux is trying to catch up with the trend, and it provides lots of support for wireless network cards. There's a small trick you'll need to know about if you use a wireless network card. If SimplyMEPIS automatically detects your network card, it'll assign it a device name of ath0. This is the interface you'll need to configure in the MEPIS Network Assistant. If SimplyMEPIS wasn't able to automatically detect your network card, all is not lost quite yet. As we discussed earlier, the MEPIS Network Assistant allows you to enable a feature called ndiswrapper. This feature allows you to use the Windows drivers that come with your wireless network card in Linux! If you use this option, SimplyMEPIS assigns a device name of wlan0 to your wireless network card. Look for that in the MEPIS Network Assistant if you go that route. Safety on the Net By now I'm sure you are aware that being connected to the Internet carries some risks. There are lots of bad guys out there constantly trying to break into your system. Fortunately, the creator of SimplyMEPIS is watching out for us and includes some protection in the distribution. The Guarddog firewall application runs by default with SimplyMEPIS. Guarddog blocks attempts by outside devices to access your system. While this is normally a good thing, there may be situations in which you want to allow an outside application to access it. To do this, you must configure Guarddog. Here's how you do that. Start the Guarddog by clicking K Menu > Internet > Security > Guarddog. The main Guarddog window appears (after you type the root password). 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 6 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... The Guarddog main window With the Guarddog configuration settings, you can allow access to your system based on either a remote IP address or by a specific protocol. Be careful with what you do, though—when you enable a port, you are opening your system up to the Internet. The default Guarddog settings are fine for most normal Internet users. I hope that you now have your Linux PC connected to the Internet, either using dial-up access and KPPP, or a cable or DSL modem and your network interface. Next, we'll look at the popular Web browsers available for you. Chapter 3 Surfing the Net Without a doubt, surfing the Internet has become a popular pastime around the world. There are lots of different Web browsing packages available for the Linux platform. SimplyMEPIS includes two. Mozilla Firefox In the Windows world, the Mozilla Firefox Web browser has become a popular open source alternative to Microsoft's Internet Explorer. Firefox also offers a version that runs in Linux, and SimplyMEPIS uses it as the main Web browsing tool. Firefox includes lots of neat features that make it an excellent Web browser. It contains a pop-up blocker to block those annoying advertisements you see when visiting some Web sites. It also incorporates the Google search toolbar, providing instant search capabilities. One of my favorite features of Firefox is tabbed browsing panes. If you want to view multiple Web pages, instead of having to open separate windows for each page, you can open a new pane within the same window. You can then access each individual Web page by clicking the tab at the top of the pane. Another great feature is the way Firefox handles file downloads. When you select a file to download from a Web page, Firefox performs the download in background mode, saving the file directly to your desktop—where you'll be able to access it as soon as it's downloaded. No more hunting around to find downloaded files! Start Firefox either by clicking the globe icon in the KDE Panel or by going through K Menu > Internet > Web Browser 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... (Firefox). The main Firefox window appears, ready for action. Before starting to use Firefox, you probably want to check the default configuration. To get to the configuration window, click Edit > Preferences from the top Firefox menu bar. The Preferences dialog box appears, allowing you to change configuration settings within Firefox. The Firefox preferences window Firefox classifies the various configuration settings into categories. Each category appears as an icon at the top of the dialog box window. Click the Main icon to see the main browser settings. These include setting your home page, deciding where to save downloaded files, and checking whether Firefox is the default Web browser. Change these values to reflect your preferences. Next, click the Privacy icon. In this window you can set the options related to how information about your browsing is stored on your PC. You can set the number of days Firefox remembers the sites you visited by setting the History feature value. You can also set how cookies are set on your system by using the Cookies feature. A neat feature is the ability to automatically clear all private data each time you close the Firefox browser. Next, click the Content icon. In this window you can either enable or disable the pop-up window blocking feature or add specific sites that you want to allow to send you pop-ups. You can also enable Java and JavaScript processing here, as well as specify if you want Firefox to automatically load images on Web pages. Both of these items can be great security features because they can stop malicious Java code from executing on your system. Let's take a closer look at two of the Firefox features that make it unique. Open a normal Web page from within the main Firefox window. Now press CTRL + T. This opens a new tabbed windowpane within the Firefox window. You can switch between the two panes by clicking the tabs. In the new window you can open a different Web page. The original Web page remains in the first tabbed pane. 7 of 15 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... Using multiple tabbed panes You can also open Web links as new tabbed pages by right-clicking the link and selecting Open Link in new Tab. This is a great feature for navigating through complex Web sites where you need to refer back to previous pages. The other Firefox feature I really enjoy is the background download manager that I mentioned earlier. When you download a file using Firefox, it doesn't pop up a download box like Internet Explorer does. Instead, it quietly performs the download in background, allowing you to go on about your Web browsing. Of course, the downside to this is that if you aren't familiar with Firefox, you might think that nothing is happening and try to click the download link again—which would start another download. To see the progress of a download, you must use the Download Manager. To see the Download Manager, click Tools > Downloads from the menu bar. The Firefox Download Manager The Download Manager shows the status of all downloads performed by the browser. The bottom of the Download Manager window shows where Firefox saves the downloaded files (this is configurable through the Preferences settings). The entries in the Manager show each downloaded file and its status. If a download is in progress, you'll see a progress bar, showing how far along the download is. You can cancel the download by clicking the Cancel link. A great feature is that you can pause a download by clicking the pause link and then go back at a later time and resume the download right where it left off. Konqueror 8 of 15 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 9 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... You can also use our old friend Konqueror, the Swiss Army Knife of applications, as a Web browser. While it is not nearly as feature-rich as Firefox, it does provide a simple, easy-to-use Web browsing environment. One great feature of Konqueror is that you can have multiple tabs open, pointing to both your local disk resources as well as remote Web pages. This often makes transferring files easy. Start the Konqueror Web browser by going to K Menu > Internet > Web Browser (Konqueror). The main Konqeuror Web browser window appears. The Konqueror Web browser Click Settings > Configure Konqueror. The Konqueror configuration settings window appears. You can change the configuration settings for the Konqueror Web browser from this window. 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... The Konqueror configuration window Just like Firefox, Konqueror groups settings into categories that you select from the left-side icons. For each category, you can set the individual settings within its configuration window. When you're done setting Konqueror to your preferences, type a Web page in the text box at the top of the window. The Web page loads into Konqueror just like it would in any other Web browser. Press CTRL + T, and another tabbed pane opens within Konqueror. From the new tabbed pane, you can open another Web page or browse to a folder on your local system by selecting File > Open Location from the toolbar. Opening a folder and Web page in Konqueror Now you know about the Web browsers that come with your new system. In the next chapter, we'll discuss some other Internet-related applications available in SimplyMEPIS. Chapter 4 Additional Internet Software There are a host of additional applications SimplyMEPIS includes to enhance your Internet experience. You'll find them in the Internet section on the K Menu. Accessing News Feeds While browsing Web pages is fine, sometimes you have to do a lot of browsing to get important information. Often, news feeds can help with this. Lots of organizations provide news feeds for free, providing real-time information at your fingertips. The most popular format for news feeds is RDF Site Summary, or RSS. SimplyMEPIS provides the Akregator application for you to use to connect to Internet RSS news feeds. Akregator The RSS news feeds use XML to post news messages to newsgroups. This is a formatting language similar to HTML, the language of Web pages. By using XML rather than just text, RSS news articles can incorporate just about anything a standard Web page can in a message. Of course, this requires a more sophisticated client tool to read news articles. The Akregator application provides a graphical interface for connecting to RSS news feeds and reading articles. It can manage connecting to multiple RSS news feeds and monitoring each news feed for new messages. 10 of 15 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... The Akregator RSS news reader By default, SimplyMEPIS preconfigures Akregator with the MEPIS RSS news feed. But you can add your own RSS news feed information and monitor as many RSS news feeds as you want. Akregator creates a KDE Panel icon, showing the number of unread items in your news feeds. This gives you an easy way to see when new messages arrive. SimplyMEPIS also incorporates Akregator in the Kontact Personal Information Manager software, which we discussed earlier when talking about office software. This allows you to quickly get your news fix while working on your calendar and e-mail. Instant Messaging Ask just about any teenager, and he or she will tell you that Instant Messaging (IM) is a necessity of life. In case you've been out of the loop, IM involves sending quick messages across the Internet to your friends and family. While it is similar to e-mail, IM sends and receives messages in real time, much like talking on a phone. Of course, to receive your messages, the people whom you're IMing with must be online at the same time you are. The downside to IM is that you must belong to an instant messaging host, and you can only send and receive messages from others on the same IM host. Each host assigns you a unique user account and a nickname (often called a screen name) that it uses to identify you to other users. Some of the more popular hosts are AOL, Yahoo, and MSN. The Gaim IM application is an open source program that can connect to multiple IM hosts, including AOL, Yahoo, and MSN. It helps simplify having multiple host accounts because it can monitor all of them from a single interface. You can configure it to communicate with multiple IM systems at the same time. And it'll monitor several IM hosts for your messages and post them in a single location for you to respond to. 11 of 15 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... The Gaim IM client File Transfers File transfers are also a big part of the Internet. These days it's almost a necessity to use the Internet to download new drivers, software patches, or even entire software packages. You can do this using a couple of packages provided by SimplyMEPIS. gFTP The gFTP application allows you to transfer files (called doing an FTP, which stands for File Transfer Protocol) using a graphical interface. Start gFTP by clicking K Menu > Internet > gFTP. The main gFTP window appears. 12 of 15 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 13 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... gFTP main window Type in the host name and your user ID and password information (if you're logging in to an anonymous FTP server, you should use the word anonymous as the user ID and your e-mail address as the password). After you have logged in to the remote FTP server, gFTP retrieves a directory listing and shows it in the right window. You'll notice that it also displays your local directory listing in the left window. Once logged in to the remote server, you can use gFTP to graphically browse it, just as if you were using Konqueror on your local drives. Downloading files is as easy as highlighting them in the right window, setting the left window to the local directory in which you want to place the file, and then clicking the left-pointing arrow button. Once you're finished transferring files, click the host icon next to the remote host login to disconnect from the remote server. Ktorrent The standard FTP file transfer process has one drawback for FTP servers. If a single FTP server publishes a file for downloading, every person who wants the file must connect to the server to download it. While this is not a big deal for small networks or little-used files, imagine what happens when, for example, thousands of people want to download the latest version of SimplyMEPIS all at the same time! The open source community created a new protocol to solve this problem. The BitTorrent protocol allows downloading files using common peer-to-peer file sharing techniques. As you are downloading parts of the file, you also offer your parts to others to download. This takes much of the load off of the original server. SimplyMEPIS provides the KTorrent application, which uses the BitTorrent protocol for downloading files. KTorrent allows you to connect to a BitTorrent site to download a file and then allows other BitTorrent users to connect to your system to also retrieve the file parts you've already downloaded. By redirecting downloads to other client machines, BitTorrent takes network load off of the main file server. However, the load is redistributed to individual clients trying to download the file. This can present a problem in that other Internet users are accessing your PC to download parts of the file. While this is not a security issue (BitTorrent only allows them to access the file you are downloading or are hosting), it may produce a network bandwidth issue for you. So only use KTorrent if you are accessing the Internet from a high-speed Internet connection, and your ISP doesn't penalize you for too much network bandwidth usage. 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... Chapter 5 Summary Once again, we've covered lots of ground! We started off talking about how to use the MEPIS Network Assistant to get your Linux PC connected to the Internet—either through a dial-up modem ISP connection or through a network interface connection to a cable or DSL modem. Then we walked through the two different Web browsers available in SimplyMEPIS. Mozilla Firefox offers a full-featured Web browsing experience, while the trusty Konqueror browser provides a simple way to get to Web pages. Finally, we discussed some of the other Internet applications available in SimplyMEPIS. The Akregator news feed readers can help us stay on top of what's happening in the world. The Gaim IM client lets us keep in touch with friends and family while we're on our Linux PCs. You may be wondering why we didn't talk about e-mail. The reason is that e-mail is a huge application in itself, so I thought it would be best to give it its own lesson. We'll do exactly that in Lesson 9. You'll see what software SimplyMEPIS provides for getting us connected to our e-mail servers and how we can use that software to manage our e-mail lives. Supplementary Material Firefox Help http://www.mozilla.org/support/firefox/ Get tips, keyboard shortcuts, mouse shortcuts, menu references, and more for the FireFox Web browser. Gaim Documentation http://gaim.sourceforge.net/documentation.php This site provides complete documentation for using Gaim to connect to your Instant Messaging service. Akregator Information http://akregator.sourceforge.net Here you'll find all the information you need to become an expert in reading RSS news feeds using Akregator. FAQs Q: How do I know if Linux supports my WinModem? A: The linmodem Web site (www.linmodems.org) provides information on which WinModems Linux currently supports. SimplyMEPIS stays fairly up-to-date with the latest WinModem drivers available for Linux. Q: Why don't AOL and Juno provide ISP service for Linux workstations? A: Good question. If enough of us Linux users complain, maybe someday they will! Q: Is Mozilla Firefox safer than Internet Explorer? A: It depends on who you ask. Internet Explorer has received a bad rap about having lots of security holes for which Microsoft constantly creates patches. Firefox has long had a pretty good reputation in this regard, but it too has had some security issues. There is no 100% safe Web browser. Always be cautious when running code from unknown Web 14 of 15 7/1/2012 11:51 AM Introduction to Linux: Lesson 8 15 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=8&classro... sites, and never, ever, download unknown applications—even if they are free and have cute icons! Assignment Today, we'll do some Web surfing using Firefox. Open the Firefox application, and go to the MEPIS Web page (www.mepis.org). After the page finishes loading, right-click the Downloads link and select Open Link in New Tab. What happened? Did a new Firefox window appear? Click the tab that contains the Downloads Web page. Did it load correctly? Select a SimplyMEPIS download link, and click it. Did the link open in a new window? From the new download window, select a version of SimplyMEPIS to download, and click it. Did the download start? How can you tell? Open the Download Manager window by clicking Tools > Downloads. What is the status of your download? Click the Pause link for the download. Did the download stop? Now close the Download Manager window, and go to another Web page of your choosing. Open the Download Manager window again. Is the SimplyMEPIS download still there? Click the Resume link. Does the download resume? Click the Cancel link to cancel the download. Does the download status show that the download was cancelled? Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:51 AM Introduction to Linux: Lesson 9 1 of 14 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... Introduction to Linux: Lesson 9 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less09.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less09.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction I hope things went well for you in Lesson 8 and that your Linux PC is now connected to the Internet. But it's time to stop surfing for a few minutes and take another step—configuring and using e-mail. These days just about everyone has an e-mail address. If your ISP allows you to check your mail remotely using standard e-mail packages (such as Microsoft Outlook), then you can use your SimplyMEPIS PC to check your ISP mailbox and to send messages as well. SimplyMEPIS includes two e-mail packages—Mozilla Thunderbird and KMail. The KMail package is remarkably easy to use and provides lots of advanced features found in much fancier packages. I'll use KMail to walk you through how to set up e-mail software. Once you know how to do that in KMail, it will be a snap for you to do the same in Thunderbird. So we'll start today by discussing how to configure your KMail setup for your specific e-mail environment. Then we'll see how easy it is to check for new messages, respond to them, and send new ones. Finally, we'll take a look at some of KMail's advanced features and discover how easy they can make it to organize your e-mails and to keep your computer safe. Okay, let's get going. Chapter 2 Configuring KMail There are two ways to start the KMail application. You can start it directly from the K Menu by clicking K Menu > Internet > Mail Client (KMail). However, I prefer to open it as part of the integrated Personal Information Manager package Kontact. If you remember, we talked a little about Kontact back in Lesson 6 when we examined office productivity software. The Kontact package integrates e-mail, an address book, a calendar, to-do lists, and notes, all in one handy location. And the e-mail packaged Kontact uses? You guessed it: KMail! This is by far the best way to go with SimplyMEPIS. Let's start Kontact now by clicking the Kontact icon on the KDE Panel (it's the one with pages and a green star). The main Kontact window appears. Click the Mail icon on the left side in Kontact to make the KMail window active, showing your messages. 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... The Kontact main window with the Mail feature You should recognize the window layout from when we discussed Kontact earlier. This time, we'll focus on the KMail window and its features. Before you can start using KMail, though, you'll need to configure it to talk to your e-mail system. From the Kontact menu bar, click Settings > Configure KMail. The KMail configuration window appears. The KMail configuration window Setting Your Identity This window shows the KMail configuration categories on the left, as icons. The first category is your identity. This is where you set how you want KMail to identify you on the From line in the e-mails you send. You may want to use one identity for sending one type of message (such as personal e-mails), and another identity for other types of messages (such as business correspondence). 2 of 14 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... For example, when I e-mail friends and relatives, I just want the message to say it came from Rich Blum, but when I am sending business messages, I prefer to use my full name, Richard K. Blum. I can do this by setting up two identities in KMail. There is one identity called Default, which is the identity KMail uses automatically when you send e-mail. If you create and want to use another identity, you have to select it when you compose your message (we'll see how to do that later). Click the Default identity entry, and then click the Modify button. The Edit Identity dialog box appears. Here you must type in your full name and e-mail address as you want them to appear on your e-mail messages. You can also set a signature block in this window if you so desire. If you're not familiar with a signature block, it's a text block that gets included at the bottom of all your messages. Normally this would be your name and contact information, but some people like to also include a witty saying. You can also set a reply address for your messages (under the Advanced tab) if it's different from your e-mail address. If your e-mail address is your reply address, you can keep this field blank. When you finish adding your information, click OK. Once you've defined your identity, it's time to tell KMail how to get to your e-mail account. Setting Up Your E-mail Account The next icon is for the Accounts settings. When you click it, a window appears with two tabs—one for sending messages and one for receiving them. Configuring your account settings in KMail The Sending tab tells KMail how to forward messages to your ISP to send them out onto the Internet. But you must add at least one account to be able to send messages. To do this, click the Add button. A dialog box appears, asking if you want to use SMTP or sendmail to connect to your mail server. KMail uses the Simple Mail Transport Protocol (SMTP) to send messages out to the Internet via your ISP mail host. So select SMTP and click OK. The SMTP configuration window appears. 3 of 14 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... The KMail SMTP configuration window Identify your ISP in the Name text box and the host name or IP address of your ISP in the Host text box. For most ISPs, the default TCP port setting provided will be fine. Many ISP mail servers now require that you log into the server to send mail. If your ISP requires this, check the Server requires authentication checkbox, and enter your login information. If you have problems sending mail with KMail, consult your ISP to see if you need to change any of these values. When you're done, click OK to return to the Network window. There are a few common sending features that you must configure in the Sending window. You must determine how you want KMail to send new messages. If you have a broadband Internet connection that is continually active, you can configure KMail to send new messages immediately. If you are using a dial-up Internet connection, you may want to configure KMail to send messages only when you say to send them (we'll cover how to do that a little later). After you finish with your sending configuration, you must configure the e-mail host you want to check for incoming e-mail messages. Configure for Receiving Messages Click the Receiving tab. Again, you must configure at least one account from which KMail will receive messages. To start doing this, click the Add button. There are several types of e-mail protocols KMail can use to check e-mail hosts. You'll most likely want either the Interactive Mail Access Protocol (IMAP) or Post Office Protocol (POP, also called POP3). (If you're not sure which one you should choose, check with your ISP.) When you select either POP3 or IMAP, a new dialog box appears with information you need to fill out. 4 of 14 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... Configuring a POP e-mail account Enter a name for this e-mail account, your login user ID and password to access your e-mail server, and the name or IP address of your e-mail server (again, if you need to, you can get all of these values from your ISP). There are also a few options you have to choose from. You can choose to store your e-mail account password in the KMail configuration file. This enables KMail to check your e-mail account automatically without asking you for your password. The downside to this is, if others use your PC, they could look in the configuration file and view your password (assuming they're clever enough to do that). You can also check if you want KMail to leave your messages on the e-mail server after it downloads them. Most ISPs require that you delete downloaded messages so their e-mail servers don't get full. Again, check with your particular ISP to find out their policies. You can also configure KMail to check your e-mail account automatically at predetermined intervals. This is nice if you have a broadband Internet connection that's always connected. If you have a dial-up connection, don't check this value, because KMail will want you to redial every time it tries to check. Okay, that was a lot of things to cover in one chapter. Now you should have KMail configured with your basic information so it can start sending and receiving messages. Next chapter, we'll talk about how to actually read and send messages. Chapter 3 Reading Messages Start Kontact. It should open to the Kmail window and by default show your inbox folder. As with any other e-mail package, KMail uses the inbox folder to hold newly received e-mail messages (although it's possible to configure KMail to route new messages to different folders using the Receiving account configuration). 5 of 14 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 6 of 14 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... The KMail mail folders To check for new messages at your ISP, click the Check Mail In icon on the toolbar (it's the envelope with the red down arrow). The bottom of the Kontact window shows the status of the operation. When KMail finishes, it displays your new messages in the inbox. As you can see, KMail displays message information in two sections. The top section lists each individual e-mail message that's in your inbox. You can sort this listing by any of the column headings. Just click the heading box you want to sort by. Click once to sort in ascending order, then again to sort in descending order. The lower section shows the content of whatever message you've highlighted above. You will notice that the important message header information is set apart from the message body. The From, To, and Date message header information is displayed. You can change the way KMail displays the message header information by clicking View > Headers on the menu bar. You can select among five different header formats, including showing all of the message header information. To view a complete message, double-click the message item in the top section list. A new window appears, showing the complete message. 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... Viewing a complete message There are three icons at the top of the message window. Use the first icon to print the message, the second icon to reply to the message sender, and the third icon to forward the message to a different person. A Word About Message Formats KMail can display messages in two formats—standard text format and HTML format. Standard text format messages are plain messages and don't take up much space in your mailbox. HTML formatting is often used for messages that display graphics. You may be wondering what's up with the No HTML Message text along the side of the message display. This is an important feature that KMail enables by default. KMail uses that to warn you if a message is in HTML format. This is important for one reason. If you have been using e-mail for any length of time, I'm sure you're aware of Unsolicited Commercial E-mail (UCE). You may know it by its nickname—spam. These are unsolicited messages sent to your account to sell you all sorts of things (most of which are not appropriate to mention here). Senders of spam messages constantly get more sophisticated in their approach. They know that most people are savvy about spam and will just delete it. To prevent this from happening, spammers now send messages, in HTML format, with active links to Web sites. When some e-mail readers view the message, they automatically follow the Web links, and unknown to you, contact the spammer's Web server. By contacting a specific Web address, the spammers know exactly which e-mail address read the message, and before you know it, you're part of another spam list. KMail combats this problem by allowing you to refuse to display messages in HTML format. By default, KMail displays all messages in text mode, effectively thwarting those sneaky spammers. The No HTML Message warning is there to remind you that the HTML message view has been disabled. To enable viewing messages in HTML mode, in the Security KMail configuration group, check the Prefer HTML to plain text check box. Sending Messages Click the New Message icon in the toolbar (it's the first icon on the left, the picture of a blank page with an envelope). A blank message window appears, ready for you to compose your new message. 7 of 14 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 8 of 14 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... The new message composer window If you've created multiple identities, you can select which identity to use for the new message by clicking View and selecting Identity. A new drop-down box appears in the toolbar, allowing you to select which identity to use. If you didn't create more than one identity, KMail will just use the default identity. Next, complete the message header information, including the To field. Notice that you can also select CC- or BCC-type fields from the To field drop-down. You must type the complete e-mail address in the text box. Separate multiple addresses using a comma. If you used the Kontact address book feature back in Lesson 6, you probably have a bunch of people already entered into your address book. Guess what—KMail can use that information! Notice the Select. . . button at the end of the To text box. This button brings up the Kontact address book where you can select e-mail addresses. You can select the address to be added to either the To, CC, or BCC field. Go ahead and click the button and then select one or more addresses from your contact list. The message body text box is a self-contained word processor. By default, KMail puts you in text mode, so all you can do is enter text in a single, standard font. If you prefer to use HTML-formatted messages, click Settings, select Toolbars, and then select HTML toolbar. From the new toolbar at the top of the window, select the type of text you want to enter. You can select the font, font size, color, alignment, and even choose a list format. KMail also allows you to attach files to your messages. The Attach File icon appears as a paper clip on the toolbar. When you click it, a file selection dialog box appears, where you can browse to find the file to attach. When you're ready to send your message, click the Send Now button on the toolbar (the first icon on the left). KMail places the message in the Outbox and attempts to send it (deciding when to do so based on your configuration settings). Now that you know the basics of sending and reading messages, it's time to explore some of the more advanced features of KMail. We'll do that in the next chapter. Chapter 4 Advanced KMail Features You already know all the basics of using KMail for reading and sending messages. But now that you have the KMail 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 9 of 14 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... system, you probably want to know about some of its more advanced features that can really help you manage your e-mails and protect your computer. Managing Message Folders Sometimes it's easy to get lost in a sea of e-mail messages. So it's a good idea to organize and manage your e-mails. That involves creating specialized folders to store them. KMail provides several ways to do this. By default, the mail folder group is called Local Folders. These folders are stored in your KMail configuration. If there is more than one user on the workstation, then each user will get his or her own set of local folders in KMail. You can't see other users' mail folders. If your ISP uses the IMAP protocol for retrieving messages, you'll see a second group of e-mail folders in the folder list. This second group of folders resides on your ISP's IMAP server, not on your local PC. You can view messages in these folders on any PC you log in from. Your inbox folder will be in the host group inbox folder, not in your local inbox folder. This can get confusing at times. Whether you use IMAP or POP3 to connect to your ISP, you can also create your own local folders for storing messages. Let's try creating one now. Right-click the Local Folders text, and select New Folder. Assign a name to your new folder, and select the mailbox format to use (the default is maildir format, which is fine for us). You can create as many folders as you need to organize your e-mails. Once you have created folders, you can move messages to them. Right-click a message in the message list, and select Move To. A list appears with the current folders. Select the folder to which you want to move the message and then release the mouse button. Your local folder group also includes the Outbox, Sent-mail, and Trash folders. When you send a message, KMail places it in the Outbox folder. KMail attempts to deliver messages in the Outbox based on your configuration settings, either automatically or when you manually connect to your ISP. By default, KMail saves a copy of your sent messages in the Sent-mail folder. Any deleted messages go to the Trash folder. If you delete messages in the trash folder, KMail destroys them, never to be seen again. There is also a spam folder in the local folder group. It has a special purpose that you must configure separately in KMail. We'll talk about that next. Fighting Spam KMail can help you control the problem of spam. You may have noticed the spam folder. KMail can be configured to look for spam messages and automatically move them into that folder for you. Here's how. From the main KMail window, click Tools > Anti-Spam Wizard. The Anti-Spam Wizard starts and walks you through the configuration options. 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... The Anti-Span Wizard choices SimplyMEPIS includes the popular SpamAssassin anti-spam package. The SpamAssassin package uses well-known spam rules to attempt to identify spam messages. This program runs continually in the background on your SimplyMEPIS PC. Select this option, and click Next. In the next window, you must configure how KMail identifies and handles spam messages. There are a few different options to use here. Configuring spam filters By default, SimplyMEPIS moves any message marked as spam to the trash folder. This can be dangerous, since no spam tool is 100% accurate. I wouldn't recommend putting them directly in the Trash folder. This may accidentally delete real messages. Instead, put them in the special spam folder. 10 of 14 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... After you turn on the spam protection, two additional icons appear on the KMail toolbar. A green circle with an arrow in it allows you to mark spam messages that made it past the filter into your inbox. And the green checkmark icon allows you to mark normal messages that SpamAssassin erroneously marked as spam. This helps SpamAssassin modify its rules and not make the same mistake in future e-mails. Testing Your Spam Protection There's a neat trick for testing whether you installed and configured your spam software correctly. The Generic Test Unsolicited Bulk E-mail (GTUBE) message is a harmless generic text message that all spam filtering software identifies as spam. Using KMail, create a new message and address it to yourself. In the body of the message, type or copy and paste the following text: XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X All of this text should be on one line of the message. Send the e-mail to yourself, and then check your incoming messages. If your ISP doesn't screen spam messages for you, KMail should receive the new message, identify it as spam, and place it in your spam folder (if your ISP does screen spam messages, you may get a message indicating that the ISP blocked a potential spam message). The test spam message captured by KMail My KMail configuration correctly identified the message as spam and placed it in the spam folder. By viewing the message, you can see that the SpamAssassin program adds some information to the message, explaining why it tagged it as spam. Stopping Viruses Virus messages are another problem that plagues e-mail systems. Some people will attempt to compromise your PC by sending e-mails with malicious programs attached to them. Happily, Linux is immune to all Microsoft Windows viruses. However, that's no reason to get lazy about virus protection. KMail offers a feature to scan all incoming messages for commonly known viruses. To start the anti-virus configuration wizard, click Tools > Anti-Virus Wizard. Similar to the Anti-Spam Wizard, the Anti-Virus Wizard asks you to choose an anti-virus tool to use. SimplyMEPIS includes the Clam anti-virus tool. Ensure that the Claim Anti-Virus entry is selected and then click Next. 11 of 14 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... Configuring KMail anti-virus protection After selecting the anti-virus tool, you must configure how KMail uses it. Obviously, you first need to select the Check messages using the anti-virus tools check box. Next, you can determine if you want to move messages identified as having a virus to a specific folder. Finally, you must select that folder. Of course, anti-virus software is only as good as its latest update. SimplyMEPIS provides the KlamAV update tool for Clam. Select K Menu > System > Antivirus (KlamAV) to configure and start automatic updates for Clam. Once started, KlamAV will automatically start every time you run SimplyMEPIS, keeping you up-to-date in virus protection. Chapter 5 Summary SimplyMEPIS includes the KMail package to simplify reading and sending e-mail. The best way to use KMail is as part of the Kontact package, which also incorporates a full-feature address book and calendar. Kontact provides one-stop shopping for all of your personal information management needs. Before you can use KMail, you must configure it for your ISP. You have to define your ISP login name and password as well as your ISP e-mail host information. Once you configure KMail, you can use it to check for new messages and to send messages to others. KMail can also interact with advanced spam- and virus-blocking tools. To help keep your e-mail experience enjoyable, and to protect your computer, SimplyMEPIS includes the SpamAssassin spam blocker and the Clam virus blocker. That's all for today's lesson. I hope you were able to access your e-mail account using KMail. Now you can do just about everything you need to from your Linux PC. We've covered all of your Linux PC's basic functions! Now it's time to start digging into its more advanced features. In our next lesson, we'll explore the world of the Linux command prompt. There are lots of interesting things we can do from the command prompt, so I'm looking forward to walking through them with you. Supplementary Material 12 of 14 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... KMail—The KDE Mail Client http://kmail.kde.org Find all the tips and tricks on using KMail at the official KMail Web site. SpamAssassin http://spamassassin.apache.org Find out how SpamAssassin identifies spam messages, and keep up-to-date on the latest techniques for detecting it. FAQs Q: Why does SpamAssassin not work on my IMAP e-mail account? A: IMAP accounts don't download messages to your computer—they maintain them on the server. So although you can view messages, they don't pass through SpamAssasin. But KMail offers the Disconnected IMAP feature, which lets you connect to your IMAP server but download messages to folders on your PC. If you use this technique, SpamAssasin will work. Q: I see lots of entries in the KMail configuration for encryption and digital signatures. Can I use these features? A: To use the e-mail encryption features of KMail, you must have the OpenPGP package installed on your system. The SimplyMEPIS distribution chose not to include it. More-advanced Linux users can download this feature and install it. Q: KMail keeps retrieving the same messages from my ISP over and over again. What is wrong? A: A common mistake is to check the Leave fetched messages on server option. Usually, KMail marks these messages as read and avoids them when it checks the mailbox later on. Unfortunately, some e-mail server hosts don't support this feature, so KMail has no way of marking messages as read. Assignment I hope you've been following along with the lesson and have your KMail settings configured for your ISP. If not, take a few minutes and set it up. Once you are connected with your ISP, let's look at one feature you may run into with KMail. Click the New Message button to compose a new message. For the recipient, enter your own e-mail address. Now try experimenting with some of the font settings (hint: remember to enable the HTML toolbar). Try to set several different types of fonts and colors in your message. Are you able to set the fonts and types? Now send your message and then check your new mail. What does the message look like? What happened to your fonts? When you view a message in text mode, you can see the text just fine, but you can't see all the special fonts and colors. Now go to the KMail configuration window, select Security, and check the Prefer HTML to Plain text check box. Click OK to return to your messages. Now what does the message look like? Did the special fonts appear? What about the sidebar text on the message; did that change to indicate you’re now viewing an HTML message? Remember that viewing messages in HTML may be dangerous. Unscrupulous spammers can send HTML messages that connect back to their Web sites to log that you read the message. 13 of 14 7/1/2012 11:52 AM Introduction to Linux: Lesson 9 14 of 14 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=9&classro... Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:52 AM Introduction to Linux: Lesson 10 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... Introduction to Linux: Lesson 10 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less10.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less10.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction We sure have covered lots of ground in this course! I hope by now you're comfortable using your Linux PC to perform most, if not all, of the functions you're used to doing with your Windows or Macintosh computer. Now it's time for us to step away from the standard applications and to start digging deeper into the Linux system itself, doing some of the things that more advanced Linux users do. Today we're going to get away from fancy graphical interfaces. We'll meet Linux on its own terms—the command line interface. We'll remove the middleman and talk directly to the Linux system—typing in commands and seeing what the results are. You'll discover that using simple text commands allows you to perform many useful functions quickly and easily. First, we'll walk through the command line interface tool included with SimplyMEPIS—Konsole. After getting comfortable with Konsole, we'll look at some simple commands we can use to glean information from our Linux systems. Let's get started on the command line! Chapter 2 The Command Line Interface Until now, we've been using graphical tools to perform all of the common tasks in Linux. When we wanted to handle files and folders on our system, we used the Konqueror application. When we wanted to add new user accounts, we used the MEPIS User Assistant or the KUser program. Graphical tools are great for getting started in Linux. They hide some of the complexity of the system behind fancy windows and icons. However, it can be very helpful to learn to do some functions without having to rely on graphical tools. The command line interface to a Linux system is called the shell. The shell is a text-based environment. That is, you enter text commands and get back text responses from the system. No icons, no buttons, and no fancy graphics. While using a command line interface may seem old-fashioned, it's the method that most Linux administrators prefer. As with everything else in Linux, there's more than one shell. SimplyMEPIS includes five different types of shells in its distribution, and each one offers different features. For now, we'll just look at the default shell, called bash. The bash shell is an open source version of the original Unix shell developed by Steve Bourne, which was called simply sh (which is short for shell). The bash shell gets its name from the phrase Bourne Again Shell, which is a play on words, indicating that it is somewhat similar to the original Bourne shell. Now let's see how to get to the shell. The Konsole Program 1 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 2 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... As I mentioned, the shell provides a text interface for interacting with the system. However, if you're already running the KDE graphical environment, it's not so easy to get to the default text shell. You'd have to stop the KDE windows manager and then stop X Windows server, leaving you with the command line interface of the Linux system. To keep us from having to tear down all of the graphical interfaces just to get to the command line, KDE provides a simple command line interface program—Konsole. The Konsole program offers a command line interface within a graphical environment, kind of a best-of-both-worlds thing. Start Konsole now by clicking K Menu > System > Terminal Program (Konsole). The Konsole application starts, initially showing a Tips dialog box and then showing the main Konsole window with a single shell screen. The main Konsole window Well, there we are. You're now at the command line interface for your Linux system. Not too exciting, is it? Well, not yet, anyway. Now you need to learn what to type to get useful responses from the system. But before we talk about commands you can use, let's take a look at the features of Konsole. Notice that the main shell screen appears as a tabbed window within the main Konsole window. You can open additional shell screens within the main window. Click the button in the lower-left corner of the Konsole window. A new Shell tabbed window appears within Konsole. You now have two separate shell sessions active and can switch back and forth between them. Click the Session menu bar item. This gives you the option to start a new normal shell session using the account you are currently logged in as, a root shell session (which is a session logged in as the root user with full privileges), or a Python shell, which is used for programming. Next, click Settings, also on the menu bar. Notice that you can customize each individual shell window by changing the font by using the Font setting and the screen colors by using the Schema setting. The Command Prompt The first thing you should notice in the Konsole shell screen is the command prompt. On my SimplyMEPIS system, it looks like this: rich@1 [~] $ The shell prompt shows the user account, the shell session number, and the current directory. The tilde symbol indicates that you are in your home directory, which is the default location that Konsole starts you out in. The dollar symbol indicates that the command line interface is ready for you to enter a command. There are lots of commands the bash shell uses to perform functions—and they all use a similar format: command –options arguments The first item is obviously the command name. Most commands can be modified using one or more options. Options are usually a single character and are preceded with a dash. If there's more than one option, each can be listed either separately on the line (such as -a -b -c) or they can all be bunched together after a single dash (such as -abc). Following the options, there may or may not be an argument for the command to use. An argument provides information for the 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... command, such as file names to copy or user accounts to add. We'll talk more about this later in the lesson. Commands Let's see how the command line interface works. From a shell screen, type the command date,and press the ENTER key. You should get a response back from the system, showing you the current date (assuming the date is set correctly on your system). After the command output, a new command prompt is displayed, ready for a new command. One great feature that SimplyMEPIS includes is something called the man pages. Don't worry, the man pages aren't a guy thing—they're the manual pages for all of the commands used in bash. You use the man pages to view information about a command. To get the man pages for the date command, type man date (make sure you include the space). You should now see the man page for the date command. The date man page The man page divides information into separate sections, described in the following table. The Man Pages Section Description Name Displays the command name and a short description. Synopsis Shows the format of the command. Description Describes each command option. Author Provides information on the person who developed the command. Reporting Bugs Provides information on where to report any bugs found. Copyright Information on the copyright status of the command. See Also Refers you to any similar commands. You can step through the man page by pressing the SPACEBAR or using the ARROW keys to scroll forward and backward through the man page text. From the Synopsis and Description, you can see that there are options for displaying the date in a variety of formats. If you use a root shell session, you can also set the date of your system 3 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... directly from the command line interface. To exit the man page screen, press Q on your keyboard. Now that you've seen the basics of the command line interface, let's start performing some practical commands. Chapter 3 File Management Commands While the Konqueror interface provides an easy way to manipulate files, it can get clunky when you're doing file management. Often, it's faster to use the bash shell for this. The first file management command we'll look at is the df command—a quick way to show the available disk space on all mounted partitions. Start a Konsole shell session now and type df at the command prompt. Using the df command Note: Remember, the df command shows information on mounted partitions. If you're using the LiveCD and don't have any partitions mounted, you won't see anything. The first column of the df output shows the name of the mounted file system. The output from the df command on my system shows two hard disks /dev/hda1 and /dev/hda3. The varrun, varlock, udev, devshm, and lrm filesystems are virtual filesystems SimplyMEPIS creates to manage devices and running programs. The next three columns show the size of the drive (using 1 kilobyte blocks), how much of the disk is used, and how much is still available. For those of us who aren't math experts, df also provides a fourth column showing the percentage of the disk that's in use. The last column shows the location in the Linux virtual directory where the disk is currently mounted. Note that SimplyMEPIS mounted my first hard disk partition at the root level, and the other at the /home level. That's quite a bit of useful information from one simple command. Are you starting to see the power of the command line interface? Viewing File and Folder Information Now let's use the command line interface to work with our files and folders. The first command is the ls command. You can use it to get a listing of your files and folders. Go ahead and type ls at the default Konsole command prompt. 4 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... You should see a list of the files and folders in your home folder. Not quite as exciting as the display in Konqueror but just as useful and informative. Notice that items are shown in different colors (the exact colors depend on the schema you've chosen for your shell session). This lets you quickly tell files apart from folders. You should also see that files marked as executable appear in another color. Let's get more information. At the command prompt, type ls -l. Using the ls command The -l option provides a long-format listing of files and folders. Its columns show: The file permissions How many 1 kilobyte blocks the file uses The owner of the file The group the file belongs to The size of the file in bytes The date and time the file was created The file name As you can see, this provides a single place to get all of the information about a file. If you are trying to get information about lots of different files, this is much faster than looking at file property windows in Konqueror. Changing Folders One way to see files in other folders is to use the folder name as the command argument. Type ls -l Documents at the command prompt. You'll see a long listing of the files contained in your Documents folder. This method can get tedious if you are working on lots of files from another folder. Another technique is to change the command prompt to the other folder and then enter commands. You use the cd command to do this. From the command prompt, type cd Documents. You should now see your command prompt change to reflect that you are in the Documents folder. Now use the ls command to view the files in that folder. 5 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... Changing folders When you change folders at the command prompt, there are two different techniques you can use. The first is to type the absolute folder path. For example, to get to the Documents folder in Katie's home directory, I can type the command cd /home/katie/Documents. That command specifies the exact folder path to follow to get to Katie's Documents folder. However, if you are just jumping back and forth between a couple of folders in your own folder structure, it can get tiring to have to type so much. So you could instead type in a relative folder path. Relative folder paths change folders relative to the folder you are currently in. Linux uses a couple of shorthand symbols to indicate folders. The period (.) always represents the folder that you're in. Two periods () represent the parent folder of your current folder. You can use both symbols in command line commands to describe folder locations. For example, if you're still in your Documents folder, you can get back up to your home folder by typing cd .. Give it a try. Presto, you're back at your home folder. Now return to your Documents folder by typing cd Documents. From there, you can get to your Desktop folder in two different ways: cd /home/rich/Desktop cd /Desktop The first command uses the absolute pathname to get to the Desktop folder (remember to use your user account name instead of mine). The second command uses the symbol to tell the cd command to go up one folder in the hierarchy and then to the Desktop folder. That is a lot less typing to deal with. One last tip: If you use the cd command all by itself on the command line, it'll return you to your home folder. This can come in handy when you're digging through the file system and are a few folders deep in an area. Copying and Moving Files Now that you know how to list files and get around the file system, it's time to start moving some files around. You use the cp command to copy files to another location. The original file will still exist, but Linux creates a full copy of it in the location you specify. You can use the man page to see all of the available options for the cp command. The basic format for the cp command is: cp source destination When specifying file names in the cp command, you can use either absolute or relative path names. If you're copying a file in your current folder, you don't need to use a file path, just the file name. 6 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... Let's try this out. From the command prompt, use the cd command to get to the MEPIS folder located under your Documents folder. Now let's copy the MEPIS_GettingStarted.pdf file to your desktop. Use the command cp MEPIS_GettingStarted.pdf /Desktop. If you specify a folder name as the destination, the cp command copies the file, using its existing file name, to the new folder. Alternatively, we could have specified a new file name to use for the new file. When you copy the file, the cp command returns with no message, just another command prompt. You should now see a new icon on your desktop—the MEPIS_GettingStarted.pdf file. It worked! Two other useful file commands are the mv command, which moves files, and the rm command, which removes (deletes) files. Be careful with these commands, though, as they can be dangerous when used as the root user account. Always be cautious when moving or removing files. When you're working from the command line interface, there's no going back after you've deleted a file. That's enough to cover for this chapter. Next, we'll look at some more-advanced commands. Chapter 4 Advanced Shell Commands Now that you have the hang of using the command line interface, let's take a look at some of the more advanced things you can do with it. Redirecting Command Output One of the neat features of the command line interface is redirecting command output. Instead of sending the output of a command to the screen, you can redirect it to another command. This links commands together, allowing one command to work on the results from a previous command. To redirect the output of a command, use the pipe symbol (|). This symbol is usually located with the backslash key on the keyboard (you must use the SHIFT key to access the pipe symbol). Let's try redirecting a command output and see how it works. A very useful command for this is the more command. You can use it to pause screen output, allowing you to read what's on the screen before it scrolls by. The more command displays a screen full of information and then waits for you to enter another command before displaying more information (similar to how the man page displayed text). So when might you use this? Well, say you had a folder with lots of files. Using the ls command to list them may not be easy, because it just scrolls the information by all at once. This is an excellent situation in which to use the more command. Let's try it now. From the folder, type the command ls | more. The ls command performs its function and internally sends its information to the more command. The more command displays the first screen of information, then stops and waits for you to give a command. 7 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... Using the more command If you've seen all you need to see, you can press the Q key to stop the output. If you want to see more information, press the SPACEBAR. To see all of the output, you must continue pressing the SPACEBAR at each prompt. Redirecting command output is a powerful tool in the command line interface arsenal. Other commands that are useful in handling data are grep, which searches the data and displays only information that matches a supplied filter, and sort, which, obviously, sorts the displayed data in a format you specify in the command line. Redirecting Output to a File You can use the greater-than symbol (>) to redirect the output of a command to a text file. Let's try it. From a Konsole shell screen, type the command ls –l > output.txt. This creates a file called output.txt, which contains the output from the ls command. Perform another ls command to see if the output.txt file exists. Now it's time to see how we can view the contents of the file. Viewing Text Files There are lots of ways to view text files directly in the command line interface. Often this is much easier than trying to use a graphical editor. Here are a couple of simple methods that frequently come in handy. The cat command doesn't refer to felines but to concatenating files—a fancy term for putting multiple files together into a single file. You can use this complex command to quickly display the contents of text files. Let's try this out. From a Konsole shell screen, type the command cat output.txt (be careful; unfortunately, Linux is case sensitive). You should see the contents of the text file you created from the previous test scroll by your screen. While that was informative, it was quite fast. But now you should know how to solve that problem. Yes, that's right— redirect the cat command output to the more command. Go ahead and do just that. Type the command cat output.txt | more. Another problem solved! The output now displays and then stops after each screen of information. 8 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... The other text display command is less. As its name implies, it's the opposite of the more command. The more command takes the entire output from a command and allows you to scroll through it. This is a unidirectional function (that is, you can only scroll forward in the file). The less command allows you full control of the input file, scrolling either backward or forward. Let's look at the same file using less. Type the command less output.txt. The less command displays the first screen of information and then stops and waits for your command. Using the less command You can now press the SPACEBAR to go forward, or use the ARROW keys to go backward and forward through the text file. Watching What's Running One of the greatest commands available is the ps command. This command shows what processes are currently running on your Linux system. It can be a lifesaver when your system is running slowly. A quick glance at the processes running can often tell you what's happening. Let's try this out. From the Konsole shell session, type the command ps. The output is not too exciting. You should have seen two processes running: your bash session and the ps command you ran. That's because, by default, the ps command only shows the processes associated with your user ID. To see everything running on the system, you must use a few additional command line options for the ps command. You can use the ps command man page to see what options are available. Unfortunately, there's quite a bit of controversy in the Linux world about the ps command. You see, at one time there were different versions of it floating around. To try and resolve this problem, the Linux community combined them into a single version. However, the different versions used the same option letters to mean different things. This has resulted in an odd situation in which the ps command can use the same command line options both with and without a dash and get different results. Perusing through the ps man page may help you decide what ps command option to use to get the information you need. My favorite ps command options are a, e, l, and x (without the dashes). Remember, you can group these options together to make axle. Besides being simple to remember, this combination shows you all of the processes running on your system and just about everything you would ever need to know about them. To see what's running on your system, type the command ps axle | more (yes, another place where the more command comes in handy). 9 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... Using the ps command Wow, that's a lot of information! For now, we won't get into what each thing does (we'll do that in our last lesson, when we discuss system administration). But you should see some things you recognize, such as the spamd program vigilantly running in the background, watching for spam messages, and the cupsd program running our printer sessions. Chapter 5 Summary Today we entered the world of the Linux command line interface. We saw that you can get to it from the KDE desktop by using the Konsole application. This enables us to access the command line without having to shut down the graphical desktop environment. We got acquainted with a number of commands. The file management and manipulation commands can come in handy when you want to quickly find new file information and move files around. The ls command lists the files in a folder, and the cd command is used for changing to a different folder. We saw how the cp command lets you copy files between folders and how the mv and rm commands can come in handy. Finally, we looked at some of the more advanced commands available. One handy tool is the pipe symbol, which we can use to redirect the output from one command into another. We also saw how the ps command will display the processes running on the system, allowing you to get an idea of what's going on when your computer has a problem. In our next lesson, we'll talk about the different ways you can install applications on the SimplyMEPIS Linux system. This will allow you to customize your Linux PC to exactly the way you want it. 10 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 11 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... Supplementary Material Getting Started with Bash—A Bash Tutorial http://www.hypexr.org/bash_tutorial.php This is a great tutorial on how to use the bash shell, geared toward the common PC user. Bash Reference Manual http://www.faqs.org/docs/bashman/bashref.html You can find just about any information on using the bash shell here. Learn how to use the advanced features of the command line interface. FAQs Q: Do I have to keep retyping commands that I've used in my session? A: No. Each shell session keeps a history log of the commands you've typed. To recall them, you just press the UP ARROW key. Q: How do I exit a shell session? A: Use the exit command to close a session. Q: How do I access the other shells available in SimplyMEPIS? A: Click K Menu > Applications > Shells and then select the shell you want to use. Assignment Let's do some file management using the Linux command line. Open a Konsole session, and create a new folder in your home folder called Lesson10. (Typing the command cd by itself takes you to your home folder.) Hint: To create a new folder, use the mkdir command. Change to the new folder, and copy all of the contents of your Documents/MEPIS folder to it using the cp command (hint: the cp command can use wildcard characters, such as the asterisk (*) to represent all files). List the contents of the new folder to make sure the files copied over. Did they copy okay? Use Konqueror to display the contents of your new folder. Click the MEPIS_GettingStarted.pdf file icon in Konqueror and see what happens. Use the ps command to list the currently running processes, and redirect the output of the command to a text file named processes.txt. Did the new file get created in your folder? How can you tell? List the contents of the processes.txt file, and see what process ID the cupsd program is running under. Were you able to find it? How did you do it? Try using the grep command to display only the line containing the cupsd process information. Were you able to do it? 7/1/2012 11:43 AM Introduction to Linux: Lesson 10 12 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=10&classr... Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... Introduction to Linux: Lesson 11 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less11.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less11.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Now that you're familiar with the Linux command line, it's time to continue on to another advanced area of the Linux world—installing software. Today, we'll discuss how you can access even more software than what comes already installed with SimplyMEPIS. As we learned way back in Lesson 1 (you do remember Lesson 1, don't you?), the creator of the SimplyMEPIS distribution derived it from the Ubuntu Linux distribution. Recall that we use a distribution because it bundles software that we'll probably want and leaves out stuff we may not need. Well, now it's time for us to look at the stuff that SimplyMEPIS left out. Who knows, you might just find something that you can't live without! We'll start by seeing how Linux distributions bundle application files together to make installation easier. Linux uses a specific format for bundling software, and you need to know about it. After that, we'll take a look at a couple of command line tools included in SimplyMEPIS that allow us to see what software packages are already installed on our systems and to add new ones. Finally, we'll discuss two graphical software installation packages included with SimplyMEPIS—KPackage and Synaptic. Both applications greatly simplify finding and installing software. We'll see the benefits of each one and learn when to use them. Chapter 2 Distributing Linux Application Software When you've installed a new program on your Windows or Macintosh PC, you've probably purchased a CD, placed it in your CD tray, and let it install the application automatically. During the automated install process, you probably saw the install program copy lots of files to the system. These days, even the simplest applications require lots of files to run. This is not much different with Linux applications. In the Linux world, the problem is trying to bundle all of the files together and create an easy way to install them. Remember, in the open source world you don't need to buy your software on a CD—you can usually download it for free from a Web site. So the trick to distributing open source software is finding a way to make it easy for the common user to download and install it. This is where Linux packages come in. Linux application files are bundled into an installation package. The package contains all of the files necessary for the application and instructions on where the system must place each file for the application to run. A package management system on the Linux system reads the package and installs the files in the proper location. There are several package 1 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 2 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... management systems available in Linux. SimplyMEPIS uses the Debian package management system. This means that with SimplyMEPIS, you can only install packages designed for Debian. Any package released for this system will have .deb as its file extension. Fortunately, the Debian project creates installations for virtually every open source package available for Linux. So you can get lots of additional software that isn't already on your SimplyMEPIS PC. Finding Debian Packages The best place to find Debian software packages is the Debian package repository at http://packages.debian.org. You can access thousands of applications free of charge from this Web site. Of course, this isn't the only place to find Debian software packages. Thanks to the popularity of the Debian distribution, developers from around the world release their open source packages in Debian format. To work the examples in this lesson, we'll need a sample Debian software package to install. So let's go out and find something to use. One of my favorite games has always been Tetris. So let's go get a simple Tetris game (in Debian package format, of course). Tint is a small, simple version of Tetris that you can download without too much trouble. You can find it in the Debian package repository, or you can get it directly from the creator of the application, Abraham van der Merwe. Let's do that for practice. Abraham's Web site is located at http://oasis.frogfoot.net. Once you're there, click the Code link to go to his list of software programs. From there, scroll down to about the middle of the page, and click tint to bring up the tint software package Web page. Tint link on Abraham's Web site At the bottom of the tint Web page is a download link, which takes you to another Web page. It contains links to all the different versions of tint. Click the link for the latest version, 0.03b. It takes you to a Web page where you'll see several links for downloading the tint package in different formats. Just by its name, you should recognize that tint_0.03b_i386.deb is a Debian software package. Go ahead and click this link to download it. Remember where you save the package because we'll use it later in this lesson (the default download location is your Desktop). 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 3 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... tint_0.03b_i386.deb link on Abraham's Web site The dpkg Program The Debian package management system uses a database to keep track of which Debian software packages you install, remove, or modify. You can query the database to determine the installation status of software packages. The dpkg program is a command line application that interfaces with the Debian package management system. We'll use Konsole to get to dpkg so we can peek into the SimplyMEPIS software system. Open a Konsole command line screen by clicking K Menu > System > Terminal Program (Konsole). At the command prompt, type dpkg --list | more (there are two dashes next to the list option). This option uses the package management system to list the Debian software packages installed on your SimplyMEPIS PC. 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... The output from dpkg --list Each line in the listing shows a separate software package entry in the database. The first three columns of the entry show status information about the package. The first column describes what the package management system thinks the status of the package should be (remember, the Debian package management system is just a database, so it's possible the actual status of the software may vary from what the database thinks). For installed packages, the status should be i for installed. The second column shows the actual status of the software package on the Linux system. Again, for most of the packages, the actual status is also i for installed. The combination of ii in the first two columns indicates that the package is installed on the system and that the package management system knows it's installed. This is the desired status for all installed packages. Removed packages will show a status of rc, indicating that the package was removed and the files aren't on the system. The third column shows if there are any detected errors in an installed software package's installation. After the three status indicators, dpkg shows the name of the software package, along with its version number and a short description of it. As you can see, this display gives you a quick rundown of the packages on your system. Another useful option available with the dpkg command is -L. It lists the files that a specific package installed on the system. Let's try this. Select a package from the list of installed openoffice.org packages you saw earlier (such as the writer package), and then type dpkg -L openoffice.org-writer | more. This lists the files included in the package. Listing files in the openoffice.org-writer package As you can see, a complex package like openoffice.org installs lots of files. Fortunately, the package management system keeps track of all the files installed for each application. If you remove an application, the system must remove all of its associated files. Now that you've seen how to list the software packages installed on your system, it's time to learn how to install and remove packages ourselves. Chapter 3 Installing and Removing Debian Packages 4 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 5 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... If you've installed SimplyMEPIS on a hard drive, you can also use the dpkg command to install and remove packages on your SimplyMEPIS system. (You can't install new packages if you're using the LiveCD.) Remember, though, that this only works for packages that use the Debian package management system (.deb files). Let's return to our sample .deb file we downloaded earlier and install it using dpkg. Installing Debian Packages First off, you must log in as the root user account. Since it's not a good idea to always log in as root, SimplyMEPIS provides a special Konsole session with root privileges. Click K Menu > System > Terminal Program (Konsole). This starts the standard Konsole program that you're already use to. Now, select Session > New Root Shell from the menu bar. Konsole opens a new tab, queries you for the root user password, and then opens a shell session as the root user. We'll use the -i dpkg option to install a new package. Using your command line skills, change to the directory where you downloaded the Tint package (hint: remember the cd command), and type the command dpkg -i tint_0.03b_i386.deb (or whatever version of Tint was available when you downloaded it). Installing the Tint package The dpkg program enters the new information into the installed packages database file and installs the files contained in the package. You can test to see if the package was installed by typing tint at the command prompt. Because Tint is a command line Tetris game, you must run it from a Konsole session. If you get stumped while trying to play Tint, here's a tip: Tint uses some odd keys to rotate the Tetris pieces (it's a long Unix story, but it uses j, k, and l). Now that the new package is installed, let's see if it shows up in the package management database. From the command line, type dpkg --list | more, and look for the Tint package. It should be there. You can get a listing of files included in the Tint package by using the -L option in dpkg. To do that, type dpkg -L tint at the command line. You can upgrade an already-installed package in the same way. You just use the normal install option for dpkg with the new .deb package file. The program will automatically remove the previous version and install the files for the newer one. Removing Debian Packages You also use the dpkg command to remove installed software packages altogether. This requires the -r option. Just list the name of the package you want to remove as the command line argument after the -r option. Let's try this by removing the sample tint package (don't worry, if you really liked the game, you can reinstall it later). 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 6 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... Open another Konsole screen in super user mode, and type dpkg -r tint. You'll see the status of the removal process, showing that you removed the software from the system. After the removal is complete, enter the dpkg command again, using the --list option. Notice that in the dpkg listing, the Tint entry still exists, but now it shows the package status as r for removed. The package management system keeps track of all packages that you install and remove. Be extremely careful when you remove packages. In fact, don't remove any packages that you didn't install yourself. The creators of SimplyMEPIS install some packages to support other packages. If you remove them, it could result in problems. If you aren't sure what you're doing, it's always safest to just leave things alone. The apt-get Program There is one drawback to the dpkg command—you must have the .deb package file on hand, either from the SimplyMEPIS CD or from a file downloaded from a Web site. If you want to install lots of applications, it can become tiring trying to find all of the .deb files yourself. But if you have an Internet connection on your Linux PC, there is an easier way to install multiple applications using Debian packages. The apt-get command line tool allows you to contact a package repository via the Internet, search for specific packages, and then automatically install them. All you need to know is the name of the packages you want to install. The apt-get program does the rest. By default, the creators of SimplyMEPIS configure apt-get to contact the MEPIS package repository. You won't see all of the packages that are available from the Debian package repository, but you will see packages that are compatible with the SimplyMEPIS distribution. The format of the apt-get command is simple: apt-get install (package name). The apt-get program contacts the package repository, looking for the package named on the command line. If it finds it, it automatically installs the package on your system. Since the apt-get program contacts the repository directly, you don't use file names in the command line, just the package name. The apt-get program determines the latest version available in the repository and installs it. You can even install multiple packages using one command line. Just separate the package names with a space. Remember earlier when I mentioned that some packages have a list of required packages that you must install first? The apt-get program automatically detects this and installs the required packages as well. Software installation doesn't get any easier than that! You can also use the apt-get program to remove packages. The format to do this is: apt-get remove (package name). This command removes all of the files associated with the package and marks the package as being removed in the package management system. Chapter 4 Graphical Package Management Programs The dpkg and apt-get programs are great utilities to help you manage installed software. But they can be a tad bit clunky. These days, old command line programs don't always cut it. Fortunately, there are a couple of graphical software packages that interface with the Debian package management system. They provide all of the installed software package information in a fancy graphical output. SimplyMEPIS includes two of them, and in this chapter we'll take a look at both. KPackage The KDE team designed the KPackage program as a generic package management system to be part of the KDE software suite. It interfaces with the Debian system (you can use it with several other package management systems, too) to provide an interface that's easy to work with. Start the KPackage program now by clicking K Menu > System > More Applications > Package Manager 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... (KPackage). The main KPackage window appears. The KPackage main window The KPackage window has two panels. The left panel contains four tabbed windows—one for all of the installed packages, one for the updated packages, one for new packages, and one for all of the packages listed in the database. The window showing all of the installed packages is open by default. Notice that KPackage places the packages into groups, such as packages that support the development environment or packages that contain games. The package listing also shows which version of a package is installed. The large green N icon next to the package name indicates a package that is not installed, but available in the repository. The smaller icon indicates a package that is already installed. Find a package and click its name in the left panel. The right panel now shows information about the package. The Properties tab provides all of the basic information, including the status of the package, a long description of it, and what other packages it depends on. 7 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 8 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... Viewing package information in KPackage Now click the File List tab. This shows the files included in the package and their installation status. A green check mark indicates the file is present on the system. A red X indicates that the file is missing. The third tab, Change Log, shows information regarding changes made in different versions of the application. Sometimes it's helpful to see what modifications have been made to a package—especially if you are having problems with it. Installing Packages Using KPackage The KPackage program also provides several easy ways to install new Debian software packages. You can: Click the package file name in Konqueror to start KPackage automatically Drag the file from a Konqueror window to the KPackage window In KPackage, click File > Open If you've installed SimplyMEPIS on your hard drive, you can try this out with our sample Tint package. From KPackage, click File > Open, and select the tint .deb package you downloaded earlier. The Install Package window appears. 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 9 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... Install new package Click the Install button to start the installation. A window appears asking for the root password (remember, only the root user can install new software packages). After you enter the correct password, the right window shows the status of the installation. When the installation is complete, click the Done button. The Tint package should now appear in the list of installed packages, and, as before, you can enter the tint command from a command shell screen to play the game. Now let's use KPackage to uninstall Tint. To uninstall the package, first select it from the package listing. When the package name is highlighted, click Packages > Uninstall from the top menu bar. An uninstall window appears. Click the Uninstall button to start the removal process. When the package is removed, click the Done button. KPackage is the default package installed for Konqueror. When you click on a package icon in Konqueror, KPackage automatically starts and is ready to install the package. Synaptic The other package management program installed in SimplyMEPIS is Synaptic. It's an advanced software management package that's great if you have an Internet connection on your Linux PC. The Synaptic program is a graphical front end to the apt-get program. It uses apt-get to contact the remote MEPIS package repository automatically. Then it compares all of the packages installed on your system to the current entries in the repository. It marks any packages that have upgrades available and allows you to automatically upgrade them in background mode. SimplyMEPIS runs the Synaptic program continually as a background process. If you have an Internet connection on your SimplyMEPIS PC, Synaptic automatically connects to the SimplyMEPIS repositories and checks the upgrade status of all your installed packages. The Synaptic icon on the Panel (the yellow opened box) indicates how many installed packages have upgrades available in the repositories. To install the upgrades (or any other package from the repository, just click the Synaptic icon on the Pane. The program prompts you for the root user password, and then the main Synaptic window appears. 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 10 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... The Synaptic main window When Synaptic starts, it attempts to contact the MEPIS package repository. Once it connects, it downloads information about the packages that are available for download. The Synaptic main window has entries for different categories of packages (such as all, installed, and installed (upgradeable)). The installed Synaptic window lists all of the packages on your system. It shows the basic information about your package version and the version available in the package repository. The installed (upgradeable) Synaptic window shows only the packages that have upgrades available in the repository. This way, you can easily see when an updated version of a package is available. Select a package from one of the package lists, right-click it, and select the Properties menu item. A new dialog box appears, showing information about the package. 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... Package properties in the Synaptic window By default, the Synaptic automatic tool synchronizes specifically with the SimplyMEPIS repositories. This means that all of the packages have been approved to work with SimplyMEPIS. Be careful though with this feature. If you synchronize Synaptic with another Debian repository, you may download a package upgrade that is incompatible with your SimplyMEPIS PC. That said, Synaptic is a great tool for seeing what upgrades are available for most application software that is not system-related. Chapter 5 Summary You are not limited to using the software that came installed on your SimplyMEPIS system. There is a wealth of free software packages you can download and install. SimplyMEPIS uses the Debian package management system. It bundles application files into a single distribution file that can be downloaded from a Web site. The Debian distribution maintains a package repository where you can download package files for thousands of free applications. Your SimplyMEPIS PC maintains an internal package management system that keeps track of what packages you install or remove. You can use the dpkg command line tool to query it. You can also use the dpkg program to install or remove packages. The apt-get command line tool can communicate directly with a package repository to download and install packages automatically. If command line tools are not your thing, you can use the KPackage program. It will graphically query the package management system and add new packages. The KPackage program interfaces with Konqueror to easily install .deb package files. Finally, we discussed the Synaptic program. This graphical program uses the apt-get utility to query a remote package repository, check the latest versions of packages, and automatically install newer ones. There's just one more topic to cover in our Linux journey. Now that you've got your system set up just right, it's time to learn how to manage it! So in our last lesson, we'll explore Linux system administration. Supplementary Material The Debian Package Repository http://packages.debian.org The Debian Package Repository contains thousands of software packages created for installation on a Debian-based system. Synaptic Package Manager Home Page http://www.nongnu.org/synaptic/ This site gives complete information on how to use the Synaptic package manager to keep installed packages up-to-date. FAQs Q: Can I install a new Linux system kernel using KPackage or Synaptic? 11 of 12 7/1/2012 11:43 AM Introduction to Linux: Lesson 11 12 of 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=11&classr... A: Yes, but I wouldn't recommend it. Installing system components one by one is a very dangerous thing to do in Linux (and in other operating systems as well). The whole point of choosing a Linux distribution is that all of the system components are already matched and installed for you. Why mess with something that already works? If you want to upgrade your system, download a new distribution. Don't try to upgrade using KPackage or Synaptic. Q: Can I install just part of an installation package? A: No. The dpkg utility will only install the entire application package. There are other utilities that can extract files from an installation package, but I wouldn't recommend that novice Linux users mess with these. Installing just parts of a package can quickly result in a broken Linux system. Assignment For today's assignment, we'll install a new software package on our SimplyMEPIS system. If you're running SimplyMEPIS from the LiveCD you won't be able to install the package, but you can still follow along. First, we must find a new package to install. One of my favorite Linux games is Frozen Bubble, a lighthearted game in which a poor penguin shoots frozen bubbles that stick to a ceiling. He (you) must connect three frozen bubbles of the same color to remove them from the ceiling. And, of course, the ceiling is slowly getting lower. So you have to pop all of the bubbles before the poor penguin gets squished. The Frozen Bubble game is part of the standard Debian software repository that's accessible from the software installation packages we discussed in this lesson. You can install it using any of the methods we talked about. First, pick the software package system you are most comfortable with (KPackage, Synaptic, or even apt-get). After choosing your installation method, determine if Frozen Bubble is already installed on your system. Next, attempt to download the necessary packages for Frozen Bubble either manually or automatically, using a package management system we discussed (be careful, as the Frozen Bubble application has a few dependencies). Were you successful in getting all of the pieces? If you downloaded Frozen Bubble manually, use the package management system of your choice to install it. If you choose to install the package using the Synaptic program, you can utilize the Search button to look for the word frozen. You'll see that a few different packages appear with that word. Right-click the frozen package entry, and select Mark for installation. Next, select the Apply button to start the installation. Synaptic automatically detects the required dependent packages, and asks you if it can install them. Just click the OK button, and the installation begins! Once it's installed, open a Konsole window and start the application. Did things start okay? If not, check to see if the application installed successfully. Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:43 AM Introduction to Linux: Lesson 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... Introduction to Linux: Lesson 12 (printer-friendly version) Your Instructor: Richard Blum INSTRUCTIONS: To print this page, wait for the page to fully load. Once the document is ready to print, simply click your browser's File menu and choose Print . To save this page, click your browser's File menu and choose Save As. Select a disk drive and folder to receive the file, and change the name of the file to less12.htm. To view the file while you are offline, just go to the drive and folder you selected when you saved the file and double-click the file named less12.htm. Your browser will start and you will have access to the file. Chapter 1 Introduction Okay, so now you've got your SimplyMEPIS PC running exactly the way you want it, with just the right combination of software packages installed. You're writing documents, creating fancy graphics, listening to music CDs, and even playing games. But don't sit back and relax just yet; there's still something left to do. Unfortunately, things can (and often do) go wrong with computer systems. While Linux has a reputation for being a stable operating system, things can still go awry. So it's a good idea to learn how to deal with your Linux PC when something doesn't go quite the way you planned. That's what this lesson is all about. System administration is the art of keeping your system running properly and planning for when things do go wrong. Today we'll cover three areas of system administration that are important for keeping your Linux experience friendly—data backups, monitoring processes, and monitoring system log files. First off, we'll discuss how to keep backup copies of all your important work using SimplyMEPIS's Ark application. It helps you easily archive documents and folders. Next, we'll explore a way to see how things are running on your SimplyMEPIS system—watching everything from application programs to the CPU and memory utilization. Finally, we'll take a look at the SimplyMEPIS system log files. There's a wealth of information tucked away in them. Knowing what to look for (and where to look) can often make solving system problems easier. Let's get started talking about backups. Chapter 2 Archiving Data From system administrators to home users, disk problems are the bane of those who work with computers. There's nothing worse than turning on your PC and getting a disk not found error. Months and even years of work can be lost in an instant. It's common knowledge that backing up the data on your computer is a good thing. In the past, the problem was finding an easy way to do it. In the old days, you often had to purchase an expensive tape drive and spend hours copying data onto a slow tape that you might never use. Fortunately, modern technology has made backing up data much faster and easier. With the popularity of inexpensive USB memory sticks, backing up data is now as easy as plugging in a stick and copying files. Once you have your files copied, you just put the stick away in a safe place. The only tricky part to this procedure is making sure you've copied all of your data. 1 of 15 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 2 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... This is where the Linux Ark and Keep applications come in handy. We'll take a look at both of these applications, and see how each of them can fit into your system backup toolkit. The Ark Program Ark is an archive program that uses file compression techniques to bundle files and folders into a single compressed file. If you're familiar with the popular Windows Zip application, you should feel right at home with Ark. Similar to Zip, Ark has the ability to combine multiple folders (and their contents) into a single file and then compress the file to save space. This is perfect for taking quick snapshots of your data to copy to a removable media disk. All you need to do is create an archive file of all your data folders, and then copy that single file to a memory stick for safekeeping. There is another benefit of the Ark program. It can create standard Unix compressed archive files, which are portable to any other Unix system. This means you can copy your archive file to any other Unix system and extract the original files and folders. The standard Unix archive file format is called tar, which is short for tape archive. A tar file uses a special format that combines entire folders of files into a single file. Then you can copy the tar file to another storage medium, such as a CDROM or a USB memory stick. But there's a downside to the fact that a tar archive file just concatenates the files and folders into a single file. (Remember that fancy word from Lesson 10? It means that the tar utility copies files and folders in their entirety into the tar archive file.) This can make for an archive file that's quite large. To solve this problem, most Linux systems compress the tar archive file. As with everything else in Linux, there are lots of different compression programs available that Ark can use. By far the most popular is the GNU Zip application (not related to the Windows Zip program). Ark uses the GNU Zip application (called gzip for short) to compress the tar archive file, creating a gzipped version of it. You can identify archive file types by their file extensions. Tarred archive files have a .tar extension. If the tar archive file is compressed using gzip, it gets an additional extension .tar.gz. This extension indicates that the archive file is compressed. Some applications shorten this to a single extension of just .tgz, so you may see either version. Using Ark Start Ark now by clicking K Menu > Utilities > File > Archiving Tool (Ark). Ark starts with a blank window. The main Ark window Click the New button on the toolbar (the far left icon), or click File > New to create a new archive file. The Create New Archive window appears. Select the location for your archive file (click the Storage Media icon to place it directly on a USB memory stick if you've already inserted one), and type in a name for the archive file. Notice that you can select the type of archive file to create using the Filter drop-down box. The default is a gzipped tar 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 3 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... archive, which is the most commonly used in Linux. Select this archive file type, and click Save. The main window reappears, showing the new archive file name in the title bar. The window is used to show the contents of the new file (which for now is empty). Now you can add files and folders to the archive file. The third icon in the toolbar, Add File, allows you to select individual files to add to the archive file. The fourth icon in the toolbar, Add Folder, allows you to select entire folders of files and subfolders to add to the archive file. When you click either of these buttons, a new dialog box appears, allowing you to browse to the file or folder to add to the archive. Click the Add Folder icon, select the Documents folder in your home directory, and then click OK. The main Ark window reappears, showing the files and folders that you added to the archive file. Files and folders added to the archive file The Ark window shows all the details of the files in the archive, including the file owner, file size, and the time you created the file. You can add more files or folders to the archive by clicking the appropriate toolbar icon. When you are finished adding files, quit Ark by clicking File > Quit. Using the Archive File Once you create the archive file with all of your important data, you can copy or move it anywhere you want, just like a regular file. Just open Konqueror, find your archive file, and copy it. Using an archive file in Konqueror 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 4 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... Konqueror shows the archive file as a special icon—a page with a yellow box on it. This shows that the file is a gzipped tar archive file. Right-click the archive file icon. The Konqueror menu appears, showing the options available for that file. As with any other file, you can cut, copy, or rename the file. If you want to save the archive file, copy it to your USB memory stick. Now if your hard drive goes belly up, you at least have all of your hard work safely stored away. An additional benefit of SimplyMEPIS is that you can boot your PC using the SimplyMEPIS live CD and then access your data directly from your memory stick, even with a broken hard drive! Notice that on the Konqueror menu for the archive file there are a few other options you can choose. You can open the archive file with Ark directly from Konqueror. You can also extract the contents of the archive file, either to another location or to the current one. A great feature of Konqeuror is that you can just left-click the archive file, and it will automatically open in the Konqueror window. Go ahead and try that now. You should see your folders just as you placed them in your archive file. You can access the files and folders directly within the archive file using Konqueror without having to extract them. This is a great feature if you need to recover just a single file from an archive. The Keep Program The Keep program allows you to schedule regular backups of important folders to an alternative location. If you accidentally delete a file or folder, you can restore them from a previous backup. Start the Keep program by clicking K Menu > System > Backup System (Keep). The main Keep window appears. The main Keep window The Keep window is actually a graphical interface for the rdiff-backup command line program. This program runs continually as a background process, scheduling backup jobs automatically. The main Keep window contains six icons so you can easily control and monitor the scheduled backup jobs. To create a new scheduled backup, click the Add directory to backup icon. A simple wizard starts, walking you through the process of scheduling a new backup. First, you must select the folder to backup. Most often this will be your home folder, where you should be keeping your important files. Next, you must select a destination folder for Keep to store the backup copy. This location can be on a removable media, but remember that the removable media must be installed when the Keep program runs automatically. It's usually easier to create another folder somewhere else on the system for the backup copy. Your userid must have permission to write to the folder, so be careful. After you select the destination folder, the next step is to enter how often you want Keep to backup your files. The 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 5 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... default is once every three days. When you finish entering the wizard information, rdiff-backup will automatically run your folder backup for you, or you can select the Backup now icon to start your backup immediately. Of course, backing-up your data is no good if you can't bring it back. The Keep main window includes the Restore a backup icon for just that purpose. Click this button to start another simple wizard which guides you through selecting the backup to restore. Note: Be careful when restoring a backup. Keep returns the folder to the state at the time the backup. Any new files you entered since the backup will be removed. If you want to recover individual files, but keep newer ones, restore the backup to an alternative location, then copy those files to your original folder. Chapter 3 Monitoring the Linux PC If you recall from Lesson 10, we used the ps command line utility to watch what processes were running on the Linux system. There were lots of things running, any one of which can cause problems. The key is knowing what to look for in these processes. The KSysGuard application offers a graphical interface for watching system statistics and processes. It allows you to monitor running processes in a graphical chart (which is much nicer than the ps command line utility) and to graph system statistics, such as CPU and memory utilization. This provides a wealth of information that can help you manage your system. Let's start KSysGuard and see what it looks like. Click K Menu > System > More Applications > Performance Monitor (KSysGuard). The main window appears, containing two tabbed windows. One window shows various system statistics, while the other shows the running processes. 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... The KSysGuard Process Table window Click the Process Table tab. This window shows the list of processes running on your system, similar to what you saw with the ps command. KSysGuard shows the processes along with their process information. This format is described in the following table. KSysGuard Fields Table field Description Name The process name. PID The process ID value. User% The percent of user CPU time the process is using. System% The percent of system CPU time the process is using. Nice The scheduling priority of the process. VMSize The amount of virtual memory space the process is using. VMRss The amount of physical memory the process is using. Login The user ID the process is running under. Command The command used to start the process. You can sort the list based on any of the table fields by clicking the field name. This is an excellent tool for seeing what processes are using up your system resources. Click the System% heading to sort the running processes based on CPU utilization. If you have a process using all of the system resources, you can easily identify it. There are three items at the bottom of the process table. Click the tree check box. This sorts the processes based on what process they belong to. Often one process will start another process in the background, becoming the parent of the process. This feature allows you to see which processes start what other processes. The Refresh button immediately refreshes the table information. By default, KSysGuard updates the table information every two seconds. The last item is the Kill button. This can be a handy tool, but it can also cause huge problems. The kill button does just what it says, it kills (or stops) the highlighted process in the table. If you have a runaway process, you can highlight it, and then press the kill button to attempt to stop it. Of course, killing the wrong process can lead to lots of problems, so be careful with this feature. Also, if you log in with a normal user account, you can only kill the processes that belong to you. You won't be able to kill any of the system processes running under the root account. At the top of the process window you'll see a search box (that allows you to search for a particular process) and a dropdown box. The dropdown box allows you to filter what processes KSysGuard shows in the table. You can view all of the processes (the default), just the system processes, just the processes for a particular user, or only your processes. Using System Sensors The other tab in the KSysGuard main window is the System Load display. Click this tab, and you should see four displays showing system statistics. 6 of 15 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 7 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... The KSysGuard System Load window The System Load window shows charts for current CPU load, the one-minute average of CPU load, the physical memory used, and the swap memory used. These values are the basic information you need to monitor your system's health. These statistics are called system sensors. There are lots of system sensors you can monitor using KSysGuard. The left panel of the window shows the sensor browser. This tool allows you to select which sensors to monitor. To monitor other system sensors, you must create a new window tab. Let's set up a few new sensors to watch. Click the New button on the toolbar (or select File > New from the menu). A Worksheet Properties dialog box appears. Select a title for your new window tab. You can have multiple rows and columns of sensors. The System Load window used two rows of two columns to display four sensors. Let's do the same for ours. Next, select the update interval to take the statistics. For now we'll just use the default value of two seconds. When you're done, click OK. Your new sensor window tab should appear, with four blank sensors. We'll use the sensor browser to select sensors to place here. Expand the localhost value in the sensor browser. You'll see the different categories of sensors we can choose from. 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... Adding new sensors You can monitor CPU, disk, memory, and network statistics on your system. Expand each category name to see the individual sensors contained in that category. When you see a category you'd like to monitor, click it, and drag it into an empty sensor window. When you release the sensor in the window, a menu appears, asking you to select what type of sensor display you want to show. There are four types of sensor displays. The signal plotter display shows a running graph of the sensor values (similar to the ones we saw in the System Load window). This shows both the current and past values of the sensor, allowing you to watch for trends in the information. The multimeter display shows a digital readout of the sensor value. This just tells you the current value of the sensor, which doesn't help if you are looking for trends. But you can set an upper and lower limit to the display. If the sensor value is outside of these values, the display changes color to indicate an alarm condition. This is a quick way to see if something is wrong with your system. The third type of sensor display is the bargraph. The bargraph shows the sensor value as a bar that increases or decreases in size relative to the value of the sensor. Similar to the multimeter display, this display only shows the current value of the sensor but does provide for an easy way to quickly see the value. The fourth type of sensor display is somewhat different. The SensorLogger display doesn't show the sensor value in the display window. Instead, it logs the values of the sensor to a file. This is extremely useful when you are troubleshooting intermittent system load problems. Even when using the signal plotter display, historical data is quickly lost from the display screen. But the SensorLogger display permanently logs the information in a log file you can examine at any time. Let's set up a SensorLogger to watch the CPU load on the system. If you haven't already created a new blank worksheet, go ahead and do that using the New button. Expand the sensor browser, and then expand the CPU load sensor. From the list of sensors, click the Load Average (1 min) entry, and drag it to an empty display. When the Select Display Type menu appears, select SensorLogger. The Sensor Logger dialog box appears. The KSysGuard SensorLogger dialog box In the File text box, enter the name you want to call your log file. You can click the Browse button to select the location where you want to put it. Next, set the interval that the system updates the log file. Since we've selected the one minute CPU load average, set the Timer Interval to 60 seconds. You can also set minimum and maximum alarm values, but we won't mess with that for now. Click the OK button to 8 of 15 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 9 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... enable the new settings. Notice that KSysGuard places the SensorLogger values in the display window. However, by default KSysGuard doesn't enable the logger (note the red X in the display window). To start the logger, right-click on top of the red X, and select Start Logging. The red X turns into a green checkmark, and the logging starts. After a few minutes, use the Kate text editor to look at your newly created log file. Click K Menu > Office > Editors > Advanced Text Editor (Kate) to start the editor. When the main window appears, click the Open file button, and browse to the location of your log file. Entries in the log file The log file entries show the date and time of the entry, along with the sensor value for that sample. Note that if you keep the file open during an update period, the Kate editor will detect that the system updated the file and ask you if you want to reload the new version of it. After you have created your worksheet to monitor the system values you're interested in, don't forget to save the worksheet so you can use it again. It's also important to know that the logger will only run while the KSysGuard program is running. Once you stop the program, the logger will stop taking data samples. Chapter 4 Examining System Log Files You just saw how handy it is to use log files to monitor system data. The Linux system also writes entries into special log files, called system log files, to mark system errors and important system events. Novice users often overlook the log files. You can often peruse them to see what's going wrong with your system. As with most things Linux, there are lots of different ways for you to configure how the system logs system events. The syslogd program runs in the background, controlling the system logging functions. It determines where to log system events based on the settings in a configuration file. The syslogd configuration file is /etc/syslog.conf. This is a standard text file that you can edit to change the settings for the system logger (although you must be the root user to do that). You can view the default syslogd configuration for your SimplyMEPIS system by looking at the /etc/syslog.conf file. Use the Konqueror program to find the etc folder, and then click the syslog.conf file. Konqueror uses the KWrite application 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... to open the file. The SimplyMEPIS syslog.conf file To spare you from having to wade through one huge system log file, the syslog.conf configuration file allows you to send different types of system event messages to different log files. The SimplyMEPIS creators have configured syslogd to split up many of the different event messages into several different log files. Log Files Event Log file location authentication events /var/log/auth.log daemon process events /var/log/daemon.log kernel events /var/log/kern.log printer events /var/log/lpr.log mail events /var/log/mail.log user events /var/log/user.log You may see a common thread in the log file locations. In SimplyMEPIS, all of the system log files are kept in the /var/log folder. Let's go to that folder and take a look at what's there. Use Konqueror to open the /var/log folder. You should see all of the files defined in the syslog.conf file there. 10 of 15 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... The SimplyMEPIS /var/log folder Instead of having to manually dig through each of the log files, SimplyMEPIS includes a handy tool that allows us to do precisely that. The KSystemLog program provides one-stop-shopping for all of your log file viewing needs. Start KSystemLog by clicking K Menu > System > System Logs Viewer (KSystemLog). The KSystemLog window By default KSystemLog shows the system log file (which is located in /var/log/messages). This log file contains all of the boot-up messages, plus any important system messages that occur while the system is running. Click the Log menu item from the menu bar to view all of the logs you can view. As you can see, there are lots of choices to choose from. 11 of 15 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... The KSystemLog log choices Select the log you are interested in observing, and it appears in the viewing window. Chapter 5 Summary Today we walked into the world of the system administrator. Even users of simple home systems need to do some administration work to keep things running smoothly. We looked at three of the most important parts of system administration—backups, controlling processes, and viewing system log files. Backups are the single most important job of a system administrator. Depending on your situation, it is often crucial to be able to recover data from a crashed system. Fortunately, SimplyMEPIS allows you to easily back up the data that's on your system using the Ark and Keep programs. The Ark program can create compressed archive files of your data. You can copy these files to a removable storage device, such as a USB memory stick. The Keep program allows you to keep archived copies of files and folders in an alternative location, then easily restore them if you need to. The second most important part of system administration is monitoring system health. The KSysGuard application provides a simple graphical interface for monitoring system activity. It enables you to watch the running processes and see which ones are using the most system resources. You can also use KSysGuard to chart your system's CPU and memory utilization. Finally, we discussed viewing system log files. The SimplyMEPIS system creates multiple log files in the /var/log folder to log system activity. It's important to know where these log files are and how to view the information contained in them. The KSystemLog program is a great tool to have for viewing log files. You can easily peruse through all of the log files from this one interface. The default system log file in KSystemLog contains important information that shows the system's boot process. Knowing what (if any) errors occurred during the boot up process can save you lots of troubleshooting headaches. You've come a long way since Lesson 1! We've talked about the different types of Linux systems and we've walked through the various parts of SimplyMEPIS. You've seen how to create users, set up printers, and monitor your system. You've also learned how to use all of the great applications contained in your SimplyMEPIS system as well as how to add new applications if you need to. I hope you've enjoyed this course and have gotten comfortable in a Linux environment. Remember, the Linux system is always changing, and new applications are always being released. Luckily, you now know enough to be able to figure out new Linux programs and features. You should have fun playing with them as they come along. It has been a pleasure teaching you. Good luck in your Linux experience! 12 of 15 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... Final Steps You still have a quiz and an assignment for this last lesson, so before diving into the final exam for the course, please allow some time to do those first. Also, if you haven't already checked out the book recommendations under the resources link, I would encourage you to do that as well. One of the exciting things about getting to know Linux is that there is always something more to learn! When you feel you're ready to take the final exam, click the completion link at the top or bottom of any page in this classroom. The exam is open-book, so feel free to print your notes or have the classroom open in another window for easy reference. Please take your time, because you get only one chance at the final. When you finish, be sure to print your completion letter. Last, I would appreciate it very much if you would take some time to evaluate this course. I pay close attention to my students' feedback; your input helps me tremendously as I continually fine-tune and improve this course material. So if you have any suggestions, comments, or concerns, please include those in your evaluation. If you'd like a response, please also post your comments or questions in the Discussion Area for this lesson. Other Courses If you enjoyed this course, here are a few other ed2go online courses you might be interested in: Other Online Courses If you enjoyed this course, here are a few other ed2go online courses you might be interested in: Introduction to Windows XP Whether you're new to Windows or an experienced PC aficionado, there's a lot to learn about Windows XP. This course covers all the basic skills and concepts needed to use a computer. It will teach you how to work with text, pictures, photos, sound, music, DVD, Interactive TV, and video; create shortcuts, customize the interface, take full advantage of the Internet, and even build your own local area network (LAN). Introduction to PC Security What you don't know about PC security really can hurt you! Learn why you're at risk and what you can do to protect your precious personal and business data from the outside world. This course, taught by a security expert, will quickly bring you up to speed on the fundamentals of PC and network security. You'll learn 13 of 15 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... the nature of the threats you face, how to assess your vulnerability, how to identify the weak links in your system, and how you can implement simple solutions to minimize your risks. Introduction to Networking Businesses, schools, and other organizations are becoming increasingly reliant on computer networks, which explains why workers with networking skills are in high demand. If you'd like to learn the fundamentals of computer networking in terms you can easily understand, this course is for you. Learn why networks have become so important, how software and hardware make networking possible, and how networks function. This course will give you the foundation you need to begin training for CCNA Certification or employment in a computer networking career. Supplementary Material The Linux System Administrator's Guide http://www.tldp.org/LDP/sag/html/index.html The Linux System Administrator's Guide is an open source document attempting to create a common guide for all Linux system administrators. This is an excellent source of information regarding advanced Linux system administration concepts. Debian GNU/Linux System Administration Resources http://www.debian-administration.org/ Remember, SimplyMEPIS uses the Debian distribution. This is the Debian system administration guide, providing additional resources to help you administer your Debian Linux system. FAQs Q: When I restore files from an archived tar file, do the file permissions stay the same? A: The tar application copies the numerical user and group IDs of files in the archive, along with user and group permissions. When you restore the files onto a system, the tar application assigns the same permissions to the same numerical user and group IDs. But the user and group names that the system associates with the files depend on the users and groups configured on the system. So if you restore the files onto the same system it was on before, the user and group IDs already exist on the system, and the user and group names will stay the same. But if you restore a tar archive file onto another system that has different numerical user and group IDs, the restored file user and group ID numbers stay the same but may be assigned to different user or group names. This can sometimes get complicated. Q: How can I kill a system process if KSysGuard won't let me? A: You can do this from the command line. Start a Konsole Super User mode session. Obtain the PID of the running 14 of 15 7/1/2012 11:55 AM Introduction to Linux: Lesson 12 15 of 15 https://www.ed2go.com/Classroom/PrintLesson.aspx?lesson=12&classr... process, using the ps command line utility (with the -axle option). When you know the PID of the process you want to kill, use the kill command line utility along with the PID of the process to stop the system process. Remember to be extremely careful when killing processes as the root user. Assignment Today we'll take a look at how various applications affect our Linux system. Start the KSysGuard application, and create a new worksheet. On the new worksheet, set up some system sensors to monitor the CPU and memory statistics. Especially watch the one-minute CPU load and a couple of the memory values (such as physical memory usage). Once you have your system sensors in place, try using a few different applications and see how they affect your system performance. Open a word processing document using OpenOffice.org, or start playing one of your favorite games on the system. How does this affect the CPU load? How does the memory usage change when you start a new application? Now set up a SensorLogger value to watch the one-minute CPU utilization and memory usage sensors. Open and use a few different applications that you would typically use through the course of a normal day. Remember to keep the KSysGuard application running during the monitoring process. Stop the SensorLogger, and store the log file away somewhere for later reference. Knowing how your system reacts while it's behaving normally can help you recognize problems when it misbehaves. If you have problems later on, you can perform another SensorLogger trace and then compare those values to the values you took during normal operations. Copyright © 1997 - 2012 Education To Go. All rights reserved. The material on this site cannot be reproduced or redistributed unless you have obtained prior written permission from Education To Go. Education To Go and ed2go are registered trademarks of Education To Go, a part of Cengage Learning. 7/1/2012 11:55 AM