Sunday, August 31, 2008

Ubuntu Philosophy

Ubuntu is driven by a philosophy of software freedom that hope will spread and bring the benefits of software technology to all parts of the globe. The latest version of the Ubuntu Philosophy can be found at: www.ubuntu.com/ubuntu/philosophy


Free and Open Source Software
Ubuntu is a community-driven project to create an operating system and a full set of applications using free and Open Source software. At the core of the Ubuntu Philosophy of Software Freedom are these core philosophical ideals:

1. Every computer user should have the freedom to run, copy, distribute, study, share, change, and improve their software for any purpose without paying licensing fees.

2. Every computer user should be able to use their software in the language of their choice.

3. Every computer user should be given every opportunity to use software, even if they work under a disability.

Ubuntu philosophy is reflected in the software produce and included in distribution. As a result, the licensing terms of the software distribute are measured against philosophy using the Ubuntu License Policy.

When you install Ubuntu almost all of the software installed already meets these ideals, and working to ensure that every single piece of software you need is available under a license that gives you those freedoms. Currently, Ubuntu make a specific exception for some "drivers" which are only available in binary form, without which many computers will not complete the Ubuntu installation. Ubuntu place these in a restricted section of your system which makes them trivial to remove if you do not need them.


Free Software
For Ubuntu, the "free" in "free software" is used primarily in reference to freedom and not to pricealthough committed to not charging for Ubuntu. The most important thing about Ubuntu is not that it is available free of charge, but that it confers rights of software freedom on the people who install and use it. It is those freedoms that enable the Ubuntu community to grow, sharing its collective experience and expertise to improve Ubuntu and make it suitable for use in new countries and new industries.

Quoting the Free Software Foundation's "What is Free Software," the freedoms at the core of free software are defined as:

• The freedom to run the program for any purpose.

• The freedom to study how the program works and adapt it to your needs.

• The freedom to redistribute copies so you can help others.

• The freedom to improve the program and release your improvements to the public, so that everyone benefits.

Free software has been a coherent social movement for more than two decades. This movement has produced millions of lines of code, documentation, and a vibrant community of which Ubuntu is proud to be a part.


Open Source
Open Source is a term coined in 1998 to remove the ambiguity in the English word "free." The Open Source Initiative described Open Source software in the Open Source Definition. Open source continues to enjoy growing success and wide recognition.

Ubuntu is happy to call itself Open Source. While some refer to free and Open Source software as competing movements with different ends, Ubuntu do not see free and Open Source software as either distinct or incompatible. Ubuntu proudly includes members who identify with both the free software and Open Source camps and many who identify with both.

Source of Information : The Official Ubuntu Book

Saturday, August 30, 2008

Instant Messaging with Gaim in Ubuntu

The Web is great for one-way communications: someone posts a web page and someone else views it. Even in online forums, discussions may span days. E-mail is a faster communication method, and is bi-directional, but is not instant. Instant messaging (IM) systems allow realtime communications with groups of people.

Internet Relay Chat (IRC) was one of the first IM protocols. (IRC predates most IM protocols by more than a decade.) There are plenty of IRC clients for Dapper, including the graphical xchat and text-based irssi. But IRC is only one type of IM protocol available today. Yahoo!, AOL, MSN, and Napster all have their own IM protocols. Beyond proprietary systems, the open-source Jabber protocol is growing in popularity; Jabber is essentially IRC over an encrypted channel.

Although you could download a specific IM client for every protocol, it is much more convenient to have one client that supports them all. Gaim in an IM client that ships with Ubuntu and supports eight of the most common IM protocols. To run Gaim, go to Applications -> Internet -> Gaim Instant Messanger. When Gaim first starts, you will need to add an account. Accounts specify IM servers and your identities on each server. Each server protocol has different requirements that you will need to specify.

After creating an account, you can log in to the account-this connects to the server. From there, you can join chat rooms and communicate in real-time. Although Gaim does not allow you to bridge between IM connections, it does allow you to connect to many different servers at the same time.

Gaim uses many different windows and there is no central text menu for opening a specific window. To see the list of windows, right-click on the yellow Gaim icon that appears in the top panel. This will pull up the main menu and allow you to see accounts, chat windows, and even exit the application.

>>> Read more about Talking with VoIP in Ubuntu <<<

Source of Information : Hacking Ubuntu

Friday, August 29, 2008

Choosing a SUSE Linux Desktop Environment: KDE and GNOME

With Windows and the Macintosh, the desktop is just that—the desktop. Linux is all about choices, and so is X, KDE or GNOME.

One of the cool things is that you can remain indecisive your whole life: You can choose what desktop to load every time you log in. Of course, you don't have to choose that often either; SUSE Linux will load whatever desktop you loaded last time by default (and the initial default, assuming you installed it, is KDE).

When you first install SUSE Linux, YaST will recommend installing just the KDE desktop. You can choose to install GNOME instead, or install both if you have enough disk space.

With very few exceptions, all software designed for one desktop will happily run on the other, and will even show up in the other's Start menu. A trivial example is that SUSE installs identical default wallpaper for both desktops. You might find that one application designed for GNOME runs a little slower on KDE (or vice versa), but these types of issues are rarely catastrophic. All the Linux products not designed with either desktop (like OpenOffice.org and the Mozilla family) will also run beautifully in both.

Another key similarity is the capability to display multiple virtual desktops. If you regularly run one of those other operating systems and if you're a busy person, the desktop can get awfully crowded with a web browser, email client, word processor, and project manager all up at the same time. You can wind up Alt+Tabbing between apps, resizing and minimizing windows, or heavily working the taskbar to keep up. Wouldn't it be nice to have each application in its own desktop, away from the others? By default, GNOME and KDE offer you two virtual desktops (GNOME calls them workspaces). You can have up to 16 in KDE and 36 in GNOME. You can switch between them by pressing the Ctrl key along with the F key corresponding to the desktop number (that is, to switch to Desktop 2, press Ctrl+F2; for Desktop 3, press Ctrl+F3, and so on). For the incurable customizers, you can use descriptive names for each desktop, and even have different wallpaper on each one! You can have some applications (such as your schedule or time tracker) appear on all desktops, and choose whether you want to see the applications on other desktops in the taskbar. The taskbar will always show you your desktop lineup, with representations of the windows.

KDE is older, more stable, and has more applications designed for it. Its technological underpinnings come from the commercial Qt libraries from Trolltech, and for a long time Qt's licensing scheme was not open source.

GNOME is the relative newcomer and has only recently become a stable system. Its technological underpinnings come from the first Linux killer app: The GNU Image Manipulation Program The GIMP. It began as an open-source rebellion, but has the support of many leading Linux-oriented corporations.

GNOME was the first desktop project to put usability at the top of its concerns, producing a truly admirable Human Interface Guidelines (HIG) document that has been a model for later efforts (including KDE's forthcoming HIG project). It has ambitions beyond the desktop as well. Many of its most partisan developers believe it provides a model framework for all software development.

One more common function for both desktop environments is a very handy application launcher. Press Alt+F2 to bring up a dialog box. Enter the name of an application to launch it. If you enter a URL, the default browser (Konqueror in KDE, Epiphany in GNOME) opens on that site. This way, you save time browsing through menus or opening new shells.


KDE: The K Desktop Environment
The KDE project began in 1996 and has been the default desktop environment for SUSE Linux for nearly all that time. SUSE Linux 9.2 includes KDE 3.3. SUSE Linux also uses the KDE Display Manager to provide a graphical login screen after it has booted.

When you first log in to KDE, it will take a few seconds to load, but when it's finished you will see the basic elements of the desktop. Windows users should feel pretty comfortable with this opening experience—a few icons on the desktop, a taskbar (called the Kicker in KDE parlance) along the bottom, with assorted applications ready for quick access and a clock in the right corner (optionally configured to show the seconds passing by).

By default, KDE loads any applications that were running when your last session ended, so you can pick up where you left off. The SUSE icon in the left corner of the Kicker opens the application menus. To its right, the icons on the left side give you access to your home directory (via the Konqueror file manager), the Konsole Xterminal shell, the SUSE Help Center, the Konqueror web browser, and the Kontact personal information manager (the Outlook-style combined email, address book, and calendar program).

You will notice that KDE developers have a fetish for naming their programs with a K in front. This can be kreative, or just a little too kute, but it is a handy way of identifying what applications are K-specific. The Kicker panel is highly customizable; right-click anywhere to add or remove icons from the panel. The Configure Panel screen also lets you put the panel on a different side of the screen and set several other options.

In the right corner of the Kicker, next to the clock, are more application icons that always run. Mouse over each to see what they are. The smaller SUSE icon is the SUSEWatcher application, which checks the YaST Online Update (YOU) servers regularly to see if updates are available. These fix security problems and occasionally give you new versions of installed applications. Watch for an exclamation mark on this icon to get new updates. The Klipper clipboard utility offers much more than its Windows counterpart. Among other things, Klipper stores your last seven cut/copy actions by default, so you can paste several items in sequence if you choose. Klipper will remember your clipboard actions over sessions, too.

So many applications have been written for KDE that the YaST initial installation menu separates out some from the default KDE installation. It's all there if you want it, though.


GNOME: The GNU Network Object Model Environment
When you open GNOME for the first time, you may notice two differences between it and KDE: The look is a lot less cluttered, and the taskbar is at the top of the screen. You might even miss it the first time you look.

The GNOME panels are highly configurable with a curious collection of applications that you have much more control over than in KDE. Displaying many of the same characteristics and applications by default as KDE, the whole look is a bit cleaner with the much smaller icons.

The Programs menu was built for SUSE (indicated by the Novell icon attached to it) and is identical to the default Kicker menu in KDE, but there is a separate menu for quick access to System tools, including YaST, the file finder, and the logout button. The left side default applications include the Epiphany web browser, the Evolution groupware/personal information manager tool, and OpenOffice.org Writer, along with SUSEWatcher and SUSEPlugger. On the right, in addition to the clock, is the volume control and the list of all open applications.

In the bottom panel is your task/workspace switcher (right-click it to change the number of workspaces/desktops) and a window hiding tool to show just the desktop. Active applications and documents also appear in the bottom panel.

To add an icon to either panel, right-click exactly in the spot where you want the item to appear and choose Add to Panel. You can then select your item from the menu. Among the choices is a weather report with the current temperature and conditions for many global cities. Select your own location—or the place you want to be.

Source of Information : SUSE Linux 10 Unleashed

Thursday, August 28, 2008

Understanding SUSE Linux X Window System

The X Window System represents two primary concepts. The X Window System was created to keep the UNIX kernel and GUI code separate. It was also designed for distributed processing based on the client/server model. That is, with X you don't need to have a computer with massive amounts of hard drive space and RAM to run graphical applications. A thin client with a connection to an X server is all you need. Nonetheless, if you have the aforementioned massive hard drive and hundreds of megabytes of RAM, you can host both the X server and many clients on your own machine.

The X server's primary job is to create and manage windows, dialog boxes, buttons, and other graphical elements on a screen. That screen can be located practically anywhere in the world, and perhaps even on a laptop on the International Space Station. X is extremely portable, too. After you have configured X the way you (or your system administrators) want it, you can take that configuration file with you and copy it into any other X-capable machine and it will run the same way.

Dozens of applications have been developed to manage windows for X, and hundreds of X client programs exist to help users work in the graphical environment X provides. It all begins, however, with the fundamental question: What do you want your window decorations to look like?

Configuring X in SUSE Linux
SaX (also referred to as SaX) is the X configuration tool for SUSE Linux. It runs for the first time during the initial SUSE Linux installation, where it identifies your graphics card, installs the graphics drivers, and sets up X to its default configuration. The settings are stored in the /etc/X11/XF86Config file. You can edit this file manually, but that would be unnecessary risky behavior.

To open SaX after the initial installation, go to YaST, Hardware, Graphics Card and Monitor. A second window will open with your initial monitor and card listed, along with the resolution and whether the card supports 3D acceleration. Click Change to open SaX and configure X.

When you open SaX, you can see that it manages much more than your desktop settings. The Multihead section will configure a multiple monitor setup; Input Devices include keyboard, mouse, touchscreen, and graphics tablet; and Access Control covers Virtual Network Client (VNC) access and XAccess, a tool for controlling your mouse with the keypad (especially useful for people who can't see the screen). SaX usually does a terrific job of identifying your video card and setting up the X environment. It can make mistakes, but before you hand edit XF86Config, try choosing the Reprobe button in SaX. With the wrong Monitor Frequency settings, it is possible (if quite rare) to blow out your monitor.

If SaX has incorrectly identified either your monitor or graphics card, click the appropriate link and then click Properties. You will get a list of manufacturers and models to select from. Select the correct one; if you have a Linux driver disk for the item, click the Manufacturer's Disk button to install the new drivers. You can read and make changes to the frequency range and other settings in the Frequencies and Expert tabs, but don't do this unless you are absolutely sure you know what you're doing. Click OK and Finish to confirm your choices. As you make changes in each SaX component, be aware that nothing is written into the configuration file until you click Finalize and test the new setup.

There's not much to do in the Color and Resolution section. SaX detects the maximum color depth and all the resolutions your card will support and sets both defaults to the highest possible. Unless you have a fairly ancient machine, the color depth will be set at 16-bit True Color. This is the only thing you can change.

Change the position if the desktop is large enough in width and height, but you are seeing empty space on one side. Change the size if you're seeing empty space on both sides. Keep pushing the appropriate arrow buttons until it looks right; then click Save.
When you're finished changing settings, click Finalize on the main SaX screen. You'll be asked to test the new configuration, which is always a good idea. If everything looks good, click Save; if the desktop image fails, click Ctrl+Alt+Esc to kill the X server and review your selections.

In most cases, you'll be using a display manager to log in and start X, but there may come a time when something breaks and you can't get into the display manager. Don't panic! You may still be able to get into X.

If this happens at boot, you will get a text-based login prompt. Log in as user, and you should be sitting in your home directory (type pwd to make sure). Look for the .xinitrc file: ls -a .xinitrc.

SUSE Linux puts a default file in Home called .xinitrc.template. Make a copy of this file to activate it:cp .xinitrc.template .xinitrc

Now, type the magic word: startx

This should get you in and may help you solve the original problem.

Source of Information : SUSE Linux 10 Unleashed

Wednesday, August 27, 2008

Configuring Ubuntu Wireless Networking with Command-Line Tools

The wireless-tools package, which is installed on Ubuntu systems by default, provides several commands for probing and configuring wireless interfaces and networks. You can execute the man wireless command to get information about the wireless-tools package, learn how and where it is installed by various Linux distributions, and view a list of the commands that this package provides. The wireless-tools commands that I find most valuable are the iwconfig and iwlist commands.

The iwconfig command displays information much like the ifconfig command, providing information about the wireless status of all or specific Ethernet interfaces on a system. The following example shows the output of the iwconfig command, querying the wireless Ethernet interface that was installed

$ iwconfig wlan0
wlan0 IEEE 802.11-DS ESSID:”wvh” Nickname:”okuwlan”
Mode:Managed Frequency:2.427 GHz Access Point:
00:03:93:E9:89:22
Bit Rate:11 Mb/s Tx-Power=15 dBm
Retry limit:8 RTS thr=1536 B Fragment thr=1536 B
Power Management:off
Link Quality=0/0 Signal level=95/255 Noise level=0/0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

As you can see, this provides much of the same information as that provided by the ifconfig command, but it also includes wireless-specific information. The iwconfig command can also be used to set various wireless configuration options from the command line—see the online man page for iwconfig (using the command man iwconfig) for more information.

The iwlist command enables you to scan for wireless networks and examine various characteristics of a wireless interface. For example, scanning for wireless networks around my home using the iwlist wlan0 scan command displays the following information:

$ sudo iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: 00:03:93:E9:89:22
ESSID:”wvh”
Mode:Master
Channel:4
Encryption key:off
Quality:0/0 Signal level:38/255 Noise level:0/0
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s

This command is useful for verifying that a wireless interface is actually working, and that it can communicate with an access point. The information produced by the iwlist command is much more interesting in public areas, where you will usually detect multiple wireless networks, as in the following example from one of my laptops while I was on vacation:

$ sudo iwlist eth0 scan
Password:
eth0 Scan completed :

Cell 01 - Address: 00:09:5B:36:22:38
ESSID:”Wireless”
Mode:Master
Frequency:2.412 GHz (Channel 1)
Signal level:20/153 Noise level:12/153
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s

Cell 02 - Address: 00:12:17:A6:E8:CC
ESSID:”linksys”
Mode:Master
Frequency:2.437 GHz (Channel 6)
Signal level:83/153 Noise level:13/153
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s

Cell 03 - Address: 00:12:17:A6:E8:CC
ESSID:”linksys”
Mode:Master
Frequency:2.437 GHz (Channel 6)
Signal level:81/153 Noise level:13/153
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s

Cell 04 - Address: 00:12:17:79:CF:D3
ESSID:”linksysR79cfd3”
Mode:Master
Frequency:2.437 GHz (Channel 6)
Signal level:49/153 Noise level:13/153
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18Mb/s;24 Mb/s; 36 Mb/s; 54 Mb/s

In this case, the information provided by the iwlist command was very useful in identifying available wireless access points, their names, and whether they were configured for authentication/encryption. The iwlist command can also query specific wireless configuration details.

>>> Read more about Overview of Wireless Technologies <<<

Source of Information : Ubuntu Linux - Bible

Tuesday, August 26, 2008

Configuring Wireless Ethernet Interfaces in Ubuntu

The Linux kernel includes drivers for many popular PCI wireless cards, PCMCIA wireless adapters, and USB wireless adapters. On Ubuntu systems, wireless Ethernet interfaces are configured in the same way as wired Ethernet interfaces.

If no Linux driver is available for your wireless card, all is not lost. Thanks to the cleverness of the folks in the open source community, a Linux kernel module and related utilities called ndiswrapper enables you to use the Microsoft Windows drivers for much of the networking hardware that is not yet natively supported by Linux. Installing these utilities, installing Windows drivers under Linux, and configuring your system to automatically start loading the kernel module.

Using systems that have both wired and wireless interfaces is quite common nowadays. Even though wireless specifications such as 802.11g and the upcoming 802.11n provide high communication speeds. Ubuntu’s administrative Networking application makes this easy enough to do manually, but an automated solution is also available in the Networking Manager application.

Wireless network adapters are configured in basically the same way as standard networking adapters, except that they require some additional, wireless-specific information. To configure a wireless networking adapter on your Ubuntu system, connect it to your system and select System -> Administration -> Networking to start Ubuntu’s networking administration application (which you can also execute as the network-admin command from any Ubuntu command line, using the sudo command).

When you first start this application, your wireless adapter should be listed in the dialog, but should be identified as being unconfigured. If no wireless adapter is listed, your wireless adapter may not be directly supported by the Linux kernel.

Once your wireless adapter is displayed in the dialog, select the entry for your adapter and click Properties to display the configuration dialog for wireless adapters. Select the Enable this interface checkbox to enable you to enter specific configuration information for your wireless interface.

If you want to join a specific wireless network, enter the ESSID of that network—leaving this space blank will enable your wireless interface to connect to any open, publicly visible access point that does not require authentication, regardless of its name. Similarly, if the wireless network that you are joining uses WEP keys, select the appropriate type of key from the Key type drop-down list, and enter the key in the WEP key field— if the wireless network that you want to join does not use WEP, leave the Plain (ASCII) key type selected, and leave the WEP key field blank. The final configuration step is to enter the appropriate networking information if you want your system to use a static IP address for its wireless connection. If the wireless network that you want to join uses DHCP, click the Configuration entry and select DHCP from the drop-down list.

After completing these settings, click OK to proceed. The Properties dialog closes, and a status dialog displays as your Ubuntu system activates your new wireless adapter.

If your system has both wired and wireless adapters and you want to be able to use both together, you should change the Default gateway device setting at the bottom of the dialog to identify the Ethernet device over which you want to send packets to random hosts. In most cases, this will be your wired network interface. Depending on your configuration, you may also want to disable the other Ethernet interfaces on your system by selecting each interface, clicking Properties, and deselecting the Enable this connection checkbox.

To complete the wireless configuration process, you can then click OK to save your configuration settings, or click Cancel to close this dialog without saving any of your new configuration settings. You can verify that the interface is correctly configured by using the ifconfig command to query the status of that interface from any Ubuntu command line, which displays output like the following:

$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:06:25:07:F7:0E
inet addr:192.168.6.81 Bcast:192.168.6.255
Mask:255.255.255.0
inet6 addr: fe80::206:25ff:fe07:f70e/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:44 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7697 (7.5 KiB) TX bytes:1284 (1.2 KiB)

Some removable wireless Ethernet interfaces are assigned names beginning with wlan (wireless LAN) and use numeric identifiers to differentiate between multiple wireless interfaces, just like Ethernet interfaces whose names typically begin with eth. The prefix used (wlan or eth) is set inside the device driver.

>>> Read more about Overview of Wireless Technologies <<<

Source of Information : Ubuntu Linux - Bible

Monday, August 25, 2008

Adding Printers in Ubuntu

Printers are one of the most common types of external device. Today, many computer manufactures bundle printers with new computers-it's hard not to have a printer. Printers used to come with one of two types of connectors: serial or parallel. Today, USB printers are very common. In corporate and small-office/home-office (SOHO) environments, networked printers are common. Ubuntu supports an amazing number of printers; making Ubuntu work with most printers is relatively easy.

Changing Paper Size
Before you install your first printer, be sure to set the system's default paper size. This is found in the file /etc/papersize. The default paper size probably says A4 or letter-this depends on the geographical location you selected during the installation. If the default paper size is not set right, then every printer you add to the system will be configured with the wrong default paper size. Changing /etc/papersize after you create a printer will not alter any already existing printers. If you have multiple printers that take different paper sizes, set the value in /etc/papersize before adding each printer.

To change the default paper size, edit the /etc/papersize file and change the value. Common values are A4, letter, and legal. A4 is a commonly used standard paper in Europe. Letter and legal refer to the 8.5" × 11" and 8.5" × 14" paper sizes common in the United States. Less common paper sizes that I have come across include A5, B2, C2, ledger, and 10 × 14.

Paper sizes, such as A0, A1, A2, B3, C4, and D4, refer to ratios from a larger piece of paper. For example, A0 has a total area of one square meter. The A0 dimensions are 841 × 1189 mm. A1 is half of A0's longest direction: 594 × 841mm. A2 is half of A1 (420 × 594), and so on. As a result, 16 sheets of A4 cover a surface area of 1m2. Other paper types follow the same ratios-four sheets of B2 can fit in one B0 sheet. B0 is 1000 × 1414 mm and C0 is 917 × 1297 mm.

Specific fields use different paper sizes. For example, A is common in publishing and C is used in construction for building plans. If you have a large printer or plotter, be sure to set up /etc/papersize with the right default before adding the printer.


Adding a Printer
Adding a printer under Ubuntu is straightforward. Go to System -> Administration Printing to open the printer applet. From there, you can double-click New Printer to configure the device.

The first step in adding a printer requires specifying which kernel device communicates with the printer. The default choices are a local printer using a USB or parallel port, or a network printer. Although the local printer configuration is easy (simply select the detected USB printer or parallel port), networked printers require additional information.
• CUPS Printer (IPP)-The Common Unix Printing System allows the sharing of printers between different Unix computers. You will need to provide a URL for the printer, such as ipp://server/printer_name.

• Windows Printer (SMB)-More common than CUPS are Windows printers. In small offices, a user with a printer directly connected to their Windows host can share the printer with the network. You will need to provide the Windows host name, printer name, and any user name and password needed to access the device.

• Unix Printer (LPD)-The Line Printer Daemon protocol is one of the oldest and most reliable network printing options. Most stand-alone network printers support LPD. For this option, you will need to provide the host name and the name of the LPD print queue.

• HP JetDirect-This is another common protocol for stand-alone printers. You only need to provide the host name (and port number if it's not the default 9100).

The second step for adding a printer enables you to specify the type of printer. If your exact printer model is not listed, chances are good that there is a model that is close enough. In the worst case, you can always select one of the generic printer options. Finally, you should name the printer. Give it something descriptive so you can recognize it later.

>>> Read more about Sharing Printers in Ubuntu <<<

Source of Information : Hacking Ubuntu Serious Hacks Mods and Customizations

Sunday, August 24, 2008

Installing and Running sendmail in Red Hat Linux

The full sendmail distribution consists of three RPM packages: sendmail, sendmail-cf, and sendmail-doc. Only the first package is truly necessary to send and receive mail on your machine. The second package includes configuration macros and other files that can help you reconfigure your site's sendmail installation if the defaults are insufficient. The third package contains documentation files that help to explain some of the details of the current version.

The sendmail binary packages are included in the Red Hat distribution. The sendmail package is on CD #1, while the sendmail-cf package is on CD #2, and the sendmail-doc package is on CD #3. From the Red Hat RPMS directory on each CD-ROM, the following command installs the packages:

# rpm -ivv sendmail*


Starting sendmail

Once installed, the sendmail service is turned on by default. To start sendmail immediately, you can either reboot the machine or just run /etc/init.d/sendmail start to start the server. The procedure for starting and stopping sendmail is no different from that of other server processes.


Other Mail Servers Available for Red Hat Linux
The open-source version of sendmail is not the only mail server available for Red Hat Linux, but it is definitely the most common. Other servers are described in the following list, with URLs that provide further information.

Postfix — The Postfix MTA is the only mail-server software besides Sendmail that comes with Red Hat Linux. Written by Wietse Venema (of tcp_wrappers fame), this free mail server was designed with security in mind and executes most functions as an unprivileged user in a restricted chroot environment. The server encompasses more than a dozen small programs (each performing a simple, distinct task) and several single-purpose queues. Information and source code can be found at www.postfix.org.

Exim — The Exim MTA is a free mail server (under GNU) that runs on Linux and other UNIX systems. This MTA includes enhanced protection against unsolicited junk mail and mail bombs. Find out more about Exim from the Exim Home Page (www.exim.org).

Qmail — Also conceived with security as a high priority, this mail server (written by Daniel J. Bernstein) offers secure and reliable message transfer, mailbox quotas, virtual domains, and antispam features. More information is available from www.qmail.org/top.html.

Sendmail (commercial version) — Based on the same source code as open-source sendmail, this product is distributed as binary executables built specifically for Red Hat Linux (among other Linux and UNIX variants). Pricing for the Sendmail Advanced Message Server is based on the number of mailboxes you are serving. The product offers simple installation, Web-based management, and support. Details can be found at www.sendmail.com.


Smail — Smail offers many of the same features as sendmail but is somewhat easier to configure and requires less memory. The source code can be downloaded from ftp://ftp.planix.com/pub/Smail/.


Incoming messages received by sendmail are processed and stored in the /var/spool/mail directory. Each file in this directory represents a valid user name on the local machine. The file is created automatically when you add a user. People with login accounts use this directory and their user account name as their incoming mailboxes (for example, /var/spool/mail/johnq).

Outgoing messages go in /var/spool/mqueue directory while waiting to be sent. Filenames in this directory follow a consistent naming scheme. The first two characters indicate what type of data is stored in the file. Subsequent characters form a unique random identifier based on the PID of the sendmail process that is handling that message.

File Prefixes in /var/spool/mqueue

Filename Prefix

Type of Data Stored

df

The data that constitutes the body of an e-mail message.

qf

The queue control file that contains the message headers and other administrative details.

tf

A temporary copy of the qf file, created if delivery errors occur.

xf

Any error messages generated while trying to send the message.



Other programs
Several other executable programs are included in the distribution.

Other Related Sendmail Programs

Program

Description

mailq

Displays a summary of the messages awaiting processing in the mail queue (the command is equivalent to sendmail -bp).

mailstats

Displays message quantity and byte count statistics.

makemap

Translates text files (/etc/mail/virtusertable) to hashed Berkeley databases ( /etc/mail/virtusertable.db). This command runs each time the sendmail script starts at boot time.

newaliases

Translates the plain-text /etc/aliases file into the hashed Berkeley database file /etc/aliases.db (the command is equivalent to sendmail -bi).

praliases

Prints out all aliases defined in /etc/aliases.

procmail

Not included with the sendmail package, but is used as an MDA for sendmail. (It is included in Red Hat Linux in the procmail package.)

purgestat

Clears the directory where host status information is stored. The command is equal to sendmail -bH, which is disabled by default.

rmail

Handles incoming mail via UUCP.

smrsh

Implements a restricted shell for running programs from sendmail.



Logging performed by sendmail
The amount of logging performed by sendmail is configurable in the sendmail.cf file, but the default level provides good coverage of informational notices and error messages. By default, the syslog facility (/etc/syslog.conf file) stores logging information from sendmail in the /var/log/maillog file.

An informational message similar to the following is written in the /var/log/maillog file each time the daemon starts (which also causes the hashed alias database to be regenerated):

Feb 16 12:52:40 toys sendmail[1758]: alias database /etc/aliases
rebuilt by root
Feb 16 12:52:40 toys sendmail[1758]: /etc/aliases: 63 aliases, longest
10 bytes, 625 bytes total
Feb 16 12:52:40 toys sendmail[1787]: starting daemon (8.12.8):
SMTP+queueing@01:00:00

Each time a message is sent or received, a log file entry is created:

Feb 16 12:54:34 toys sendmail[1120]: OAA01120: from=root, size=161,
class=0, pri=3 0161, nrcpts=1,
msgid=<199907191254.oaa01120@toys.linuxtoys.net>, relay=root@localhost
Feb 16 12:54:35 toys sendmail[1127]: OAA01120: to=jkpat, ctladdr=root
(0/0), delay=00:00:01, xdelay=00:00:00, mailer=local, stat=Sent

The logs even show when people attempt things that perhaps they shouldn't try. The wiz and debug commands were implemented in earlier versions of sendmail and were found to be a huge security problem. You may log file entries, such as those shown in the code examples below, as people with malicious intent check to make sure that you're not running a vulnerable sendmail daemon. Also, the expn and vrfy commands (which can be disabled via a configuration option) could give out more information than you'd care to distribute.

Feb 16 13:03:27 toys sendmail[699]: NOQUEUE: "wiz" command from localhost
[127.0.0 .1] (127.0.0.1)
Feb 16 13:03:29 toys sendmail[699]: NOQUEUE: "debug" command from
localhost [127.0 .0.1] (127.0.0.1)
Feb 16 13:03:37 toys sendmail[701]: NOQUEUE: localhost [127.0.0.1]:
expn oracle
Feb 16 13:03:43 toys sendmail[702]: NOQUEUE: localhost [127.0.0.1]:
vrfy oracle


>>> Read more about What is Red Hat Linux SMTP and sendmail <<<

Source of Information : Red Hat Linux Bible: Fedora and Enterprise Edition

Saturday, August 23, 2008

Optimizing the Ubuntu Boot Process

The /sbin/init process uses an entry in /etc/inittab for your system’s default run level to run scripts that start various services at boot time. You can manually customize the run levels at which various services start, but this is tedious at best. As you might expect, the Ubuntu repositories provide a number of applications that simplify editing the startup and shutdown scripts associated with different run levels. Ubuntu comes with an application
(System -> Administration -> Services) that promises to provide coarse control over which services are started at boot time, but does not provide granular control over the run levels with which these services are associated or the sequence in which they are started. (This is odd because it used to do this. I guess that progress is not always forward.)

My two favorite tools for modifying the scripts started at various Ubuntu run levels are the following:

• sysv-rc-conf: An application that runs in any Ubuntu terminal application, such as an xterm or the GNOME Terminal. The SysV Runlevel Config application provides a simple interface for enabling or disabling services at various run levels, and includes onscreen help for its user interface.

• Boot-Up Manager: A graphical application that provides an excellent user interface for enabling and disabling startup/shutdown scripts at various run levels.

Neither the syv-rc-conf or Boot-Up Manager applications are installed automatically as part of a default Ubuntu installation, but can easily be installed using the Synaptic Package Manager or the command-line apt-get application.

The Boot-Up Manager is by far the more interesting of these two applications (as long as you’re running an X Window system desktop or window manager). Installing this application adds the System -> Administration -> Boot-Up Manager menu item, which you can use to start the application. Like most administrative applications, you’ll need to supply your password to run this application. The Boot-Up manager requires a fair amount of time to start, as it must read and process every startup script in the /etc/init.d directory and must read every symbolic link in any of your /etc/rc directories. This additional startup time is worth it in terms of usability.

Once the Boot-Up Manager is running, it provides some basic information about each of the startup scripts that your system is running, which helps you make intelligent decisions about the services that you want to enable or disable. However, clicking the Advanced checkbox on its main dialog displays two additional tabs that provide access to the real power of the Boot-Up Manager. You can click either of these tabs to display more detailed information about the topic with which it is associated, or click the Summary tab to display the standard Boot-Up Manager. Boot-Up Manager’s Services tab, provides a detailed description of the services that are stopped and started by available run level scripts, and the different run levels with which each is associated.

You can start or stop any existing service, remove it from the startup and shutdown sequence, or modify the sequence in which that script is executed during the startup or shutdown processes by right-clicking any entry in the Services tab to display the pop-up menu. To change the sequence in which a script is executed during the startup and shutdown processes, select Change start/stop priority from the pop-up menu. (Identifying a script’s sequence number as its priority is somewhat misleading, but c’est le vie.) A dialog shown, you can enter the new numeric identifier for the sequence in which you want this script to run during the startup or shutdown process.

After modifying these values, click OK to save your changes and return to the Services tab or click Cancel to return to the Services tab without making any changes. Any changes that you specify are made to your system immediately. (The current Boot-Up manager doesn’t update its internal display to use the new sequence number until the next time that you start the Boot-Up Manager, which is certainly a bug.) In addition to enabling you to modify the startup and shutdown scripts associated with various system services, clicking the Boot-Up Manager’s Advanced checkbox also displays a tab on which you can examine the startup and shutdown scripts that are run during the boot process through the system initialization script identified by the sysinit entry in your /etc/inittab file. Click the Startup and shutdown scripts tab to see a list of these other scripts and the part of the system startup or shutdown sequence that they are associated with.

The SysVInit process is well-known and well-established, but has been used for years without any substantial modifications. Its biggest problem is that all of the scripts that it executes are executed sequentially, which means that your system’s startup process can take much longer than it needs to, assuming that there are no major dependencies between startup scripts. Jimmy Wennlund’s initng (Init, Next generation) replacement for the standard /sbin/init process is a great step in the right direction, supporting parallel execution of startup scripts whenever possible. The InitNG program also enables you to collect additional statistics that may be useful to you when analyzing your system’s startup performance. See the InitNG home page, http://initng.thinktux.net, for more information about this project (and the source code). InitNG is actively under development and is still maturing, but you can experiment with it by building and installing it on your system, and then modify your GRUB kernel command line to include the statement init=/sbin/initng. This enables you to experiment with InitNG without risking any problems with your current, traditional initialization sequence.

>>> Read more about Examining Ubuntu Boot Process with Boot Chart <<<

Source of Information : Ubuntu Linux - Bible

Friday, August 22, 2008

Installing and Configuration Ubuntu Samba Server

To install the packages required to run and monitor a Samba server on your Ubuntu system, start the Synaptic Package Manager from the System -> Administration menu, and click Search to display the search dialog. Make sure that Names and Descriptions are the selected items to look in, enter samba as the string to search for, and click Search. After the search completes, scroll down until you see the samba-common and samba-server packages, right-click each of these packages and select Mark for Installation from the pop-up menu. You may also want to select the samba-doc and samba-doc-pdf packages, which respectively provide HTML and PDF versions of all of the official Samba project documentation, plus an online copy of a book entitled.

Depending on what software you have previously installed on your Ubuntu system and what you select in Synaptic, a dialog may display that lists other packages that must also be installed, and ask for confirmation. When you see this dialog, click Mark to accept these related (and required) packages. Next, click Apply in the Synaptic toolbar to install the Samba server and friends on your system. Once the installation completes, you’re ready to share data with any system that supports NFS.


Samba Server Configuration Essentials
At the moment, the absence of a graphical tool for setting up and configuring Samba on Ubuntu systems is a rather glaring omission to the standard user-friendliness that Ubuntu users have come to expect. I’m not the only person to have noticed this, and there are active discussions on various Ubuntu lists and forums about developing such a tool. However, for the time being, you must do your initial Samba configuration in the aging but tried-and-true Linux way—by editing configuration files using a text editor. Samba’s configuration file is /etc/samba/smb.conf. The Samba configuration file contains many helpful comments, which are lines beginning with a hash mark. It also contains many sample, inactive configuration commands, which are lines beginning with a semicolon. These indicate configuration commands that you may want to activate by removing the leading semicolon.

Editing the file /etc/samba/smb.conf to configure Samba is actually quite simple, but is also somewhat inelegant when compared to the rest of the system administrative environment provided by Ubuntu Linux.

Regardless of whether a graphical tool for Samba setup and configuration is available by the time that you read this (check the System -> Administration menu), the information in this section still applies, and it’s actually quite useful to have some insights into where Samba configuration information is stored, and how the primary Samba configuration file is organized.

Web-based system administration tools such as swat (Samba Web Administration Tool) and webmin (a more generalized Web-based administrative environment) are available from the Ubuntu repositories, but require special configuration before they’ll work correctly in the Ubuntu environment. Rather than taking the conceptual detour of explaining how to use these tools, I’ll continue to wait for a desktop GNOME/Ubuntu solution for Samba setup and configuration. After all, KDE already has such a tool in its Control Center—and GNOME can’t (or shouldn’t be) far behind.

>>> Read more about Samba Server <<<

Source of Information : Ubuntu Linux - Bible

Why use Shell in Ubuntu

The real measure of a Linux user expertise comes from your abilities at the shell. In our modern age, the GUI is mistakenly considered “progress.” For instance, users of the Microsoft and Apple-based operating systems are quite used to using a mouse to navigate and perform various tasks. While it’s handy in certain situations—it would be difficult to imagine image editing without a mouse, for example—in many other situations, such as when manipulating files, directly typing commands is far more efficient.

Most modern Linux distributions prefer you to use the GUI to do nearly everything. This is because they acknowledge the dominance of Windows and realize they need to cater to mouse users who might not even know the shell exists (and, of course, programs like web browsers would be unusable without a GUI). To this end, they provide GUI tools for just about every task you might wish to undertake. Ubuntu is strong in this regard, and you can configure a lot of things from the desktop.

However, it’s well worth developing at least some command-line shell skills, for a number of reasons:

It’s simple and fast. The shell is the simplest and fastest way of working with Ubuntu. As just one example, consider the task of changing the IP address of your network card. You could click the Systems menu, then the Administration option, then the Network option, and then double-click the entry in this list relating to your network card. That will take at least a minute or two if you know what you’re doing, and perhaps longer if it’s new to you. Alternatively, you could simply open a shell and type this:
ifconfig eth0 192.168.0.15 up

It’s versatile. Everything can be done via the shell—from deleting files, to configuring hardware, to creating MP3s. A lot of GUI programs actually make use of programs you can access via the shell.

It’s consistent among distributions. All Linux systems have shells and understand the same commands (broadly speaking). However, not all Linux systems will have Ubuntu’s graphical configuration programs. SUSE Linux uses its own GUI configuration tool, as does Mandrake Linux. Therefore, if you ever need to use another system, or decide to switch distributions, a reliance on GUI tools will mean learning everything from scratch.
Knowing a few shell commands will help you get started instantly.

It’s crucial for troubleshooting. The shell offers a vital way of fixing your system should it go wrong. Your Linux installation might be damaged to the extent that it cannot boot to the GUI, but you’ll almost certainly be able to boot into a shell. A shell doesn’t require much of the system other than the ability to display characters on the screen and take input from the keyboard, which most PCs can do, even when they’re in a sorry state. This is why most rescue floppies offer shells to let you fix your system.

It’s useful for remote access. One handy thing about the shell is that you don’t need to be in front of your PC to use it. Programs like ssh let you log in to your PC across the Internet and use the shell to control your PC. For example, you can access data on a remote machine, or even fix it when you’re unable to attend the machine’s location. This is why Linux is preferred on many server systems when the system administrator isn’t always present on the site.

It’s respected in the community. Using a shell earns you enormous brownie points when speaking to other Linux users. It separates the wheat from the chaff and the men from the boys (or women from the girls). If you intend to use Linux professionally, you will most certainly need to be a master at the shell.

Seen in this light, learning at least a handful of shell commands is vital to truly mastering your PC.

The drawback when using a command-line shell is that it’s not entirely intuitive. Take for instance the command to change the network card’s IP address:
ifconfig eth0 192.168.0.15 up

If you’ve never used the shell before, it might as well be Sanskrit. What on earth does ifconfig mean? And why is there the word up at the end?

Learning to use the shell involves learning terms like these. Hundreds of commands are available, but you really need to learn only around 10 or 20 for everyday use. The comparison with a new language is apt because, although you might think it daunting to learn new terminology, with a bit of practice, it will all become second nature. Once you’ve used a command a few times, you’ll know how to use it in the future. When you become familiar with it, you’ll see that it is a beautiful concept. The shell is simple, elegant, and powerful.

>>> Read more about What Is Ubuntu BASH Shell? <<<

Source of Information : Beginning Ubuntu Linux - From Novice To Professional

Thursday, August 21, 2008

Windows Server 2008 Enhances Networking - Next Generation TCP/IP stack

Windows Server 2008 includes a new implementation (a complete redesign) of the original TCP/IP protocol stack called the Next Generation TCP/IP stack. This new framework is a total rewrite of TCP/IP functionality for both IPv4 and IPv6. It’s designed to better meet connectivity and performance needs in various networking environments using various networking technologies.

For the benefit of those stuck in a cave in Patagonia since the early 1980s, TCP/IP is the de facto standard network protocol stack for most server and workstation computers you’ll encounter, but it’s by no means the only one. It expands to Transmission Control Protocol/Internet Protocol and serves as the foundation for network traffic shuttled across the Internet. It’s become a nearly universal means for networked communications of all kinds.

The core network stack framework is improved and enhanced to increase existing functionality, complement it with supplementary performance enhancing functionality, and further expand that framework through additional features and components. The following are material that’s both directly and indirectly related to advances in the Next Generation TCP/IP network protocol stack in Windows Server 2008.


Receive window auto-tuning
In TCP, a receive window size defines the amount of data that a TCP receiver permits a TCP sender to push onto the network before requiring the sender to wait for acknowledgement of its receipt. Correctly determining the maximum receive window size for a connection is now automatically handled by receive window auto-tuning, which continuously determines the optimal window size on a per-connection basis using real-time bandwidth calculations.

Improved receive window throughput increases network bandwidth utilization during data transfers. If all receivers are optimized for TCP data, Quality of Service (QoS) can help reduce congestion for networks operating at or near capacity.

Quality of Service (abbreviated QoS) refers to the ability to shape and control the characteristics of ongoing network communications services. This idea operates on the notion that transmission and error rates (along with other traffic characteristics) can be measured, improved, and guaranteed — to some extent, anyway.


Compound TCP
The Next Generation TCP/IP network stack also treats connections with large receive window sizes and large bandwidth delays to Compound TCP (CTCP), a function that aggressively increases the amount of data sent in real-time by monitoring current traffic conditions.

CTCP also ensures that it doesn’t negatively impact other existing TCP connections and complements receive window auto-tuning support to provide substantial performance gains appreciable in any high-delay, high-throughput network environment.


Explicit Congestion Notification support
Lost TCP segments are assumed to be lost, probably owing to router congestion, which triggers a congestion control mechanism that dramatically reduces a TCP sender’s transmission rate. With Explicit Congestion Notification (ECN; see RFC 3168, which you can find at www.faqs.org/rfcs/rfc3168.html) support, both TCP peers and routers experiencing congestion accordingly mark packets they forward. On receipt of such packets, a TCP peer will scale back its transmission rate to ease congestion and reduce segment loss. Windows Server 2008 now includes core support for this protocol feature.


Quality of Service (QoS) support
Windows Server 2003 and Windows XP provide QoS functionality to applications through QoS APIs, which are leveraged to prioritize time-sensitive network data delivery functions. Windows Server 2008 and Windows Vista include new facilities for network traffic management on Windows networks so that high-priority traffic is handled first, which helps with streaming media, voice over IP, video conferencing, and other applications where quick response times are needed.

Policy-based QoS for enterprise networks allows IT staff to either prioritize or manage the send rate for outbound connections, which can be confined to applications, source/destination IPv4 or IPv6 addresses, and source/destination or a range of ports.


Enhancements for high-loss environments
The Next Generation TCP/IP stack also improves network conditions in highloss environments through several optimization features that include:

• (RFC 2582) The NewReno Modification to TCP’s Fast Recovery Algorithm: The NewReno algorithm provides faster throughput by changing the way a sender can increase its sending rate when multiple segments in a given window are lost, and the sender receives partial acknowledgement only for segments actually received.

• (RFC 2883) An Extension to Selective Acknowledgement (SACK) Option for TCP: SACK allows a receiver to determine when it has retransmitted a segment unnecessarily and adjust its behavior on-the-fly to prevent further unnecessary retransmissions. Fewer retransmissions result in more optimal overall delivery.

• (RFC 3517) A Conservative Selective Acknowledgement (SACK)-based Loss Recovery Algorithm for TCP: Windows Server 2003 and Windows XP use SACK information only to determine those TCP segments that have yet to arrive. Windows Server 2008 includes a method defined in
• RFC 3517 to use SACK information for loss recovery in the event duplicate acknowledgements are received, which is maintained on a perconnection basis by the Next Generation TCP/IP stack.

• (RFC 4138) Forward RTO-Recovery (F-RTO): Spurious retransmissions can occur as a result of increases in round trip time (RTT). The F-RTO algorithm prevents unnecessary retransmissions, particularly in wireless environments where client adapters may roam from point to point, to return quickly to normal send rates.

>>> Read more about Windows Server 2008 Enhances Networking - Offloading protocol processing <<<

Source of Information : For Dummies Windows Server 2008 For Dummies

Wednesday, August 20, 2008

How SUSU Linux Loading the Kernel

When GRUB hands over the process to the SUSE Linux kernel, it leaves the scene. The kernel now takes charge, putting up the message Uncompressing Linux...; it is present and available to you until you shut down the system. While the kernel boots, SUSE Linux puts up a nice blue wallpaper to hide all the boring text that scrolls by as the kernel initializes first your peripheral hardware, then the hard drive and attending file systems, followed by the serial ports. Press the Esc key to watch the boot process unfold.

As a user, or even as an administrator, you don't have much direct interaction with the Linux kernel. You run applications, which occasionally interact with the kernel to get things done. In the kernel's view of things, an application is simply a process, one of many it deals with. The father of all processes, which the kernel loads soon after the kernel itself loads, is called init, located in the /sbin directory. The rest of the boot process (and later, the shutdown process) is really handled by init, not the kernel. All other processes are started by init or one of its child processes. Init is centrally configured by the /etc/inittab file.

After activating the serial ports, the kernel runs a series of boot scripts, located at /etc/rc.d/boot.d, which activates (and, if required, mounts) still more devices and local file systems.

Then boot.clock sets up the system clock, ldconfig identifies the current time zone, and local networking interfaces are turned on via boot.sysctrl, boot.localnet (for the loopback interface), and boot.isapnp.

Finally, the kernel's System Boot Control declares

The system has been set up and runs /etc/init.d/boot.local. This program invokes the appropriate runlevel for the system. There is much more on runlevels in the next section, but a standard networked desktop will launch Runlevel 5 as it hits the home stretch of the boot process.

At Runlevel 5, networking services are started and various other services and the system logs come online. The sound driver, keyboard maps, CUPS printer interfaces, mail transfer agent, and xinetd Internet services come next.

Finally, the kernel starts the X Window System and the display manager (KDM by default) that allows the user to log in. Logging in loads the desired desktop, and you're done.

To closely examine your most recent boot process, open /var/log/boot.msg in a text editor, or open the YaST View Startup Log module from the Misc page.

Source of Information : SUSE Linux 10 Unleashed

SUSE Linux GRUB Versus LILO

You may not realize it unless you are dual booting multiple operating systems, but after your BIOS starts firing up the fan, the microprocessor chip, and the power supply, a boot manager, or bootloader, takes over the process until the kernel starts up.

Linux supports a variety of open-source and proprietary boot managers, but you can install only two with YaST: the Grand Unified Bootloader (GRUB) and the Linux Loader (LILO). GRUB has been the default bootloader for SUSE Linux since v8.2, but LILO still runs quite a few systems, and you may want to use it instead.

LILO succeeded load in as the primary Linux bootloader and seems to be in the long process of being superseded by GRUB. LILO carries out its single task, booting to a file system, well. It is not quite as flexible nor as configurable as GRUB. Nonetheless, it is still the default bootloader for systems in which the Root partition is installed on CPU-dependent RAID controllers (such as many Promise or Highpoint controllers), Software RAID, or Logical Volume (LVM) managed disk.

The chief difference between the two bootloaders is in how they find and load file systems. LILO looks for a file system based on where the partition table says it is. GRUB can read and identify several file systems (ext2, ext3, ReiserFS, JFS, XFS, Minix, and DOS).

In YaST, the Boot Loader Configuration module is on the System page. You can set LILO as the default if you want and set many other options in this screen. If you prefer, you can edit the file directly by clicking Edit Configuration Files.

By default, GRUB displays a menu, allowing you to boot SUSE Linux from the hard drive, from a floppy drive, or into fail-safe mode. Fail-safe mode loads a kernel version with a set of parameters that makes it possible to boot with some hardware problems. If there's another operating system on your computer, GRUB will list this on your boot menu as well. After 8 seconds, GRUB will boot the first item on the menu; that is, SUSE Linux. At the bottom of the GRUB menu, you can specify options for the kernel, if you are so inclined.

You can see how each process builds on the previous one, allowing different operating systems to work on the same hardware. The GRUB menu you see is controlled by the GRUB configuration file, which is located at /boot/grub/menu.lst.

The first portion of menu.lst defines options for the display of the GRUB menu, such as the color scheme of the menu, the default menu option, and the number of seconds (timeout) before GRUB runs the default menu option.

Following the display options are a list of items that will be displayed in the GRUB menu. Each menu item begins with "title." This particular GRUB menu will display three items:
• SUSE LINUX 10.0
• Floppy
• Failsafe—SUSE LINUX 10.0

The remaining lines tell GRUB where to find the operating system files needed to run Linux. These include the following:
• root: This command sets the current root device to the specified device.
• kernel: This command loads the primary boot image from the boot image file.
• initrd: This command loads an initial ramdisk for the boot image.

To configure how GRUB boots your system, you can either manually edit menu.lst with a text editor, or you can use the YaST System, Boot Loader module. In addition to manually editing the menu.lst file and using YaST, you can also use the GRUB shell to configure how your system boots. Simply enter grub at the shell prompt. To learn how to manipulate GRUB from the shell, see the grub man page.

Source of Information : SUSE Linux 10 Unleashed

Tuesday, August 19, 2008

Formatting a USB Drive in Ubuntu

USB drives support two basic formats: floppy drive and hard drive. A USB floppy drive consists of one large formatted drive. In contrast USB hard drives contain partition tables and one or more formatted partitions. If you purchased a thumb drive and never formatted it, then it is most likely configured as a USB hard drive with one large partition.

Before formatting or partitioning any device, be sure the device is not mounted! Use the mount command (without any parameters) to see if it is mounted, and then use umount to unmount any partitions. For example, to unmount /dev/sdc1 mounted at /media/usbdrive, you can use sudo umount /dev/sdc1 or sudo umount /media/usbdrive.

Thumb drives are usually partitioned just like a regular hard drive. Commands such as fdisk and cfdisk can easily modify the drive partitions, and mkfs can be used to format a partition. Besides capacity, speed is a significant difference between thumb drives and hard drives. When you change the partition table on a flash drive or format a partition, wait a few seconds before removing the drive; otherwise, some data may be buffered and not yet transferred.

When you use the fdisk or cfdisk command on a thumb drive, you configure it as a USB hard drive. However, you can also configure it as a USB floppy drive. This requires formatting the device without partitioning it. For example, to make an ext2-formatted USB floppy drive on my 64 MB USB thumb drive (/dev/sdc), I can use:

$ sudo mkfs /dev/sdc
mke2fs 1.38 (30-Jun-2005)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
16128 inodes, 64512 blocks
3225 blocks (5.00%) reserved for the super user
First data block=1
8 block groups
8192 blocks per group, 8192 fragments per group
2016 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
$ sudo sync


When you first plug in a USB hard drive, all the partitions will appear and automatically mount. However, to create a USB floppy drive, be sure to unmount all partitions and then format the main device (for example, /dev/sda or /dev/sdc) and not a partition (for example, /dev/sda2 or /dev/sdc1). You will need to disconnect and reconnect the device after you format it in order to remove any stale device partition identifiers.

When writing to a thumb drive, I usually run the sync command (sudo sync). This flushes all cached data to the disk. When the command returns, it is safe to remove the drive.

Source of Information : Hacking Ubuntu Serious Hacks Mods and Customizations

Monday, August 18, 2008

Enabling Multiple CPUs (SMP) in Ubuntu

Many of today's computers have multiple CPUs. Some are physically distinct, and others are virtual, such as hyper-threading and dual-core. In any case, these processors support symmetric multiprocessing (SMP) and can dramatically speed up Linux.

The kernel supports multiple CPUs and hyper-threading. If your computer has two CPUs that both support hyper-threading, then the system will appear to have a total of four CPUs.

Older versions of Ubuntu, such as Hoary and Breezy, had different kernels available for SMP. To take advantage of multiple processors, you would need to install the appropriate kernel.

sudo apt-get install kernel-image-2.4.27-2-686-smp

Without installing an SMP kernel, you would only use one CPU on an SMP system.

Dapper changed this requirement. Under Dapper, all of the default kernels have SMP support enabled. The developers found that there was no significant speed impact from using an SMP kernel on a non-SMP system, and this simplified the number of kernels they needed to maintain.

There are a couple of ways to tell if your SMP processors are enabled in both the system hardware and kernel.

• /proc/cpuinfo-This file contains a list of all CPUs on the system.

• top-The top command shows what processes are running. If you run top and press 1, the header provides a list of all CPUs individually and their individual CPU loads. (This is really fun when running on a system with 32 CPUs. Make sure the terminal window is tall enough to prevent scrolling!)

• System Monitor-The System Monitor applet can be added to the Gnome panels. When you click it, it shows the different CPU loads.

In each of these cases, if only one CPU is listed, then you are not running SMP. Multiple CPUs in the listings indicate SMP mode.



Disabling SMP
In some situations, such as application benchmarking or hardware debugging, you may want to disable SMP support. This can be done with the kernel parameters nosmp or maxcpus=1.If this is a temporary need, you can just boot the system, catch Grub at the menu by pressing ESC, and typing boot nosmp maxcpus=1 at the prompt. If you have multiple boot options, then you may need to edit the kernel line and add nosmp maxcpus=1 to the kernel boot line. Warning, some kernels do not work with nosmp, but in my experience maxcpus=1 always works.

For a longer-term solution, consider adding these boot parameters to the Grub configuration.

1. As root, edit /boot/grub/menu.lst.

2. Scroll down to your kernel.

3. Add a kernel option for disabling SMP. For example: kernel /boot/vmlinuz-2.6.15-26-686 root=/dev/hda1 ro splash maxcpus=1

4. Save your changes.

The next reboot will use your new changes. If you modify /boot/grub/menu.lst, be aware that the contents could be overwritten the next time you upgrade the kernel or run update-grub.



SMP not working
If you find that you only have one active CPU on a multiple CPU system, try installing the explicit SMP kernel: sudo apt-get install linux-686-smp. Beyond that, there are few generic debugging options and the problem is unlikely related to Ubuntu-it is probably a general Linux kernel problem.

Check with the motherboard manufacturer and see if Linux supports their chipset. For example, I have an old dual-CPU motherboard that is not supported by Linux.

Check the Linux Hardware FAQ for the motherboard or chipset. This will tell you if other people managed to get it to work. Web sites such as https://wiki.ubuntu.com/HardwareSupport and/http://www.faqs.org/docs/Linux-HOWTO/SMP-HOWTO.html are good places to start.

If all else fails, post a query to any of the Linux or Ubuntu hardware forums. Maybe someone else knows a workaround. Some good forums include http://www.ubuntuforums.org/, http://www.linuxhardware.org/, and http://www.linuxforums.org/forum/. Be sure to include details such as the make and model of the motherboard, Ubuntu version, and other peripherals. It is generally better to provide too much information when asking for help, rather than providing too little.

Unfortunately, if SMP is not enabled after installing the linux-686-smp kernel, then it probably will not work. But you might get lucky-if someone has a patch then you will probably need to recompile the kernel.

Source of Information : Hacking Ubuntu Serious Hacks Mods and Customizations

Sunday, August 17, 2008

Remote Logging Using ssh in Ubuntu

The newer, more modern and secure replacement for telnet is ssh, the secure shell application, which uses SSH, the Secure Shell protocol. The ssh application is installed as part of a default Ubuntu Linux installation, along with other applications that use the same protocol and authentication information, and which shares much of the same command-line syntax, such as sftp (secure FTP) and scp (secure copy). Using ssh, you can establish a remote login session on any machine that is running an ssh daemon. An ssh daemon must be running on the remote system. If you try to connect to the remote system and see a message like the following, the ssh daemon is either not running on that system or it is running on some port other than the default port 22:

$ ssh ulaptop
ssh: connect to host ulaptop port 22: Connection refused

Using ssh to connect to a remote system as the current user is as simple as typing the ssh hostname command, where hostname is the name or IP address of the host that you want to connect to. The first time that you attempt to connect to a remote system that you have never connected to before, you will see a message like the following:

$ ssh ulaptop
The authenticity of host ‘ulaptop (192.168.6.90)’ can’t be established.
RSA key fingerprint is 07:e6:3a:50:4b:6d:e6:d8:f1:80:c6:b2:da:02:a3:da.
Are you sure you want to continue connecting (yes/no)?

To continue connecting to this system, type yes and press return. The ssh utility adds the RSA key for the remote system to its list of known hosts (to prevent some other machine from impersonating the remote machine in the future), and prompts you for your password, as in the following example:

Warning: Permanently added ‘ulaptop’ (RSA) to the list of known hosts.
wvh@ulaptop’s password:

RSA stands for Rivest, Shamir, and Adleman, the developers of the type of public key encryption technology that is used by default by the OpenSSH implementation of the SSH protocol. For more information about public key infrastructure (PKI) and related encryption technologies, see a Web site such as Wikipedia’s PKI information at http://en.wikipedia.org/wiki/Pki.

At this prompt, enter your password on the remote system and press return. Assuming that you typed the correct password, you’ll see a successful login message from the remote system, and that system’s prompt will display, as in the following example:

Linux ubuntu32 2.6.15-21-386 #1 PREEMPT Fri Apr 21 16:43:33 UTC 2006

The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
Last login: Wed May 1 20:15:16 2006
wvh@ubuntu32:~$

Once you’ve established an ssh connection to a remote machine, you can do anything from this login prompt that you could do from a direct connect to that machine, including starting graphical applications that display on your local system if you set the DISPLAY environment variable correctly Graphical Environments for Linux working on the remote system, you can log out by pressing Control+D or by typing the exit command.

All of this is well and good assuming that you have the same login name on all of the systems that you want to connect to, or that you always want to connect as yourself. Luckily, the ssh command provides an easy way to connect to another system as another user by using a command such as ssh user@host, where user is the name of the user that you want to log in as, and host is the name of the host to which you want to connect as that user. For example, the command ssh joeuser@ulaptop would use ssh to connect to the remote host ulaptop as the user joeuser. Assuming that you know this user’s password, you can login there as the specified user and perform any actions that they are authorized to do.

The ssh command has many other options, few of which you’ll probably ever need to use. For complete information on the ssh command, see the online reference information for the command that is available through the man ssh command.

Source of Information : Ubuntu Linux - Bible

Saturday, August 16, 2008

The Apache Software Foundation

In 1999, the same folks who wrote the Apache server formed the Apache Software Foundation (ASF). The ASF is a nonprofit organization that was created to facilitate the development of open source software projects. Tomcat is developed under the auspices of the ASF. According to their Web site, the ASF accomplishes this goal by doing the following:

• Providing a foundation for open, collaborative software development projects by supplying hardware, communication, and business infrastructure

• Creating an independent legal entity to which companies and individuals can donate resources and be assured that those resources will be used for the public benefit

• Providing a means for individual volunteers to be sheltered from legal suits directed at ASF Projects

• Protecting the Apache brand (as applied to its software products) from being abused by other Organizations


In practice, the ASF does indeed sponsor a great many open source projects. While the best-known of these projects is likely the aforementioned Apache Web server, the ASF hosts many other well-respected and widely used projects, including such respected industry standards as the following:

• Xerces: A Java/C++ XML parser with JAXP bindings

• Ant: A Java-based build system (and much more)

• Axis: A Java-based Web services implementation

The number of ASF-sponsored projects is growing fast. Visit www.apache.org to see the latest list.

Source of Information : Apress Pro Apache Tomcat

Friday, August 15, 2008

How to install a package in Ubuntu

In Ubuntu, all components (applications, documentation, artwork, etc.) are split up into separate packages. Each package serves one purpose. For instance the package Firefox contains Mozilla Firefox, and Ubuntu-audio contains the Ubuntu default audio theme.

To install a program, select Applications > Add/Remove. When asked for a password, enter your login password. Select a category in the left pane. This corresponds to the Applications menu. Click an empty checkbox for any application you want in the upper right pane to select it for installation. Or deinstall an application by deselecting the application's checkbox. Nothing will actually happen until you click Apply or OK. A dialog box lists the pending changes, and if you click OK the required packages are downloaded and installed (or deinstalled if that's what you chose). When it's finished, click Close.

If you can't find what you're looking for, enter a word into the search box in the upper right corner. For instance if you enter "picture," it will show the GIMP, a powerful tool to edit pictures. You can also search for a specific application, such as Patience.

When you still can't find it, or you want to install a package not listed in Add/Remove, click the Advanced button. You can also open Synaptic by selecting System > Administration > Synaptic Package Manager. Enter your login password if prompted.

First click the Reload button on the toolbar to download the latest package lists. To search for a package, click Search on the toolbar. For example, enter "Tux Paint," and click Search. Successive search queries are stored in the left pane, and the results are shown in the right pane. To install a package, click the box to the left of the name. Select Mark for Installation from the list. Synaptic will warn when other packages (dependencies) have to be installed for the package you want to install. Click Mark to automatically mark the required packages for installation. The package you've selected is highlighted in green. Packages marked for removal appear in red. For Tux Paint, you see two other packages highlighted in green. Other required packages marked for installation do not appear in the search results for Tux Paint, because they are not specifically made for Tux Paint, and hence can also be used by other applications.

To browse for packages click Components in the lower left corner. The categories presented in the left pane are not corresponding to the Applications menu. The "universe" and "multiverse" categories hold packages not supported by Ubuntu. It is advisable only to install them if you know what you are doing.

When you have selected a package, a description is shown in the bottom pane. To obtain more detailed information (such as the download and installed size), click Properties on the toolbar.

When you are done marking packages, click Apply on the toolbar. This opens a dialog where you can see the pending changes. If you are sure, click Apply. The required packages are then downloaded and installed. When it's finished, click Close.