Posted on September 9th, 1997 by shacker
One of the more frequently asked questions I receive here at betips.net is „How do I set up a BeOS web server to do CGI?“ The answer to this is no different from setting up CGI on any other POSIX platform, unless you’re working with attributes, in which case there are other details to be aware of (see the TrackerBase page for more on that).
First of all you’ll need to be running a CGI-capable web server — anything but PoorMan will do (see RobinHood, or diner — Apache is coming soon).
Once your server is up and running, create a cgi-bin directory in the server’s root — this will store all of your bash, perl, or other scripts to be executed by the server. CGI, by the way, stands for Common Gateway Interface — a CGI script can be written in any language — even compiled C or C++, though perl is by far the most common language used in CGI implementations.
The first line of your script always consists of the „magic cookie,“ and points to the interpreter for the language the script is written in. For example, here are the magic cookies you would use for bash and perl scripts, respectively:
Note that the magic cookie must include the full path to the interpreter, even if it’s already in your path.
You must make your scripts executable with the chmod command (if you want to do this graphically, you can use Chris Herborth’s SetPerms. Tracker add-on). If working from the command line, use:
chmod 755 filename.cgi
or
chmod a+x filename.cgi
The only other important thing to remember is that when you want results from the script returned as a web page, you must send the HTML header before you start spitting out HTML code. This will look like:
echo "Content-Type: text/html"
in a shell script, or
print "Content-type: text/html
" ;
in a perl script.
Posted in Allgemein | Tags:
Scripting |
Kommentare deaktiviert für CGI
basics
Posted on September 9th, 1997 by shacker
If you use SoundPlay 3.4 or later, open the Plugin Manager and select the User Interfaces tab. Make the sure the HTTP UI plugin is enabled, and close the Plugin Manager.
Now open a web browser and enter http://127.0.0.1:8080 (port 8080 on your loopback IP). Because SoundPlay has its own built-in HTTP mini-server, you’ll get back a web page listing all the tracks in your current playlist, with the currently playing track highlighted.
If you have a permanent IP address or domain name, you can tell your friends so they can see what you’re playing from any machine on the LAN or elsewhere on the Internet.
Posted in Allgemein | Tags:
Applications |
Kommentare deaktiviert für SoundPlay: View playlists from the web
Posted on September 9th, 1997 by shacker
On x86, BeOS users see a row of icons on the splash screen, lighting up sequentially as the boot sequence commences (though for most users it all happens too quickly to see what’s going on). Ever wonder what those icons mean?

