Sunday, May 31, 2009

KDE 4

The KDE 4 release is a major reworking of the KDE desktop. Though not officially supported in the 8.04 LTR release, a version of 8.04 with KDE 4 is available, called Kubuntu4. You can download it from www.kubuntu.com or from http://cdimage.ubuntu.com. Check the KDE site for detailed information on KDE 4, including the visual guide: www.kde.org/announcements/4.0/.

Every aspect of KDE has been reworked with KDE 4, including a new files manager, desktop, theme, panel, and configuration interface. The KDE window manager supports advanced compositing effects, and Oxygen artwork for user interface theme, icons, and windows.

Device interfaces are managed by Phonon for multimedia devices, and Solid for power, network, and Bluetooth devices. Phonon multimedia framework provides can support different back ends for media playback. Currently it uses the xine back end. With Phonon you can direct media files to specific devices. Solid hardware integration framework integrates ixed and removable devices, as well as network and Bluetooth connections. Solid also connects to your hardware’s power management features. ThreadWeaver makes efficient use of multicore processors.

New applications include the Okular document viewer for numerous document formats with various display features such as zoom, page thumbnails, search, and bookmarks. It allows you to add notes to documents. Gwenview is the KDE image viewer with browsing, display, and slideshow features for your images. Terminal window supports tabbed panels, split views for large output, background transparency, and search dialogs for commands. Large output can be scrolled.


KDE 4 Desktop and File Manager
When you log in to KDE 4, the desktop displays the KickOff application launcher in the bottom panel along with the taskbar manager, desktop pager, and the clock. The icon that appears in the upper-right corner is a mouse-activated area that displays a menu for adding widgets to the panel as well as zooming in and out the desktop area, in effect minimizing it.

The KickOff application launcher replaces the K menu. It organizes menu entries’ tabbed panels that are accessed by icons at the bottom of the KickOff menu: Favorites, Applications, Computer, Recently Used, and Leave. You can add and remove applications on the Favorites panel by right-clicking and selecting Add or Remove To Favorites. The Applications panel shows application categories. Click the Computer icon to open a window with all your fixed and removable storage. The Recently Used panel shows both documents and applications. Click Leave to log out or shut down. KickOff also provides a Search box where you can search for a particular application, instead of working through menus.

The KDE 4 desktop features the Plasma desktop shell with new panel, menu, and widgets, and with a new dashboard function. The dashboard replaces the Show Desktop function. Use the ctrl-f12 key to start the desktop shell. It hides all windows and brings all applets to the front, expanding them to widgets on the desktop area. Click the top-right corner menu to hide the dashboard when you are finished. Krunner is a quick startup window for applications, where you can type in the application name in a pattern and Krunner will provide possible matches (it even works as a calculator). You can also use the alt-f2 key to one the Krunner window.

KWin window manager desktop effects can be enabled on the Desktop tab (System Settings Desktop Desktop Effects). The Advanced Effects tab lists available effects. Desktop Grid shows a grid of all your virtual desktops , letting you see all your virtual desktops at once. Use the ctrl-f8 key to toggle the display for your virtual desktops on or off. You can then move windows and open applications between desktops. You can also drag the virtual desktop applet to the desktop to view an enlarged version of it. The Taskbar Thumbnails effect will display a live thumbnail of window on the taskbar as your mous passes over it, showing information on the widget in an expanded window. Some applications and windows can support transparency, letting you see the open windows behind it. The terminal window supports transparency, allowing you to see the terminal text while showing open windows it overlays. You can enable many other effects as well. Dolphin is KDE 4’s dedicated file manager (Konqueror is used as a Web browser). It is also used in Kubuntu, as discussed previously. On Kubuntu4, Dolphin will display two sidebars, a places sidebar for accessing directories and file systems, and an information sidebar. You can close one or both . With the split view you can open directories in the same window, letting you copy and move items between them. The Places sidebar shows icons for often used folders such as Home, Network, and Trash, as well as removable devices. To add a folder to the sidebar, just drag it there. The information pane displays detailed information about a selected file or folder, and the Folders pane displays a directory tree for the file system. You can display panels by choosing View Panels. The panels are detachable from the file manager window. Dolphin file manager also features integrated desktop search and metadata extraction.

With the KDE configuration panels, you can configure your desktop and system, changing the way it is displayed and the features it supports. The configuration are accessed from the System Settings entry in the Favorites panel of the KDE menu, and appear similar to those used for KDE 3, the Kubuntu edition.

Kubuntu4 uses the same System Settings configuration window as Kubuntu. The System Settings window shows two tabs for General and Advanced. The General tab has sections for Personal, Look & Feel, Computer Administration, and Network & Connectivity.

