Got an old dot matrix printer around and you want to print out some plain text? Plug it into your computer and launch the Printer prefs panel, then click Add. Your printer should come online. Close the preferences panel.
Now launch a Terminal window and „cat“ a file to your printer. For example, if you want to print the file blah.txt
to a printer on parallel port 1, you would type:
cat blah.txt > /dev/parallel/parallel1
If you need to download a lot of files from various web sites and don’t want to sit there clicking and waiting all day, build yourself a quick wget script. With wget installed in ~/config/bin
, create a text file looking something like this:
wget http://www.somesite.com/dir/filename.zip wget http://www.anothersite.com/files/mp3/audiotest.mp3 wget http://www.hoohaa.com/images/screenshot.gif
and so on. The easiest way to get the download URLs is to right-click the actual link in your browser, choose Copy Link Location, and paste it into the script. Save the script to ~/config/bin
as, say, getfiles
. Launch a Terminal, cd to the directory you’d like the files downloaded to, and type getfiles
. Go to bed.
This is a great way to download lots of software from BeBits, for example.
See also: Use SoftwareValet for Batch Transfers.
Joachim Seemer (J.Seemer@gmx.de) adds:
There’s also the „-c“ flag, which allows you to resume cancelled downloads. With it, even large downloads of game demos etc. are no problem. Just enter
wget -c http://www.site.com/largefile.zip
each time you connect to the net and watch how it gets the file step for step, skipping over the already downloaded part. Of course you’ll have to make sure to always call wget from the same folder or it keeps starting from the beginning.
Here’s a tip to easily get the URL of an incompletely downloaded file.
And here’s a tip to achieve similar things with SoftwareValet.
Update: CDDB disabled access to all unlicensed utilities sometime in Feb. or March 2001. You’re now pretty much forced to use freedb, rather than cddb. If you’ve been telling cddblinkd to use cddb, you’ll have to remove that parameter from your cddblinkd startup line.
The old tip remains for posterity.
When you mount an audio CD, its tracks appear as WAV files in the Tracker. These WAVs aren’t really WAVs, but the cdda filesystem driver makes the OS and all applications think that they are. You can play these WAVs through MediaPlayer, SoundPlay, CL-Amp, or other audio players. BeOS MP3 encoders such as RipEnc can also use cdda-fs to encode directly from CD, without ripping first. And of course you can drag audio tracks direcly off the CD and into the Tracker.
To really make cdda-fs useful, run the cddblinkd daemon in the background. When cddblinkd is running, it will detect when an audio CD has been mounted, look it up in a compact disc database, and rename the CD to „Artist Name – Album Name“ and all of the WAV files will be renamed with the actual track names.
cddblinkd can be downloaded here (a pre-compiled cddblinkd binary is also distributed with RipEnc) . Once you have the archive, open a Terminal, enter the source directory, and type „make“. When the compile is finished, move the cddblinkd binary to ~/config/bin
and type
cddblinkd &
into the Terminal. To make sure cddblinkd is always running, put the above line in your ~/config/boot/UserBootscript
.
You may find that a certain percentage of CDs aren’t looked up successfully. This is because cddblink queries only one database by default: freedb.freedb.org.
freedb is cool because it doesn’t make unreasonable requirements of developers (such as the requirement that applications making use of it display the CDDB logo). Unfortunately, freedb is also much smaller than CDDB.
If you want cddblink to stand a better chance of finding your CD, go back to the cddblinkd source directory, open cddblinkd.cpp in a text editor, and search on the string „freedb.freedb.org“. Edit this to read „cddb.cddb.com“ and remake the binary.
CDDB is a much larger database, but note that it’s your responsibility to make sure the new binary follows the licensing requirements established by CDDB.
Because BeOS has a sophisticated messaging system behind the scenes, both developers and users can do some pretty cool tricks that just aren’t possible (or that are very difficult to do) on other operating systems. For example, take a look at Marco Nellisen’s ColorFontSelector, which is capable of broadcasting messages to all kinds of applications (the color picker in some BeOS graphics apps can do this as well).
If you drag a color out of the color picker palette and onto the Desktop, the Desktop changes to that color. If you drag a color onto DeskCalc, the calculator takes on that color. If you drag the color into your favorite text or HTML editor, the color’s hex value will be inserted into the editor. None of these applications were designed to work specifically with the color picker — the magic of BMessages makes it possible for any app to communicate with any other app easily.
To see which drivers and modules are currently loaded by the kernel, launch a Terminal window and type:
listimage 1
It helps if you make the Terminal window very wide.
When in the To, cc:, or bcc: fields of a new Mailt-It message, type the first few letters of any person in your database of people files, then hit the Tab key. Mail-It will present a window showing all potential matches for that person. Use the arrow keys to navigate to the correct entry, then hit Enter.
Similarly, if a person has more than one e-mail address, Mail-It will present a panel when you leave the field, so you can specify which address to use.
An HP inkjet printer connected to a Windows NT 4 server, and shared to the network using the Macintosh printing services, can be used through WON.
An HP Deskjet 500 inkjet printer will print quite well using PCL 3 laserjet compatibility.
Add a network printer from the BeOS Printer Preferences, choose the HP PCL 3 LaserJet-compatible printer and use the Browse button to connect to your network printer share.
Pulse is interesting to watch and decent for getting ballpark guesstimates of processor usage, but it isn’t very helpful when you need an accurate reading.
Much better is the command-line utility „top“ which will show you resource consumption for individual threads. If you want more detail than is provided by the version of top bundled with BeOS, download an updated top replacement from BeWare. By default, the updated version of top will update its report once per second, which may be too rapid to study properly. If you want a better view, use:
top -d 5
to have top update itself every five seconds.
The problem with top is that it isn’t always easy to figure out exactly how much CPU a given application is consuming, because many apps do their work in worker threads that may be difficult to identify. Fortunately, you can launch an app through the „time“ utility. BeOS will calculate the total time the app was running and report the total number of seconds of processor time consumed in system space and in user space. From that, you can calculate the percentage of available CPU consumed by that app.
For example, let’s say you want to see whether CL-Amp or SoundPlay requires more horsepower to play the same MP3 file. Close SoundPlay, then type something like this:
time /path/to/SoundPlay/SoundPlay /path/to/Song.mp3"
As soon as SoundPlay finishes playing the song, close it and you’ll get a report like this:
real 1m42.708s user 0m9.427s sys 0m1.769s
To calculate CPU usage, use this formula:
(user + sys)*100 / real = percentage of available CPU time
Note that these figure will be slightly off because launching the app will consume extra CPU time, but it gives you a pretty good idea of what’s going on.
Thanks to Marco Nelissen for pointing out the time utility.
BeOS R4.5 comes with the YMF724 driver, which unfortunately does not work with recent YMF724F/740/744 chipsets. If you have a sound card based on these chipsets, try the „YMF724 Driver Patch,“ which you can get here:
http://hp. vector.co.jp/authors/VA001240/archive/index-en.html
3dmiX has some interesting time- and pitch-shifting controls which are not immediately obvious. If you hold down the Option key while dragging the end of a sample, you can change its length without changing its pitch. If you Opt+Shift+Drag instead, you’ll change the pitch without changing the length. Try this on vocal samples for some very wild possibilities.
Note: Opt is the right Ctrl key or the left Win key on most keyboards.