Here’s a quick guide:
Atom: Indicates the handoff of the bootloader to the BeOS kernel.
I/O Card: PCI initialization has been completed.
Lightning Bolt: This icon appears just before the system enables non-boot CPUs (where non-boot CPUs are defined as the additional processors in a multi-proc system).
Oscilloscope: All CPUs have now been enabled.
Disks: All boot drivers and modules have been initialized.
Magnifying Glass: The boot volume has been mounted.
BeBox: The system BootScript
is being read into memory and its contents executed.
For a more complete description of this process, see this BMessage article: BeOS Splash Screen Icons
Posted in Allgemein | Tags:
Miscellaneous |
Kommentare deaktiviert für Understanding the boot icons
Posted on September 9th, 1997 by shacker
If BeOS hangs during the boot process, the cause may be limitations in BeOS‘ ability to work with the PIO to which the CD-ROM drive is currently set.
For example, I had a Samsung 32x CD-ROM and I installed BeOS without a problem. A couple of weeks ago, I upgraded the hard disk and installed a Sony 40x CDROM. After that, I couldn’t boot far enough to even begin the BeOS installation — it hung on the 5th icon in the splash screen. [Editor’s note — the 5th icon means all boot drivers and modules have been initialized successfully.]
Because BeOS was working on this PC previously, I knew it must be either the CD or new Quantum Hard Disk. The solution was to enter the BIOS and change the PIO mode of the Sony CD-ROM from 4 to 3 (all CD-ROM and hard disk drives have been set to at least 4 for several years now). That did the trick — BeOS then booted and installed just fine.
Posted in Allgemein | Tags:
Hardware |
Kommentare deaktiviert für Some CD-ROM drives halt boot process
Posted on September 9th, 1997 by shacker
If your sound card has two CD-ROM drive connectors (as does the SB64 PCI), and you connect cables from the card’s ports to each of your CD drives, you may find that you can only get CD audio from one of them, even though you can access data from both drives simultaneously. This is probably a limitation in the current sound driver for that card. Until this is worked out, make sure the CD-ROM drive you use most often for audio playback is connected to the outermost port on the sound card.
If you’ve only got one CD-ROM drive and you’re not getting any CD audio, try moving the cable to the card’s other port.
Posted in Allgemein | Tags:
Hardware |
Kommentare deaktiviert für Two
CD-ROM drives on one sound card
Posted on September 9th, 1997 by shacker
Now that both SoundPlay and CL-Amp support .M3U and .PLS files, and MP3.com has moved their InstantPlay function from RealAudio to streaming MP3, you can listen to their Hi-Fi and Low-Fi transmissions in BeOS, as well as .M3U or .PLS files containing URLs from other sites.
Go to any artist page on MP3.com and click the Hi-Fi or Low-Fi link. This will download a tiny text file of the type audio/x-mpegurl, which will be automatically launched in SoundPlay or CL-Amp. The text file simply includes the URL to an MP3 file, so that download control of the actual audio is passed from the browser to the playback software.
Similarly, streaming audio from SHOUTCast.com and icecast.org can now be played easily on BeOS.
To change associations for any of these streaming techniques, launch the FileTypes preferences panel and choose a player from the picklist in the sections labeled audio/x-mpegurl, audio/mpegurl, and audio/x-scpls.
Posted in Allgemein | Tags:
Audio & Video |
Kommentare deaktiviert für Auto-streaming MP3 audio
Posted on September 9th, 1997 by shacker
If you’re not already using your extra CPU cycles, scanning the heavens for signs of little green men, you should be. See this BeNews story for configuration details.
Once you’re up and running, you may become tired of looking at the cryptic lines of output from the setiathome client. Download PerlSETI from www.ude.org/jan/perlseti. PerlSETI is a colorful front end to the setiathome client written in Perl. A few changes have to be made for it to run under BeOS though.
- Install Perl if you haven’t already done so. Perl 5.00503 is located in
/optional/develop
if you installed the optional items from R4.5 CD.
- Move the PerlSETI files to your setiathome directory.
- PerlSETI assumes your setiathome client is located in your setiahome directory. If it’s not, you can change the correct input path in the „perlseti“ file.
- Open the
perlseti.conf
file and change the $setilog
variable to the path where you want your perlseti.log
file to be stored. This must be the full path, including the filename.
- Change the line
#!/bin/bash
in the perlseti script to #!/bin/sh
.
- In
perlseti.pl
and perlseti.reset.pl
, change the shebang line (first line in script files) to #!/boot/home/config/bin/perl
or wherever perl is located on your system.
- Type
perlseti
and watch! (if setiathome is not already running, type perlseti start
.
Posted in Allgemein | Tags:
Applications |
Kommentare deaktiviert für SETI@home: Use a colorful front end
Posted on September 9th, 1997 by shacker
Note: Because BeMail messages are used universally by all BeOS mail clients, this tip applies whether you’re using BeMail or another application.
E-mail programs on most platforms let you change the subject line of a stored message, which is really important when you want to file messages in folders for long-term storage and future reference. Unfortunately, the BeMail Subject: attribute is uneditable. While you can toggle it to editable in the FileTypes preferences panel, this for some reason still won’t let you edit the attribute in the Tracker.
However, you can still edit the attribute manually, either by using the command line tools rmattr and addattr, or by using a simple GUI tool like the excellent Toothpick add-on.
Remember, if you use BeatWare Mail-It, you’ll need to re-build the cache for that folder by Ctrl-clicking the folder in which the message lives.
Posted in Allgemein | Tags:
Applications |
Kommentare deaktiviert für BeMail: Edit email subject lines
Posted on September 9th, 1997 by shacker
Audio CDs don’t contain a filesystem that’s automatically readable by operating systems, so users need special utilities or OS support capable of translating the bits in the audio tracks into computer-readable data such as .WAV or .AIFF files. This process is known as Digital Audio Extraction, or DAE, and requires that the drive be capable of doing accurate error-correction to ensure perfect „rips.“
While the vast majority of CD-ROM drives made in the last few years support DAE natively, some do not. When shopping for a drive, always make sure you get a DAE-capable drive. Nearly all geeks agree that drives made by Plextor are the king when it comes to fast, accurate DAE. Plextor also provides a Windows utility that will let you view your audio tracks as .WAV files, sort of like cdda-fs does for all
CD-ROM drives in BeOS, but without the CDDB lookup.
Some BeOS users complain of difficulty doing DAE in BeOS, even with a DAE-capable drive. If you’re having DAE problems, there are several things you can investigate:
- Go into your computer’s BIOS and change the PIO Mode from 4 to 2.
- If you use IDE drives, put the CD-ROM drive on a bus separate from your main hard drive. The IDE bus can only access one drive at a time, and while rapid time-sharing usually works, problems can crop up if you’re trying to use both drives intensively and simultaneously.
- Use shorter IDE cables. The IDE spec calls for a cable length limit of 40cm, though some vendors ship longer cables by default. Some operating systems have workarounds for this, while BeOS adheres more closely to the spec.
- Using techniques outlined in the tip Make Boot Options Permanent and at the BeOS Bible R4.5 Update Site, edit
~/config/settings/kernel/drivers/atapi
and force DMA on (un-comment the last 11 lines in the file). Some DMA-capable drives don’t announce their DMA capabilities to the system automatically.
- If you’re using cdda-fs, increase the buffer size in
~/config/settings/kernel/drivers/cdda
. According to Marco Nellisen, lowering the blocksize in that same file may also help, since some drives don’t handle large blocksizes (with the default of 64 sectors qualifying as large) and will read very slowly, if at all.
[Editor’s note: Ripping digital audio from CD-ROM drives cleanly is largely dependent on capabilities built into the drive’s firmware. While most CD-ROM drives can do digital audio extraction, some makes and models are better at it than others. Peter Urbanec offers these notes, which may be useful when purchasing your next CD-ROM drive.]
It’s all in the firmware. The brand and model of your CD-ROM will make the biggest difference.
SCSI-1 had no standards for any audio operations.
SCSI-2 introduced audio playback operations into the standard, but only in a very limited way.
SCSI-3 is a lot more complete and defines a complete set of audio related operations, including playback, audio seeking (aka FFWD and REW) and audio extraction.
ATAPI drives use a variant of SCSI-3 over the IDE bus to achieve similar capabilities.
Since ATAPI devices are what they are (mainly cheap clones), their firmware performs correspondingly. Most of the ATAPI drives are poor audio performers. Some Toshiba drives are good, others are not. Avoid Acer, Cyberdrive and TAEIL – from my experience, their firmware is shockingly bad.
Good SCSI drives are Pioneer, Yamaha CD-RW drives (firmware after December 98) and some of the newer Plextors.
When I wrote CDDA support for BeOS, I wanted to present a uniform and reliable frontend for audio operations. There are lots of things that you can do with specific models of CD-ROM drives, but most of this stuff is vendor specific and only applicable to certain models. The current CDDA API in BeOS is built for consistent and predictable behaviour across a wide range of hardware.
Developers: If you want to do „special“ stuff, you will need to hit the hardware directly. You will find that in 99% of cases, this is not required and it is not worth the extra effort.
For a great explanation of DAE issues in general, see About Digital Audio Extraction
Posted in Allgemein | Tags:
Hardware |
Kommentare deaktiviert für Notes on digital audio extraction
Posted on September 9th, 1997 by shacker
You already know how to minimize (double-click) or hide (right-click) any window via its title tab. But did you know that these tricks also work on any window border? Try double-clicking or right-clicking the outer border of any window to hide or minimize it. Granted, that’s a pretty small target, but if you have good mouse aim, you may find this useful.
Posted in Allgemein | Tags:
Interface |
Kommentare deaktiviert für Hide or minimize from any border