Although the GNU/Linux operating system was generally free to anyone as both open source and in price, it did not catch on in the commercial computer market. For starters, GNU/Linux didn’t come packaged like other operating systems, such as Microsoft Windows. Instead, a great deal of programming knowledge was needed to piece together the hundreds of little programs, written by hundreds of different programmers, which comprised the operating system. Sometimes, a piece of hardware would be lacking an essential piece of software called a device driver to allow that hardware to work. In cases like these, individuals would have to write the program themselves to get their computer up and running.
Almost immediately, programmers began to realize the difficulty that many computer non-experts were having with the GNU/Linux operating system. Again, their sense of community kicked in, and people began packaging all of the necessary programs to successfully install the Linux operating system. These collections of programs were called distributions, or distros for short. In 1992, a company called Yggdrasil Linux created the first CD-ROM-based Linux distribution. This opened the floodgates for many other companies to piece together Linux distributions for people to use. Some of the more popular distributions throughout the years are Red Hat, SUSE, Mandriva (formerly Mandrake), and Debian, which the Ubuntu distribution is based on.
While the distros made the installation of the operating system easier, it was the development of a program called the X Window System that brought GNU/Linux from only the computers of experts to those of hobbyists as well. The X Window System was a project that had been started in 1984 with the purpose of giving a graphical user interface, or GUI, to the Unix operating system. From this project, the three most popular desktop environments were born: GNOME, KDE, and Xfce. Now, GNU/Linux users were not limited to only a command line to work from. The X Window System now gave them a desktop rivaling the commercial operating systems like Microsoft Windows and the Apple Mac OS.
Despite the fact that the GNU/Linux operating system was free, it was still limited in use to true computer enthusiasts. GNU/Linux was also deemed much more stable as an operating system in the early days of Windows when system crashes became the fodder for many Microsoft-related jokes. Still, the popularity of GNU/Linux didn’t grow much. Even in the days when viruses and worms began to emerge in Windows computers and networks, the immune GNU/Linux operating system still sat on the sidelines.
Source of Information : McGraw Hill Osborne Media How to Do Everything Ubuntu
Wednesday, December 31, 2008
Tuesday, December 30, 2008
Is GNU/Linux More Secure than Microsoft Windows?
GNU/Linux is considered a more stable and more secure operating system than Microsoft Windows. The belief behind this comes from two schools of thought. The first is that the open source / free software alliance makes the GNU/Linux operating system less of a target for attackers who wish to cause trouble for the commercial enterprise–backed operating system.
The other school of thought states that the stability and security come from the fact that many developers are looking at, probing, and testing the source code that is freely available. With such a large community of developers looking over the code, bugs and other errors are found and fixed more quickly. GNU/Linux opponents have raised the point that one unethical programmer could insert malicious code into the project. However, the number of people who are examining the source code practically ensures that this would be detected almost immediately.
Another reason behind some of the strength of the GNU/Linux operating system is that there is no rush to market. Many software packages need to be released by a certain date in order to meet sales projections. Security experts cringe at this thought since when software is rushed, not enough time is spent fixing vulnerabilities in the code. With GNU/Linux, often hundreds of volunteers are pouring over the source code looking for these vulnerabilities.
Source of Information : McGraw Hill Osborne Media How to Do Everything Ubuntu
The other school of thought states that the stability and security come from the fact that many developers are looking at, probing, and testing the source code that is freely available. With such a large community of developers looking over the code, bugs and other errors are found and fixed more quickly. GNU/Linux opponents have raised the point that one unethical programmer could insert malicious code into the project. However, the number of people who are examining the source code practically ensures that this would be detected almost immediately.
Another reason behind some of the strength of the GNU/Linux operating system is that there is no rush to market. Many software packages need to be released by a certain date in order to meet sales projections. Security experts cringe at this thought since when software is rushed, not enough time is spent fixing vulnerabilities in the code. With GNU/Linux, often hundreds of volunteers are pouring over the source code looking for these vulnerabilities.
Source of Information : McGraw Hill Osborne Media How to Do Everything Ubuntu
Monday, December 29, 2008
The Super User/Root User
No matter how many system administrators there are for a system, there can ever only be one super user account. The super user account, more commonly referred to as the root user, has total and complete control over all aspects of the system. They can go anywhere in the filesystem, grant and revoke access to files and directories, and can carry out any operation on the system, including destroying it if they so wish. The root user is unique in that it has a UID of 0 and GID of 0.
As you can probably guess by now, the root user has supreme power over your system.
With this in mind, it’s important that you do not work as root all the time as you may inadvertently cause serious damage to your system, perhaps even making it totally unusable. Instead, you should rely on root only when you need to make specific changes to your system that require root privileges. As soon as you’ve finished your work you can switch back to your normal user account to carry on working.
Within Ubuntu you execute a command with root privileges by way of the sudo command like so:
$sudo apt-get update
You will be prompted for your password so you should enter this. Ubuntu will then carry out the command (in this case updating information about available software) as if you were running it as root.
A regular user is someone who logs on to the system to make use of it for nonadministrative tasks such as word processing or email. These users do not need to make systemwide changes or manage other users. However, they might want to be able to change settings specific to them (for instance, a desktop background). Of course, depending on how draconian the root user is, regular users might not even be able to do that!
The super user grants privileges to regular users by means of file and directory permissions. For example, if the super user does not want you to change your settings in ~/.profile (the ~ is a shell shortcut representing your home directory), root can alter the permissions so that you may read from, but not write to, that file.
Because of the potential for making a catastrophic error as the super user (using the command rm -rf /* is the classic example, but do not ever try it!), always use your system as a regular user and become root only temporarily to do sysadmin duties. While you are on a multiuser system, consider this advice an absolute rule; if root were to delete the wrong file or kill the wrong process, the results could be disastrous for the business. On your home system, you can do as you please, and running as root makes many things easier, but less safe. In any setting, however, the risks of running as root are significant and we cannot stress how important it is to be careful when working as root.
The third type of user is the system user. The system user is not a person, but rather an administrative account that the system uses during day-to-day running of various services.
For example, the system user named apache owns the apache web server and all the associated files. Only itself and root can have access to these files—no one else can access or make changes to these files. System users do not have a home directory or password, nor do they permit access to the system through a login prompt. You will find a list of all the users on a system in the /etc/passwd file. Ubuntu refers to these users as the standard users because they are found on every Ubuntu computer as the default set of system (or logical) users provided during the initial installation. This “standard” set differs among Linux distributions.
If you’ve used other Linux distros then you are likely to be a little puzzled by the use of the sudo command. In short, Ubuntu allows the first user on the system access to full root privileges through the sudo command. It also disables the root account so no one can actually login with the username root. In other Linux distros you would change to the root user by issuing the command su - followed by the root password. This will land you at the root prompt, which is shown as a pound sign (#). From here you are able to execute any command you wish. To get to a root prompt in Ubuntu you need to execute the command sudo -i which, after you enter your password, will give you the prompt so familiar to other Linux distros. When you’ve finished working as root just type exit and hit Enter to get back to a normal user prompt ($).
Source of Information : Sams Ubuntu Unleashed 2008 Edition
As you can probably guess by now, the root user has supreme power over your system.
With this in mind, it’s important that you do not work as root all the time as you may inadvertently cause serious damage to your system, perhaps even making it totally unusable. Instead, you should rely on root only when you need to make specific changes to your system that require root privileges. As soon as you’ve finished your work you can switch back to your normal user account to carry on working.
Within Ubuntu you execute a command with root privileges by way of the sudo command like so:
$sudo apt-get update
You will be prompted for your password so you should enter this. Ubuntu will then carry out the command (in this case updating information about available software) as if you were running it as root.
A regular user is someone who logs on to the system to make use of it for nonadministrative tasks such as word processing or email. These users do not need to make systemwide changes or manage other users. However, they might want to be able to change settings specific to them (for instance, a desktop background). Of course, depending on how draconian the root user is, regular users might not even be able to do that!
The super user grants privileges to regular users by means of file and directory permissions. For example, if the super user does not want you to change your settings in ~/.profile (the ~ is a shell shortcut representing your home directory), root can alter the permissions so that you may read from, but not write to, that file.
Because of the potential for making a catastrophic error as the super user (using the command rm -rf /* is the classic example, but do not ever try it!), always use your system as a regular user and become root only temporarily to do sysadmin duties. While you are on a multiuser system, consider this advice an absolute rule; if root were to delete the wrong file or kill the wrong process, the results could be disastrous for the business. On your home system, you can do as you please, and running as root makes many things easier, but less safe. In any setting, however, the risks of running as root are significant and we cannot stress how important it is to be careful when working as root.
The third type of user is the system user. The system user is not a person, but rather an administrative account that the system uses during day-to-day running of various services.
For example, the system user named apache owns the apache web server and all the associated files. Only itself and root can have access to these files—no one else can access or make changes to these files. System users do not have a home directory or password, nor do they permit access to the system through a login prompt. You will find a list of all the users on a system in the /etc/passwd file. Ubuntu refers to these users as the standard users because they are found on every Ubuntu computer as the default set of system (or logical) users provided during the initial installation. This “standard” set differs among Linux distributions.
If you’ve used other Linux distros then you are likely to be a little puzzled by the use of the sudo command. In short, Ubuntu allows the first user on the system access to full root privileges through the sudo command. It also disables the root account so no one can actually login with the username root. In other Linux distros you would change to the root user by issuing the command su - followed by the root password. This will land you at the root prompt, which is shown as a pound sign (#). From here you are able to execute any command you wish. To get to a root prompt in Ubuntu you need to execute the command sudo -i which, after you enter your password, will give you the prompt so familiar to other Linux distros. When you’ve finished working as root just type exit and hit Enter to get back to a normal user prompt ($).
Source of Information : Sams Ubuntu Unleashed 2008 Edition
Sunday, December 28, 2008
What Is a Window Manager?
X-windows is a system that divides the labor up quite a bit. An X-windows application draws and controls only the area "inside" the window, the so-called client area. A totally separate program, called a "window manager" paints the borders and controls (such as resizing edges, maximize, minimize, and close buttons). You can have only one window manager program per X server, and that window manager provides these window "decorations" on behalf of all windows.
The window manager and the X-application communicate in standard ways. For example, when you resize a window by dragging an edge, all the work is done by the window manager program until you release the edge; then the window manager tells the X application about it by sending it a resize message. The application then must repaint itself in the new client area. (This is a bit theoretical: Some window managers send repaint messages while you drag the edge, so the application repaints several times, but you get the idea.) The application is also able to tell the window manager certain things, such as whether or not the window may be resized.
The division of labor has some distinct advantages, especially when you consider X's network capabilities. If the window manager is local, then when, for example, resizing the window of a remote application, only the final "window resize" and screen repaint need go over the network. None of the mouse events or border animation need to generate network traffic. (Again, if your window manager sends repaint messages as it goes, this benefit is lost.)
The other advantage is that you can change window managers. You might have an industrial application that is always maximized and should not be closed. You could write a window manager that doesn't have a close button or resizing decorations and that always sets the client area size to the full screen. Heck, some existing window managers can be configured to do this without any programming.
The details of window managers and their interaction with applications can get quite complex. There is a sort of "minimum standard" set of features a window manager must provide, and there is a "minimum standard" set of window manager messages an X-application must support, but many applications go well beyond this. The increasingly common "desktop" systems for X (KDE and GNOME, for example) extend this set quite, er, extensively. This means that applications that use these features either will run only with that one window manager or will have some functionality unavailable when running under other window managers.
If you want to know more, it is time for you to delve into X-windows programming.
As for X-servers for Windows, a number of commercial ones are available. A free X-server for Windows is available as part of a product called Cygwin, which is a complete POSIX-compliant programming environment for Windows. Cygwin actually makes Windows itself into a decent Unix-like environment. The X-server for Cygwin is the same X-server shipped with most Linux distributions: Xfree86. Cygwin is available from Cygnus Software, which was purchased by RedHat last year. The URL is http://sources.redhat.com/cygwin.
Source of Information : Addison Wesley - Multitool Linux - Practical Uses for Open Source Software
The window manager and the X-application communicate in standard ways. For example, when you resize a window by dragging an edge, all the work is done by the window manager program until you release the edge; then the window manager tells the X application about it by sending it a resize message. The application then must repaint itself in the new client area. (This is a bit theoretical: Some window managers send repaint messages while you drag the edge, so the application repaints several times, but you get the idea.) The application is also able to tell the window manager certain things, such as whether or not the window may be resized.
The division of labor has some distinct advantages, especially when you consider X's network capabilities. If the window manager is local, then when, for example, resizing the window of a remote application, only the final "window resize" and screen repaint need go over the network. None of the mouse events or border animation need to generate network traffic. (Again, if your window manager sends repaint messages as it goes, this benefit is lost.)
The other advantage is that you can change window managers. You might have an industrial application that is always maximized and should not be closed. You could write a window manager that doesn't have a close button or resizing decorations and that always sets the client area size to the full screen. Heck, some existing window managers can be configured to do this without any programming.
The details of window managers and their interaction with applications can get quite complex. There is a sort of "minimum standard" set of features a window manager must provide, and there is a "minimum standard" set of window manager messages an X-application must support, but many applications go well beyond this. The increasingly common "desktop" systems for X (KDE and GNOME, for example) extend this set quite, er, extensively. This means that applications that use these features either will run only with that one window manager or will have some functionality unavailable when running under other window managers.
If you want to know more, it is time for you to delve into X-windows programming.
As for X-servers for Windows, a number of commercial ones are available. A free X-server for Windows is available as part of a product called Cygwin, which is a complete POSIX-compliant programming environment for Windows. Cygwin actually makes Windows itself into a decent Unix-like environment. The X-server for Cygwin is the same X-server shipped with most Linux distributions: Xfree86. Cygwin is available from Cygnus Software, which was purchased by RedHat last year. The URL is http://sources.redhat.com/cygwin.
Source of Information : Addison Wesley - Multitool Linux - Practical Uses for Open Source Software
Saturday, December 27, 2008
THE DEBIAN PACKAGE MANAGEMENT SYSTEM
The Debian Package Management System (DPMS) is the foundation for managing software on Debian and Debian-like systems. As is expected of any software management system, DPMS provides for easy installation and removal of software packages. Debian packages end with the .deb extension. At the core of the DPMS is the dpkg (Debian Package) application. dpkg works in the back-end of the system, and several other command-line tools and graphical user interface (GUI) tools have been written to interact with it. Packages in Debian are fondly called “.deb” files. dpkg can directly manipulate .deb files. Various other wrapper tools have been developed to interact with dpkg, either directly or indirectly.
APT
APT is a highly regarded and sophisticated toolset. It is an example of a wrapper tool that interacts directly with dpkg. APT is actually a library of programming functions that are used by other middle-ground tools, like apt-get and apt-cache, to manipulate software on Debian-like systems. Several user-land applications have been developed that rely on APT. (User-land refers to non-kernel programs and tools.) Examples of such applications are synaptic, aptitude, and dselect. The user-land tools are generally more user-friendly than their command-line counterparts. APT has also been successfully ported to other operating systems.
One fine difference between APT and dpkg is that APT does not directly deal with .deb packages; instead, it manages software via the locations (repositories) specified in a configuration file. This file is the sources.list file. APT utilities use the sources.list file to locate archives (or repositories) of the package distribution system in use on the system.
It should be noted that any of the components of the DPMS (dpkg, apt, or the GUI tools) can be used to directly manage software on Debian-like systems. The tool of choice depends on the user’s level of comfort and familiarity with the tool in question. The tool at the apex of the triangle (dpkg) is the most difficult to use and the most powerful, followed by the next easiest to use (APT), and then followed finally by the user-friendly user-land tools.
Source of Information : McGraw Hill Osborne Media Linux Administration A Beginners Guide Fifth Edition
APT
APT is a highly regarded and sophisticated toolset. It is an example of a wrapper tool that interacts directly with dpkg. APT is actually a library of programming functions that are used by other middle-ground tools, like apt-get and apt-cache, to manipulate software on Debian-like systems. Several user-land applications have been developed that rely on APT. (User-land refers to non-kernel programs and tools.) Examples of such applications are synaptic, aptitude, and dselect. The user-land tools are generally more user-friendly than their command-line counterparts. APT has also been successfully ported to other operating systems.
One fine difference between APT and dpkg is that APT does not directly deal with .deb packages; instead, it manages software via the locations (repositories) specified in a configuration file. This file is the sources.list file. APT utilities use the sources.list file to locate archives (or repositories) of the package distribution system in use on the system.
It should be noted that any of the components of the DPMS (dpkg, apt, or the GUI tools) can be used to directly manage software on Debian-like systems. The tool of choice depends on the user’s level of comfort and familiarity with the tool in question. The tool at the apex of the triangle (dpkg) is the most difficult to use and the most powerful, followed by the next easiest to use (APT), and then followed finally by the user-friendly user-land tools.
Source of Information : McGraw Hill Osborne Media Linux Administration A Beginners Guide Fifth Edition
Friday, December 26, 2008
RPM PACKAGE MANAGER
The Red Hat Package Manager (RPM) allows the easy installation and removal of software packages—typically, precompiled software. A package consists of an archive of files and other metadata.
It is wonderfully easy to use, and several graphical interfaces have been built around it to make it even easier. Several Linux distributions (distros) and various third parties use this tool to distribute and package their software. In fact, almost all of the software mentioned in this book is available in RPM form. The reason you’ll go through the process of compiling software yourself in other chapters is so that you can customize the software to your system, as such customizations might not be readily possible in an RPM.
An RPM file is a package that contains files needed for the software to function correctly. These files can be configuration files, binaries, and even pre- and postscripts to run while installing the software. However, adhering to the open source principle, the various commercial and noncommercial Linux distros are obliged to make the source code for most GNU binaries available. (Those who don’t make it available by default are obliged to give it to you if you ask for it.) Some Linux vendors stick to this principle more than others. Several Linux vendors, therefore, make the source code for their binaries available in RPM form. For instance, Fedora and SuSE also make source code available as an RPM, and it is becoming increasingly common to download and compile source code in this fashion.
The RPM tool performs the installation and uninstallation of RPMs. The tool also maintains a central database of what RPMs you have installed, where they are installed, when they were installed, and other information about the package.
In general, software that comes in the form of an RPM is less work to install and maintain than software that needs to be compiled. The trade-off is that by using an RPM, you accept the default parameters supplied in the RPM. In most cases, these defaults are acceptable. However, if you need to be more intimately aware of what is going on with a piece of software, you may find that by compiling the source yourself, you will learn more about what software components and options exist and how they work together.
Assuming that all you want to do is install a simple package, RPM is perfect. There are several great resources for RPM packages, including the following:
• http://rpm.pbone.net
• http://ftp.redhat.com
• http://mirrors.kernel.org
• http://freshrpms.net
Of course, if you are interested in more details about RPM itself, you can visit the RPM web site at www.rpm.org. RPM comes with Fedora, OpenSuSE, Mandrake, and countless other Red Hat derivatives, and, most surprising of all, the Red Hat version of Linux! If you aren’t sure if RPM comes with your distribution, check with your vendor.
The primary functions of the RPM are
• Querying, installing, and uninstalling software
• Maintaining a database that stores various items of information about the packages
• Packaging other software into an RPM form
Frequently used RPM options
--install. This installs a new package.
--upgrade. This upgrades or installs the package currently installed to a newer version.
--erase. Removes or erases an installed package.
--query. This is the option used for querying.
--force. This is the sledgehammer of installation. Typically, you use it when you’re knowingly installing an odd or unusual configuration and RPM’s safeguards are trying to keep you from doing so. The –force option tells RPM to forego any sanity checks and just do it, even if it thinks you’re trying to fit a square peg into a round hole. Be careful with this option.
-h. Prints hash marks to indicate progress during an installation. Use with the -v option for a pretty display.
--percent. Prints the percentage completed to indicate progress. It is handy if you’re running RPM from another program, such as a Perl script, and you want to know the status of the install.
-nodeps. If RPM is complaining about missing dependency files, but you want the installation to happen anyway, passing this option at the command line will cause RPM to not perform any dependency checks.
-q. Queries the RPM system for information.
--test. This option does not perform a real installation; it just checks to see whether an installation would succeed. If it anticipates problems, it displays what they’ll be.
-V. Verifies RPMs or files on the system.
-v. Tells RPM to be verbose about its actions.
Source of Information : McGraw Hill Osborne Media Linux Administration A Beginners Guide Fifth Edition
It is wonderfully easy to use, and several graphical interfaces have been built around it to make it even easier. Several Linux distributions (distros) and various third parties use this tool to distribute and package their software. In fact, almost all of the software mentioned in this book is available in RPM form. The reason you’ll go through the process of compiling software yourself in other chapters is so that you can customize the software to your system, as such customizations might not be readily possible in an RPM.
An RPM file is a package that contains files needed for the software to function correctly. These files can be configuration files, binaries, and even pre- and postscripts to run while installing the software. However, adhering to the open source principle, the various commercial and noncommercial Linux distros are obliged to make the source code for most GNU binaries available. (Those who don’t make it available by default are obliged to give it to you if you ask for it.) Some Linux vendors stick to this principle more than others. Several Linux vendors, therefore, make the source code for their binaries available in RPM form. For instance, Fedora and SuSE also make source code available as an RPM, and it is becoming increasingly common to download and compile source code in this fashion.
The RPM tool performs the installation and uninstallation of RPMs. The tool also maintains a central database of what RPMs you have installed, where they are installed, when they were installed, and other information about the package.
In general, software that comes in the form of an RPM is less work to install and maintain than software that needs to be compiled. The trade-off is that by using an RPM, you accept the default parameters supplied in the RPM. In most cases, these defaults are acceptable. However, if you need to be more intimately aware of what is going on with a piece of software, you may find that by compiling the source yourself, you will learn more about what software components and options exist and how they work together.
Assuming that all you want to do is install a simple package, RPM is perfect. There are several great resources for RPM packages, including the following:
• http://rpm.pbone.net
• http://ftp.redhat.com
• http://mirrors.kernel.org
• http://freshrpms.net
Of course, if you are interested in more details about RPM itself, you can visit the RPM web site at www.rpm.org. RPM comes with Fedora, OpenSuSE, Mandrake, and countless other Red Hat derivatives, and, most surprising of all, the Red Hat version of Linux! If you aren’t sure if RPM comes with your distribution, check with your vendor.
The primary functions of the RPM are
• Querying, installing, and uninstalling software
• Maintaining a database that stores various items of information about the packages
• Packaging other software into an RPM form
Frequently used RPM options
--install. This installs a new package.
--upgrade. This upgrades or installs the package currently installed to a newer version.
--erase. Removes or erases an installed package.
--query. This is the option used for querying.
--force. This is the sledgehammer of installation. Typically, you use it when you’re knowingly installing an odd or unusual configuration and RPM’s safeguards are trying to keep you from doing so. The –force option tells RPM to forego any sanity checks and just do it, even if it thinks you’re trying to fit a square peg into a round hole. Be careful with this option.
-h. Prints hash marks to indicate progress during an installation. Use with the -v option for a pretty display.
--percent. Prints the percentage completed to indicate progress. It is handy if you’re running RPM from another program, such as a Perl script, and you want to know the status of the install.
-nodeps. If RPM is complaining about missing dependency files, but you want the installation to happen anyway, passing this option at the command line will cause RPM to not perform any dependency checks.
-q. Queries the RPM system for information.
--test. This option does not perform a real installation; it just checks to see whether an installation would succeed. If it anticipates problems, it displays what they’ll be.
-V. Verifies RPMs or files on the system.
-v. Tells RPM to be verbose about its actions.
Source of Information : McGraw Hill Osborne Media Linux Administration A Beginners Guide Fifth Edition
Thursday, December 25, 2008
Communicating through Gaim
Using Gaim to communicate with other IM clients is a straightforward process. The following instructions show how to use Gaim to communicate with Gaim's default service, AIM (AOL Instant Messenger).
Sending messages
The following instructions use Gaim to contact and start communicating with others using AIM:
1. Open the Gaim application, if necessary, by choosing Internet --> Gaim Internet Messenger from the GNOME Applications menu.
The Gaim Buddy List window opens. Another Gaim dialog, showing a text box in which you type your IM account password, opens if you chose not to save your IM account password when configuring Gaim; the section "Registering with Instant Message services" describes the configuration process.
2. If necessary, type your password in the Enter Password text box, immediately below the Enter password for User heading, in the Gaim dialog.
Gaim logs in to your AIM account and displays a message in the bottom of the Buddy List window telling you that your account is available.
3. Click the Buddies menu and select the New Instant Message option. The New Instant Message dialog opens.
4. Type the name of the person (buddy) you want to contact and click the OK button.
The Gaim window opens.
5. You can start chatting:
a. Type a message in the lower subwindow.
b. Press the Send button in the lower-right corner of the Gaim window.
Testing, 1-2-3-4, testing. If you're new to IM and don't know anyone who uses it, you can simply talk to yourself. (Chatting with yourself might not be particularly interesting, but it does demonstrate how the system works.) Follow these steps:
a. Open a Gaim window and sign in as described in these instructions.
b. Select your own name in Step 4.
A second Gaim window opens. Whatever message you type in one window is displayed in the other window.
Adding buddies
You'll accumulate contacts as you use Gaim. Gaim provides a convenient method for saving contact information with AIM (the default Gaim service). Here's how to use it:
1. In the Buddy List window, click the Buddies menu and select the Add Buddy option.
The Add Buddy dialog opens.
2. Type the screen name and the alias for your contact.
The screen name is valid only for the IM service the person is registered for. The alias is the name Gaim knows the contact as; that is, Gaim uses the alias to locate the contact on your Ubuntu computer.
3. If you want to categorize your new Buddy, select your contact's category from the Group drop-down menu.
For instance, Friend is the default.
4. Select the IM service provider from the Account drop-down menu.
5. Click the Add button.
6. In the Buddies window, click the Buddies menu and select New Instant Message.
The New Instant Message dialog opens, and you can type the contact's alias in the Name text box to contact that person.
Source of information : For Dummies Ubuntu Linux For Dummies
Sending messages
The following instructions use Gaim to contact and start communicating with others using AIM:
1. Open the Gaim application, if necessary, by choosing Internet --> Gaim Internet Messenger from the GNOME Applications menu.
The Gaim Buddy List window opens. Another Gaim dialog, showing a text box in which you type your IM account password, opens if you chose not to save your IM account password when configuring Gaim; the section "Registering with Instant Message services" describes the configuration process.
2. If necessary, type your password in the Enter Password text box, immediately below the Enter password for User heading, in the Gaim dialog.
Gaim logs in to your AIM account and displays a message in the bottom of the Buddy List window telling you that your account is available.
3. Click the Buddies menu and select the New Instant Message option. The New Instant Message dialog opens.
4. Type the name of the person (buddy) you want to contact and click the OK button.
The Gaim window opens.
5. You can start chatting:
a. Type a message in the lower subwindow.
b. Press the Send button in the lower-right corner of the Gaim window.
Testing, 1-2-3-4, testing. If you're new to IM and don't know anyone who uses it, you can simply talk to yourself. (Chatting with yourself might not be particularly interesting, but it does demonstrate how the system works.) Follow these steps:
a. Open a Gaim window and sign in as described in these instructions.
b. Select your own name in Step 4.
A second Gaim window opens. Whatever message you type in one window is displayed in the other window.
Adding buddies
You'll accumulate contacts as you use Gaim. Gaim provides a convenient method for saving contact information with AIM (the default Gaim service). Here's how to use it:
1. In the Buddy List window, click the Buddies menu and select the Add Buddy option.
The Add Buddy dialog opens.
2. Type the screen name and the alias for your contact.
The screen name is valid only for the IM service the person is registered for. The alias is the name Gaim knows the contact as; that is, Gaim uses the alias to locate the contact on your Ubuntu computer.
3. If you want to categorize your new Buddy, select your contact's category from the Group drop-down menu.
For instance, Friend is the default.
4. Select the IM service provider from the Account drop-down menu.
5. Click the Add button.
6. In the Buddies window, click the Buddies menu and select New Instant Message.
The New Instant Message dialog opens, and you can type the contact's alias in the Name text box to contact that person.
Source of information : For Dummies Ubuntu Linux For Dummies
Wednesday, December 24, 2008
Configuring Gaim
Instant messaging is a popular Internet communication method based on the quick exchange of text-based messages. You contact another person — your buddy — and type a quick message. The other person sees your message and responds in kind. The exchange shows up instantly on your screen.
Gaim is an open source instant messenger (IM) application that lets you chat on your Ubuntu computer through these message services:
• AIM (AOL Instant Messenger, the Gaim default service)
• MSN Instant Messenger
• Yahoo! Messenger
• Jabber
• ICQ
• Google Talk
The name Gaim is unusual in a world filled with technical acronyms. Gaim is not an acronym. According to its creators, Gaim doesn't stand for anything but freedom (an open source application that helps the world communicate).
Configuring Gaim
To use Gaim, you must
• Tell Gaim which IM service provider to use.
You need an account to use an IM service. If you don't have an account for an IM service you want to use, go to the service's Web home page and sign up.
• Provide your IM username and password.
Gaim uses the information you provide to log in to the IM service provider. When you're logged in, you can communicate with other people who use that service.
There's no limit to how many IM service providers you can use. Just register with the IM service and then configure Gaim to use it. After you've registered and configured it, you can start up a separate instance of Gaim for each service.
You can configure and use Gaim when running Ubuntu live from an Ubuntu CD-ROM (or DVD). However, any configurations you make won't be saved after you reboot your Ubuntu computer. All settings are saved when running Ubuntu from a hard drive.
Registering with Instant Message services
Let's start by starting Gaim, configuring its basic stuff, and connecting to an IM service provider:
1. Choose Applications --> Internet --> Gaim Internet Messenger from the GNOME menu bar.
Two windows open:
2. Click the Add button in the Accounts window.
The Add Account dialog opens.
3. Click the Protocol drop-down menu and select your IM service provider.
The default service provider is AIM, but you can choose from any of the other available ones.
4. Type your screen name in the Screen Name text box.
You'll be known as your screen name while chatting.
5. Type your screen name password in the Password text box.
You can select options to simplify startup and stay in touch with Gaim.
If you want Gaim to remember your password, select the Remember Password and/or the Auto-Login check box. If you want Gaim to notify you when you receive a message to your IM provider e-mail account, select the New Mail Notifications radio button.
6. Click the Save button.
Control returns to the Account window.
7. Click the Close button.
Your screen name and alias are displayed in the Account drop-down menu in the Gaim Login window. You're ready to chat.
Adding other IM services
If you want to add an IM service to Gaim, follow these steps:
1. Open Gaim by choosing Internet --> Gaim Internet Messenger from the GNOME Applications menu, if it isn't already running.
2. Click the Accounts menu (from the Buddy List dialog) and select the Add/Edit option.
The Accounts dialog opens.
3. Click the Add button.
The Add Account dialog opens.
4. From the Protocol drop-down menu, select an IM service provider.
For example, select Yahoo! to chat with people using Yahoo! Messenger.
5. Type your screen name, password, and alias in the appropriate text boxes.
You must use the screen name and password that you selected when registering your Gaim account with the IM service provider.
6. Click the Save button.
The Add Account dialog closes and your settings are saved.
7. Click the Close button in the Accounts dialog.
The Accounts dialog closes. Now you're ready to converse with people using the particular IM service.
Source of Information : Ubuntu Linux For Dummies
Gaim is an open source instant messenger (IM) application that lets you chat on your Ubuntu computer through these message services:
• AIM (AOL Instant Messenger, the Gaim default service)
• MSN Instant Messenger
• Yahoo! Messenger
• Jabber
• ICQ
• Google Talk
The name Gaim is unusual in a world filled with technical acronyms. Gaim is not an acronym. According to its creators, Gaim doesn't stand for anything but freedom (an open source application that helps the world communicate).
Configuring Gaim
To use Gaim, you must
• Tell Gaim which IM service provider to use.
You need an account to use an IM service. If you don't have an account for an IM service you want to use, go to the service's Web home page and sign up.
• Provide your IM username and password.
Gaim uses the information you provide to log in to the IM service provider. When you're logged in, you can communicate with other people who use that service.
There's no limit to how many IM service providers you can use. Just register with the IM service and then configure Gaim to use it. After you've registered and configured it, you can start up a separate instance of Gaim for each service.
You can configure and use Gaim when running Ubuntu live from an Ubuntu CD-ROM (or DVD). However, any configurations you make won't be saved after you reboot your Ubuntu computer. All settings are saved when running Ubuntu from a hard drive.
Registering with Instant Message services
Let's start by starting Gaim, configuring its basic stuff, and connecting to an IM service provider:
1. Choose Applications --> Internet --> Gaim Internet Messenger from the GNOME menu bar.
Two windows open:
2. Click the Add button in the Accounts window.
The Add Account dialog opens.
3. Click the Protocol drop-down menu and select your IM service provider.
The default service provider is AIM, but you can choose from any of the other available ones.
4. Type your screen name in the Screen Name text box.
You'll be known as your screen name while chatting.
5. Type your screen name password in the Password text box.
You can select options to simplify startup and stay in touch with Gaim.
If you want Gaim to remember your password, select the Remember Password and/or the Auto-Login check box. If you want Gaim to notify you when you receive a message to your IM provider e-mail account, select the New Mail Notifications radio button.
6. Click the Save button.
Control returns to the Account window.
7. Click the Close button.
Your screen name and alias are displayed in the Account drop-down menu in the Gaim Login window. You're ready to chat.
Adding other IM services
If you want to add an IM service to Gaim, follow these steps:
1. Open Gaim by choosing Internet --> Gaim Internet Messenger from the GNOME Applications menu, if it isn't already running.
2. Click the Accounts menu (from the Buddy List dialog) and select the Add/Edit option.
The Accounts dialog opens.
3. Click the Add button.
The Add Account dialog opens.
4. From the Protocol drop-down menu, select an IM service provider.
For example, select Yahoo! to chat with people using Yahoo! Messenger.
5. Type your screen name, password, and alias in the appropriate text boxes.
You must use the screen name and password that you selected when registering your Gaim account with the IM service provider.
6. Click the Save button.
The Add Account dialog closes and your settings are saved.
7. Click the Close button in the Accounts dialog.
The Accounts dialog closes. Now you're ready to converse with people using the particular IM service.
Source of Information : Ubuntu Linux For Dummies
Tuesday, December 23, 2008
sudo: Running a Command with root Privileges
Classically a user gained root privileges by logging in as root or by giving an su (substitute user) command and providing the root password. When an ordinary user executed a privileged command in a graphical environment, the system would prompt for the root password. More recently the use of sudo (www.sudo.ws) has taken over these classic techniques of gaining root privileges.
As installed, Ubuntu locks the root account by not providing a root password. This setup prevents anyone from logging into the root account (except when you bring the system up in recovery mode). There is, however, a root account (a user with the username root—look at the first line in /etc/passwd). This account/user owns files (give the command ls –l /bin) and runs processes (give the command ps –ef and look at the left column of the output). The root account is critical to the functioning of an Ubuntu system. The sudo utility enables you to run a command as though it had been run by a user logged in as root.
Ubuntu strongly encourages the use of sudo. In fact, as shipped, Ubuntu locks the root account (there is no password) so you cannot use the classic techniques. There are many advantages of using sudo over using the root account for system administration:
• When you run sudo, it requests your password—not the root password— so you have to remember only one password.
• The sudo utility logs all commands it executes. This log can be useful for retracing your steps if you make a mistake and for system auditing.
• The sudo utility allows implementation of a finer-grained security policy than does the use of su and the root account. Using sudo, you can enable specific users to execute specific commands—something you cannot do with the classic root account setup.
• Using sudo makes it harder for a malicious user to gain access to a system. When there is an unlocked root account, a malicious user knows the username of the account she wants to crack before she starts. When the root account is locked, the user has to determine the username and the password to break into a system.
Some users question whether sudo is less secure than su. Because both rely on passwords, they share the same strengths and weaknesses. If the password is compromised, the system is compromised. However, if the password of a user who is allowed by sudo to do one task is compromised, the entire system may not be at risk. Thus, if used properly, the finer granularity of sudo’s permissions structure can make it a more secure tool than su. Also, when sudo is used to invoke a single command, it is less likely that a user will be tempted to keep working with root privileges than if the user opens a root shell with su.
Using sudo may not always be the best, most secure way to set up a system. On a system used by a single user, there is not much difference between using sudo and carefully using su and a root password. In contrast, on a system with several users, and especially on a network of systems with central administration, sudo can be set up to be more secure than su. If you are a dyed-in-the-wool UNIX/Linux user who cannot get comfortable with sudo, it is easy enough to give the root account a password and use su.
When you install Ubuntu, the first user you set up is included in the admin group. As installed, sudo is configured to allow members of the admin group to run with root privileges. Because there is no root password, initially the only way to perform privileged administrative tasks from the command line is for the first user to run them using sudo. Graphical programs call other programs, such as gksud, which in turn call sudo for authentication.
Timestamp
By default, sudo asks for your password (not the root password) the first time you run it. At that time, sudo sets your timestamp. After you supply a password, sudo will not prompt you again for a password for 15 minutes, based on your timestamp.
sudo’s environment
The pwd builtin in the preceding example shows one aspect of the modified environment the –i option creates. This option spawns a root login shell (a shell with the same environment as a user logging in as root would have) and executes root’s startup files. Before issuing the sudo –i command, the pwd builtin shows /home/sam as Sam’s working directory; after the command it shows /root, root’s home directory, as the working directory. Use the –s option to spawn a root shell without modifying the environment. When you call sudo without an option, it runs the command you specify in an unmodified environment. To demonstrate, the following example has sudo run pwd without an option. The working directory of a command run in this manner does not change.
Redirecting output
The following command fails because, although the shell that sudo spawns executes ls with root privileges, the nonprivileged shell that the user is running redirects the output. The user’s shell does not have permission to write to /root. There are several ways around this problem. The easiest is to pass the whole command line to a shell running under sudo: The bash –c option spawns a shell that executes the string following the option and then terminates. The sudo utility runs the spawned shell with root privileges. You can quote the string to prevent the nonprivileged shell from interpreting special characters. You can also spawn a root shell with sudo –i, execute the command, and exit from the privileged shell.
Options
You can use command line options to control how sudo runs a command. Following is the syntax of an sudo command line:
sudo [options] [command]
where options is one or more options and command is the command you want to execute. Without the –u option, sudo runs command with root privileges. Some of the more common options follow; see the sudo man page for a complete list.
–b (background) Runs command in the background.
–i (initial login environment) Spawns the shell that is specified for root (or another user specified by –u) in /etc/passwd, running root’s (or the other user’s) startup files, with some exceptions (e.g., TERM is not changed). Does not take a command.
–k (kill) Resets the timestamp (page 491) of the user running the command, which means the user must enter a password the next time she runs sudo.
–L (list defaults) Lists the parameters that you can set on a Defaults line (page 497) in the sudoers file. Does not take a command.
–l (list commands) Lists the commands the user who is running sudo is allowed to run on the local system. Does not take a command.
–s (shell) Spawns a new root (or another user specified by –u) shell as specified in the /etc/passwd file. Similar to –i but does not change the environment. Does not take a command.
–u user Runs command with the privileges of user. Without this option sudo runs command with root privileges.
Source of Information : McGraw Hill Osborne Media How to Do Everything Ubuntu
As installed, Ubuntu locks the root account by not providing a root password. This setup prevents anyone from logging into the root account (except when you bring the system up in recovery mode). There is, however, a root account (a user with the username root—look at the first line in /etc/passwd). This account/user owns files (give the command ls –l /bin) and runs processes (give the command ps –ef and look at the left column of the output). The root account is critical to the functioning of an Ubuntu system. The sudo utility enables you to run a command as though it had been run by a user logged in as root.
Ubuntu strongly encourages the use of sudo. In fact, as shipped, Ubuntu locks the root account (there is no password) so you cannot use the classic techniques. There are many advantages of using sudo over using the root account for system administration:
• When you run sudo, it requests your password—not the root password— so you have to remember only one password.
• The sudo utility logs all commands it executes. This log can be useful for retracing your steps if you make a mistake and for system auditing.
• The sudo utility allows implementation of a finer-grained security policy than does the use of su and the root account. Using sudo, you can enable specific users to execute specific commands—something you cannot do with the classic root account setup.
• Using sudo makes it harder for a malicious user to gain access to a system. When there is an unlocked root account, a malicious user knows the username of the account she wants to crack before she starts. When the root account is locked, the user has to determine the username and the password to break into a system.
Some users question whether sudo is less secure than su. Because both rely on passwords, they share the same strengths and weaknesses. If the password is compromised, the system is compromised. However, if the password of a user who is allowed by sudo to do one task is compromised, the entire system may not be at risk. Thus, if used properly, the finer granularity of sudo’s permissions structure can make it a more secure tool than su. Also, when sudo is used to invoke a single command, it is less likely that a user will be tempted to keep working with root privileges than if the user opens a root shell with su.
Using sudo may not always be the best, most secure way to set up a system. On a system used by a single user, there is not much difference between using sudo and carefully using su and a root password. In contrast, on a system with several users, and especially on a network of systems with central administration, sudo can be set up to be more secure than su. If you are a dyed-in-the-wool UNIX/Linux user who cannot get comfortable with sudo, it is easy enough to give the root account a password and use su.
When you install Ubuntu, the first user you set up is included in the admin group. As installed, sudo is configured to allow members of the admin group to run with root privileges. Because there is no root password, initially the only way to perform privileged administrative tasks from the command line is for the first user to run them using sudo. Graphical programs call other programs, such as gksud, which in turn call sudo for authentication.
Timestamp
By default, sudo asks for your password (not the root password) the first time you run it. At that time, sudo sets your timestamp. After you supply a password, sudo will not prompt you again for a password for 15 minutes, based on your timestamp.
sudo’s environment
The pwd builtin in the preceding example shows one aspect of the modified environment the –i option creates. This option spawns a root login shell (a shell with the same environment as a user logging in as root would have) and executes root’s startup files. Before issuing the sudo –i command, the pwd builtin shows /home/sam as Sam’s working directory; after the command it shows /root, root’s home directory, as the working directory. Use the –s option to spawn a root shell without modifying the environment. When you call sudo without an option, it runs the command you specify in an unmodified environment. To demonstrate, the following example has sudo run pwd without an option. The working directory of a command run in this manner does not change.
Redirecting output
The following command fails because, although the shell that sudo spawns executes ls with root privileges, the nonprivileged shell that the user is running redirects the output. The user’s shell does not have permission to write to /root. There are several ways around this problem. The easiest is to pass the whole command line to a shell running under sudo: The bash –c option spawns a shell that executes the string following the option and then terminates. The sudo utility runs the spawned shell with root privileges. You can quote the string to prevent the nonprivileged shell from interpreting special characters. You can also spawn a root shell with sudo –i, execute the command, and exit from the privileged shell.
Options
You can use command line options to control how sudo runs a command. Following is the syntax of an sudo command line:
sudo [options] [command]
where options is one or more options and command is the command you want to execute. Without the –u option, sudo runs command with root privileges. Some of the more common options follow; see the sudo man page for a complete list.
–b (background) Runs command in the background.
–i (initial login environment) Spawns the shell that is specified for root (or another user specified by –u) in /etc/passwd, running root’s (or the other user’s) startup files, with some exceptions (e.g., TERM is not changed). Does not take a command.
–k (kill) Resets the timestamp (page 491) of the user running the command, which means the user must enter a password the next time she runs sudo.
–L (list defaults) Lists the parameters that you can set on a Defaults line (page 497) in the sudoers file. Does not take a command.
–l (list commands) Lists the commands the user who is running sudo is allowed to run on the local system. Does not take a command.
–s (shell) Spawns a new root (or another user specified by –u) shell as specified in the /etc/passwd file. Similar to –i but does not change the environment. Does not take a command.
–u user Runs command with the privileges of user. Without this option sudo runs command with root privileges.
Source of Information : McGraw Hill Osborne Media How to Do Everything Ubuntu
Monday, December 22, 2008
GNU, Linux, and the Free Software Movement
In 1983, a computer programmer from MIT by the name of Richard M. Stallman grew skeptical of the commercial software packages that were selling for big bucks at computer stores. Since this software was a commercial product, its source code was often protected, and the alteration, or hacking, of the code was prohibited. A product of the early days of computers when programmers shared software code with one another, Stallman encouraged the use of what was known as free software, to give computer programmers and developers the ability to once again alter a program’s source code to make it better. Free software didn’t mean that it shouldn’t be sold, but rather that the code should be allowed to be viewed and modified by the people using it. Stallman believed that people who use computers and software are entitled to four essential freedoms, described as follows.
Freedom 0. The freedom to run the program for any purpose. Stallman wanted to make sure that people who wrote, enhanced, hacked, or used free software could use it any way they wished. Eventually, this freedom would also come to mean that the software could be run on any operating system as well.
Freedom 1. The freedom to study the software’s source code and modify it to do what you want it to do. This is one of the main ideals behind the open source movement as well. The ability to study a program’s source code means you can read all of the commands and programming that the programmer used to write the software. This may not mean much to many people, but to software developers, it not only gives them a way to learn new things, but it also gives them a foundation on which to build a newer, better program. This is done through modifying, or hacking, the source code. “Hacking” to the early programmers merely meant changing something around so that it works better.
Freedom 2. The freedom to distribute copies of your software to other people. This was an essential characteristic, as much of the focus of the early computer programmers was to help out others in the computer community. So even years before Ubuntu was to enter this community, the fundamental philosophy was there! Adding on to this freedom, Stallman also stated that in addition to being able to freely distribute software, others should be allowed to republish the software and source code as well.
Freedom 3. The freedom to publish your modifications of a software package. Again, this is one of the fundamental beliefs in the early computing community. If you make a program better through hacking and modifying the source code, share your findings with others! Think back to Mandela’s quote on Ubuntu, “Are you doing so in order to enable the community around you to improve?”
One of the biggest projects to come out of Stallman’s free software movement was an operating system that he and other programmers wrote in 1990 called GNU, a recursive acronym for GNU’s Not Unix. This operating system was designed as a completely free OS. Not only would programmers have the opportunity to modify the source code, but the operating system software itself would cost the user nothing!
However, this operating system was not yet complete. It was missing a vital component called a kernel. This essential piece of the operating system controls things like the allocation of a computer’s resources, interfacing with hardware devices, accessing programs, and security, to name a few. The GNU team found this central piece of their operating system in a kernel written in 1991 by a programmer named Linus Torvalds. “Linus’ Unix,” or “Linux,” was the name given to this kernel. The operating system born of this marriage was called the GNU/Linux operating system. Since then, the “GNU” has been dropped from the name in many circles, and the operating system is known simply as Linux. However, Stallman and others still refer to the operating system by its full name, stating that Linux is the name of the kernel that runs the operating system not the software as a whole. According to Stallman, not referring to GNU/Linux by its whole name does not give credit to those who worked so hard on other aspects of the operating system.
Source of Information : McGraw Hill Osborne Media How to Do Everything Ubuntu
Freedom 0. The freedom to run the program for any purpose. Stallman wanted to make sure that people who wrote, enhanced, hacked, or used free software could use it any way they wished. Eventually, this freedom would also come to mean that the software could be run on any operating system as well.
Freedom 1. The freedom to study the software’s source code and modify it to do what you want it to do. This is one of the main ideals behind the open source movement as well. The ability to study a program’s source code means you can read all of the commands and programming that the programmer used to write the software. This may not mean much to many people, but to software developers, it not only gives them a way to learn new things, but it also gives them a foundation on which to build a newer, better program. This is done through modifying, or hacking, the source code. “Hacking” to the early programmers merely meant changing something around so that it works better.
Freedom 2. The freedom to distribute copies of your software to other people. This was an essential characteristic, as much of the focus of the early computer programmers was to help out others in the computer community. So even years before Ubuntu was to enter this community, the fundamental philosophy was there! Adding on to this freedom, Stallman also stated that in addition to being able to freely distribute software, others should be allowed to republish the software and source code as well.
Freedom 3. The freedom to publish your modifications of a software package. Again, this is one of the fundamental beliefs in the early computing community. If you make a program better through hacking and modifying the source code, share your findings with others! Think back to Mandela’s quote on Ubuntu, “Are you doing so in order to enable the community around you to improve?”
One of the biggest projects to come out of Stallman’s free software movement was an operating system that he and other programmers wrote in 1990 called GNU, a recursive acronym for GNU’s Not Unix. This operating system was designed as a completely free OS. Not only would programmers have the opportunity to modify the source code, but the operating system software itself would cost the user nothing!
However, this operating system was not yet complete. It was missing a vital component called a kernel. This essential piece of the operating system controls things like the allocation of a computer’s resources, interfacing with hardware devices, accessing programs, and security, to name a few. The GNU team found this central piece of their operating system in a kernel written in 1991 by a programmer named Linus Torvalds. “Linus’ Unix,” or “Linux,” was the name given to this kernel. The operating system born of this marriage was called the GNU/Linux operating system. Since then, the “GNU” has been dropped from the name in many circles, and the operating system is known simply as Linux. However, Stallman and others still refer to the operating system by its full name, stating that Linux is the name of the kernel that runs the operating system not the software as a whole. According to Stallman, not referring to GNU/Linux by its whole name does not give credit to those who worked so hard on other aspects of the operating system.
Source of Information : McGraw Hill Osborne Media How to Do Everything Ubuntu
Sunday, December 21, 2008
THE ADVANTAGES OF OPEN SOURCE SOFTWARE
If the GPL seems like a bad idea from the standpoint of commercialism, consider the surge of successful open source software projects—they are indicative of a system that does indeed work. This success has evolved for two reasons. First errors in the code itself are far more likely to be caught and quickly fixed under the watchful eyes of peers. Second, under the GPL system, programmers can release code without the fear of being sued. Without that protection, people may not feel as comfortable to release their code for public consumption.
Most projects don’t start out as full-featured, polished pieces of work. They may begin life as a quick hack to solve a specific problem bothering the programmer at the time. As a quick-and-dirty hack, the code may not have a sales value. But when this code is shared and consequently improved upon by others who have similar problems and needs, it becomes a useful tool. Other program users begin to enhance it with features they need, and these additions travel back to the original program. The project thus evolves as the result of a group effort and eventually reaches full refinement. This polished program may contain contributions from possibly hundreds, if not thousands, of programmers who have added little pieces here and there. In fact, the original author’s code is likely to be little in evidence.
There’s another reason for the success of generally licensed software. Any project manager who has worked on commercial software knows that the real cost of development software isn’t in the development phase. It’s in the cost of selling, marketing, supporting, documenting, packaging, and shipping that software. A programmer carrying out a weekend hack to fix a problem with a tiny, kludged program may lack the interest, time, and money to turn that hack into a profitable product.
When Linus Torvalds released Linux in 1991, he released it under the GPL. As a result of its open charter, Linux has had a notable number of contributors and analyzers. This participation has made Linux strong and rich in features. Torvalds himself estimates that since the v.2.2.0 kernel, his contributions represent only 5 percent of the total code base. Since anyone can take the Linux kernel (and other supporting programs), repackage them, and resell them, some people have made money with Linux. As long as these individuals release the kernel’s full source code along with their individual packages, and as long as the packages are protected under the GPL, everything is legal. Of course, this means that packages released under the GPL can be resold by other people under other names for a profit.
In the end, what makes a package from one person more valuable than a package from another person are the value-added features, support channels, and documentation. Even IBM can agree to this; it’s how they made most of their money from 1930 to 1970, and now in the late 1990s and early 2000s with IBM Global Services. The money isn’t necessarily in the product alone; it can also be in the services that go with it.
Source of Information : McGraw Hill Osborne Media Linux Administration A Beginners Guide Fifth Edition
Most projects don’t start out as full-featured, polished pieces of work. They may begin life as a quick hack to solve a specific problem bothering the programmer at the time. As a quick-and-dirty hack, the code may not have a sales value. But when this code is shared and consequently improved upon by others who have similar problems and needs, it becomes a useful tool. Other program users begin to enhance it with features they need, and these additions travel back to the original program. The project thus evolves as the result of a group effort and eventually reaches full refinement. This polished program may contain contributions from possibly hundreds, if not thousands, of programmers who have added little pieces here and there. In fact, the original author’s code is likely to be little in evidence.
There’s another reason for the success of generally licensed software. Any project manager who has worked on commercial software knows that the real cost of development software isn’t in the development phase. It’s in the cost of selling, marketing, supporting, documenting, packaging, and shipping that software. A programmer carrying out a weekend hack to fix a problem with a tiny, kludged program may lack the interest, time, and money to turn that hack into a profitable product.
When Linus Torvalds released Linux in 1991, he released it under the GPL. As a result of its open charter, Linux has had a notable number of contributors and analyzers. This participation has made Linux strong and rich in features. Torvalds himself estimates that since the v.2.2.0 kernel, his contributions represent only 5 percent of the total code base. Since anyone can take the Linux kernel (and other supporting programs), repackage them, and resell them, some people have made money with Linux. As long as these individuals release the kernel’s full source code along with their individual packages, and as long as the packages are protected under the GPL, everything is legal. Of course, this means that packages released under the GPL can be resold by other people under other names for a profit.
In the end, what makes a package from one person more valuable than a package from another person are the value-added features, support channels, and documentation. Even IBM can agree to this; it’s how they made most of their money from 1930 to 1970, and now in the late 1990s and early 2000s with IBM Global Services. The money isn’t necessarily in the product alone; it can also be in the services that go with it.
Source of Information : McGraw Hill Osborne Media Linux Administration A Beginners Guide Fifth Edition
Saturday, December 20, 2008
Configuring Bash Configuration Files in Linux
Several configuration files support how your shell behaves. Some of the files are executed for every user and every shell, while others are specific to the user who creates the configuration file.
Bash Configuration Files
/etc/profile. Sets up user environment information for every user. It is executed when you first log in. This file provides values for your path, as well as setting environment variables for such things as the location of your mailbox and the size of your history files. Finally, /etc/profile gathers shell settings from configuration files in the /etc/profile.d directory.
/etc/bashrc. Executes for every user who runs the bash shell, each time a bash shell is opened. It sets the default prompt and may add one or more aliases. Values in this file can be overridden by information in each user’s ~/.bashrc file.
~/.bash_profile .Used by each user to enter information that is specific to his or her own use of the shell. It is executed only once, when the user logs in. By default it sets a few environment variables and executes the user’s .bashrc file.
~/.bashrc. Contains the information that is specific to your bash shells. It is read when you log in and also each time you open a new bash shell. This is the best location to add environment variables and aliases so that your shell picks them up.
~/.bash_logout. Executes each time you log out (exit the last bash shell). By default, it simply clears your screen.
To change the /etc/profile or /etc/bashrc files, you must be the root user. Users can change the information in the $HOME/.bash_profile, $HOME/.bashrc, and $HOME/.bash_logout files in their own home directories.
The following sections provide ideas about items to add to your shell configuration files. In most cases, you add these values to the .bashrc file in your home directory. However, if you administer a system, you may want to set some of these values as defaults for all of your Linux system’s users.
Source of Information : Linux Bible 2008 Edition
Bash Configuration Files
/etc/profile. Sets up user environment information for every user. It is executed when you first log in. This file provides values for your path, as well as setting environment variables for such things as the location of your mailbox and the size of your history files. Finally, /etc/profile gathers shell settings from configuration files in the /etc/profile.d directory.
/etc/bashrc. Executes for every user who runs the bash shell, each time a bash shell is opened. It sets the default prompt and may add one or more aliases. Values in this file can be overridden by information in each user’s ~/.bashrc file.
~/.bash_profile .Used by each user to enter information that is specific to his or her own use of the shell. It is executed only once, when the user logs in. By default it sets a few environment variables and executes the user’s .bashrc file.
~/.bashrc. Contains the information that is specific to your bash shells. It is read when you log in and also each time you open a new bash shell. This is the best location to add environment variables and aliases so that your shell picks them up.
~/.bash_logout. Executes each time you log out (exit the last bash shell). By default, it simply clears your screen.
To change the /etc/profile or /etc/bashrc files, you must be the root user. Users can change the information in the $HOME/.bash_profile, $HOME/.bashrc, and $HOME/.bash_logout files in their own home directories.
The following sections provide ideas about items to add to your shell configuration files. In most cases, you add these values to the .bashrc file in your home directory. However, if you administer a system, you may want to set some of these values as defaults for all of your Linux system’s users.
Source of Information : Linux Bible 2008 Edition
Friday, December 19, 2008
Connecting Your Camera in Ubuntu
Most modern cameras use memory cards to store the pictures. If you have such a model, when you plug the camera into your PC’s USB port, you should find that Ubuntu instantly recognizes it. An icon should appear on the desktop, and double-clicking it should display the memory card’s contents in a Nautilus window. Along the top of the window, you’ll see an orange bar saying “This media contains digital photos” alongside a button marked "Open F-Spot Photo Manager”. Clicking this button will start F-Spot, with which you can copy the images to your hard disk, as explained in the next section. Of course, you can simply copy the pictures to your hard disk manually using Nautilus.
If your camera doesn’t appear to be recognized by Ubuntu, you should consider buying a USB card reader. These devices are typically inexpensive and usually can read a wide variety of card types, making them a useful investment for the future. Some new PCs even come with card readers built in. Most generic card readers should work fine under Linux, as will most new digital cameras.
Before detaching your camera or removing a photo card, you should right-click the desktop icon and select Unmount Volume. This tells Ubuntu that you’ve finished with the device. Failing to eject in this way could cause data errors.
If you’re working with print photos, negative film, or transparencies, you can use a scanner and the XSane program (Applications -> Graphics -> XSane Image Scanner) to digitize them. This works in a virtually identical way to the TWAIN modules supplied with Windows scanners, in that you need to set the resolution in dots per inch (DPI), as well as the color depth. Generally speaking, 300 DPI and 24-bit color should provide an adequate representation of most printed photos. Because of their smaller size, transparency or negative film images will require higher resolutions, in the order of 1,200 or 2,400 DPI.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
If your camera doesn’t appear to be recognized by Ubuntu, you should consider buying a USB card reader. These devices are typically inexpensive and usually can read a wide variety of card types, making them a useful investment for the future. Some new PCs even come with card readers built in. Most generic card readers should work fine under Linux, as will most new digital cameras.
Before detaching your camera or removing a photo card, you should right-click the desktop icon and select Unmount Volume. This tells Ubuntu that you’ve finished with the device. Failing to eject in this way could cause data errors.
If you’re working with print photos, negative film, or transparencies, you can use a scanner and the XSane program (Applications -> Graphics -> XSane Image Scanner) to digitize them. This works in a virtually identical way to the TWAIN modules supplied with Windows scanners, in that you need to set the resolution in dots per inch (DPI), as well as the color depth. Generally speaking, 300 DPI and 24-bit color should provide an adequate representation of most printed photos. Because of their smaller size, transparency or negative film images will require higher resolutions, in the order of 1,200 or 2,400 DPI.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
Thursday, December 18, 2008
Connecting and Expanding Commands in Linux Shell
A truly powerful feature of the shell is the capability to redirect the input and output of commands to and from other commands and files. To allow commands to be strung together, the shell uses metacharacters. As noted earlier, a metacharacter is a typed character that has special meaning to the shell for connecting commands or requesting expansion.
Piping Commands
The pipe (|) metacharacter connects the output from one command to the input of another command. This lets you have one command work on some data, and then have the next command deal with the results. Here is an example of a command line that includes pipes:
$ cat /etc/password | sort | less
This command lists the contents of the /etc/password file and pipes the output to the sort command. The sort command takes the usernames that begin each line of the /etc/password file, sorts them alphabetically, and pipes the output to the less command (to page through the output).
Pipes are an excellent illustration of how UNIX, the predecessor of Linux, was created as an operating system made up of building blocks. A standard practice in UNIX was to connect utilities in different ways to get different jobs done. For example, before the days of graphical word processors, users created plain-text files that included macros to indicate formatting. To see how the document really appeared, they would use a command such as the following:
$ gunzip < /usr/share/man/man1/grep.1.gz | nroff -c -man | less
In this example, the contents of the grep man page (grep.1.gz) are directed to the gunzip command to be unzipped. The output from gunzip is piped to the nroff command to format the man page using the manual macro (-man). The output is piped to the less command to display the output. Because the file being displayed is in plain text, you could have substituted any number of options to work with the text before displaying it. You could sort the contents, change or delete some of the content, or bring in text from other documents. The key is that, instead of all those features being in one program, you get results from piping and redirecting input and output between multiple commands.
Sequential Commands
Sometimes you may want a sequence of commands to run, with one command completing before the next command begins. You can do this by typing several commands on the same command line and separating them with semicolons (;):
$ date ; troff -me verylargedocument | lpr ; date
In this example, I was formatting a huge document and wanted to know how long it would take. The first command (date) showed the date and time before the formatting started. The troff command formatted the document and then piped the output to the printer. When the formatting was done, the date and time was printed again (so I knew how long the troff command took to complete). Another useful command to add to the end of a long command line is the mail command. You could add mail -s “Finished the long command” chris@example.com to the end of a command line. Then, for example, a mail message is sent to the user you choose after the command completes.
Background Commands
Some commands can take a while to complete. Sometimes you may not want to tie up your shell waiting for a command to finish. In those cases, you can have the commands run in the background by using the ampersand (&).
Text formatting commands (such as nroff and troff, described earlier) are examples of commands that are often run in the background to format a large document. You also might want to create your own shell scripts that run in the background to check continuously for certain events to occur, such as the hard disk filling up or particular users logging in. Here is an example of a command being run in the background:
$ troff -me verylargedocument | lpr &
Expanding Commands
With command substitution, you can have the output of a command interpreted by the shell instead of by the command itself. In this way, you can have the standard output of a command become an argument for another command. The two forms of command substitution are $(command) and `command` (backticks, not single quotes). The command in this case can include options, metacharacters, and arguments. Here is an example of using command substitution:
$ vi $(find /home | grep xyzzy)
In this example, the command substitution is done before the vi command is run. First, the find command starts at the /home directory and prints out all files and directories below that point in the file system. The output is piped to the grep command, which filters out all files except for those that include the string xyzzy in the filename. Finally, the vi command opens all filenames for editing (one at a time) that include xyzzy. This particular example is useful if you want to edit a file for which you know the name but not the location. As long as the string is uncommon, you can find and open every instance of a filename existing beneath a point you choose in the file system. (In other words, don’t use grep a from the root file system or you’ll match and try to edit several thousand files.)
Expanding Arithmetic Expressions
There may be times when you want to pass arithmetic results to a command. There are two forms you can use to expand an arithmetic expression and pass it to the shell: $[expression] and $(expression). Here is an example:
$ echo “I am $[2008 - 1957] years old.”
I am 51 years old.
The shell interprets the arithmetic expression first (2008 - 1957), and then passes that information to the echo command. The echo command displays the text, with the results of the arithmetic (51) inserted. Here’s an example of the other form:
$ echo “There are $(ls | wc -w) files in this directory.”
There are 14 files in this directory.
This lists the contents of the current directory (ls) and runs the word count command to count the number of files found (wc -w). The resulting number (14 in this case) is echoed back with the rest of the sentence shown.
Expanding Environment Variables
Environment variables that store information within the shell can be expanded using the dollar sign ($) metacharacter. When you expand an environment variable on a command line, the value of the variable is printed instead of the variable name itself, as follows:
$ ls -l $BASH
-rwxr-xr-x 1 root root 625516 Dec 5 11:13 /bin/bash
Using $BASH as an argument to ls -l causes a long listing of the bash command to be printed. The following section discusses shell environment variables.
Piping Commands
The pipe (|) metacharacter connects the output from one command to the input of another command. This lets you have one command work on some data, and then have the next command deal with the results. Here is an example of a command line that includes pipes:
$ cat /etc/password | sort | less
This command lists the contents of the /etc/password file and pipes the output to the sort command. The sort command takes the usernames that begin each line of the /etc/password file, sorts them alphabetically, and pipes the output to the less command (to page through the output).
Pipes are an excellent illustration of how UNIX, the predecessor of Linux, was created as an operating system made up of building blocks. A standard practice in UNIX was to connect utilities in different ways to get different jobs done. For example, before the days of graphical word processors, users created plain-text files that included macros to indicate formatting. To see how the document really appeared, they would use a command such as the following:
$ gunzip < /usr/share/man/man1/grep.1.gz | nroff -c -man | less
In this example, the contents of the grep man page (grep.1.gz) are directed to the gunzip command to be unzipped. The output from gunzip is piped to the nroff command to format the man page using the manual macro (-man). The output is piped to the less command to display the output. Because the file being displayed is in plain text, you could have substituted any number of options to work with the text before displaying it. You could sort the contents, change or delete some of the content, or bring in text from other documents. The key is that, instead of all those features being in one program, you get results from piping and redirecting input and output between multiple commands.
Sequential Commands
Sometimes you may want a sequence of commands to run, with one command completing before the next command begins. You can do this by typing several commands on the same command line and separating them with semicolons (;):
$ date ; troff -me verylargedocument | lpr ; date
In this example, I was formatting a huge document and wanted to know how long it would take. The first command (date) showed the date and time before the formatting started. The troff command formatted the document and then piped the output to the printer. When the formatting was done, the date and time was printed again (so I knew how long the troff command took to complete). Another useful command to add to the end of a long command line is the mail command. You could add mail -s “Finished the long command” chris@example.com to the end of a command line. Then, for example, a mail message is sent to the user you choose after the command completes.
Background Commands
Some commands can take a while to complete. Sometimes you may not want to tie up your shell waiting for a command to finish. In those cases, you can have the commands run in the background by using the ampersand (&).
Text formatting commands (such as nroff and troff, described earlier) are examples of commands that are often run in the background to format a large document. You also might want to create your own shell scripts that run in the background to check continuously for certain events to occur, such as the hard disk filling up or particular users logging in. Here is an example of a command being run in the background:
$ troff -me verylargedocument | lpr &
Expanding Commands
With command substitution, you can have the output of a command interpreted by the shell instead of by the command itself. In this way, you can have the standard output of a command become an argument for another command. The two forms of command substitution are $(command) and `command` (backticks, not single quotes). The command in this case can include options, metacharacters, and arguments. Here is an example of using command substitution:
$ vi $(find /home | grep xyzzy)
In this example, the command substitution is done before the vi command is run. First, the find command starts at the /home directory and prints out all files and directories below that point in the file system. The output is piped to the grep command, which filters out all files except for those that include the string xyzzy in the filename. Finally, the vi command opens all filenames for editing (one at a time) that include xyzzy. This particular example is useful if you want to edit a file for which you know the name but not the location. As long as the string is uncommon, you can find and open every instance of a filename existing beneath a point you choose in the file system. (In other words, don’t use grep a from the root file system or you’ll match and try to edit several thousand files.)
Expanding Arithmetic Expressions
There may be times when you want to pass arithmetic results to a command. There are two forms you can use to expand an arithmetic expression and pass it to the shell: $[expression] and $(expression). Here is an example:
$ echo “I am $[2008 - 1957] years old.”
I am 51 years old.
The shell interprets the arithmetic expression first (2008 - 1957), and then passes that information to the echo command. The echo command displays the text, with the results of the arithmetic (51) inserted. Here’s an example of the other form:
$ echo “There are $(ls | wc -w) files in this directory.”
There are 14 files in this directory.
This lists the contents of the current directory (ls) and runs the word count command to count the number of files found (wc -w). The resulting number (14 in this case) is echoed back with the rest of the sentence shown.
Expanding Environment Variables
Environment variables that store information within the shell can be expanded using the dollar sign ($) metacharacter. When you expand an environment variable on a command line, the value of the variable is printed instead of the variable name itself, as follows:
$ ls -l $BASH
-rwxr-xr-x 1 root root 625516 Dec 5 11:13 /bin/bash
Using $BASH as an argument to ls -l causes a long listing of the bash command to be printed. The following section discusses shell environment variables.
Source of Information : Linux Bible 2008 Edition
Wednesday, December 17, 2008
Applying GIMP Filters
Like other image-editing programs, GIMP includes many filters to add dramatic effects to your images. Filters are applied either to the currently selected layer or to a selection within the layer. To apply a filter, right-click the image and choose the relevant menu option. If you don’t like an effect you’ve applied, you can reverse it by selecting Edit ->
Undo, or by pressing Ctrl+Z.
The submenus offer filters grouped by categories, as follows:
Blur: These filters add various kinds of blur to the image or selection. For example, Motion Blur can imitate the effect of photographing an object moving at speed with a slow shutter. Perhaps the most popular blur option is Gaussian Blur, which has the effect of applying a soft and subtle blur.
Enhance: The Enhance effects are designed to remove various artifacts from an image or otherwise improve it. For example, the Despeckle effect will attempt to remove unwanted noise within an image (such as flecks of dust in a scanned image). The Sharpen filter discussed in the previous section is located here, as is Unsharp Mask, which offers a high degree of control over the image-sharpening process.
Distorts: As the name of this category of filters suggests, the effects here distort the image in various ways. For example, Whirl and Pinch allow you to tug and push the image to distort it (to understand what is meant here, imagine printing the image on rubber and then pinching or pushing the surface). This category also contains other special effects, such as Pagecurl, which imitates the curl of a page at the bottom of the picture.
Light and Shadow: Here, you will find filters that imitate the effects that light and shadow can have on a picture, such as adding sparkle effects to highlights or imitating lens flare caused by a camera’s lens.
Noise: This collection of filters is designed to add speckles or other types of artifacts to an image. These filters are offered within GIMP for their potential artistic effects, but they can also be used to create a grainy film effect—simply click Scatter RGB.
Edge-Detect: This set of filters can be used to automatically detect and delineate the edges of objects within an image. Although this type of filter can result in some interesting results that might fall into the category of special effects, it’s primarily used in conjunction with other tools and effects.
Generic: In this category, you can find a handful of filters that don’t seem to fall into any other category. Of particular interest is the Convolution Matrix option, which lets you create your own filters by inputting numeric values. According to GIMP’s programmers, this is designed primarily for mathematicians, but it can also be used by others to create random special effects. Simply input values and then preview the effect.
Combine: Here, you’ll find filters that combine two or more images into one.
Artistic: These filters allow you to add paint effects to the image, such as making it appear as if the photo has been painted in impressionistic brushstrokes or painted on canvas.
Map: These filters aim to manipulate the image by treating it like a piece of paper that can be folded in various ways and stuck onto 3D shapes (a process referred to as mapping). Because the image is treated as if it were a piece of paper, it can also be copied, and the copies placed on top of each other to create various effects.
Render: Here, you’ll find filters designed to create new images from scratch, such as clouds or flame effects. They obliterate anything that was previously underneath on that particular layer or within that selection, and the original image has no bearing on what is generated by the filter.
Web: Here, you can create an image map for use in a web page. An image map is a single image broken up into separate hyperlinked areas, typically used on a web page as a sophisticated menu. For example, an image map is frequently used for a geographical map on which you can click to get more information about different regions.
Animation: These filters aim to manipulate and optimize GIF images, which are commonly used to create simple animated images for use on web sites.
Alpha to Logo: These filters are typically used to create special effects for text. They are quite specialized and require an in-depth knowledge of how GIMP works, particularly the use of alpha channels.
Decors: These filters are used to add decorations and special effects to an image. Filters include Coffee Stains (which actually adds coffee stains to your image), Old Photo, Round Corners, and Bevel Borders.
Undo, or by pressing Ctrl+Z.
The submenus offer filters grouped by categories, as follows:
Blur: These filters add various kinds of blur to the image or selection. For example, Motion Blur can imitate the effect of photographing an object moving at speed with a slow shutter. Perhaps the most popular blur option is Gaussian Blur, which has the effect of applying a soft and subtle blur.
Enhance: The Enhance effects are designed to remove various artifacts from an image or otherwise improve it. For example, the Despeckle effect will attempt to remove unwanted noise within an image (such as flecks of dust in a scanned image). The Sharpen filter discussed in the previous section is located here, as is Unsharp Mask, which offers a high degree of control over the image-sharpening process.
Distorts: As the name of this category of filters suggests, the effects here distort the image in various ways. For example, Whirl and Pinch allow you to tug and push the image to distort it (to understand what is meant here, imagine printing the image on rubber and then pinching or pushing the surface). This category also contains other special effects, such as Pagecurl, which imitates the curl of a page at the bottom of the picture.
Light and Shadow: Here, you will find filters that imitate the effects that light and shadow can have on a picture, such as adding sparkle effects to highlights or imitating lens flare caused by a camera’s lens.
Noise: This collection of filters is designed to add speckles or other types of artifacts to an image. These filters are offered within GIMP for their potential artistic effects, but they can also be used to create a grainy film effect—simply click Scatter RGB.
Edge-Detect: This set of filters can be used to automatically detect and delineate the edges of objects within an image. Although this type of filter can result in some interesting results that might fall into the category of special effects, it’s primarily used in conjunction with other tools and effects.
Generic: In this category, you can find a handful of filters that don’t seem to fall into any other category. Of particular interest is the Convolution Matrix option, which lets you create your own filters by inputting numeric values. According to GIMP’s programmers, this is designed primarily for mathematicians, but it can also be used by others to create random special effects. Simply input values and then preview the effect.
Combine: Here, you’ll find filters that combine two or more images into one.
Artistic: These filters allow you to add paint effects to the image, such as making it appear as if the photo has been painted in impressionistic brushstrokes or painted on canvas.
Map: These filters aim to manipulate the image by treating it like a piece of paper that can be folded in various ways and stuck onto 3D shapes (a process referred to as mapping). Because the image is treated as if it were a piece of paper, it can also be copied, and the copies placed on top of each other to create various effects.
Render: Here, you’ll find filters designed to create new images from scratch, such as clouds or flame effects. They obliterate anything that was previously underneath on that particular layer or within that selection, and the original image has no bearing on what is generated by the filter.
Web: Here, you can create an image map for use in a web page. An image map is a single image broken up into separate hyperlinked areas, typically used on a web page as a sophisticated menu. For example, an image map is frequently used for a geographical map on which you can click to get more information about different regions.
Animation: These filters aim to manipulate and optimize GIF images, which are commonly used to create simple animated images for use on web sites.
Alpha to Logo: These filters are typically used to create special effects for text. They are quite specialized and require an in-depth knowledge of how GIMP works, particularly the use of alpha channels.
Decors: These filters are used to add decorations and special effects to an image. Filters include Coffee Stains (which actually adds coffee stains to your image), Old Photo, Round Corners, and Bevel Borders.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
Tuesday, December 16, 2008
Making Color Corrections with GIMP
The first step when editing most images is to correct the brightness, contrast, and color saturation. This helps overcome some of the deficiencies that are commonly found in digital photographs or scanned-in images. To do this, right-click the image and select Colors. You’ll find a variety of options to let you tweak the image, allowing you a lot of control over the process.
For simple brightness and contrast changes, selecting the Brightness-Contrast menu option will open a dialog box where clicking and dragging the sliders will alter the image.
The changes you make will be previewed on the image itself, so you should be able to get things just right.
Similarly, the Hue-Saturation option will let you alter the color balance and the strength of the colors (the saturation) by clicking and dragging sliders. By selecting the color bar options at the top of the window, you can choose individual colors to boost. Clicking the Master button will let you once again alter all colors at the same time.
The trouble with clicking and dragging sliders is that it relies on human intuition. This can easily be clouded by a badly calibrated monitor, which might be set too dark or too light. Because of this, GIMP offers another handy option: Levels.
To access the Levels feature, right-click the image and select Colors -> Levels. This presents a chart of the brightness levels in the photo and lets you set the dark, shadows, and highlight points. Three sliders beneath the chart represent, from left to right, the darkest point, the midtones (shadows), and the highlights within the picture. The first step is to set the dark and light sliders at the left and right of the edges of the chart. This will make sure that the range of brightness from the lightest point to the darkest point is set correctly. The next step is to adjust the middle slider so that it’s roughly in the middle of the highest peak within the chart. This will accurately set the midtone point, ensuring an even spread of brightness across the image.
A little artistic license is usually allowed at this stage, and depending on the effect you want in the photo, moving the midtone slider a little to the left and/or right of the highest peak might produce more acceptable results. However, be aware that the monitor might be showing incorrect brightness or color values.
For simple brightness and contrast changes, selecting the Brightness-Contrast menu option will open a dialog box where clicking and dragging the sliders will alter the image.
The changes you make will be previewed on the image itself, so you should be able to get things just right.
Similarly, the Hue-Saturation option will let you alter the color balance and the strength of the colors (the saturation) by clicking and dragging sliders. By selecting the color bar options at the top of the window, you can choose individual colors to boost. Clicking the Master button will let you once again alter all colors at the same time.
The trouble with clicking and dragging sliders is that it relies on human intuition. This can easily be clouded by a badly calibrated monitor, which might be set too dark or too light. Because of this, GIMP offers another handy option: Levels.
To access the Levels feature, right-click the image and select Colors -> Levels. This presents a chart of the brightness levels in the photo and lets you set the dark, shadows, and highlight points. Three sliders beneath the chart represent, from left to right, the darkest point, the midtones (shadows), and the highlights within the picture. The first step is to set the dark and light sliders at the left and right of the edges of the chart. This will make sure that the range of brightness from the lightest point to the darkest point is set correctly. The next step is to adjust the middle slider so that it’s roughly in the middle of the highest peak within the chart. This will accurately set the midtone point, ensuring an even spread of brightness across the image.
A little artistic license is usually allowed at this stage, and depending on the effect you want in the photo, moving the midtone slider a little to the left and/or right of the highest peak might produce more acceptable results. However, be aware that the monitor might be showing incorrect brightness or color values.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
Monday, December 15, 2008
The Basics Features of GIMP
After you’ve started GIMP (and assigned it a virtual desktop), you can load an image by selecting File -> Open. The browser dialog box offers a preview facility on the right side of the window.
You will probably need to resize the image window so that it fits within the remainder of the screen. You can then use the Zoom tool to ensure that the image fills the editing window, which will make working with it much easier. Alternatively, you can click the Zoom drop-down list in the lower-left of the image window. You can save any changes you make to an image by right-clicking it and selecting File -> Save As. You can also print the image from the same menu. Before you begin editing with GIMP, you need to be aware of some essential concepts that are vital to understand in order to get the most from the program:
Copy, cut, and paste buffers: Unlike some Windows programs, GIMP lets you cut or copy many selections from the image and store them for use later. It refers to these saved selections as buffers, and each must be given a name for future reference. A new buffer is created by selecting an area using any of the selection tools, then right-clicking within the selection area and selecting Edit -> Buffer -> Copy Named (or Cut Named). Pasting a buffer back is a matter of right-clicking the image and selecting Edit -> Buffer -> Paste Named.
Paths: GIMP paths are not necessarily the same as selection areas, although it’s nearly always possible to convert a selection into a path and vice versa (right-click within the selection or path, and look for the relevant option on the Select menu: Select -> To
Path or Select -> From Path). In general, paths allow the creation of complex shapes, rather than the simple geometric shapes offered by the selection tools. You can also be more intricate in your selections. Paths can be saved for later use. To view the Paths dialog box, right-click the image and select Dialogs -> Paths.
Layers: In GIMP (along with most other image-editing programs), layers are like transparent sheets of plastic that are placed on top of the image. Anything can be drawn on each individual transparent sheet, and many layers can be overlaid in order to create a complicated image. Layers also let you cut and paste parts of the image between them. It’s also possible to apply effects and transformations to a single layer, rather than to the entire image. The Layers dialog box, appears by default, but if you closed it earlier, you can open it again by right-clicking the image and selecting Dialogs -> Layers. The layers can be reordered by clicking and dragging them in the dialog box. In addition, the blending mode of each layer can be altered. This refers to how it interacts with the layer below it. For example, its opacity can be changed so that it appears semitransparent, thereby showing the contents of the layer beneath.
You will probably need to resize the image window so that it fits within the remainder of the screen. You can then use the Zoom tool to ensure that the image fills the editing window, which will make working with it much easier. Alternatively, you can click the Zoom drop-down list in the lower-left of the image window. You can save any changes you make to an image by right-clicking it and selecting File -> Save As. You can also print the image from the same menu. Before you begin editing with GIMP, you need to be aware of some essential concepts that are vital to understand in order to get the most from the program:
Copy, cut, and paste buffers: Unlike some Windows programs, GIMP lets you cut or copy many selections from the image and store them for use later. It refers to these saved selections as buffers, and each must be given a name for future reference. A new buffer is created by selecting an area using any of the selection tools, then right-clicking within the selection area and selecting Edit -> Buffer -> Copy Named (or Cut Named). Pasting a buffer back is a matter of right-clicking the image and selecting Edit -> Buffer -> Paste Named.
Paths: GIMP paths are not necessarily the same as selection areas, although it’s nearly always possible to convert a selection into a path and vice versa (right-click within the selection or path, and look for the relevant option on the Select menu: Select -> To
Path or Select -> From Path). In general, paths allow the creation of complex shapes, rather than the simple geometric shapes offered by the selection tools. You can also be more intricate in your selections. Paths can be saved for later use. To view the Paths dialog box, right-click the image and select Dialogs -> Paths.
Layers: In GIMP (along with most other image-editing programs), layers are like transparent sheets of plastic that are placed on top of the image. Anything can be drawn on each individual transparent sheet, and many layers can be overlaid in order to create a complicated image. Layers also let you cut and paste parts of the image between them. It’s also possible to apply effects and transformations to a single layer, rather than to the entire image. The Layers dialog box, appears by default, but if you closed it earlier, you can open it again by right-clicking the image and selecting Dialogs -> Layers. The layers can be reordered by clicking and dragging them in the dialog box. In addition, the blending mode of each layer can be altered. This refers to how it interacts with the layer below it. For example, its opacity can be changed so that it appears semitransparent, thereby showing the contents of the layer beneath.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
Sunday, December 14, 2008
Using the Command History in Ubuntu
The original hackers who invented the tools used under Unix hated waiting around for things to happen. After all, being a hacker is all about finding the most efficient way of doing any particular task.
Because of this, the BASH shell includes many features designed to optimize the user experience. The most important of these is the command history. BASH remembers every command you enter (even the ones that don’t work!) and stores them as a list on your hard disk.
During any BASH session, you can cycle through this history using the up and down arrow keys. Pressing the up arrow key takes you back into the command history, and pressing the down arrow key takes you forward. The potential of the command history is enormous. For example, rather than retype that long command that runs a program with command options, you can simply use the cursor keys to locate it in the history and press Enter.
On my Ubuntu test system, BASH remembers 1000 commands. You can view all of the remembered commands by typing history at the command prompt. The history list will scroll off the screen because it’s so large, but you can use the scroll bars of the GNOME Terminal window to read it.
Each command in the history list is assigned a number. You can run any of the history commands by preceding their number with an exclamation mark (!), referred to as a bang, or sometimes a shriek. For example, you might type !923. On my test system, command number 923 in the BASH history is cd .., so this has the effect of switching me into the parent directory.
Command numbering remains in place until you log out (close the GNOME Terminal window or end a virtual console session). After this, the numbering is reordered. There will still be 1000 commands, but the last command you entered before logging out will be at the end of the list, and the numbering will work back 1000 places until the first command in the history list.
Rather than specifying a command number, you can type something like !cd. This will cause BASH to look in the history file, find the last instance of a command line that started with cd, and then run it.
Pressing Ctrl+R lets you search the command history from the command prompt. This particular tool can be tricky to get used to, however. As soon as you start typing, BASH will autocomplete the command based on matches found in the history file, starting with the last command in the history. What you type appears before the colon, while the autocompletion appears afterwards.
Because BASH autocompletes as you type, things can get a little confusing when you’re working with the command history, particularly if it initially gets the match wrong. For example, typing cd will show the last instance of the use of cd. This might not be what you’re looking for, so you must keep typing the command you do want until it autocompletes correctly.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
Because of this, the BASH shell includes many features designed to optimize the user experience. The most important of these is the command history. BASH remembers every command you enter (even the ones that don’t work!) and stores them as a list on your hard disk.
During any BASH session, you can cycle through this history using the up and down arrow keys. Pressing the up arrow key takes you back into the command history, and pressing the down arrow key takes you forward. The potential of the command history is enormous. For example, rather than retype that long command that runs a program with command options, you can simply use the cursor keys to locate it in the history and press Enter.
On my Ubuntu test system, BASH remembers 1000 commands. You can view all of the remembered commands by typing history at the command prompt. The history list will scroll off the screen because it’s so large, but you can use the scroll bars of the GNOME Terminal window to read it.
Each command in the history list is assigned a number. You can run any of the history commands by preceding their number with an exclamation mark (!), referred to as a bang, or sometimes a shriek. For example, you might type !923. On my test system, command number 923 in the BASH history is cd .., so this has the effect of switching me into the parent directory.
Command numbering remains in place until you log out (close the GNOME Terminal window or end a virtual console session). After this, the numbering is reordered. There will still be 1000 commands, but the last command you entered before logging out will be at the end of the list, and the numbering will work back 1000 places until the first command in the history list.
Rather than specifying a command number, you can type something like !cd. This will cause BASH to look in the history file, find the last instance of a command line that started with cd, and then run it.
Pressing Ctrl+R lets you search the command history from the command prompt. This particular tool can be tricky to get used to, however. As soon as you start typing, BASH will autocomplete the command based on matches found in the history file, starting with the last command in the history. What you type appears before the colon, while the autocompletion appears afterwards.
Because BASH autocompletes as you type, things can get a little confusing when you’re working with the command history, particularly if it initially gets the match wrong. For example, typing cd will show the last instance of the use of cd. This might not be what you’re looking for, so you must keep typing the command you do want until it autocompletes correctly.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
Saturday, December 13, 2008
Ubuntu Desktop Search Tools
Two primary search tools are available for your Ubuntu desktop: Search For Files and Tracker. Search For Files is installed by default and is accessible by choosing Places Search For Files. The Tracker search and desktop indexer is accessible from Applications Accessories Tracker search tool. When you start using Tracker, a Tracker icon will appear in the top panel. Tracker will actually index your files, making access more efficient. The GNOME file manager also provides its own search tool for quickly finding files. As an alternative, you can use the DeskBar search applet, which also makes use of Tracker indexing.
Tracker: Indexed Search
Tracker is a GNOME desktop indexing search tool (www.gnome.org/projects/tracker/) that’s technically named Meta-Tracker. Tracker is turned off by default as its indexing function can be resource intensive. You can enable Tracker by choosing System Preferences Search And Indexing and checking both the Enable Indexing and Enable Watching check boxes on the General tab. If you find that indexing is consuming too many resources, you can turn it off by unchecking the Enable Indexing check box. You can still use Tracker to perform searches if you have Enable Watching checked. Once enabled, the Tracker applet appears on the right side of the top panel. You can right-click the icon to display a menu for selecting preferences as well as to start Tracker or pausing indexing. Tracker indexes not just by name or location, but also by metadata and content of files and directories. Indexing is performed by the trackerd daemon.
To use Tracker, click its icon to open a search window, where you can enter your search and display the results. You can also open this window directly by rightclicking the Tracker icon and choosing Search. Search results are organized into Categories in the side pane. The results for a selected category are shown in the top-right pane. Information about a selected result appears in the lower-right pane. Tracker also has an indexer that can be configured using the Tracker Preferences window. Right-click the Tracker icon and choose Preferences, or choose System Preferences Search And Indexing. You’ll see tabs for General, Files, Ignored Files, Email, and Performance. On the General tab, you can enable or disable indexing. On the Files tab, you can specify what directories to index. Your home directory is already specified. You can also choose to index the contents of files. The Ignored Files tab lets you exclude directories from indexing, as well as files with certain patterns in their names. On the Email tab, you can index e-mail clients such as Evolution or Thunderbirds, as well as specify particular mbox files. The Performance tab lets you control the amount of resources indexing will use.
Search for Files
The Search For Files tool performs basic file searching. It uses a GNOME front end for the Linux grep, find, and locate tools. Choose Places Search For Files and enter the pattern for which you want to search. File-matching characters (wildcards) will help, such as an ampersand (*) for filename completion or brackets ([]) to specify a range of possible characters or numbers.
Enter the pattern of the search in the Name Contains text box, and then select the folder or file system in which to search from the Look In Folder drop-down menu. The user’s home folder is selected by default. You can then elect to specify advanced options such as the Contains The Text text box for searching the contents of text files (grep), or additional file characteristics such as the file date, size, or owner type (find). You can also use a regular expression to search filenames.
GNOME File Manager Search
The GNOME file manager uses another search tool with similar features. You enter a pattern on which to search, but you can also specify file types. The search begins from the folder opened, but you can specify another folder to search (Location option). Click the plus (+) button to add location and file type search parameters. In the browser mode, you can click the Search button on the toolbar to make the URL box a Search box. Pop up menus for Location and File Type will appear in the folder window, with + and – buttons for adding or removing location and file type search parameters.
Source of Information : McGraw Hill Ubuntu The Complete Reference
Tracker: Indexed Search
Tracker is a GNOME desktop indexing search tool (www.gnome.org/projects/tracker/) that’s technically named Meta-Tracker. Tracker is turned off by default as its indexing function can be resource intensive. You can enable Tracker by choosing System Preferences Search And Indexing and checking both the Enable Indexing and Enable Watching check boxes on the General tab. If you find that indexing is consuming too many resources, you can turn it off by unchecking the Enable Indexing check box. You can still use Tracker to perform searches if you have Enable Watching checked. Once enabled, the Tracker applet appears on the right side of the top panel. You can right-click the icon to display a menu for selecting preferences as well as to start Tracker or pausing indexing. Tracker indexes not just by name or location, but also by metadata and content of files and directories. Indexing is performed by the trackerd daemon.
To use Tracker, click its icon to open a search window, where you can enter your search and display the results. You can also open this window directly by rightclicking the Tracker icon and choosing Search. Search results are organized into Categories in the side pane. The results for a selected category are shown in the top-right pane. Information about a selected result appears in the lower-right pane. Tracker also has an indexer that can be configured using the Tracker Preferences window. Right-click the Tracker icon and choose Preferences, or choose System Preferences Search And Indexing. You’ll see tabs for General, Files, Ignored Files, Email, and Performance. On the General tab, you can enable or disable indexing. On the Files tab, you can specify what directories to index. Your home directory is already specified. You can also choose to index the contents of files. The Ignored Files tab lets you exclude directories from indexing, as well as files with certain patterns in their names. On the Email tab, you can index e-mail clients such as Evolution or Thunderbirds, as well as specify particular mbox files. The Performance tab lets you control the amount of resources indexing will use.
Search for Files
The Search For Files tool performs basic file searching. It uses a GNOME front end for the Linux grep, find, and locate tools. Choose Places Search For Files and enter the pattern for which you want to search. File-matching characters (wildcards) will help, such as an ampersand (*) for filename completion or brackets ([]) to specify a range of possible characters or numbers.
Enter the pattern of the search in the Name Contains text box, and then select the folder or file system in which to search from the Look In Folder drop-down menu. The user’s home folder is selected by default. You can then elect to specify advanced options such as the Contains The Text text box for searching the contents of text files (grep), or additional file characteristics such as the file date, size, or owner type (find). You can also use a regular expression to search filenames.
GNOME File Manager Search
The GNOME file manager uses another search tool with similar features. You enter a pattern on which to search, but you can also specify file types. The search begins from the folder opened, but you can specify another folder to search (Location option). Click the plus (+) button to add location and file type search parameters. In the browser mode, you can click the Search button on the toolbar to make the URL box a Search box. Pop up menus for Location and File Type will appear in the folder window, with + and – buttons for adding or removing location and file type search parameters.
Source of Information : McGraw Hill Ubuntu The Complete Reference
Thursday, December 11, 2008
Accessing Ubuntu Linux from the Command Line Interface
For the command line interface, you are initially provided a login prompt. On Ubuntu, you can access the command line interface by pressing ctrl-alt-f1 at any time (alt-f7 returns to the graphical interface). The login prompt is preceded by the hostname you gave to your system. When you finish using Linux, you first log out. Linux then displays exactly the same login prompt, waiting for you or another user to log in again. This is the equivalent of the login window provided by the GDM. You can then log in to another account.
Once you log in to an account, you can enter and execute commands. Logging in to your Linux account involves two steps: entering your username and then entering your password. Type in the username for your user account. In the next example, the hostname is turtle, and the user enters the username richlp and is then prompted to enter a password:
Ubuntu release 8.04
Kernel 2.6 on an i686
turtle login: richlp
Password:
When you type in your password, it does not appear on the screen to protect your password from being seen by others. If you enter either the username or the password incorrectly, the system will respond with the error message “Login incorrect” and will ask for your username again, starting over the login process. You can then re-enter your username and password.
Once you enter your username and password correctly, you are logged in to the system.
The command line prompt is displayed, waiting for you to enter a command. Notice the command line prompt is a dollar sign ($), not a number sign (#). The $ is the prompt for regular users, whereas the # is the prompt solely for the root user. In this version of Ubuntu, your prompt is preceded by the hostname and the directory in which you are working. Both are bounded by a set of brackets:
[turtle /home/richlp]$
To end your session, issue the logout or exit command. This returns you to the login prompt, and Linux waits for another user to log in.
[turtle /home/richlp]$ logout
To log out and shut down your system from the command line, enter the halt command:
$ halt
Once you log in to an account, you can enter and execute commands. Logging in to your Linux account involves two steps: entering your username and then entering your password. Type in the username for your user account. In the next example, the hostname is turtle, and the user enters the username richlp and is then prompted to enter a password:
Ubuntu release 8.04
Kernel 2.6 on an i686
turtle login: richlp
Password:
When you type in your password, it does not appear on the screen to protect your password from being seen by others. If you enter either the username or the password incorrectly, the system will respond with the error message “Login incorrect” and will ask for your username again, starting over the login process. You can then re-enter your username and password.
Once you enter your username and password correctly, you are logged in to the system.
The command line prompt is displayed, waiting for you to enter a command. Notice the command line prompt is a dollar sign ($), not a number sign (#). The $ is the prompt for regular users, whereas the # is the prompt solely for the root user. In this version of Ubuntu, your prompt is preceded by the hostname and the directory in which you are working. Both are bounded by a set of brackets:
[turtle /home/richlp]$
To end your session, issue the logout or exit command. This returns you to the login prompt, and Linux waits for another user to log in.
[turtle /home/richlp]$ logout
To log out and shut down your system from the command line, enter the halt command:
$ halt
Source of Information : McGraw Hill Ubuntu The Complete Reference
Wednesday, December 10, 2008
Web Servers for Use with Ubuntu
To determine the best web server for your use, consider the needs of the website you manage. Does it need heavy security (for e-commerce), multimedia (music, video, and pictures), or the capability to download files easily? How much are you willing to spend for the software? Do you need software that is easy to maintain and troubleshoot or that includes tech support? The answers to these questions might steer you to something other than Apache.
Apache Web Server
Apache is the most widely used web server on the Internet today, according to a Netcraft survey of active websites in June 2007. Note that these statistics do not reflect Apache’s use on internal networks, known as intranets. The name Apache appeared during the early development of the software because it was “a patchy” server, made up of patches for the freely available source code of the NCSA HTTPd web server. For a while after the NCSA HTTPd project was discontinued, a number of people wrote a variety of patches for the code, to either fix bugs or add features they wanted. A lot of this code was floating around and people were freely sharing it, but it was completely unmanaged. After a while, Brian Behlendorf and Cliff Skolnick set up a centralized repository of these patches, and the Apache project was born. The project is still composed of a small core group of programmers, but anyone is welcome to submit patches to the group for possible inclusion in the code.
There has been a surge of interest in the Apache project over the past several years, partially buoyed by a new interest in open source on the part of enterprise-level information services. It’s also due in part to crippling security flaws found in Microsoft’s Internet Information Services (IIS); the existence of malicious web task exploits; and operating system and networking vulnerabilities to the now-infamous Code Red, Blaster, and Nimda worms. IBM made an early commitment to support and use Apache as the basis for its web offerings and has dedicated substantial resources to the project because it makes more sense to use an established, proven web server.
In mid-1999, The Apache Software Foundation was incorporated as a nonprofit company. A board of directors, who are elected on an annual basis by the ASF members, oversees the company. This company provides a foundation for several open-source software development projects, including the Apache Web Server project. The best places to find out about Apache are the Apache Group’s website, http://www.apache.org/, and the Apache Week website, http://www.apacheweek.com/, where you can subscribe to receive Apache Week by email to keep up on the latest developments in the project, keep abreast of security advisories, and research bug fixes.
Ubuntu ships with Apache 2, and the server (named apache2). You can obtain the latest version of Apache as a package file from an Ubuntu FTP server, through Synaptic, or by getting the source code from the Apache website and, in true Linux tradition, build it for yourself. To determine the version of Apache included with your system, use the web server’s –V command-line option like this:
$ /usr/sbin/apache2 -V
Server version: Apache/2.0.50
Server built: Jun 29 2004 11:11:55
Server’s Module Magic Number: 20020903:8
Architecture: 32-bit
Server compiled with....
The output displays the version number, build date and time, platform, and various options used during the build. You can use the -v option to see terser version information.
Sun ONE Web Server
Despite the Netcraft numbers shown previously in, there is evidence that the Sun Java System Web Server (formerly known as the iPlanet Web Server, and subsequently Sun ONE Web Server) might be even more popular than Apache in strictly corporate arenas. The server got its start as the Netscape Enterprise Server—one of the first powerful web servers ever to hit the market. Sun ONE Web Server comes in many flavors, and all of them are big. In addition to the enterprise-level web server that can be run on Ubuntu, the software features application, messaging, calendar, and directory servers—just to name a few. Sun ONE Web Server is great for handling big web needs, and it comes with an appropriately big price tag. It’s definitely not something to run the school website—unless your school happens to be a major state university with several regional campuses. For more information on Sun Java System Web Server, you can visit its website (http://wwws.sun.com/software/products/web_srvr/home_web_srvr.html).
Zope
Zope is another open-source web server. Although it is still relatively young and might not have as much flexibility as Apache, it is making strong inroads in the web server market. What makes Zope different from Apache is the fact that it is managed through a completely web-based graphic interface. This has broad appeal for those who are not enthused about a command-line–only interface. Zope is a product of the Zope Corporation (formerly Digital Creations), the same firm that made the Python programming language. And, like all things open source, it is free. Information on Zope can be found at both http://www.zope.com (for the commercial version) and http://www.zope.org (for the open-source version).
Zeus Web Server
Ubuntu sites can also use the Zeus Web Server from Zeus Technology. This server offers a scalable SSL implementation, security settings across multiple websites, and an online administration server. The current price is $1,700 for a host platform with up to two CPUs, but load balancing via the Zeus Load Balancer costs $12,000 (at the time of writing) for each pair of load-balancing computers. You can get more information about the Zeus Web Server at http://www.zeus.com/products/zws/.
Apache Web Server
Apache is the most widely used web server on the Internet today, according to a Netcraft survey of active websites in June 2007. Note that these statistics do not reflect Apache’s use on internal networks, known as intranets. The name Apache appeared during the early development of the software because it was “a patchy” server, made up of patches for the freely available source code of the NCSA HTTPd web server. For a while after the NCSA HTTPd project was discontinued, a number of people wrote a variety of patches for the code, to either fix bugs or add features they wanted. A lot of this code was floating around and people were freely sharing it, but it was completely unmanaged. After a while, Brian Behlendorf and Cliff Skolnick set up a centralized repository of these patches, and the Apache project was born. The project is still composed of a small core group of programmers, but anyone is welcome to submit patches to the group for possible inclusion in the code.
There has been a surge of interest in the Apache project over the past several years, partially buoyed by a new interest in open source on the part of enterprise-level information services. It’s also due in part to crippling security flaws found in Microsoft’s Internet Information Services (IIS); the existence of malicious web task exploits; and operating system and networking vulnerabilities to the now-infamous Code Red, Blaster, and Nimda worms. IBM made an early commitment to support and use Apache as the basis for its web offerings and has dedicated substantial resources to the project because it makes more sense to use an established, proven web server.
In mid-1999, The Apache Software Foundation was incorporated as a nonprofit company. A board of directors, who are elected on an annual basis by the ASF members, oversees the company. This company provides a foundation for several open-source software development projects, including the Apache Web Server project. The best places to find out about Apache are the Apache Group’s website, http://www.apache.org/, and the Apache Week website, http://www.apacheweek.com/, where you can subscribe to receive Apache Week by email to keep up on the latest developments in the project, keep abreast of security advisories, and research bug fixes.
Ubuntu ships with Apache 2, and the server (named apache2). You can obtain the latest version of Apache as a package file from an Ubuntu FTP server, through Synaptic, or by getting the source code from the Apache website and, in true Linux tradition, build it for yourself. To determine the version of Apache included with your system, use the web server’s –V command-line option like this:
$ /usr/sbin/apache2 -V
Server version: Apache/2.0.50
Server built: Jun 29 2004 11:11:55
Server’s Module Magic Number: 20020903:8
Architecture: 32-bit
Server compiled with....
The output displays the version number, build date and time, platform, and various options used during the build. You can use the -v option to see terser version information.
Sun ONE Web Server
Despite the Netcraft numbers shown previously in, there is evidence that the Sun Java System Web Server (formerly known as the iPlanet Web Server, and subsequently Sun ONE Web Server) might be even more popular than Apache in strictly corporate arenas. The server got its start as the Netscape Enterprise Server—one of the first powerful web servers ever to hit the market. Sun ONE Web Server comes in many flavors, and all of them are big. In addition to the enterprise-level web server that can be run on Ubuntu, the software features application, messaging, calendar, and directory servers—just to name a few. Sun ONE Web Server is great for handling big web needs, and it comes with an appropriately big price tag. It’s definitely not something to run the school website—unless your school happens to be a major state university with several regional campuses. For more information on Sun Java System Web Server, you can visit its website (http://wwws.sun.com/software/products/web_srvr/home_web_srvr.html).
Zope
Zope is another open-source web server. Although it is still relatively young and might not have as much flexibility as Apache, it is making strong inroads in the web server market. What makes Zope different from Apache is the fact that it is managed through a completely web-based graphic interface. This has broad appeal for those who are not enthused about a command-line–only interface. Zope is a product of the Zope Corporation (formerly Digital Creations), the same firm that made the Python programming language. And, like all things open source, it is free. Information on Zope can be found at both http://www.zope.com (for the commercial version) and http://www.zope.org (for the open-source version).
Zeus Web Server
Ubuntu sites can also use the Zeus Web Server from Zeus Technology. This server offers a scalable SSL implementation, security settings across multiple websites, and an online administration server. The current price is $1,700 for a host platform with up to two CPUs, but load balancing via the Zeus Load Balancer costs $12,000 (at the time of writing) for each pair of load-balancing computers. You can get more information about the Zeus Web Server at http://www.zeus.com/products/zws/.
Source of Information : Sams Ubuntu Unleashed 2008 Edition
Tuesday, December 9, 2008
Using Autocompletion in Ubuntu
The Tab key is your best friend when using the shell, because it will cause BASH to automatically complete whatever you type. For example, if you want to run Ubuntu’s web browser, you can enter firefox at the command line. However, to save yourself some time, you can type fir, and then press Tab. You’ll then find that BASH fills in the rest for you. It does this by caching the names of the programs you might run according to the directories listed in your $PATH variable.
Of course, autocompletion has some limitations. On my Ubuntu test system, typing loc didn’t autocomplete locate. Instead, it caused BASH to beep. This is because on a default Ubuntu installation, there is more than one possible match. Pressing Tab again shows those matches. Depending on how much you type (how much of an initial clue you give BASH), you might find there are many possible matches.
In this case, the experienced BASH user simply types another letter, which will be enough to distinguish the almost-typed word from the rest, and presses Tab again. With any luck, this should be enough for BASH to fill in the rest.
Autocompletion with Files and Paths
Tab autocompletion also works with files and paths. If you type the first few letters of a folder name, BASH will try to fill in the rest. This also obviously has limitations. There’s no point in typing cd myfol and pressing Tab if there’s nothing in the current directory that starts with the letters myfol. This particular autocomplete function works by looking at your current directory and seeing what’s available.
Alternatively, you can specify an initial path for BASH to use in order to autocomplete. Typing cd /ho and pressing Tab will cause BASH to autocomplete the path by looking in the root directory (/). In other words, it will autocomplete the command with the directory home. In a similar way, typing cd myfolder/myfo will cause BASH to attempt to autocomplete by looking for a match in myfolder.
If you want to run a program that resides in the current directory, such as one you’ve just downloaded for example, typing ./, followed by the first part of the program name, and then pressing Tab should be enough to have BASH autocomplete the rest. In this case, the dot and slash tell BASH to look in the current directory for any executable programs or scripts (programs with X as part of their permissions) and use them as possible autocomplete options.
BASH is clever enough to spot whether the command you’re using is likely to require a file, directory, or executable, and it will autocomplete with only relevant file or directory names.
Viewing Available Options
The autocomplete function has a neat side effect. As we mentioned earlier, if BASH cannot find a match, pressing Tab again causes BASH to show all the available options. For example, typing ba at the shell, and then pressing Tab twice will cause BASH to show all the possible commands starting with the letters ba. On my test PC, this produces the following list of commands:
badblocks banner baobab basename bash bashbug batch
This can be a nice way of exploring what commands are available on your system. You can then use each command with the --help command option to find out what it does, or browse the command’s man page.
When you apply this trick to directory and filename autocompletion, it’s even more useful. For example, typing cd in a directory, and then pressing the Tab key twice will cause BASH to show the available directories, providing a handy way of retrieving a brief directory listing. Alternatively, if you’ve forgotten how a directory name is spelled, you can use this technique to find out prior to switching into it.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
Of course, autocompletion has some limitations. On my Ubuntu test system, typing loc didn’t autocomplete locate. Instead, it caused BASH to beep. This is because on a default Ubuntu installation, there is more than one possible match. Pressing Tab again shows those matches. Depending on how much you type (how much of an initial clue you give BASH), you might find there are many possible matches.
In this case, the experienced BASH user simply types another letter, which will be enough to distinguish the almost-typed word from the rest, and presses Tab again. With any luck, this should be enough for BASH to fill in the rest.
Autocompletion with Files and Paths
Tab autocompletion also works with files and paths. If you type the first few letters of a folder name, BASH will try to fill in the rest. This also obviously has limitations. There’s no point in typing cd myfol and pressing Tab if there’s nothing in the current directory that starts with the letters myfol. This particular autocomplete function works by looking at your current directory and seeing what’s available.
Alternatively, you can specify an initial path for BASH to use in order to autocomplete. Typing cd /ho and pressing Tab will cause BASH to autocomplete the path by looking in the root directory (/). In other words, it will autocomplete the command with the directory home. In a similar way, typing cd myfolder/myfo will cause BASH to attempt to autocomplete by looking for a match in myfolder.
If you want to run a program that resides in the current directory, such as one you’ve just downloaded for example, typing ./, followed by the first part of the program name, and then pressing Tab should be enough to have BASH autocomplete the rest. In this case, the dot and slash tell BASH to look in the current directory for any executable programs or scripts (programs with X as part of their permissions) and use them as possible autocomplete options.
BASH is clever enough to spot whether the command you’re using is likely to require a file, directory, or executable, and it will autocomplete with only relevant file or directory names.
Viewing Available Options
The autocomplete function has a neat side effect. As we mentioned earlier, if BASH cannot find a match, pressing Tab again causes BASH to show all the available options. For example, typing ba at the shell, and then pressing Tab twice will cause BASH to show all the possible commands starting with the letters ba. On my test PC, this produces the following list of commands:
badblocks banner baobab basename bash bashbug batch
This can be a nice way of exploring what commands are available on your system. You can then use each command with the --help command option to find out what it does, or browse the command’s man page.
When you apply this trick to directory and filename autocompletion, it’s even more useful. For example, typing cd in a directory, and then pressing the Tab key twice will cause BASH to show the available directories, providing a handy way of retrieving a brief directory listing. Alternatively, if you’ve forgotten how a directory name is spelled, you can use this technique to find out prior to switching into it.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
Monday, December 8, 2008
Accessing Your Ubuntu Linux System with GDM
If you have installed the GRUB boot loader, when you turn on or reset your computer, the boot loader first decides what operating system to load and run. The boot loader then loads the default operating system, which will be Ubuntu. Ubuntu will use a graphical interface by default, presenting you with a login window in which you enter your username and password.
If other operating systems, such as Windows, are already installed on your computer, you can press the spacebar at startup to display a boot loader menu showing those systems as boot options. If a Windows system is listed, you can choose to start that instead of Ubuntu.
The GNOME Display Manager: GDM
In Ubuntu, the GNOME Display Manager (GDM) manages the login interface along with authenticating the username and password, and then Ubuntu starts up a selected desktop.
On startup, the GDM displays a login window with a Username text box. Various GDM themes are available, which you can select using the GDM configuration tool. The default theme currently used is the Ubuntu Human theme. An Options pop-up menu at the lower-left corner of the screen shows entries for Restart, Shut Down, Suspend, and Hibernate your system. In addition, Select Language and Select Session entries display dialogs for selecting the language or user interface you want to use, such as GNOME or KDE.
Enter your username and press enter. Then enter your password and press enter. By default, the GNOME desktop starts up.
When you log out from the desktop, you return to the GDM login screen. To shut down your Linux system, choose Options | Shut Down. To restart, choose Options | Restart. You can also shut down the system from GNOME: Choose System | Quit, or click the Quit button on the top panel at the right. GNOME will display a dialog box with two rows of buttons: Suspend, Hibernate, Restart, or Shut Down options appear in the bottom row. Click Restart to shut down and restart your system.
Choose Options | Select Sessions to select the desktop or window manager you want to start up. In the dialog box that shows all installed user interfaces, you can choose KDE to start up the K Desktop, for example, instead of GNOME. The KDE option will not be shown unless you have already installed KDE.
Failsafe entries for both GNOME and the terminal provide a stripped down interface you can use for troubleshooting. For example, the Run Xclient script lets you run just your X Window System configuration script. This script will normally start up GNOME or KDE, but it could be specially configured for other desktops or window managers. Normally, the last session entry would be selected, which starts up the interface you used previously. Once you have selected your interface, click the Change Session button (or you can opt
out of any change by clicking the Cancel button) to return to the login screen.
Selecting Language from the Options menu opens a dialog with a drop-down menu that lists a variety of languages supported by Linux. Choose one and click the Change Language button to change the language used by your interface.
If you encounter problems in using the GUI, you can force an exit by pressing CTRL-ALTBACKSPACE to return to the login screen. In addition, from the GDM, you can switch to the command line interface by pressing CTRL-ALT-F1, and then switch back to the GUI by pressing CTRL-ALT-F7. You can also force your system to reboot at the login prompt by holding down the CTRL and ALT keys and then pressing the DEL key (CTRL-ALT-DEL). Your system will go through the standard shutdown procedure and then your computer will reboot.
You can configure your GDM login window with different features such as background images and user icons. The GDM even has its own selection of themes from which to choose. Choose System | Administration | Login Window to configure your login window.
The User Switcher
The user switcher at the upper-right of the top panel of the GNOME desktop lets you switch to another user without having to log out or end your current user session. The user switcher is installed automatically as part of your basic GNOME desktop configuration. Click the username to see a list of all other users, as shown next. Check boxes appear next to the names to indicate which users are logged in and running. To switch to a different user, simply select the user from this list. If the user is not already logged in, the login screen (GDM) will appear, where you can enter the user’s password.
If the user is already logged in, the login screen for the lock screen will appear (you can disable the lock screen). Enter the user’s password here. The user’s original session will continue, and any open windows and applications running when the user switched off will still be open and running. You can easily switch back and forth between logged in users, with each user retaining his session where he left off. When you switch to a new user, the former user’s running programs will continue in the background. Right-clicking the switcher will list several user management options, such as configuring the login screen, managing users, or changing the user’s password and personal information. The Preferences item lets you configure how the user switcher is displayed on your screen. For example, instead of the username, you could use the term Users or a user icon. You can also choose whether to use a lock screen when the user is switched. Disabling the lock screen option will let you switch seamlessly between logged in users.
If other operating systems, such as Windows, are already installed on your computer, you can press the spacebar at startup to display a boot loader menu showing those systems as boot options. If a Windows system is listed, you can choose to start that instead of Ubuntu.
The GNOME Display Manager: GDM
In Ubuntu, the GNOME Display Manager (GDM) manages the login interface along with authenticating the username and password, and then Ubuntu starts up a selected desktop.
On startup, the GDM displays a login window with a Username text box. Various GDM themes are available, which you can select using the GDM configuration tool. The default theme currently used is the Ubuntu Human theme. An Options pop-up menu at the lower-left corner of the screen shows entries for Restart, Shut Down, Suspend, and Hibernate your system. In addition, Select Language and Select Session entries display dialogs for selecting the language or user interface you want to use, such as GNOME or KDE.
Enter your username and press enter. Then enter your password and press enter. By default, the GNOME desktop starts up.
When you log out from the desktop, you return to the GDM login screen. To shut down your Linux system, choose Options | Shut Down. To restart, choose Options | Restart. You can also shut down the system from GNOME: Choose System | Quit, or click the Quit button on the top panel at the right. GNOME will display a dialog box with two rows of buttons: Suspend, Hibernate, Restart, or Shut Down options appear in the bottom row. Click Restart to shut down and restart your system.
Choose Options | Select Sessions to select the desktop or window manager you want to start up. In the dialog box that shows all installed user interfaces, you can choose KDE to start up the K Desktop, for example, instead of GNOME. The KDE option will not be shown unless you have already installed KDE.
Failsafe entries for both GNOME and the terminal provide a stripped down interface you can use for troubleshooting. For example, the Run Xclient script lets you run just your X Window System configuration script. This script will normally start up GNOME or KDE, but it could be specially configured for other desktops or window managers. Normally, the last session entry would be selected, which starts up the interface you used previously. Once you have selected your interface, click the Change Session button (or you can opt
out of any change by clicking the Cancel button) to return to the login screen.
Selecting Language from the Options menu opens a dialog with a drop-down menu that lists a variety of languages supported by Linux. Choose one and click the Change Language button to change the language used by your interface.
If you encounter problems in using the GUI, you can force an exit by pressing CTRL-ALTBACKSPACE to return to the login screen. In addition, from the GDM, you can switch to the command line interface by pressing CTRL-ALT-F1, and then switch back to the GUI by pressing CTRL-ALT-F7. You can also force your system to reboot at the login prompt by holding down the CTRL and ALT keys and then pressing the DEL key (CTRL-ALT-DEL). Your system will go through the standard shutdown procedure and then your computer will reboot.
You can configure your GDM login window with different features such as background images and user icons. The GDM even has its own selection of themes from which to choose. Choose System | Administration | Login Window to configure your login window.
The User Switcher
The user switcher at the upper-right of the top panel of the GNOME desktop lets you switch to another user without having to log out or end your current user session. The user switcher is installed automatically as part of your basic GNOME desktop configuration. Click the username to see a list of all other users, as shown next. Check boxes appear next to the names to indicate which users are logged in and running. To switch to a different user, simply select the user from this list. If the user is not already logged in, the login screen (GDM) will appear, where you can enter the user’s password.
If the user is already logged in, the login screen for the lock screen will appear (you can disable the lock screen). Enter the user’s password here. The user’s original session will continue, and any open windows and applications running when the user switched off will still be open and running. You can easily switch back and forth between logged in users, with each user retaining his session where he left off. When you switch to a new user, the former user’s running programs will continue in the background. Right-clicking the switcher will list several user management options, such as configuring the login screen, managing users, or changing the user’s password and personal information. The Preferences item lets you configure how the user switcher is displayed on your screen. For example, instead of the username, you could use the term Users or a user icon. You can also choose whether to use a lock screen when the user is switched. Disabling the lock screen option will let you switch seamlessly between logged in users.
Source of Information : McGraw Hill Ubuntu The Complete Reference
Saturday, December 6, 2008
Wubi - Ubuntu Windows-Based Installer
Wubi is an Ubuntu installer that lets you install and run Ubuntu from Windows. It is a simple, safe, and painless way to install Linux for users who want to preserve their Windows system without having to perform any potentially hazardous hard disk partition operations to free up space and create new hardware partitions for Ubuntu. Wubi is already integrated into the Ubuntu 8.04 Desktop CD. Using Wubi, you do not have to create a separate partition for Ubuntu. A file created on your Window system functions as a virtual disk, and Ubuntu is installed on this virtual disk, which operates like a hard disk with a Linux file system installed on it. The Windows boot loader is modified to list a choice for Ubuntu, so when Windows starts up, you can choose to start Ubuntu instead of Windows.
The Wubi installation of Ubuntu is fully functional in every way. Though it uses a virtual hard disk, it is not a virtual system. When you start Ubuntu, you are running only Ubuntu. It differs from a standard install in that the system is installed on a file, rather than an actual hard disk partition, and the original Windows boot loader is used instead of the GRUB boot loader. As far as usage is concerned, operations are the same, though with slightly slower disk access. You can find out more about Wubi at http://wubi-installer.org. Check the Ubuntu WubiGuide (https://wiki.ubuntu.com/WubiGuide) for detailed information about installation and management issues such as boot problems, virtual disk creation, and details of the Wubi installation for Ubuntu.
To install Ubuntu with Wubi, insert the Ubuntu Desktop CD into your CD/DVD drive. The Ubuntu CD Menu automatically starts, giving you the option of performing the standard install (restart and possibly partition your drive) or installing inside Windows (use a Wubi virtual hard disk file on Windows). The Learn More option opens the Ubuntu Web site.
The Setup screen will prompt you for the drive on which to install the virtual disk file; the installation size, which is the size for the virtual disk file; the desktop environment (Ubuntu); the language to use; and a username and password. You then click the Install button to download and install Ubuntu. Clicking the Accessibility button opens a dialog where you can specify accessibility install options such as Contrast, Magnifier, Braille, and On-screen Keyboard.
Wubi then installs the standard Ubuntu desktop. Your language, keyboard, partitions, and user login have already been determined from the Setup window. Wubi will first copy over files from the Desktop install disk and then prompt you to reboot. When you reboot, your Windows boot menu is displayed with an entry for Ubuntu. Use the arrow keys to select the Ubuntu entry and press enter. Ubuntu will then start up. The first time it will complete the installation showing just a progress bar on the desktop, formatting, installing software, detecting hardware, and configuring your system. You do not have to do anything. Once installation tasks are finished, you reboot and select Ubuntu again to start it up. Ubuntu is fully functional. You can configure your system, install hardware drivers, and set preferences just as you do for any Ubuntu system.
Wubi sets up an ubuntu directory on the hard drive partition on which you installed Ubuntu, usually the c: drive. Here you will find boot and disks subdirectories. In the disks subdirectory is your virtual hard disk where Ubuntu is installed. You will also find another virtual hard disk file for your swap disk. Your Ubuntu virtual disk will be named root.disk, as in c:\ubuntu\disks\root.disk. Keep in mind that Ubuntu is installed as a file on your Windows system. Be careful not to delete the ubuntu directory. Should you reformat your Windows partition for any reason, you, of course, would lose you Ubuntu system also. You can uninstall a Wubi installed Ubuntu system using Window’s Add or Remove Software applet.
Source of Information : McGraw Hill Ubuntu The Complete Reference
The Wubi installation of Ubuntu is fully functional in every way. Though it uses a virtual hard disk, it is not a virtual system. When you start Ubuntu, you are running only Ubuntu. It differs from a standard install in that the system is installed on a file, rather than an actual hard disk partition, and the original Windows boot loader is used instead of the GRUB boot loader. As far as usage is concerned, operations are the same, though with slightly slower disk access. You can find out more about Wubi at http://wubi-installer.org. Check the Ubuntu WubiGuide (https://wiki.ubuntu.com/WubiGuide) for detailed information about installation and management issues such as boot problems, virtual disk creation, and details of the Wubi installation for Ubuntu.
To install Ubuntu with Wubi, insert the Ubuntu Desktop CD into your CD/DVD drive. The Ubuntu CD Menu automatically starts, giving you the option of performing the standard install (restart and possibly partition your drive) or installing inside Windows (use a Wubi virtual hard disk file on Windows). The Learn More option opens the Ubuntu Web site.
The Setup screen will prompt you for the drive on which to install the virtual disk file; the installation size, which is the size for the virtual disk file; the desktop environment (Ubuntu); the language to use; and a username and password. You then click the Install button to download and install Ubuntu. Clicking the Accessibility button opens a dialog where you can specify accessibility install options such as Contrast, Magnifier, Braille, and On-screen Keyboard.
Wubi then installs the standard Ubuntu desktop. Your language, keyboard, partitions, and user login have already been determined from the Setup window. Wubi will first copy over files from the Desktop install disk and then prompt you to reboot. When you reboot, your Windows boot menu is displayed with an entry for Ubuntu. Use the arrow keys to select the Ubuntu entry and press enter. Ubuntu will then start up. The first time it will complete the installation showing just a progress bar on the desktop, formatting, installing software, detecting hardware, and configuring your system. You do not have to do anything. Once installation tasks are finished, you reboot and select Ubuntu again to start it up. Ubuntu is fully functional. You can configure your system, install hardware drivers, and set preferences just as you do for any Ubuntu system.
Wubi sets up an ubuntu directory on the hard drive partition on which you installed Ubuntu, usually the c: drive. Here you will find boot and disks subdirectories. In the disks subdirectory is your virtual hard disk where Ubuntu is installed. You will also find another virtual hard disk file for your swap disk. Your Ubuntu virtual disk will be named root.disk, as in c:\ubuntu\disks\root.disk. Keep in mind that Ubuntu is installed as a file on your Windows system. Be careful not to delete the ubuntu directory. Should you reformat your Windows partition for any reason, you, of course, would lose you Ubuntu system also. You can uninstall a Wubi installed Ubuntu system using Window’s Add or Remove Software applet.
Source of Information : McGraw Hill Ubuntu The Complete Reference
Friday, December 5, 2008
Using the Mouse in Ubuntu
The mouse works mostly the same under Ubuntu as it does under Windows: a left-click selects things, and a right-click usually brings up a context menu. Try rightclicking various items, such as icons on the desktop or even the desktop itself.
Right-clicking a blank spot on the desktop and selecting Create Launcher lets you create shortcuts to applications. Clicking Create Folder lets you create new empty folders.
You can use the mouse to drag icons on top of other icons. For example, you can drag a file onto a program icon in order to run it. You can also click and drag in certain areas to create an “elastic band” and, as in Windows, this lets you select more than one icon at once. You can resize windows using the mouse in much the same way as in Windows. Just click and drag the edges and corners of the windows. In addition, you can double-click the title bar to maximize and subsequently restore windows.
Ubuntu also makes use of the third mouse button for middle-clicking. You might not think your mouse has one of these but, actually, if it’s relatively modern, it probably does.
Such mice have a scroll wheel between the buttons, and this can act as a third button when pressed.
In Ubuntu, the main use of the middle mouse button is in copying and pasting, as described in the next section. Middle-clicking also has a handful of other functions; for example, middle-clicking the title bar of any open window will switch to the window underneath.
If your mouse doesn’t have a scroll wheel, or if it has one that doesn’t click, you can still middle-click. Simply press the left and right mouse buttons at the same time. This emulates a middle-click, although it takes a little skill to get right. Generally speaking, you need to press one button a fraction of a second before you press the other button.
Right-clicking a blank spot on the desktop and selecting Create Launcher lets you create shortcuts to applications. Clicking Create Folder lets you create new empty folders.
You can use the mouse to drag icons on top of other icons. For example, you can drag a file onto a program icon in order to run it. You can also click and drag in certain areas to create an “elastic band” and, as in Windows, this lets you select more than one icon at once. You can resize windows using the mouse in much the same way as in Windows. Just click and drag the edges and corners of the windows. In addition, you can double-click the title bar to maximize and subsequently restore windows.
Ubuntu also makes use of the third mouse button for middle-clicking. You might not think your mouse has one of these but, actually, if it’s relatively modern, it probably does.
Such mice have a scroll wheel between the buttons, and this can act as a third button when pressed.
In Ubuntu, the main use of the middle mouse button is in copying and pasting, as described in the next section. Middle-clicking also has a handful of other functions; for example, middle-clicking the title bar of any open window will switch to the window underneath.
If your mouse doesn’t have a scroll wheel, or if it has one that doesn’t click, you can still middle-click. Simply press the left and right mouse buttons at the same time. This emulates a middle-click, although it takes a little skill to get right. Generally speaking, you need to press one button a fraction of a second before you press the other button.
Source of Information : Apress Beginning Ubuntu Linux 3rd Edition
Thursday, December 4, 2008
Enabling Automatic Login in Ubuntu
The first component of user interaction Ubuntu requires is the input of a username and password. By default, Ubuntu will pause at the login screen indefinitely until the details are entered. Following this, the GNOME desktop will load, which can take another 30 seconds on an older computer.
It’s possible to make Ubuntu log in to any particular account automatically, which will save time during boot (and will also allow you to activate your computer, leave the room, and come back to the computer ready for instant use).
However, you should do this only if you’re confident your computer is in a secure location. After all, enabling automatic login will mean that anyone who has physical access to your computer will be logged in automatically and have access to your data.
To enable automatic login, click System -> Administration -> Login Window. In the Login Window Preferences window that appears, click the Security tab, and put a check alongside Enable Automatic Login. Then choose the account that you would like to log in automatically from the User drop-down list (If there’s only one user on your system, there will be only one entry in this list.) Click the Close button at the bottom right of the Login Window Preferences window to save your changes and exit.
It’s possible to make Ubuntu log in to any particular account automatically, which will save time during boot (and will also allow you to activate your computer, leave the room, and come back to the computer ready for instant use).
However, you should do this only if you’re confident your computer is in a secure location. After all, enabling automatic login will mean that anyone who has physical access to your computer will be logged in automatically and have access to your data.
To enable automatic login, click System -> Administration -> Login Window. In the Login Window Preferences window that appears, click the Security tab, and put a check alongside Enable Automatic Login. Then choose the account that you would like to log in automatically from the User drop-down list (If there’s only one user on your system, there will be only one entry in this list.) Click the Close button at the bottom right of the Login Window Preferences window to save your changes and exit.
Wednesday, December 3, 2008
Using the Network File System in Ubuntu
Network File System (NFS) is the protocol developed by Sun Microsystems that allows computers to use a remote file system as if it were a real part of the local machine. A common use of NFS is to allow users home directories to appear on every local machine they use, thus eliminating the need to have physical home directories. This opens up hot desking and other flexible working arrangements, especially because no matter where the user is, his home directory follows him around.
Another popular use for NFS is to share binary files between similar computers. If you have a new version of a package that you want all machines to have, you have to the upgrade only on the NFS server, and all hosts running the same version of Ubuntu will have the same upgraded package.
Installing and Starting or Stopping NFS
NFS is not installed by default on Ubuntu, so you need to install the nfs-common, nfskernel-server, and portmap packages. NFS itself consists of several programs that work together to provide the NFS server service. One is rpc.portmapper, which maps NFS requests to the correct daemon. Two others are rpc.nfsd, which is the NFS daemon, and rpc.mountd, which controls the mounting and unmounting of file systems. Ubuntu automatically adds NFS to the system startup scripts, so it will always be available after you have configured it. To check this, use the command sudo /etc/init.d/nfskernel-server status and it will show you that the service is running. If you need to manually start the NFS server, use the following command:
$ sudo /etc/init.d/nfs-kernel-server start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
In this example, NFS has been started. Use the stop keyword instead to stop the service, or restart to restart the server. This approach to controlling NFS proves handy, especially after configuration changes have been made. See the next section on how to configure
NFS support on your Ubuntu system.
NFS Server Configuration
You can configure the NFS server by editing the /etc/exports file. This file is similar to the /etc/fstab file in that it is used to set the permissions for the file systems being exported. The entries look like this:
/file/system yourhost(options) *.yourdomain.com(options) 192.168.0.0/24(options)
This shows three common clients to which to share /file/system. The first, yourhost, shares /file/system to just one host. The second, .yourdomain.com, uses the asterisk (*) as a wildcard to enable all hosts in yourdomain.com to access /file/system. The third share enables all hosts of the Class C network, 192.168.0.0, to access /file/share. For security, it is best not to use shares like the last two across the Internet because all data will be readable by any network the data passes by.
The following is an example of an /etc/exports file:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
/home/andrew 192.168.0.0/24(rw,no_root_squash)
This file exports (makes available) /home/ahudson to any host in 192.168.0.* and allows users to read from and write to /home/andrew.
After you have finished with the /etc/exports file, the following command
$ sudo exportfs –a
exports all the file systems in the /etc/exports file to a list named xtab under the
/var/lib/nfs directory, which is used as a guide for mounting when a remote computer asks for a directory to be exported. The -r option to the command reads the entire
/etc/exports file and mounts all the entries. You can also use the exportfs command to
export specific files temporarily. Here’s an example using exportfs to export a file system:
/usr/sbin/exportfs -o async yourhost:/usr/tmp
This command exports /usr/tmp to yourhost with the async option.
Be sure to restart the NFS server after making any changes to /etc/exports. If you prefer, you can use Ubuntu’s shares-admin graphical client to set up NFS while using the X Window System. Start the client by clicking the System menu and then selecting the Shared Folders menu item from the Administration menu.
After you press Enter, you are prompted for your password. Type in the password and click OK; the main window will then display. Click the Add button to open the Add Share dialog box.
In the Path drop-down box, choose the directory that you want to share; in the Share drop-down box, choose NFS. Click the Add Host button that appears to specify which hosts, IP addresses, or networks to be allowed access to the directory. By default, a directory is exported as read/write, but you can choose read-only by ticking the Read Only option. When finished, click the OK button, click the Apply button, and then use the File menu to quit.
NFS Client Configuration
To configure your host as an NFS client (to acquire remote files or directories), you need to ensure that you have the nfs-common package installed, in order to be able to access NFS shares. Once you’ve installed this using either synaptic or apt-get, edit the /etc/fstab file as you would to mount any local file system. However, instead of using a device name to be mounted (such as /dev/sda1), enter the remote hostname and the desired file system to be imported. For example, one entry might look like this:
# Device Mount Point Type Options Freq Pass
yourhost:/usr/local /usr/local nfs nfsvers=3,ro 0 0
The Options column uses the same options as standard fstab file entries with some additional entries, such as nfsvers=3, which specifies the third version of NFS. You can also use the mount command, as root, to quickly attach a remote directory to a local file system by using a remote host’s name and exported directory. For example:
$ sudo mount -t nfs 192.168.2.67:/music /music
After you press Enter, the entire remote directory appears on your file system. You can verify the imported file system using the df command, as follows:
$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda2 18714368 9642600 8121124 55% /
/dev/hda1 46636 13247 30981 30% /boot
none 120016 0 120016 0% /dev/shm
192.168.2.67:/music 36875376 20895920 14106280 60% /music
Make sure that the desired mount point exists before using the mount command. When finished using the directory (perhaps for copying backups), you can use the umount command to remove the remote file system. Note that if you specify the root directory (/) as a mount point, you cannot unmount the NFS directory until you reboot (because Linux complains that the file system is in use).
Another popular use for NFS is to share binary files between similar computers. If you have a new version of a package that you want all machines to have, you have to the upgrade only on the NFS server, and all hosts running the same version of Ubuntu will have the same upgraded package.
Installing and Starting or Stopping NFS
NFS is not installed by default on Ubuntu, so you need to install the nfs-common, nfskernel-server, and portmap packages. NFS itself consists of several programs that work together to provide the NFS server service. One is rpc.portmapper, which maps NFS requests to the correct daemon. Two others are rpc.nfsd, which is the NFS daemon, and rpc.mountd, which controls the mounting and unmounting of file systems. Ubuntu automatically adds NFS to the system startup scripts, so it will always be available after you have configured it. To check this, use the command sudo /etc/init.d/nfskernel-server status and it will show you that the service is running. If you need to manually start the NFS server, use the following command:
$ sudo /etc/init.d/nfs-kernel-server start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
In this example, NFS has been started. Use the stop keyword instead to stop the service, or restart to restart the server. This approach to controlling NFS proves handy, especially after configuration changes have been made. See the next section on how to configure
NFS support on your Ubuntu system.
NFS Server Configuration
You can configure the NFS server by editing the /etc/exports file. This file is similar to the /etc/fstab file in that it is used to set the permissions for the file systems being exported. The entries look like this:
/file/system yourhost(options) *.yourdomain.com(options) 192.168.0.0/24(options)
This shows three common clients to which to share /file/system. The first, yourhost, shares /file/system to just one host. The second, .yourdomain.com, uses the asterisk (*) as a wildcard to enable all hosts in yourdomain.com to access /file/system. The third share enables all hosts of the Class C network, 192.168.0.0, to access /file/share. For security, it is best not to use shares like the last two across the Internet because all data will be readable by any network the data passes by.
The following is an example of an /etc/exports file:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
/home/andrew 192.168.0.0/24(rw,no_root_squash)
This file exports (makes available) /home/ahudson to any host in 192.168.0.* and allows users to read from and write to /home/andrew.
After you have finished with the /etc/exports file, the following command
$ sudo exportfs –a
exports all the file systems in the /etc/exports file to a list named xtab under the
/var/lib/nfs directory, which is used as a guide for mounting when a remote computer asks for a directory to be exported. The -r option to the command reads the entire
/etc/exports file and mounts all the entries. You can also use the exportfs command to
export specific files temporarily. Here’s an example using exportfs to export a file system:
/usr/sbin/exportfs -o async yourhost:/usr/tmp
This command exports /usr/tmp to yourhost with the async option.
Be sure to restart the NFS server after making any changes to /etc/exports. If you prefer, you can use Ubuntu’s shares-admin graphical client to set up NFS while using the X Window System. Start the client by clicking the System menu and then selecting the Shared Folders menu item from the Administration menu.
After you press Enter, you are prompted for your password. Type in the password and click OK; the main window will then display. Click the Add button to open the Add Share dialog box.
In the Path drop-down box, choose the directory that you want to share; in the Share drop-down box, choose NFS. Click the Add Host button that appears to specify which hosts, IP addresses, or networks to be allowed access to the directory. By default, a directory is exported as read/write, but you can choose read-only by ticking the Read Only option. When finished, click the OK button, click the Apply button, and then use the File menu to quit.
NFS Client Configuration
To configure your host as an NFS client (to acquire remote files or directories), you need to ensure that you have the nfs-common package installed, in order to be able to access NFS shares. Once you’ve installed this using either synaptic or apt-get, edit the /etc/fstab file as you would to mount any local file system. However, instead of using a device name to be mounted (such as /dev/sda1), enter the remote hostname and the desired file system to be imported. For example, one entry might look like this:
# Device Mount Point Type Options Freq Pass
yourhost:/usr/local /usr/local nfs nfsvers=3,ro 0 0
The Options column uses the same options as standard fstab file entries with some additional entries, such as nfsvers=3, which specifies the third version of NFS. You can also use the mount command, as root, to quickly attach a remote directory to a local file system by using a remote host’s name and exported directory. For example:
$ sudo mount -t nfs 192.168.2.67:/music /music
After you press Enter, the entire remote directory appears on your file system. You can verify the imported file system using the df command, as follows:
$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda2 18714368 9642600 8121124 55% /
/dev/hda1 46636 13247 30981 30% /boot
none 120016 0 120016 0% /dev/shm
192.168.2.67:/music 36875376 20895920 14106280 60% /music
Make sure that the desired mount point exists before using the mount command. When finished using the directory (perhaps for copying backups), you can use the umount command to remove the remote file system. Note that if you specify the root directory (/) as a mount point, you cannot unmount the NFS directory until you reboot (because Linux complains that the file system is in use).
Source of Information : Sams Ubuntu Unleashed 2008 Edition
Subscribe to:
Posts (Atom)