The Advanced panel has tools for System Administration and Advanced User Settings. Click the icons to display a window with sidebar icons listing configuration panels, with the selected panel shown on the right. The selected panel may have tabs.

Source of Information : McGraw Hill Ubuntu The Complete Reference

Friday, May 22, 2009

KDE File Managers

KDE File Managers - Dolphin File Manager: Kubuntu 3 and 4
Dolphin is KDE’s dedicated file manager used in Kubuntu and KDE 4. Dolphin is fully supported by Ubuntu 8.04 LTR. A navigation bar shows the current directory either in browse or edit mode. In the browse mode, it show icons for the path of your current directory, and in the edit mode it shows the path name in a text-editable box. You can use either to move to different directories and their subdirectories. Using split between them. Kubuntu displays two sidebars: one for Bookmarks and the other for Information. Passing the mouse over a item displays its information. Dolphin file manager also features integrated desktop search and metadata extraction.

The files listed in a directory can be viewed in several ways, such as icons, detailed listings, and previews (choose View View Mode). Previews displays contents of the file, such as a thumbnail image of an image file or the first words in a text file. Dolphin also supports split views, so you can open two different folders in the same window. Click the Split View button on the toolbar to see a split view.


KDE File Managers - Konqueror File Manager
The Konqueror file manager window consists of a menu bar, a navigation toolbar, , a status bar, and a sidebar that provides different views of user resources such as a tree view of file and directory icons for your home directory. When you display the file manager window, you’ll see the file and subdirectory icons for your home directory. Files and directories are automatically refreshed, so if you add or remove directories, you do not have to refresh the file manager window manually. It automatically updates for your listing, showing added files or eliminating deleted ones.

The files listed in a directory can be viewed in several different ways, such as icons, multicolumn (small icons), expandable trees, file information, or in a detailed listing. To access the different views, choose View View Mode. The commonly used views are listed as icons at the end of the icon bar. The Tree mode lists your subdirectories as expandable trees whose contents you can display by clicking their plus signs. The Info mode lists file information such as the number of lines and characters in the file. The detailed listing provides permissions, owner, group, and size information. Permissions are the permissions controlling access to this file. The Text view does the same but does not display an icon next to the filename.

Konqueror also supports tabbed displays. Instead of opening a folder in the same file manager window or a new one, you can open a new tab for it using the same file manager window. One tab can display the initial folder opened, and other tabs can be used for folders to be opened later. You can then move from viewing one folder to another simply by clicking a folder’s tab. This lets you view multiple folders in one file manager window. To open a folder as a tab, right-click its icon and choose Open in New Tab. To close the folder, right-click its tab label and choose Close Tab. You can also detach a tab, opening it up in its own file manger window.

If you know you want to access particular directories again, you can bookmark them, much as you do a Web page. Just open the directory and choose Bookmarks Add Bookmarks. An entry for that directory is then placed in the file manager’s Bookmark menu. To move to the directory again, select its entry in the Bookmark menu. To navigate from one directory to another, you can use the Location bar or the directory tree. In the Location bar, you can enter the pathname of a directory, if you know it, and press enter. The directory tree provides a tree listing all directories on your system and in your home directory. To display the directory tree, choose View View Mode Tree View, or click the Tree View icon in the icon bar. To see the tree view for your home or root directory directly, you can use the Navigation panel’s Home or Root Folder resources.

Configuration files, known as hidden files, are not usually displayed. To have the file manager display these files, choose View Show Hidden Files. Konqueror also supports split views, letting you view different directories in the same window (the View menu). You can split vertically or horizontally. Konqueror also provides a sidebar media player for running selected media files within your file manager window.

Navigation Sidebar
The navigation sidebar lists different resources that a user can access with Konqueror. You can turn the navigation sidebar on or off by selecting its entry in the View menu. The sidebar is configured with the Navigation Panel Configuration tool, accessible by right-clicking on the navigation the navigation button bar which also displays items such as your bookmarks, devices, home directory, services, and network resources in an expandable tree. Dragging the mouse over the resource icon displays its full name. When you click an item, its icon will expand to the name of that resource. Double-click it to access it with Konqueror. For example, to move to a subdirectory, expand your home directory entry and then double-click the subdirectory you want. Konqueror will display that subdirectory. To go to a previously bookmarked directory or Web page, find its entry among the bookmarks and select it. The network button lists network resources to which you have access, such as FTP and Web sites. The root folder button displays your system’s root directory and its subdirectories. To configure the Navigation sidebar, right-click the sidebar and choose Multiple Views to allow the display of several resource listings at once, each in its separate sub-sidebar. You can also add a new resource listing, choosing from a bookmark, history, or directory type. A button will appear for the new listing. Right-click the button to select a new icon for it or select a URL, either a directory pathname or a network address. To remove a button and its listing, right-click it and choose Remove.

Konqueror Web and FTP Access
Konqueror also doubles as a full-featured Web browser and an FTP client. It includes a box for entering either a pathname for a local file or a URL for a Web page on the Internet or your intranet. A navigation toolbar can be used to display previous Web pages or previous directories. The Home button will always return you to your home directory. When accessing a Web page, the page is displayed as on any Web browser. With the navigation toolbar, you can move back and forth through the list of previously displayed pages in that session. Konqueror also operates as an FTP client. When you access an FTP site, you navigate the remote directories as you would your own directories. The operations to download a file are the same as copying a file on your local system. Just select the file’s icon or entry in the file manager window and drag it to a window showing the local directory to which you want it downloaded. Then, choose Copy from the pop-up menu that appears. Konqueror also includes KSSL, which provides full Secure Sockets Layer (SSL) support for secure connections, featuring a secure connection status display.

KDE features the KGet tool for Konqueror, which manages FTP downloads, letting you select, queue, suspend, and schedule downloads, while displaying status information on current downloads.

Configuring Konqueror
As a file browser, a Web and FTP browser, and an integral part of the KDE desktop, Konqueror has numerous configuration options. To configure Konqueror, open the Configure Konqueror window by choosing Settings Configure Konqueror from a Konqueror window. This window displays category listings in a sidebar. The initial categories deal with basic file management options such as Appearance, Behavior, Previews, and File Associations. In Behavior, you specify such actions as displaying tooltips and opening folders in new windows. Appearance lets you select the font and size. With Previews you can set the size of previewed icons, as well as specify the kind of files for which you want to retrieve metadata information. File Associations lets you set default applications for different kinds of files. The remaining categories deal with Web browser configurations, including configuring proxies and Web page displays, as well as such basic behavior as highlighting URLs, fonts to use, managing cookies, and selecting encryption methods. The History category lets you specify the number of history items and their expiration date. With the Plugins category you can see a listing of current browser plug-ins as well as scan for new ones.

Source of Information : McGraw Hill Ubuntu The Complete Reference

Monday, May 11, 2009

Manage Ubuntu - fsck

fsck stands for “file system check” or “file system consistency check.” This command will check and interactively repair inconsistent file systems. Under normal circumstances, the file system will be consistent, and the fsck command will only report on the number of files, used blocks, and free blocks in the file system. If the file system is inconsistent, then the fsck command will display information about the inconsistencies that it found, and it will ask you if you want to repair them. By default, the Ubuntu operating system will run fsck every 30 reboots on its own; however, if you would like to run this command manually, you have that option as well. The easiest way to run fsck manually is to open the Terminal and type

sudo fsck

When you’re running a command from the terminal, most commands have options or flags that can be attached to the command to set parameters for the command. In the crontab file we edited earlier in this chapter, the line read

00 00 * * * /usr/bin/apt-get update && /usr/bin/apt-get upgrade -y

Here, the –y is an example of an option. It tells the upgrade command to answer any questions with a yes. fsck has many different options that can be placed after the command. Some of these are

–N Don’t execute any changes to the file system if errors are found, only show what should be done to fix it.

–V Give back verbose output. Verbose output is very detailed and can take much longer to run this command.

–a Automatically repair the file system without asking questions.

–r Interactively repair the file system being checked.

The following command would run fsck and repair any corruptions it may find. Keep in mind that all options for commands are case sensitive. –N is not the same as –n.

sudo fsck -a

If fsck is giving you trouble when you run the command manually, you can force it to run by typing

sudo touch /forcefsck

Source of Information : McGraw Hill Ubuntu The Complete Reference

Sunday, May 10, 2009

K Desktop Environment (KDE)

The K Desktop Environment (KDE) is a network-transparent desktop that includes the standard desktop features, such as a window manager and a file manager, as well as an extensive set of applications that covers most Linux tasks. KDE is an Internetaware system that includes a full set of integrated network/Internet applications, including a mailer, a newsreader, and a Web browser. The file manager doubles as a Web and FTP client, enabling you to access Internet sites directly from your desktop. KDE aims to provide a level of desktop functionality and ease of use found in Macintosh and Windows systems, combined with the power and flexibility of the Unix operating system.

Several editions of Ubuntu, such as Xubuntu, use the Xfce desktop instead of either GNOME or KDE. Xfce is designed as a stripped down desktop with very little resource overhead; it’s ideal for laptops or systems dedicated to single tasks. Ubuntu Hardy, Ubuntu 8.04 LTR, will officially support and include KDE 3.5, not KDE 4.0. This is because the long-term release (LTR) of Ubuntu is designed for stability. KDE 4.0 is too new a release to guarantee that stability. Only KDE 3.5 will be provided the full 18 month support provided for the LTR release (this does include the new Dolphin file manager).

However, a KDE 4.0 version for Ubuntu 8.04 will be provided in the Universe repository. This version will offer six-month community-based support until the next Ubuntu short-term release, Ubuntu 8.10. A kubuntu4 disc is available for those who want to install KDE 4 directly. The situation is complicated by the fact that the Kubuntu edition of Ubuntu for 8.04 has integrated some KDE 4 features, namely the Dolphin file manager and the System Settings configuration tool. Kubuntu still provides the KDE 3.5 Konqueror file manager for use on Kubuntu 8.04. The older 3.5 version used for alternate desktop installation on the original desktop still uses the Konqueror file manager and Control Center configuration tool. The Kubuntu edition of Ubuntu installs KDE as the primary desktop from the Kubuntu install disc. You can download this disc from the Kubuntu site at www.kubuntu.org/. Here you will also find download links for the kubuntu4 disc. You can also download the discs directly from http://cdimage.unbuntu.com or http://releases.ubuntu.com.

The KDE desktop is developed and distributed by the KDE Project, a large group of hundreds of programmers from around the world. KDE is open source software provided under a GNU Public License and is available free of charge along with its source code. KDE development is managed by the KDE Core Team. Anyone can apply for team membership, though membership is based on merit.

Numerous applications written specifically for KDE are easily accessible from the desktop. These include editors, photo and paint image applications, spreadsheets, and office applications. Such applications usually have the letter K as part of their name—for example, KWord or KMail. A variety of tools are provided with the KDE desktop. These include calculators, console windows, notepads, and even software package managers.

On a system administration level, KDE provides several tools for configuring your system. With KUser, you can manage user accounts, adding new ones or removing old ones. Practically all your Linux tasks can be performed from the KDE desktop. KDE applications also feature a built-in Help application. Choosing the Contents entry from the Help menu starts the KDE Help viewer, which provides a Web page–like interface with links for navigating through the Help documents. KDE version 3 includes support for the office application suite KOffice, based on KDE’s KParts technology. KOffice includes a presentation application, a spreadsheet, an illustrator, and a word processor, among other components.

In addition, an integrated development environment (IDE), called KDevelop, is available to help programmers create KDE-based software. KDE, which was initiated by Matthias Ettrich in October 1996, was designed to run on any Unix implementation, including Linux, Solaris, HP-UX, and FreeBSD. The official KDE Web site is http://kde.org, where you’ll find news updates, download links, and documentation. KDE software packages can be downloaded from the KDE FTP site at ftp://ftp.kde.org and its mirror sites. Several KDE mailing lists are available for users and developers, including announcements, administration, and other topics (see the KDE Web site to subscribe). A great many software applications are currently available for KDE at http://kde-apps.org. Development support and documentation can be obtained at http://developer.kde.org. Various KDE Web sites

KDE uses as its library of GUI tools the Qt library, developed and supported by Trolltech. Qt is considered one of the best GUI libraries available for Unix/Linux systems. Using Qt has the advantage of relying on a commercially developed and supported GUI library. Also, using the Qt libraries drastically reduces the development time for KDE. Trolltech provides the Qt libraries as open source software that is freely distributable. Certain restrictions exist, however: Qt-based (KDE) applications must be free and open-source, with no modifications made to the Qt libraries. If you develop an application with the Qt libraries and want to sell it, you must first buy a license from Trolltech. In other words, the Qt library is free for free and open source applications but not for commercial applications.

New versions of KDE are released frequently, sometimes every few months. KDE releases are designed to enable users to upgrade their older versions easily. The distribution updater should automatically update KDE from distribution repositories, as updates become available. Alternatively, you can download new KDE packages from your distribution’s FTP site and install them manually. Packages tailored for various distributions can be also downloaded through the KDE Web site at http://kde.org or directly from the KDE FTP site at ftp://ftp.kde.org and its mirror sites in the stable directory

Source of Information : McGraw Hill Ubuntu The Complete Reference

Friday, May 8, 2009

The GConf Configuration Editor

GConf provides underlying configuration support (not installed by default). GConf corresponds to the Registry used on Windows systems. It consists of a series of libraries used to implement a configuration database for a GNOME desktop. This standardized configuration database allows for consistent interactions between GNOME applications. GNOME applications such as Nautilus that are built from a variety of other programs can use GConf to configure all those programs according to a single standard, maintaining configurations in a single database. Currently the GConf database is implemented as XML files in the user’s .gconf directory. Database interaction and access is carried out by the GConf daemon gconfd.

You can use the GConf editor to configure different GNOME applications and desktop functions. To start the GConf editor, enter gconf-editor in a terminal window. Configuration elements are specified keys that are organized by application and program. You can edit the keys, changing their values. The GConf editor has four tabs:

• Tree. Used for navigating keys, with expandable trees for each application, and located on the left. Application entries expand to subentries, grouping keys into different parts or functions for the application.

• Modification. Used to display the keys for a selected entry and located at the top-right. The Name field will include an icon indicating its type, and the Value field is an editable field showing the current value. You can directly change this value.

• Documentation. Used to display information about the selected key, showing the key name, the application that owns it, and a short and detailed description. Located at the bottom-right.

• Results. Appears at the bottom, only when you do a search for a key. A key has a specific type, such as numeric or string, and you will be able to make changes only when using the appropriate type. Each key entry has an icon specifying its type, such as a check mark for the Boolean values, a number 1 for numeric values, and a letter a for string values. Some keys have pop-up menus with limited choices, represented by an icon with a row of lines. To edit the value of a key, click its value field. Right-click a value field to display the pop-up menu.

Many keys are distributed over several applications and groups. To locate one, you can use the search function. Choose Edit Find and enter a pattern. The results are displayed in a Results tab, which you can use to scroll through matching keys, selecting the one you want.

Changes can be made either by users or by administrators. Administrators can set default or mandatory values for keys. Mandatory values will prevent users from making changes. For user changes, you can open a Settings window by choosing File Settings. This opens an identical GConf Editor window. For administrative changes, you first log in as the root user. For default changes, choose File Default, and for mandatory changes, choose File Mandatory.

Source of Information : McGraw Hill Ubuntu The Complete Reference

Thursday, May 7, 2009

GNOME Applets

Applets are small programs that perform tasks within the panel. To add an applet, right-click the panel and choose Add To Panel. This displays the Add To box, listing common applets along with other types of objects, such as launchers. Select the applet you want. For example, to add a clock to your panel, select Clock from the panel’s Add To box. Once added, the Clock applet will appear in the panel. If you want to remove an applet, right-click it and choose Remove From Panel.

GNOME features a number of helpful applets. Some applets monitor your system, such as the Battery Charge Monitor, which checks the battery in laptops, and System Monitor, which shows a graph indicating your current CPU and memory use. The Volume Control applet displays a small scroll bar for adjusting sound levels. The Deskbar tool searches for files on your desktop. Network Monitor lets you monitor a network connection.

Several helpful utility applets provide added functionality to your desktop. The Clock applet can display time in a 12- or 24-hour format. Right-click the Clock applet and choose Preferences to change its setup. The CPU Frequency Scaling Monitor displays CPU usage for CPUs such as AMD and the Intel processors that run at lower speeds when idle.


Workspace Switcher
The Workspace Switcher appears at the lower-right side of the lower panel and shows a view of your virtual desktops, as shown next. Virtual desktops are defined in the window manager. The Workspace Switcher lets you easily move from one desktop to another with the click of a mouse. This panel applet works only in the panel. You can add the Workspace Switcher to any panel by selecting it from that panel’s Add To box. The Workspace Switcher shows your entire virtual desktop as separate rectangles shown next to each other. Open windows show up as small colored rectangles in these squares. You can move any window from one virtual desktop to another by clicking and dragging its image in the Workspace Switcher. To configure the Workspace Switcher, right click it and select Preferences to display the Preferences dialog box. Here, you can select the number of workspaces. The default is four.


GNOME Window List
The Window List icon appears on the bottom panel. This list shows currently opened windows, arranging opened windows in a series of buttons, one for each window. A window can include applications such as a Web browser, or it can be a file manager window displaying a directory. You can move from one window to another by clicking its button. When you minimize a window, you can later restore it by clicking its entry in the Window List. Minimized windows will be grayed out.

Right-clicking a window’s Window List button opens a menu that lets you Minimize or Unminimize, Roll Up, Move, Resize, Maximize or Unmaximize, or Close the window. The Minimize operation reduces the window to its Window List entry. Right-clicking the entry displays the menu with an Unminimize option instead of Minimize, which you can then use to redisplay the window. The Roll Up entry reduces the window to its title bar. The Close entry closes the window, ending its application.

If the Window List applet doesn’t have enough space to display a separate button for each window, common windows will be grouped under a button that will expand like a menu, listing each window in that group. For example, all open terminal windows will be grouped under a single button, which when clicked will pop up a list of buttons. The Window List applet is represented by a small serrated bar at the beginning of the window button list. To configure the Window List, right-click this bar and choose Properties. Here, you can set features such as the size in pixels, whether to group windows, whether to show all open windows or those from just the current workspace, or to which workspace to restore windows.

Source of Information : McGraw Hill Ubuntu The Complete Reference

Wednesday, May 6, 2009

Nautilus as an FTP Browser

Nautilus works as an operational FTP browser. You can use the text-based location bar or choose File Open Location to access any FTP site. Just enter the URL for the FTP site in the Location box and press enter (you do not need to specify ftp://). Folders on the FTP site will be displayed, and you can drag files to a local directory to download them. The first time you connect to a site, an Authentication dialog will open letting you select either Anonymous access or access as a User. If you select User, you can then enter your username and password for that site. You can then choose to remember the password for just this session or permanently store it in a keyring.

Once you have accessed the site, you can navigate through the folders as you would with any Nautilus folder, opening directories or returning to parent directories. To download a file, just drag it from the FTP window to a local directory window. A small dialog will appear showing download progress. To upload a file, just drag it from your local folder to the window for the open FTP directory. Your file will be uploaded to that FTP site (if you have permission to do so). You can also delete files on the site’s directories.

Tuesday, May 5, 2009

Ubuntu Nautilus Preferences

You can set preferences for your Nautilus file manager in the Preferences dialog box, which you access by choosing Edit Preferences. The Preferences dialog box shows a main screen with a side pane with several configuration entries, including Views, Behavior, Display, List Columns, Preview, and Media. You use these tabs to set the default display properties for your Nautilus file manager.

• The Views tab allows you to select how files are displayed by default, such as the list or icon view.

• Behavior lets you choose how to select files, manage the trash, and handle scripts, as well as whether to use the Browser view as the default.

• Display lets you choose what added information you want displayed in a icon caption, such as the size or date.

• The List Columns tab lets you choose both the features to display in the detailed list and the order in which to display them. In addition to the already-selected Name, Size, Date, and Type, you can add Permissions, Group, MIME Type, and Owner.

• The Preview tab lets you choose whether you want small preview content displayed in the icons, such as beginning text for text files.

• The Media tab lets you select default applications for certain media, such as music CDs or blank DVD.

Source of Information : McGraw Hill Ubuntu The Complete Reference

Monday, May 4, 2009

System Services and Runlevels

The init command boots Ubuntu to a specific system state, commonly referred to as its runlevel. Runlevels determine which of the many available system services are started, as well as in which order they start. A special runlevel is used to stop the system, and a special runlevel is used for system maintenance. As you will see, there are other runlevels for special purposes.

You will use runlevels to manage the system services running on your computer. All these special files and scripts are set up during your installation of Ubuntu Linux, and they receive their initial values based on your choices during the installation.


Runlevel Definitions
The Ubuntu runlevels are defined for the Ubuntu system in /etc/init.d. Each runlevel tells the init command what services to start or stop. Although runlevels might all have custom definitions, Ubuntu has adopted some standards for runlevels:

• Runlevel 0—Known as “halt,” this runlevel is used to shut down the system.

• Runlevel 1—This is a special runlevel, defined as “single,” which boots Ubuntu to a root access shell prompt where only the root user may log in. It has networking, X, and multi-user access turned off. This is the maintenance or rescue mode. It allows the system administrator to perform work on the system, make backups, or repair configuration or other files.

• Runlevel 2—This is the default runlevel for Ubuntu.

• Runlevels 3–5—These runlevels aren’t used in Ubuntu but are often used in other Linux distributions.

• Runlevel 6—This runlevel is used to reboot the system.

Runlevel 1 (also known as single-user mode or maintenance mode) is most commonly used to repair file systems and change the root password on a system when the password has been forgotten. Trespassers with physical access to the machine can also use runlevel 1 to access your system.

Never forget that uncontrolled physical access is virtually a guarantee of access to your data by an intruder.


Booting into the Default Runlevel
Ubuntu boots into runlevel 2 by default, which means it starts the system as normal and leaves you inside the X Window System looking at the Gnome login prompt. It knows what runlevel 2 needs to load by looking in the rc*.d directories in /etc. Ubuntu contains directories for rc0.d through to rc5.d and rcS.d.

Assuming that the value is 1, the rc script then executes all the scripts under the /etc/rc.1 directory and then launches the graphical login.

If Ubuntu is booted to runlevel 1, for example, scripts beginning with the letter K followed by scripts beginning with the letter S under the /etc/rc1.d directory are then executed:

# ls /etc/rc1.d/
K01gdm K19hplip K20laptop-mode K20vsftpd K80slapd
K01usplash K20acpi-support K20makedev k21acpid K86ppp
...etc...
K19cupsys K20inetutils-inetd K20ssh K74-bluez-utils S20single

These scripts, as with all scripts in the rc*.d directories, are actually symbolic links to system service scripts under the /etc/init.d directory.

The rc1.d links are prefaced with a letter and number, such as K15 or S10. The (K) or (S) in these prefixes indicate whether or not a particular service should be killed (K) or started (S) and pass a value of stop or start to the appropriate /etc/init.d script. The number in the prefix executes the specific /etc/init.d script in a particular order. The symlinks have numbers to delineate the order in which they are started. Nothing is sacred about a specific number, but some services need to be running before others are started. You would not want your Ubuntu system to attempt, for example, to mount a remote Network File System (NFS) volume without first starting networking and NFS services.


Booting to a Non-Default Runlevel with GRUB
There might come a time when you do not want to boot into the default runlevel, such as when you want to repair the X server or install a new graphics driver. You’ll need to follow several specific steps to boot to a non-default runlevel if you use the default boot loader for Ubuntu, GRUB.

The GRUB boot loader passes arguments, or commands, to the kernel at boot time. These arguments are used, among other things, to tell GRUB where the kernel is located and also to pass specific parameters to the kernel, such as how much memory is available or how special hardware should be configured. To override the default runlevel, you can add an additional kernel argument to GRUB as follows:

1. At the graphical boot screen, press e (for edit), scroll down to select the kernel, and press e again.
2. Press the spacebar, type single or 1 (Ubuntu allows S and s as well), and press Enter.

3. Finally, press b to boot, and you’ll boot into runlevel 1 instead of the default runlevel
listed in /etc/inittab.

Source of Information : Sams Ubuntu Unleashed 2008 Edition

Saturday, May 2, 2009

Beginning the Boot Loading Process

Although the actual boot loading mechanism for Linux varies on different hardware platforms (such as the SPARC, Alpha, or PowerPC systems), Intel-based PCs running Ubuntu most often use the same mechanism throughout product lines. This process is accomplished through a Basic Input Output System, or BIOS. The BIOS is an application stored in a chip on the motherboard that initializes the hardware on the motherboard (and often the hardware that’s attached to the motherboard). The BIOS gets the system ready to load and run the software that we recognize as the operating system.

As a last step, the BIOS code looks for a special program known as the boot loader or boot code. The instructions in this little bit of code tell the BIOS where the Linux kernel is located, how it should be loaded into memory, and how it should be started.

If all goes well, the BIOS looks for a bootable volume such as a floppy disk, CD-ROM, hard drive, RAM disk, or other media. The bootable volume contains a special hexadecimal value written to the volume by the boot loader application (likely either GRUB or LILO, although LILO is not provided with Ubuntu) when the boot loader code was first installed in the system’s drives. The BIOS searches volumes in the order established by the BIOS settings (for example, the floppy first, followed by a CD-ROM, and then a hard drive) and then boots from the first bootable volume it finds. Modern BIOS’s allow considerable flexibility in choosing the device used for booting the system.

Next, the BIOS looks on the bootable volume for boot code in the partition boot sector also known as the Master Boot Record (MBR) of the first hard disk. The MBR contains the boot loader code and the partition table—think of it as an index for a book, plus a few comments on how to start reading the book. If the BIOS finds a boot loader, it loads the boot loader code into memory. At that point, the BIOS’s job is completed, and it passes control of the system to the boot loader.

The boot loader locates the Linux kernel on the disk and loads it into memory. After that task is completed, the boot loader passes control of the system to the Linux kernel. You can see how one process builds on another in an approach that enables many different operating systems to work with the same hardware.

If the BIOS detects a hardware problem, the boot process will fail and the BIOS will generate a few beeps from the system speaker. These “beep codes” indicate the nature of the problem the BIOS has encountered. The codes vary among manufacturers, and the diagnosis of problems occurring during this phase of the boot process is beyond the scope of this book and does not involve Linux. If you encounter a problem, you should consult the motherboard manual or contact the manufacturer of the motherboard.

Linux is very flexible and can be booted from multiple images on a CD-ROM, over a network using PXE (pronounced “pixie”) or NetBoot, or on a headless server with the console display sent over a serial or network connection. Work is even underway to create a special Linux BIOS at http://www.coreboot.org/ that will expedite the boot process because Linux does not need many of the services offered by the typical BIOS. This kind of flexibility enables Linux to be used in a variety of ways, such as remote servers or diskless workstations, which are not generally seen in personal home use.

Source of Informattion : Sams Ubuntu Unleashed 2008 Edition

Running Services at Bootup

Although most people consider a computer to be either on or off, in Ubuntu there are a number of states in between. Known as runlevels, they control what system services are started upon bootup. These services are simply applications running in the background that provide some needed function to your system, such as getting information from your mouse and sending it to the display; or a service could monitor the partitions to see whether they have enough free space left on them. Services are typically loaded and run (also referred to as being started) during the boot process, in the same way as Microsoft Windows services are. Internally, Ubuntu uses a system known as Upstart for fast booting, but this has a special backward compatibility layer that uses runlevels in the way that Linux veterans are accustomed.

You can manage nearly every aspect of your computer and how it behaves after booting via configuring and ordering boot scripts, as well as by using various system administration utilities included with Ubuntu. In this chapter, you learn how to work with these boot scripts and system administration utilities. This chapter also offers advice for troubleshooting and fixing problems that might arise with software configuration or the introduction or removal of various types of hardware from your system.

Source of Information : Sams Ubuntu Unleashed 2008 Edition

Friday, May 1, 2009

The GNOME File Manager: Nautilus

Nautilus is the GNOME file manager that supports the standard features for copying, removing, and deleting items as well as setting permissions and displaying items. It also provides enhancements such as zooming capabilities, user levels, and theme support. You can enlarge or reduce the size of your file icons; select from Novice, Intermediate, or Expert levels of use; and customize the look and feel of Nautilus with different themes. Nautilus also lets you set up customized views of file listings, enabling you to display images for directory icons and run component applications within the file manager window. Nautilus implements a spatial approach to file browsing: a new window is opened for each new folder. For GNOME 2.22, Nautilus is based on the GVFS, which allows any application to access a virtually mounted file system. File systems mounted with FUSE, the user base file systems access, will be displayed and accessed by Nautilus.


Home Folder Subdirectories
Ubuntu uses the Common User Directory Structure (xdg-user-dirs at http://freedesktop.org) to set up subdirectories such as Music and Video in the user home directory. Folders will include Documents, Music, Pictures, and Videos. These localized user directories are used as defaults by many desktop applications. Users can change their directory names or place them within other directories using the GNOME file browser. For example, Music can be moved into Documents: Documents/Music. Local configuration is held in the .config/userdirs. dirs file. System-wide defaults are set up in the /etc/xdg/user-dirs.defaults file.


Nautilus Window
Nautilus was designed as a desktop shell in which different components can be employed to add functionality. For example, within Nautilus, a Web browser can be executed to provide Web browser capabilities in a Nautilus file manager window. An image viewer can display images. The GNOME media player can run sound and video files. The GNOME File Roller tool can archive files as well as extract them from archives. With the implementation of GStreamer, multimedia tools such as the GNOME audio recorder are now more easily integrated into Nautilus.

When you click the folder for your home directory on your desktop, a file manager window opens showing your home directory. Two methods are used for displaying a folder: browser and spatial. Ubuntu uses the browser method by default. The Browser window displays several components, including a browser toolbar, a Location bar, and a side pane, commonly found on most traditional file managers. The rest of the window is divided into two panes. The side pane is used to display information about the current working directory. The main window displays the list of files and subdirectories in the current working directory. A status bar at the bottom of the window displays information about a selected file or directory. You can turn any of these elements on or off by selecting their entries in the View menu.

When you open a new directory from a Browser view window, the same window is used to display it, and you can use the Back and Forward arrows to move through previously opened directories. In the Location bar, you can enter the pathname for a directory to move directly to it. To the right of the Location bar (box or button) are magnifying glass icons for zooming out and in the view of the files. Click the minus (–) magnifying glass icon to zoom out and the plus (+) icon to zoom in. Next to the zoom elements is a drop down menu for selecting the different views for your files, such as icons, small icons, or details.

Though the Browser view mode is the default for Ubuntu, you can also enable the Spatial view. The Spatial view provides a streamlined display with no toolbars or sidebar. Much of its functionality has been moved to menus and pop-up windows, leaving more space to display files and folders. If you want to use the spatial method for viewing folders, you need to change the file manager behavior preferences. Open any folder and choose Edit | Preferences to open the File Manger Preferences dialog. In the Behavior tab, deselect the entry Always Open In Browser Window. The file manager will then open a new window for each subdirectory you choose. A directory window will show only the menus for managing files and the icons. An information bar at the bottom displays information about the directory or selected files. The menu entries provide the full range of tasks involved in managing your files. On the lower-left is a pop-up menu to access parent directories. The name of the currently displayed directory is shown here.

To use the Browser view for a particular folder while using the Spatial view, right-click the folder’s icon and choose Browser Folder. This will open that folder with the enhanced format. Also, you can select a folder and then choose File | Browser View.

Source of Information : McGraw Hill Ubuntu The Complete Reference