Chapter 5. Web Browsers and Instant Messaging
For the everyday communications that millions of people love to useweb browsing and instant messaging, including Internet Relay ChatLinux provides free software tools that match or exceed most proprietary offerings.
5.1. The World Wide Web
Everybody who has even the slightest connection with computers and has not
Linux was from the beginning intimately connected to the Internet in general and the Web in particular. For example, the Linux Documentation Project (LDP ) provides various Linux-related documents via the Web. The LDP home page, located at http://www.tldp.org, contains links to a number of other Linux-
Linux web browsers usually can display information from several types of servers, not just HTTP servers sending
The way to refer to a document or other resource on the Web, of course, is through its Uniform Resource Locator , or URL. A URL is simply a pathname uniquely identifying a web document, including the machine it resides on, the filename of the document, and the protocol used to access it (FTP, HTTP, etc.). For example, the Font HOWTO, an online document that describes the optimal use of fonts on Linux, has the following URL:
Figure 5-1. LDP home page on the World Wide Web
Let's break this down. The first part of the URL, http: , identifies the protocol used for the document, which in this case is HTTP. The second part of the URL, //www.tldp.org , identifies the machine where the document is provided. The final portion of the URL, HOWTO/html_single/Font-HOWTO/index.html , is the logical pathname to the document on www.tldp.org . This is similar to a Unix pathname, in that it identifies the file index.html in the directory HOWTO/html_single/Font-HOWTO . Therefore, to access the Font HOWTO, you'd fire up a browser, telling it to access http://www.tldp.org/HOWTO/html_single/Font-HOWTO/index.html. What could be easier?
Actually, the conventions of web servers do make it easier. If you specify a directory as the last element of the
Figure 5-2. FTP directory as displayed in the Konqueror web browser
To access a file via anonymous FTP, we can use a URL, such as:
This URL retrieves the Linux FAQ. Using this URL with your browser is identical to using ftp to fetch the file by hand.
The best way to understand the Web is to explore it. In the following section we'll explain how to get started with some of the available browsers. Later in the chapter, we'll cover how to configure your own machine as a web server for providing documents to the rest of the Web.
Of course, in order to access the Web, you'll need a machine with direct Internet access (via either Ethernet or PPP). In the following sections, we assume that you have already configured TCP/IP on your system and that you can successfully use clients, such as ssh and ftp .
5.1.1. Using Konqueror
Most things in Konqueror are quite obvious, but if you want to read more about it, you can use Konqueror to check out http://www.konqueror.org.
Here, we assume that you're using a networked Linux machine running X and that you have Konqueror installed. As stated before, your machine must be configured to use TCP/IP, and you should be able to use clients, such as ssh and ftp .
Starting Konqueror is simple. Run the command:
eggplant$ konqueror url
where url is the complete web address, or URL, for the document you wish to view. If you don't specify a URL, Konqueror will display a splash screen, as shown in Figure 5-3.
Figure 5-3. The Konqueror splash screen
If you run Konqueror from within KDE, you can simply type Alt-F2 to
We assume that you have already used a web browser to browse the Web on some computer system, so we won't go into the very basics here; we'll just point out a few Linux-specific things.
Keep in mind that retrieving documents on the Web can be slow at times. This depends on the speed of the network connection from your site to the server, as well as the traffic on the network at the time. In some cases, web sites may be so loaded that they simply
As you traverse links within Konqueror, each document is saved in the window history , which can be recalled using the Go menu. Pressing the Back button (the one that shows an arrow pointing to the left) in the top toolbar of the Konqueror window moves you back through the window history to previously visited documents. Similarly, the Forward button moves you forward through the history.
In addition, the sidebar in Konqueror can show you previously visited web sites; that is a very useful feature if you want to go to a web site that you have visited some time ago too long ago for it to still appear in the Go menu but you do not remember the
You can also bookmark frequently visited web sites (or URLs) to Konqueror's "bookmarks ." Whenever you are viewing a document that you might want to return to later, choose Add Bookmark from the Bookmarks menu, or simply press Ctrl-B. You can display your bookmarks by choosing the Bookmarks menu. Selecting any item in this menu retrieves the corresponding document from the Web. Finally, you can also display your bookmarks permanently in another pane of the sidebar by clicking on the yellow star. And of course, Konqueror comes with ample features for managing your bookmarks. Just select Bookmarks
Edit Bookmarks, and
You can also use the sidebar for navigating your home directory, your hardware, your session history, and many other things. Just try it, and you will discover many useful features.
Besides the sidebar, another feature that can increase your browsing experience considerably is the so-called tabbed browsing . First made popular by the open source browser Mozilla (see later in this chapter), Konqueror has really taken tabbed browsing to its heart and provides a number of useful features. For example, when you are reading a web page that contains an interesting link that you might want to follow later, while continuing on the current page now, you can right-click that link and select Open in New Tab from the context menu. This will create a new tab with the caption of that page as its header, but leave the current page open. You can finish reading the current page and then go on to one of those that you had opened while reading. Since all pages are on tabs in the single browser window, this does not clutter your desktop, and it is very easy to find the page you want. In order to close a tab, just click on the little icon with the tabs and the red cross.
As mentioned previously, you can access new URLs by running konqueror with the URL as the argument. However, you can also simply type the URL in the location bar near the top of the Konqueror window. The location bar has autocompletion: if you start typing an address that you have visited before, Konqueror will automatically display it for your selection. Once you are done entering the URL (with or without help from autocompletion), you simply press the Enter key, and the corresponding document is retrieved.
Konqueror is a powerful application with many options. You can customize Konqueror's behavior in many ways by selecting Settings
Configure Konqueror. The sections Web Behavior and Web Shortcuts provide particularly interesting settings. In the section Cookies, you can configure whether you want to accept cookies domain by domain and even check the cookies already stored on your computer. Compare this to browsers that hide the cookies deep in some hidden directory and make it hard for you to view them (or even
Finally, one particular feature
5.1.2. Other Web Browsers
Konqueror is not the only browser that reads web documents. Another browser available for Linux is Firefox , a descendant of Mozilla, which in
Firefox has one particular powerful feature that is often overlooked: its extensions. By selecting Tools
Extensions from the menu bar, a dialog with installed extensions pops up; it is quite likely that you initially dont have any (unless your distributor or system administrator has
We would like to point out two extensions that we have found particularly interesting. Adblock adds a small overlay that looks like a tab to
The other extension that we found particularly interesting is ForecastFox. It lets you select a number of locations on the earth and then displays small icons in the status bar (or other locations at your discretion) that show the current weather at those locations. Hover the mouse over one of those icons, and you will get a tooltip with more detailed information.
As with Konqueror, you should plan to
Yet another versatile browser is w3m . It is a text-based browser, so you