When you have finished using the computer, it is a good idea to secure it in some way to prevent other people from accessing your files and deleting or changing them. Many organizations require that users logoff or lock the desktop to ensure that unauthorized personnel are not able to steal or damage sensitive documents and plans.
Whether your organization requires logoff, lockup or has no security policy at all – as all too many do not – you should get in the habit of securing your computer. You should lock the desktop if you want programs you have running to continue to run. If you have no programs running that you care to keep running, you can logoff.
To Power Off or Not – A Philosophical Discussion
If you choose to logoff your computer and there are no programs running, you may also choose to power off the computer. There is a long-running philosophical discussion about whether to leave a computer powered on or whether to turn it off. There are no absolutes; what is right for you is what is correct regardless of what others may think. I will give you my thoughts and recommendations and you can choose for yourself.
Obviously if you have any programs running that need to continue to run, you will logoff or lock up and leave the power on. If your computer is a server, like a web server or email server, those programs must continue to run so you would logout or lock up the desktop but leave the computer running. These types of server programs – called daemons – run in the background so you can log out and they will continue to run.
If you have a user level program like a spreadsheet you do not want to close down, or some long-running program that does huge calculations, you will lock up your desktop and leave the power on. Of course you should be sure to save your work before you lockup or logoff just in case there is a power failure, just to be safe.
The controversy arises when I have logged out and I have no programs running. The question becomes, “is it better to power off the computer or leave it on?”
Obviously powering off the computer saves energy. It saves energy directly because the computer is no longer consuming power. It also saves energy indirectly because the heat put out by a computer that is turned on places additional load on the air-conditioning of the room in which the computer is located. Of course the additional heat would be welcome in the winter, but a running computer is a very inefficient way to heat a room. Turning a computer off also reduces pollution because the power plant burns less fuel. Certainly saving energy is a good thing and I know I do not need to enter into a discussion of the value of saving energy.
Another factor is that the heat generated by the computer can damage its own internal electronic components. However, powering on and off frequently during the day is not good for the computer either. The surge of current that accompanies turning on the computer can, over a period of time, damage the internal electronic components. Repeated heating and cooling cycles can also damage the computer’s internal electronic components.
Have you ever noticed that light bulbs seem to burn out most frequently at the instant when they are turned on? Or that electronic components like stereo systems worked fine before but don’t when you turn them on? This is due to the current surge that occurs when any electronic device is turned on. After many power on cycles the cumulative damage becomes so great that one more power-on current surge damages the component to the point of failure and the device no longer functions.
Many Linux computers, Red Hat Enterprise Linux and Fedora Linux specifically, are configured to perform internal maintenance, and install updates and patches in the wee hours of the morning. This can be changed, but performing those necessary updates during the day can slow down the computer for other operations just when you need it most, and the updates can take significant Internet bandwidth; it is generally much better to perform these tasks at night when no one is using the computer.
If you are a frequent user of the computer I recommend that you leave it powered on all of the time. This produces the least amount of stress on the computer itself and will extend the life of the computer and its components. Leaving the computer on all the time allows the Linux computer to perform its required maintenance and install updates at night while no one is (usually) using the computer.
If you choose not leave the computer on all of the time, leave it on at least from the time you turn it on in the morning until you stop work at night. This will limit the power cycles to one per day.
You might also choose to leave the computer on but turn off the monitor. In fact, the monitor is the component that consumes the most power of any part of the computer unless you have a flat panel LCD monitor which consumes very little power compared to the CRT types.
Adding The Lock/Logout Button to KDE Panel
The Lock/Logout button is used to lock your desktop or to logout of the computer in some of the following sections. There are a couple ways to access the Lock/Logout button discussed in some of the following sections. One way is to access it from the KDE Panel, and another is to right click on your desktop.
Locate the KDE Panel at the bottom of the display. It probably looks like or similar to the one in Figure 1 but without the Lock/Logout button on the far right end. The other is to right click on the desktop which will pop up a menu that also contains these two icons.
Figure 2: The Lock/Logout Buttons.
If your KDE Panel does not contain the Lock/Logout buttons, you can add them in one of two ways depending upon whether you have KDE 3.5 or KDE 4.x.
In KDE 3.5, add the Lock/Logout buttons by right clicking on an empty portion of the Panel and selecting Add Applet to Panel. This will launch a window from which you can choose several applets to be installed on the KDE Panel. Click on the Lock/Logout applet and then click on the Add to Panel button at the bottom of the window.
If you are using KDE 4.x, you can click on the “footprint” like icon on the very far right of the Panel. This icon is normally colored similarly to the background color of your desktop but changes to a gold color when the mouse pointer passes over it. Click on this icon to display the main KDE 4 Panel configuration menu which is the horizontal black bar with the slider bar and the sub-menu options, Screen Edge, Height, Add Widgets, Lock Widgets and More Settings.
It is easy to add widgets to the Panel. Just click on the Add Widgets sub-menu and the Add Widgets widget is displayed. Scroll down th list of widgets and choose the Lock/Logout widget to add by clicking on it. After selecting the widgets you want to add — you can select multiple ones — press the Add Widget button at the bottom of the widget.
The new widgets or widgets, in this case the Lock/Logout widget, appears on the panel. You can then use the Panel Configuration menu to move the widgets to a more optimal location for your needs or taste.
For details on adding widgets and configuring the KDE Panel in KDE 4, see Configuring the KDE 4 Panel.
Logging Off the Computer
Note: The KDE panel may look different from those shown here either because you or your system administrator has already customized it or because the distribution of Linux you are using has a different set of icons. The Panel illustrations shown in this book are for the Fedora Core KDE Panel ranging from Fedora Core 4 on up through the most current version of Fedora 14. These illustrations also use several different icon sets.
This procedure logs you off but does not shut down or power off the computer. If you are running programs they will be terminated automatically by the logoff process.
- On the panel at the bottom of the screen, locate the Lock/Logout button and click on the bottom (Door) icon once.
- When the End KDE Session window appears, click on Logout.
- The Graphical Login screen is displayed when the logout is complete.
Locking the Desktop
This procedure locks the desktop so that others cannot use your computer. It does leave all currently running programs running.
- On the Task Bar at the bottom of the screen, locate the Lock/Logout button and click on the top (Lock) icon once.
- If you have set a particular screen saver, it will display whatever you have chosen.
Unlocking the Desktop
This procedure unlocks the desktop so that you can resume work.
- If the desktop is blank, press a key like the Shift key or move the mouse a little to wake up the desktop and display the Enter Pasword window.
- Type your password.
- Press the Enter key when you have completed typing your password and you should be returned to your desktop.
Shut Down Linux
This procedure is used to shut down Linux preparatory to powering it off.
- Use the Logging off the Computer procedure above to logout.
- Locate the Shutdown button on the login window.
- Click the Shutdown button. A small window that asks Shutdown or Reboot appears. By default Shutdown is selected. Do not change this, or if Reboot is selected for some reason, select Shutdown by clicking on the radio button next to the word Shutdown.
- Click on the OK button.
- When the message Power down. appears at the bottom of the screen, it is safe to turn of the computer. Most recent computers turn off their own power automatically as the last step in the shutdown process, so it is not necessary for you to actually touch the power button. If the screen goes blank, you do not have to turn off the computer, it has already turned itself off.
Reboot the Computer
This procedure is used to reboot the computer without powering it off. Unlike computers that use Windows as their operating system, it is seldom necessary to reboot a Linux computer. It is almost never necessary to reboot a Linux computer even after installing new software, so you should not need to do this very often.
- Use the procedure above to logout.
- Locate the Shutdown button on the login window.
- Click the Shutdown button. A small window that asks Shutdown or Reboot appears. By default Shutdown is selected. Select Reboot by clicking on the radio button next to the word Reboot .
- Click on the OK button.
- If the computer does not reboot by itself after two or three minutes, press the reset button on the front of the computer box.
An Alternative Method to Reboot , Power Off, or Shut Down
This procedure also works very well, especially if you are a user of the command line shell. If you do not use the shell, you can safely ignore this method.
- Open a shell (aka Terminal) prompt. To do this, click the shell icon on the panel. The KDE shell (Terminal) icon looks like this Figure 3. You can also right click on any empty space on the desktop and the context menu for most recent releases of Fedora have the Konsole as an option. Konsole is a KDE terminal shell program. A shell is simply a program that lets you enter commands and interact with Linux using a command line interface (CLI).
- If the Terminal icon is not located on your KDE Panel, you can access the Terminal using the KDE Menu: KDE Menu => System => Terminal.
- Type one of the following commands, depending upon which you want to do.
- poweroff - To shutdown and power off the system.
- shutdown – To shutdown the system without powering off.
- reboot – Reboots the system.
Figure 4: The Terminal icon.
Note that all of these commands are completely lowercase. For example, if you type Reboot you will get an error message.
Turning the Computer Off
Note: You must shut down Linux before you power off the computer. See the section Shut Down Linux for instructions.
If the computer does not turn itself off at the end of the Shutdown procedure, you must do it yourself.
- Locate the power switch on the computer and turn it off
- Locate the power switch on the monitor and turn it off.
If you turned on other devices such as a printer or scanner, be sure to turn them off as well.
Changing Your Password
It is advisable as a good security precaution to change your password about once a month. This prevents other people from using your password even if they happen to discover it. Once you have changed it they can no longer use your previous password to access the system. You never know when or how someone might obtain or guess your password, so even if you do not think it has been compromised, you should change your password regularly.
Passwords should be protected and never written down. If a password is stolen, it can be used to access your computer and the network if your computer is so connected, and thus compromise your data.
Linux requires passwords to be a specified minimum length. The default is six characters. I recommend that you use a longer password to increase the difficulty of someone guessing your password.
Passwords should never be dates, initials, acronyms, words, or easy to remember sequences such as “ASDFG” from the left of the middle row of the keyboard. Linux can be configured to prevent the use of such sequences but most installations are not.
Crackers – bad people who want to get into your computer – have dictionaries of words, common acronyms and key sequences that they can try to attempt to crack into your system. They also try easy-to-guess sequences that are available to anyone with a little persistence such as birthdays or anniversaries as well as Social Security numbers and other possible passwords of this type.
The point is that when you change your password you should choose one that is not based on a dictionary word or one that will be easy to guess or deduce from your personal information.
Changing the Password
Now let’s finally talk about how to change your password.
- Click on the KDE Main Menu icon on the left side of the task bar to open the main menu. This icon looks like a Gear with a large “K” in it. Other versions of Fedora have similar Icons, or they may have an icon that looks like a lower case “f.” Red Hat distributions have a start Icon that looks like a Red Hat – a Fedora to be precise. Remember, this icon could be different for your distribution of Fedora or version of KDE, but it will always be the left-most icon on the KDE Panel.
- Locate the Settings menu item and click on that.
- Then click on Security & Privacy and then Password & user Account. A window with the title, “Configure – KDE Control Module” will be displayed. It has several items pertaining to your user account that can be changed.
- Locate the Password button at the bottom of the window and click on that. You will now see the Change Password window.
- Type your current password in the window and press Enter or click on the OK button.
- Type your new password twice, once in in each field in the Change Password window
- Press the OK Button.
If the two passwords do not match, you will see a message to that effect in the Change Password window. Just retype them both until they match and then click OK.
Notice that this window also has a “meter” to help you estimate the effectiveness, or strength, of your password. If your password is weak you may want to try to create a stronger password. If your password does not meet the basic criteria, such as being too short or containing a dictionary word or other easy to guess sequence of characters it will be disallowed and you will have to come up with another.
In some previous versions of Fedora, you would enter your new password once in the first Change Password window and then verify it in a second Change Password window.
An Alternative Method to Change Your Password
This procedure uses a shell (Terminal) prompt. If you do not know how to open a shell prompt, don’t worry. You can still change your password using the above procedure.
- Open a shell prompt.
- Type the command passwd and press the Enter key.
- Type your current password and press Enter.
- Type your new password and press Enter.
- Type your new password again and press Enter.
- Your new password is now in effect.
If you enter a password that is too short (less than six characters) or is based on a dictionary word, an error message like the one in Figure x below will display and you will be forced to choose another password.
Note: Your password is case sensitive so when you login it must be entered exactly as you created it.
In this chapter you have learned to login, logout, and a number of methods to shut down or power off your computer. You have also learned how to change your password and a little bit about security and your user account.