While the Internet uses the TCP/IP networking protocol to tie together BeOS, Windows, Mac OS and Unix systems around the world, more interesting things begin to happen when you use this networking capability to access Internet services. From the worldwide web, to tens of thousands of file servers, to electronic mail and remote access, Internet services provide a wealth of resources which can help you communicate with people around the globe, and literally put information at your fingertips.
This chapter discusses the following topics:
Note: Before you use any Internet server, be sure that you've configured your BeOS to connect to the Internet. If you haven't done this, see the chapter "Connecting Your BeOS System to the Internet," for information on getting connected to the Internet.
Uniform Resource Locators (URLS)
Before digging deeper into Internet services, it's important to understand the concept of uniform resource locators, or URLs. This is the standard addressing mechanism by which your BeOS system can find any Internet service, located on any Internet server, anywhere in the world.
The first part of the URL, http://, stands for the hypertext transfer protocol, which is the basic protocol of the worldwide web. The second portion of the URL, www.be.com, is the Internet domain name for the main web server at Be.
URLs aren't limited to web pages. There are also URLs for Internet file servers. The URL for Be's public file server is ftp://ftp.be.com, where ftp:// stands for the file transfer protocol, and ftp.be.com is the Internet domain name for Be's file server.
There are also URLs for mail, news and many other web services. There is even a URL for accessing files on your local hard disk -- file:///boot/beos/documentation/index.html is the URL for the index of the documentation installed on your hard disk when you installed the BeOS. You may have noticed that throughout the networking chapters, file:// URLs have been used to denote where files can be found on your hard drive as part of the BeOS.
Using Worldwide Web Services
One of the most active parts of the Internet is the worldwide web, a global network of servers each of which contains pages of information on virtually every topic. This section, discusses how to access these web pages with the NetPositive application, and how to set up a basic personal web server with the PoorMan web server application. Accessing Internet Web Servers - NetPositive
NetPositive is a worldwide web client application, also called a browser. With it, you can access any web page on the Internet, view its contents, and link to pages connected to that web page. To start up NetPositive, double-click on its icon (file:///boot/apps/NetPositive). When you do, the default window opens, and you're ready to explore the worldwide web. The Browser Window
The NetPositive application browser window displays the contents of the worldwide web page that you are currently viewing, as well as all of the basic controls needed to navigate the web. The first page you see when you open NetPositive is its default page. Retrieving a Web Page
To go to another web page, click on a hyperlink, or type the URL for the page into the URL location field beneath the menu bar. If you type www.news.com and press the Enter key, you'll get a page that looks something like this:
Note: You don't always have to type the entire URL -- NetPositive makes some intelligent guesses about the text you type. For example, if you leave http:// off NetPositive assumes that the URL represents a web page and adds it automatically. Also, if you type a single word, like "be," NetPositive assumes it should add www. to the beginning and .com to the end, resulting in www.be.com. This shortcut works for many commercial and personal home pages.
Using the Navigation Buttons
The navigation buttons to the right of the URL field allow you to quickly flip through web pages you've visited since you started the current NetPositive session:
Accessing an Internet File Server With NetPositive
You can also access Internet file servers (FTP servers) from NetPositive. To do this, type the file server's URL into the URL field and press the Enter key. For example, Be's public file server is located at ftp.be.com. If you type ftp://ftp.be.com/pub/contrib/network/, you see the contents of the folder pub/contrib/network:
Browser Window Menus
The menus across the top of the browser window give you access to the full functionality and options of NetPositive. Here's a description of each menu and the items they contain:
Command | Does this |
Preferences... | Lets you set your default home page and configure NetPositive to use proxy servers (see "Setting Your Default Home Page" and "Using NetPositive with Proxy Servers" below). Preferences also let you choose default fonts for document encodings. |
Document Encoding | Lets you tell NetPositive what type of document encoding should be used. (See "Document Encoding" below). |
If you hold the mouse over a part of the web page that does not contain a hyperlink, you see the following menu:
If you hold the mouse over a part of the web page that contains a hyperlink, you see the following context-sensitive menu:
Setting Your Default Home Page
When you open NetPositive for the first time, you see a default web page that is stored with NetPositive. This default home page is displayed whenever you start NetPositive, and when you open a new browser window.
Note: If you use a modem to connect to the Internet via a PPP connection, you may want to leave the default home page (netpositive:Startup.html) or else point to an HTML file on disk. If you use a remote web page, when you start up NetPositive, your BeOS system attempts to connect via PPP to download the home page. You might not want this to happen each time you open NetPositive.
Note: If you drop an HTML, text, or graphics file onto NetPositive from the desktop, NetPositive assumes you want to view the contents of that file and so displays it, rather than the home page.
NetPositive as a Replicant -- Live Desktop Pages
NetPositive is a replicant-enabled application. That means that you can treat web pages as objects that can be moved and placed within other applications, documents, and even on your BeOS desktop. Placing a NetPositive page on the BeOS desktop makes the web page constantly available, and the web page automatically downloads when you start up your BeOS system.
To place a NetPositive page onto the desktop (or into any replicant-enabled document), first choose Show Replicants from the Deskbar's main menu. When you do this, a replicant dragger icon appears in the lower-left corner of the NetPositive browser window.
Note: For more information on replicants, and on showing and hiding replicants, see the chapter "Learning Be Application Basics."
You can now close the NetPositive application at any time -- the desktop web page remains active. You can navigate through web pages using the same context sensitive menus that you find in the NetPositive application. You can also use the dragger icon to move the replicant around the desktop, and you can use the resize box to resize the replicant. You can place as many web page replicants on the desktop as you'd like.
Note: A web page replicant does not have a URL text field, so you can't type a URL (you'll have to open NetPositive to do that). However, all your bookmarks are available within the context- sensitive menus, and you can drag text, image, and HTML files from disk onto the replicant to show their contents.
Note: If you place a web page replicant on the desktop, when you start up your BeOS system, the web page downloads automatically. This is fine if you are directly connected to the desktop, but if you connect over a modem it means that a PPP Internet connection starts as soon as your BeOS machine starts. Keep this in mind when placing web page replicants on the desktop.
Document Encoding
As you navigate through worldwide web pages, you'll note that often you are connecting to servers located in other countries. These web sites may use different document encodings for displaying web pages. A document encoding is made up of a region (such as western, Japanese, or Unicode) and an encoding type.
The Options menu also lets you switch encodings for a page on the fly. When you selecting a different encoding, the window's content area is redrawn to reflect the change. This permits easy viewing of pages that may assume a different default encoding than your normal settings.
Note: To view Japanese web pages, or pages created for any multibyte character language, you need to install a font that contains the language's characters. You can find out how to install fonts in the chapter "Customizing the BeOS."
Using NetPositive with Proxy Servers
If you connect to the Internet via a network at your company or school, you may have a proxy server for worldwide web use or Internet file server (FTP) access. Proxy servers act as a security device, filtering the type of information that can come into a network, and flow back out onto the Internet. If you've attempted to reach a worldwide web server outside your organization (such as www.be.com) and received no response, it's possible that your network administrator has set up a proxy server. Setting Up a BeOS Personal Web Server
Your BeOS system isn't limited to accessing web pages located on other servers. It can also act as an Internet web server, serving up web pages to anyone who accesses your system. In this way you can be a publisher of web-based information, as well as a consumer of other people's web pages.
Note: The PoorMan application must be running for the web server to be active. When you close the PoorMan window or quit the application, web serving is disabled. You can hide the PoorMan window by double clicking on the window title bar, or by using the DeskBar to Hide All.
Getting your BeOS web server up and running is only the first step in creating an Internet web site. You need to create web pages using the hypertext markup language (HTML) and create the graphics for your pages. The creation process for these pages is beyond the scope of this discussion, but you can find information on this topic at your local bookstore, or on-line at Netscape's corporate web site (http://home.netscape.com/assist/net_sites/).
Note: You can't use an Internet domain name (i.e., mysystem.company.com) to access your BeOS web server unless your network administrator has configured your network's Internet router hardware to recognize the name as a substitute for your Internet IP address. So make sure you use the IP Address to access your system, and give this information to others wishing to access your system.
Using Internet File Sharing
Your BeOS system can access file servers anywhere on the Internet, and can act as an Internet file server itself -- letting you and colleagues share files and exchange information. To do this, your BeOS system uses a standard Internet protocol known as the File Transfer Protocol, abbreviated FTP. The process of file transfer is often called FTPing files. Accessing Internet File Servers
There are two ways to access an Internet file server from your BeOS System. The first is to use the command line shell built into the BeOS, and the second is to use one of the graphical FTP client applications available for the BeOS.
Command Line FTP
File server access from the BeOS command line is similar (in fact identical) to the commands used in most UNIX systems, and by most text-based Internet Service Providers. The work is done by a command line tool called "ftp." which is included with your BeOS system.
To start a command line FTP session, open the Terminal application (file:///boot/apps/Terminal). A new command line window opens with the cursor placed after a dollar sign prompt. Then type
Note: You can find out more about the BeOS command line shell in t"App A: Using the BeOS Command Line Shell."
$ ftp ftp.be.com
The first ftp tells the BeOS that this is an FTP command. ftp.be.com is the name of Be's public FTP server: you replace this with the name of the server you are trying to reach, or with the Internet IP address (i.e., ftp 192.168.0.50). When the BeOS reaches the server, you'll see the following:
Connected to www.be.com.
220 www.be.com FTP server (Version wu-2.4.2-academ[BETA-12](3) Wed
Mar 5 17:23:49 PST 1997) ready.
Name (ftp.be.com:demo):
The server asks for your name and password. Public servers use a convention called anonymous access that lets you access the public portions of a file server. In this case, you type anonymous as your log-in name, and your e-mail address as the password. When you type the password, the characters do not appear on the screen as a security precaution.
Name (ftp.be.com:demo): anonymous
Password:
230-Welcome to the Be FTP site! All transfers are logged.
230-
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
Once you typed in the name and password, you're signed onto the server. The text prompt changes to ftp> to indicate that you are using FTP.Since this is a command line interface, you type your requests and receive a text response. The entire set of commands for FTP are described in the FTP command documentation (file:///boot/beos/documentation/Shell Tools/man1/ftp.html) found on the BeOS CD. As an example, try downloading a file from the Be file server:
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 24
drwx--x--x 2 root wheel 512 Jul 9 1996 bin
drwx--x--x 2 root wheel 512 Mar 6 04:28 etc
drwx-wx-wx 9 1001 wheel 3072 Jun 6 18:20 incoming
drwxr-x--x 12 1001 wheel 2048 Jun 6 16:21 outgoing
drwxrwxr-x 19 root wheel 512 Mar 20 18:52 pub
226 Transfer complete.
The ls command requests the file listing for the current directory. The listing, in this case is five folders (subdirectories). The file you are looking for is in a specific directory (ftp://ftp.be.com/pub/contrib/network); you use the change directory command (cd) to get there:
ftp> cd pub/contrib/network
250 CWD command successful.
Once in the correct folder, you can get another file listing (by typing "ls") or you can simply get the file you are looking for (Kftp242_AA.tgz):
ftp> get Kftp242_AA.tgz
200 PORT command successful.
150 Opening BINARY mode data connection for Kftp242_AA.tgz (79824
bytes).
226 Transfer complete.
79824 bytes received in 2.07 secs (38604 bytes/sec)
The file is downloaded to your disk with the same name it had on the server. The ".tgz" at the end of the file name tells you that the file is an archive (containing many files) and is compressed. This is discussed in the section "Compressing and Archiving Files" in this chapter. Once you have the file, you can disconnect from the server by typing the quit command:
ftp> quit
221 Goodbye.
$
The dollar sign prompt returns, signalling that you have left FTP and are back in the BeOS command line shell.
One way to navigate Internet file servers graphically is to use the worldwide web and NetPositive, the BeOS built-in web browser application, or one of many other web client applications. NetPositive is discussed in this chapter in "Using Worldwide Web Services."
Another way to reach Internet file servers is with a graphical FTP application -- an application specifically designed for accessing Internet file servers. One such application is Kftp, by Laurent Pontier. You can get a copy of Kftp, and browse through a variety of other freeware, shareware, and commercial software by accessing http://www.be.com/beware/. This example uses Kftp to get the same file downloaded in the command line FTP section above.
When you open Kftp, you see the Kftp FTP settings window:
Note: Kftp is one example of a graphical FTP application. Others take different approaches to user interface and have different capabilities. This discussion is only an introduction to graphical file sharing.
Setting Up a BeOS Personal File Server
You can set up your BeOS as an Internet file server, capable of transferring and sharing files from any location on the Internet, and with any operating system.
Note: For an example of accessing a BeOS file server from the Mac OS, see the chapter "Working With the Mac OS."
Note: You can't use an Internet domain name (i.e., mysystem.company.com) to access your BeOS file server unless your network administrator configures your network's Internet router hardware to recognize the name as a substitute for your IP address. So make sure you use the IP Address to access your system.
Using Internet Mail Services
Electronic mail (e-mail for short) is Internet service used most. With e-mail you can send messages to anyone in the world, containing anything from text, to graphics, to entire packages of files. Configuring Mail Services
To set up your BeOS to send and receive electronic mail, you need to open the Mail Preferences window (file://boot/preferences/E-mail). When you double-click on the E-mail Preferences icon, the following window appears:
Once you finish configuring mail preferences, press the Save button to save the settings to disk. Then you can press the Check Now button to check for new messages immediately.
Mail Status Window
If you set the Show Status window in mail preferences to "on", a new window appears on your desktop. After the BeOS checks for new messages, the window looks like this: Checking for New Mail
Once you configure the mail preferences window, the BeOS continuously checks mail for you automatically. You can also check messages by pressing the Check Now button in the Mail Status window. Reading Mail
When you receive a message, you can double-click on its icon to display it. Double- clicking opens the BeMail application (file:///root/apps/BeMail) and creates a new window:
In this window, you complete the To:, Subject:, Cc: and Bcc: fields, and then type the text of your message. If you want to attach a file to the message, simply drag the file onto the Enclosures section of the window.
Command | Does this |
Add... | Brings up the file selection window, allowing you to attach a file as an enclosure to this message. |
Remove | Removes the selected enclosure from the message. |
Using Internet Remote Access Services
In designing the BeOS, the Be software team borrowed many ideas from other operating systems. In Unix systems, it is possible to remotely access a system from anyplace on the Internet (with the correct passwords and permissions). When you do this, the Unix system accepts commands as if they were typed from the keyboard right in front of it, and sends you the results, wherever you are.
Note: Mac OS and Windows systems generally use proprietary protocols to enable remote access. You'll need additional third-party software for your BeOS to be able to remotely access those systems.
Configuring Telnet Remote Access
To set up your BeOS for remote Internet access, you need to turn on the BeOS Telnet server using the Network Preferences window. Open this window (file:///boot/preferences/Network) and you'll see the following:
Note: You can't use an Internet domain name (i.e., mysystem.company.com) to access your BeOS system remotely unless your network administrator has configured your network's Internet router hardware to recognize the name as a substitute for your Internet IP address. So make sure you use the IP address to access your system.
Accessing Your BeOS System via Telnet
Telnet is command-line based. You access them through the command line window (file:///boot/apps/Terminal). The commands you use in a Telnet session are identical to those you use on the BeOS command line. This is important -- when you are connected remotely to your system, it behaves as if you are typing on the keyboard. All the same commands are available to you. And this applies to any BeOS or Unix-based system you connect to remotely over the Internet.
To access your BeOS system from another computer (or to access any other system from your BeOS), you need to open a Telnet client application on that system. If you are using another BeOS system to access your own, you can simply open the Terminal application (file:///boot/apps/Terminal). At the prompt, type:
Note: The BeOS and many Unix systems use a command line interface and command set known as the C Shell, Bash Shell, or Borne Again Shell. Many of the commands are documented in web pages included on your BeOS CD. To learn more about the C Shell and text-based commands, visit your local bookstore and browse the many (many, many) books on the subject.
$ telnet 192.168.0.67
where 192.168.0.67 is replaced by the domain name or the IP address of your system or the computer you are trying to reach. When you reach your BeOS system, you will see the following:
$ telnet 192.168.0.67
Trying 192.168.0.67...
Connected to 192.168.0.67
Escape character is `^]".
192.168.0.67 login:
You then type in your name and password for access to the system. If you do this correctly, you'll see something like the following:
login: yourname
Password:
Welcome to the Be shell.
$
You are now remotely connected to your BeOS system, and any command you type is sent and executed on your system, rather than one you are typing from. For example, you can start an application on your system by changing directory to where the application is located and typing the application name. For more information on the Be command line shell see "App A: Using the BeOS Command Line Shell."
When you finish, type the exit command; you should see something like this:
$ exit
logout
Connection closed by foreign host.
If you are using another BeOS system, the command line window closes automatically.
These letters have a special meaning -- they tell you that the file you are about to download has been archived, compressed, or both, in the process of Internet transmission. The concepts of archiving and compression are important when dealing with the Internet, because they make the process of data transmission easier and more efficient.
Archiving is the process of combining several files into one file. For example, you can archive ten image files into a single file for transmission. This means that the Internet, and all of the servers between you and the destination, only have to deal with this one file. When you receive an archive, you expand the archive and end up with the ten files back in their original form. Entire applications and their documentation, web sites, and folders can be neatly combined into a single file which can be moved from place to place and expanded to return to their original formats.
Compression is the process of encoding the contents of a file in such a way that the file takes less space to store -- and less time to transmit. Compression can often cut the size of a file down to one-third of its original size or less. When the compressed file arrives at the destination, it can be decompressed to return the file to its original state.
Archiving simplifies the number of files you need to attach to e-mail messages, or upload to a web site or file server. Compressing reduces the size of files so that they take less time to transmit -- extremely important if you use a modem to connect to the Internet. Compression also saves space on Internet servers, an important part of Internet etiquette.
There are a number of tools available to you for archiving and compression with the BeOS. In many cases, your Internet application takes care of these details for you. But in other cases, you'll need to archive and compress, or decompress and unarchive, yourself.
tar xvf file_name
The xvf in the command instructs the tar tool to expand the file (x), to be verbose and show you the names of the files as they are extracted (v), and to use the file with the following name (f).To archive a set of files, you also use the command line tar command
tar cf archive_name file_name
In this case, tar is told to create a new archive (c) using the file name (f) archive_name, and to place the file file_name into the archive. You can also add files to the archive at any time by using "a" (for append) rather than the "c" option.
Note: To get a complete list of the tar commands, you can type "tar --help" while in a command line window. You can review this information in the BeOS Shell Tools documentation included on your BeOS CD.
You use gunzip most often to decompress files downloaded from an Internet server. To do this, open the command line window (file:///boot/apps/Terminal) and navigate to the desired folder. You can uncompress a gzip file by typing the command
gunzip file_name.gz
This uncompresses the file, and puts the contents into a new file without the .gz extension. It also automatically deletes the compressed file to avoid confusion with the uncompressed version.To compress a file, you do exactly the same thing, only using the gzip command:
gzip file_name
This command takes the file file_name and compresses it, putting the result into a new file called file_name.gz.
Note: For a complete list of the commands for gzip and gunzip, type "gzip --help" or "gunzip --help" while in a command line window. You can also review this information in the BeOS Shell Tools (file:///boot/beos/documentation/Shell_Tools) documentation included on your BeOS CD.
The answer is a tool called zip (and its companion, unzip). This tool both archives and compresses, and preserves the attributes found on BeOS files. In fact, zip is a universal archiving and compression tool because it lets BeOS systems find and store the additional file attributes, while allowing other computer systems to ignore the attributes and read the data portion of the files.
You use unzip most often to decompress and unarchive files downloaded from an Internet server. To do this, open the command line window (file:///boot/apps/Terminal) and navigate to the desired folder. You can expand a .zip file by typing the command
Note: zip is freeware, freely distributed and free to use. In fact, it's against the license to ship zip with anything that carries a price tag, so zip can't be included on the BeOS CD as a standard tool. You can get zip and unzip from the Be public file server (ftp://ftp.be.com) or from any other public servers that carry BeOS freeware and shareware.
unzip file_name.zip
To archive and compress a file, you do exactly the same thing, only using the zip command:
zip result_name.zip file_name
This command takes the file file_name and archives and compresses it, putting the result into a new file called result_name.zip. Note that the result file name must have the ,zip extension. You can add files to the .zip archive by simply repeating the zip command with the same result_name.zip.
Note: For a complete list of the commands for zip and unzip, you can type "zip -help" or ""unzip -help" while in a command line window.
For example, the Tracker has a built-in add-on called MakeArchive which uses tar. Just select the files you want to archive, and press the right mouse button (or press and hold on single-button mice) to see the context-sensitive menu. Select Add-Ons/MakeArchive at the bottom of the menu, and the selected files are placed into a tar archive named archive.tar.
You can also find the add-ons in the File menu located at the top of all Tracker windows. MakeArchive is included with the BeOS. You can find other Tracker Add-Ons on the Be public file server (ftp://ftp.be.com/ or http://www.be.com/) and on other Be-related sites.
Software Installers - PackageBuilder Files
Another class of files you may download from the Internet are self-extracting files, also called installers. These files are self-contained -- to decompress and unarchive the contents double-click them. More sophisticated installers present you with install options, automatically place files into the appropriate folders, and more.
Once you download a package file, double-click to open the package and the following window appears: