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.
Connecting Your BeOS System to the Internet," for information on getting connected to the Internet.
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 "
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.
Learning Be Application Basics."
Note: For more information on replicants, and on showing and hiding replicants, see the chapter "
To place the current web page on the desktop, press the mouse button while over the dragger icon, and drag it onto an empty place on the desktop. Once you let go, the web page appears on the desktop and starts to fill with the current page information.
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.
Customizing the BeOS."
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 "
NetPositive works with proxy servers. To configure the application for this, open the Preferences... window from the Options menu. At the bottom of the window, are two text fields, HTTP (worldwide web) and FTP. You should place the Internet host name (i.e., proxy.mycompany.com) or Internet IP address for your company's proxy servers into these fields. When you close the preferences window, NetPositive begins using the proxy servers for worldwide web and file server access.
There is a variety of web server software available on the market with a wide range of capabilities. If you are looking to use your BeOS system as a web server accessed by a large number of people, or wish to ensure security for web-based transactions and other commerce-based applications, you'll want to get your hands on one of these industrial strength packages.
But you can get started immediately by using the personal web server that comes with the BeOS. Appropriately named the PoorMan web server application, it is designed to serve up HTML-based web pages, graphics and other web based information with a minimum of set up and hassle. PoorMan is ideal for small, personal servers and for getting started at prototyping web sites.
To set up your BeOS system as a web server, first open the PoorMan server application (file:///boot/apps/PoorMan). When you open Poor Man, the following window appears:
The first thing you'll notice when you start up PoorMan is that the web server immediately becomes active -- the Status: information field indicates the server is "Running." You might want to press the Stop button to temporarily halt the server while you configure it.
You must tell PoorMan which directory folder on your hard disk you want to use as the root directory of your web server. This is important because by specifying a folder, you restrict external web access to that folder, preventing anyone from accessing other folders on your system. You place all of your web pages and web graphics into this folder so that they can be accessed by the outside world.
To select this directory, press the Directory... button. The standard BeOS file selection window appears:
Select the folder you want to designate as your web page folder. You can use the File menu to create a new folder if needed. Then press the Select button. This returns you to the PoorMan window, where your selected folder appears in the Directory: information field.
That's it. You have now finished configuring the PoorMan web server. You can press the Start button to restart the web server. PoorMan keep counts of the number of times other people access your web pages, known as hits, and shows this number in the Hits: information field. At any time you can reset this counter, or stop the web server.
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.
This section discusses how to access file servers on the Internet, and transfer files to and from your BeOS system and other systems on the Internet. You can do this with either the BeOS text-based command line tools, or a graphical FTP client application. You'll also learn how to set up your BeOS system as an Internet file server.
The examples below show how to access Be's public Internet file server, ftp.be.com, and transfer a file called Ktfp242_AA.tgz to your system. Kftp is an example of a graphical FTP application, and is a useful tool. It is stored on the Be file server in a compressed format, discussed later in this chapter. The full URL to this file is ftp://ftp.be.com/pub/contrib/network/Kftp242_AA.tgz.
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.
App A: Using the BeOS Command Line Shell."
Note: You can find out more about the BeOS command line shell in t"
$ 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.
Working With the Mac OS."
Note: For an example of accessing a BeOS file server from the Mac OS, see the chapter "
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.
The BeOS has built-in Internet mail services. The application that does most of the work is BeMail (file://boot/apps/BeMail) and its companion, the Be Mail Server (also known as the mail daemon). This section shows how to configure the BeOS for sending and receiving mail, and describes the features of the BeMail application. It also covers other mail applications available for the BeOS.
The information you enter in this window tells the BeOS where to find your mail server on the network, your name and password, and other mail-related options.
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: