Archive for May, 2007

Web site templates - Getting into the DesktopIn the past few years,

Thursday, May 3rd, 2007

Getting into the DesktopIn the past few years, graphical user interfaces (GUIs) available for Linux have become as easy to use as thoseonthe Apple Mac or Microsoft Windows systems. With theseimprovements, even a novice computer user can start usingLinux without needing to have an expert standing by. You don t need to understand the underlying framework ofthe X Window System, window managers, widgets, and what- nots to get going with a Linux desktop system. That s why Istart by explaining how to use the two most popular desktopenvironments: KDE (K desktop environment) and GNOME. After that, if you want to dig deeper, I tell you how you can puttogether your own desktop by discussing how to choose yourown X-based window manager to run in Linux. Understanding Your DesktopWhen you install Linux distributions such as Fedora Core, SUSE, and Mandrakelinux, you have the option to chooseadesktop environment. Distributions such as Gentoo andDebian GNU/Linux give you the option to go out and get what- ever desktop environment you want (without particularlyprompting you for it). When you are given the opportunitytoselect a desktop during installation, your choices usuallyinclude one or more of the following: .K Desktop Environment (www.kde.org) In additionto all the features you would expect to find in a completedesktop environment (window managers, toolbars, pan- els, menus, keybindings, icons, and so on), KDE has manybells and whistles available. Applications for graphics, multimedia, office productivity, games, system adminis- tration, and many other features have been integrated towork smoothly with KDE, which is the default desktopenvironment for SUSE, KNOPPIX, and various other Linuxdistributions. 33CHAPTER …In This ChapterUnderstandingyourdesktopUsing the K desktopenvironmentUsing the GNOMEdesktop environmentConfiguring yourown desktop …
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision web design programs services

75Chapter 2Running Commands from the ShellPutting a number (Florida web design)

Wednesday, May 2nd, 2007

75Chapter 2Running Commands from the ShellPutting a number in front of most commands just repeats those commands. At thispoint, you should be fairly proficient at using the vicommand. When you invoke vi in many Linux systems, you re actually invoking the vim texteditor, which runs in vi compatibility mode. Those who do a lot of programmingmight prefer vim because it shows different levels of code in different colors. vimhas other useful features, such as the capability to open a document with the cur- sor at the same place where it was when you last exited that file. SummaryWorking from a shell command line within Linux may not be as simple as using a GUI, but it offers many powerful and flexible features. This chapter explains how to findyour way around the shell in Linux and provides examples of running commands, including recalling commands from a history list, completing commands, and joiningcommands. The chapter describes how shell environment variables can be used to store andrecall important pieces of information. It also teaches you how to modify shell con- figuration files to tailor the shell to suit your needs. Finally, this chapter shows youhow to use the Linux file system to create files and directories, use permissions, and work with files (moving, copying, and removing them), and how to edit textfiles from the shell using the vicommand. … Note07_
Note: If you are looking for reliable webhost to maintain and run your java application check Vision java hosting services

Web hosting asp - 74Part ILinux First StepsUsing Numbers with CommandsYou can

Wednesday, May 2nd, 2007

74Part ILinux First StepsUsing Numbers with CommandsYou can precede most vi commands with numbers to have the command repeatedthat number of times. This is a handy way to deal with several lines, words, or char- acters at a time. Here are some examples: CommandDescription3dwDeletes the next three words. 5clChanges the next five letters (that is, removes the letters and entersinput mode). 12jMoves down 12 lines. Exploring Other Text EditorsDozens of text editors are available to use with Linux. Here are a few that might be in yourLinux distribution that you can try out if you find vi to be too taxing: Text EditorDescriptiongeditThe GNOME text editor that runs in the GUI. jedThis screen-oriented editor was made for programmers. Using colors, jedcan highlight code you create so you can easily read the code and spotsyntax errors. Use the Alt key to select menus to manipulate your text. joeThe joe editor is similar to many PC text editors. Use control and arrow keysto move around. Type Ctrl+Cto exit with no save or Ctrl+Xto save and exit. kateA nice-looking editor that comes in the kdebase package. It has lots of bellsand whistles, such as highlighting for different types of programminglanguages and controls for managing word wrap. keditA GUI-based text editor that comes with the KDE desktop. mceditWith mcedit, function keys help you get around, save, copy, move, anddelete text. Like jed and joe, mcedit is screen-oriented. neditAn excellent programmer s editor. You need to install the optional neditpackage to get this editor. If you use ssh to log in to other Linux computers on your network, you can use any editorto edit files. A GUI-based editor will pop up on your screen. When no GUI is available, youwill need a text editor that runs in the shell, such as vi, jed, or joe.
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision shared web hosting services

Jetty web server - 73Chapter 2Running Commands from the Shell .Ctrl+F Page ahead,

Wednesday, May 2nd, 2007

73Chapter 2Running Commands from the Shell .Ctrl+F Page ahead, one page at a time. .Ctrl+B Page back, one page at a time. .Ctrl+D Page ahead 1/2 page at a time. .Ctrl+U Page back 1/2 page at a time. .G Go to the last line of the file. .1G Go to the first line of the file. (Use any number to go to that line inthefile.) Searching for TextTo search for the next occurrence of text in the file, use either the slash (/) orthequestion mark (?) character. Follow the slash or question mark with a pattern(string of text) to search forward or backward, respectively, for that pattern. Withinthe search, you can also use metacharacters. Here are some examples: ./hello Searches forward for the word hello. .?goodbye Searches backward for the word goodbye. ./The.*foot Searches forward for a line that has the word Thein it andalso, after that at some point, the word foot. .?[pP]rint Searches backward for either printor Print.Remember that casematters in Linux, so make use of brackets to search for words that could havedifferent capitalization. The vi editor was originally based on the ex editor, which didn t let you work in full-screen mode. However, it did enable you to run commands that let you find andchange text on one or more lines at a time. When you type a colon and the cursorgoes to the bottom of the screen, you are essentially in ex mode. Here is an exampleof some of those ex commands for searching for and changing text. (I chose thewords Localand Remoteto search for, but you can use any appropriate words.) .:g/Local Searches for the word Localand prints every occurrence of thatline from the file. (If there is more than a screenful, the output is piped to themorecommand.) .:s/Local/Remote Substitutes Remotefor the word Localon the current line. .:g/Local/s//Remote Substitutes the first occurrence of the word Localon every line of the file with the word Remote. .:g/Local/s//Remote/g Substitutes every occurrence of the word Localwith the word Remotein the entire file. .:g/Local/s//Remote/gp Substitutes every occurrence of the word Localwith the word Remotein the entire file and then prints each line so that youcan see the changes (piping it through moreif output fills more than one page).
Note: In case you are looking for affordable and reliable webhost to host and run your business application check Vision ftp web hosting services

72Part ILinux First StepsIf you ve really trashed the (Web hosting billing)

Wednesday, May 2nd, 2007

72Part ILinux First StepsIf you ve really trashed the file by mistake, the :q!command is the best way to exitand abandon your changes. The file reverts to the most recently changed version. So, if you just did a :w, you are stuck with the changes up to that point. If you justwant to undo a few bad edits, press uto back out of changes. You have learned a few vi editing commands. I describe more commands in the following sections. First, though, here are a few tips to smooth out your first trialswith vi: .Esc Remember that Esc gets you back to command mode. (I ve watchedpeople press every key on the keyboard trying to get out of a file.) Esc fol- lowed by ZZ gets you out of command mode, saves the file, and exits. .u Press U to undo the previous change you made. Continue to press U toundo the change before that, and the one before that. .Ctrl+R If you decide you didn t want to undo the previous command, useCtrl+R for Redo. Essentially, this command undoes your undo. .Caps Lock Beware of hitting Caps Lock by mistake. Everything you type invi has a different meaning when the letters are capitalized. You don t get awarning that you are typing capitals things just start acting weird. .:! command You can run a command while you are in vi using :!followedby a command name. For example, type :!dateto see the current date andtime, type :!pwdto see what your current directory is, or type :!jobsto see ifyou have any jobs running in the background. When the command completes, press Enter and you are back to editing the file. You could even do that with ashell (:!bash) to run a few commands from the shell, then type exitto returnto vi. (I recommend doing a save before escaping to the shell, just in case youforget to go back to vi.) .– INSERT When you are in insert mode, the word INSERT appears at thebottom of the screen. .Ctrl+G If you forget what you are editing, pressing these keys displays thename of the file that you are editing and the current line that you are on at thebottom of the screen. It also displays the total number of lines in the file, thepercentage of how far you are through the file, and the column number thecursor is on. This just helps you get your bearings after you ve stopped for acup of coffee at 3 a.m. Moving Around the FileBesides the few movement commands described earlier, there are other ways ofmoving around a vi file. To try these out, open a large file that you can t do muchdamage to. (Try copying /var/log/messagesto /tmpand opening it in vi.) Hereare some movement commands you can use: Tip07_
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision virtual web hosting services

Bulletproof web design - 71Chapter 2Running Commands from the ShellType a few

Tuesday, May 1st, 2007

71Chapter 2Running Commands from the ShellType a few words and then press Enter. Repeat that a few times until you have a fewlines of text. When you re finished typing, press Esc to return to command mode. Now that you have a file with some text in it, try moving around in your text withthe following keys or letters: Remember the Esc key! It always places you back into command mode. .Arrow keys Move the cursor up, down, left, or right in the file one characterat a time. To move left and right you can also use Backspace and the spacebar, respectively. If you prefer to keep your fingers on the keyboard, move the cur- sor with h (left), l (right), j (down), or k (up). .w Moves the cursor to the beginning of the next word. .b Moves the cursor to the beginning of the previous word. .0(zero) Moves the cursor to the beginning of the current line. .$ Moves the cursor to the end of the current line. .H Moves the cursor to the upper-left corner of the screen (first line onthescreen). .M Moves the cursor to the first character of the middle line on the screen. .L Moves the cursor to the lower-left corner of the screen (last line onthescreen). The only other editing you need to know is how to delete text. Here are a few vicommands for deleting text: .x Deletes the character under the cursor. .X Deletes the character directly before the cursor. .dw Deletes from the current character to the end of the current word. .d$ Deletes from the current character to the end of the current line. .d0 Deletes from the previous character to the beginning of the current line. To wrap things up, use the following keystrokes for saving and quitting the file: .ZZ Save the current changes to the file and exit from vi. .:w Save the current file but continue editing. .:wq Same as ZZ. .:q Quit the current file. This works only if you don t have any unsavedchanges. .:q! Quit the current file and don t save the changes you just made to the file. Tip07_
Note: In case you are looking for affordable webhost to host and run your web application check Vision http web server services

70Part ILinux First Stepsany shell, a character terminal, (Web hosting companies)

Tuesday, May 1st, 2007

70Part ILinux First Stepsany shell, a character terminal, or a character-based connection over a network(using telnetor ssh, for example) no GUI is required. They also each containtons of features, so you can continue to grow with them. This section provides a brief tutorial of the vi text editor, which you can use to manually edit a configuration file from any shell. (If vi doesn t suit you, see the Exploring Other Text Editors sidebar for other options.) The vi editor is difficult to learn at first, but once you know it, you never have to usea mouse or a function key you can edit and move around quickly and efficientlywithin files just by using the keyboard. Starting with viMost often, you start vi to open a particular file. For example, to open a file called/tmp/test, type the following command: $vi /tmp/testIf this is a new file, you should see something similar to the following: ~~~~~ /tmp/test [New File] The box at the top represents where your cursor is. The bottom line keeps youinformed about what is going on with your editing (here you just opened a newfile). In between, there are tildes (~) as filler because there is no text in the file yet. Now here s the intimidating part: There are no hints, menus, or icons to tell youwhat to do. On top of that, you can t just start typing. If you do, the computer islikely to beep at you. And some people complain that Linux isn t friendly. The first things you need to know are the different operating modes: command andinput. The vi editor always starts in command mode. Before you can add or changetext in the file, you have to type a command (one or two letters and an optional num- ber) to tell vi what you want to do. Case is important, so use upper- and lowercaseexactly as shown in the examples! To get into input mode, type an input command. To start out, type either of the following: .a The add command. After it, you can input text that starts to the rightofthe cursor. .i The insert command. After it, you can input text that starts to the leftofthe cursor.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision web design programs services

Web design - 69Chapter 2Running Commands from the ShellThe -Roption of

Tuesday, May 1st, 2007

69Chapter 2Running Commands from the ShellThe -Roption of chmodworks best if you are opening permissions completely oradding execute permission (as well as the appropriate read/write permission). The reason is that if you turn off execute permission recursively, you close off yourcapability to change to any directory in that structure. For example, chmod -R 644/tmp/testturns off execute permission for the /tmp/test directory and thenfails to change any files or directories below that point. Moving, Copying, and Deleting FilesCommands for moving, copying, and deleting files are fairly straightforward. Tochange the location of a file, use the mvcommand. To copy a file from one locationto another, use the cpcommand. To remove a file, use the rmcommand. Here aresome examples: $ mv abc def$ mv abc ~ $ cp abc def$ cp abc ~ $ rm abc$ rm * Of the two move (mv) commands, the first moves the file abcto the file defin thesame directory (essentially renaming it), whereas the second moves the file abctoyour home directory (~). The first copy command (cp) copies abcto the filedef,whereas the second copies abcto your home directory (~). The first removecommand (rm) deletes the abcfile; the second removes all the files in the currentdirectory (except those that start with a dot). For the root user, the mv, cp, and rmcommands are aliased to each be run with the-ioption. This causes a prompt to appear asking you to confirm each move, copy, and removal, one file at a time, and is done to prevent the root user from messingup a large group of files by mistake. Another alternative with mvis to use the -boption. With -b, if a file of the samename exists at the destination, a backup copy of the old file is made before thenew file is moved there. Using the vi Text EditorIt s almost impossible to use Linux for any period of time and not need to use a texteditor. This is because most Linux configuration files are plain-text files that you willalmost certainly need to change manually at some point. If you are using a GUI, you can run gedit, which is fairly intuitive for editing text. There s also a simple text editor you can run from the shell called nano. However, most Linux shell users will use either the vior emacscommand to edit text files. The advantage of vi or emacs over a graphical editor is that you can use them fromNoteCaution07_
Note: In case you are looking for affordable and reliable webhost to host and run your business application check Vision ftp web hosting services

Multiple domain web hosting - 68Part ILinux First StepsHere are some examples of

Tuesday, May 1st, 2007

68Part ILinux First StepsHere are some examples of how to change permission on a file (named file) andwhat the resulting permission would be: # chmod 777 filerwxrwxrwx# chmod 755 filerwxr-xr-x# chmod 644 filerw-r–r- # chmod 000 file——— You can also turn file permissions on and off using plus (+) and minus ( ) signs, respectively. This can be done for the owner user (u), owner group (g), others (o), and all users (a). For example, each time starting with a file that has all permissionsopen (rwxrwxrwx), here are some chmodexamples with resulting permissions afterusing a minus sign: chmod a-w files r-xr-xr-xchmod o-x filesrwsrwsrw- chmod go-rwx filesrwx—— Likewise, here are some examples, starting with all permissions closed (———) where the plus sign is used with chmodto turn permissions on: chmod u+rw files rw——- chmod a+x files–x–x–xchmod ug+rx filesr-xr-x— When you create a file, it s given the permission rw-r–r– by default. A directory isgiven the permission rwxr-xr-x. These default values are determined by the valueofumask. Type umaskto see what your umaskvalue is. For example: $ umask022The umaskvalue masks the permissions value of 666 for a file and 777 for a direc- tory. The umaskvalue of 022 results in permission for a directory of 755 (rwxr-xr-x). That same umaskresults in a file permission of 644 (rw-r–r–). (Execute permissionsare off by default for regular files.) Time saver: Use the -Roptions of chmodto change the permission for all of the filesand directories within a directory structure at once. For example, if you wanted toopen permissions completely to all files and directories in the /tmp/testdirec- tory, you could type the following: $ chmod -R 777 /tmp/testThis command line runs chmodrecursively (-R) for the /tmp/testdirectory, aswell as any files or directories that exist below that point in the file system (forexample, /tmp/test/hat, /tmp/test/hat/caps, and so on). All would be setto 777 (full read/write/execute permissions). This is not something you would doon an important directory on a read/write file system. However, you might do thisbefore you create a directory structure on a CD-ROM that you want to be fully read- able and executable to someone using the CD-ROM later. Tip07_
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check Vision professional web hosting services