Rebuild file system indices

The BeOS file system maintains a number of indices of the content of your most-used attributes in order to make queries lightning fast. While extremely rare, it is possible for an index to become corrupted. For example, you might find that a query for new mail shows that you have one unread message, even when that message is nowhere to be found. The answer to this situation is to remove and then re-build the index in question. In the example above, you would open a Terminal and type:

rmindex MAIL:status
mkindex MAIL:status

Note, however, that this merely re-establishes the existence of the index — it does not automatically add all applicaple data on your system to the index. Any new mail coming in will have its status attribute written to the index, but the status attribute of your existing messages will not. To remedy this, simply copy (don’t move) your mail folder to a new location and then replace the original folder with the copied version. An easy way to copy the whole folder is to select it and tap Alt+D (for Duplicate). The act of copying the files to a new location causes the filesystem to index the attributes being written.

 

Optimizing network throughput

If you do your networking through a supported network interface card (NIC) rather than via PPP, you’ll find that most everything works exactly as it should. However, there are many hardware-related things you can do to make sure your network connection is fully optimized, including using the right cable type, taking care when mixing 10 and 100Mbps components, and ensuring that full-duplex NICs aren’t talking to half-duplex hubs.
Be’s Hank Sackett has prepared an excellent overview of factors that can limit network performance. Read it here.

 

3Com Fast EtherLink XL (100BaseTX model 3C905B)

3Com’s Fast EtherLink XL (10/100) documentation suggests that you place the 3C905B card into PCI Slot 1 or Slot 2 to allow improved performance. This is due to PCI Slot 1 and 2 having a feature called „PCI Bus Mastering“ which 3Com’s hardware takes advantage of.
However, attempting to use either of these first two slots, coupled with use of BeOS’s 3Com Fast EtherLink XL (3C900/3C905) driver, results in the (Layer 2) ethernet driver being able to see the card, but not be able to transmit or receive from the UTP cable. (Layer 1!)
Moving the 3C905B card to PCI Slot 3 or 4 remedies this situation and allows proper functionality of the card.
I currently have 2 Intel PII BeBoxen linked via CAT 5 cross-over UTP at full duplex 100 Megabit communication. And yes, it’s blazingly fast. One of the boxes also has another PCI NE2000 card hooked up to Cable Modem/ADSL, and both machines can comunicate to the Internet via Richard Burgess‘ NAT software plug-in .

 

Creative Labs PCI64 gotchas

The ever-popular line of SoundBlaster 32 and 64 cards are advertised as supported by Be, and most of them work just fine. However, some users find that a newly-purchased variant of this card does not in fact work with BeOS. The biggest problem is that there are so many variants of this card’s chipset (there are at least 9 versions of the AWE32, and 23 versions of the SB16), and the package doesn’t always make it easy to determine exactly which one you’re getting in the box. Most of them work, but there are some cards out there for which Be hasn’t yet been supplied with appropriate documentation. The only thing you can really do in such a situation is to inform Be’s technical support department and wait for an update. Alternatively, you might want to trade the card with the store or with someone else for a version that does work.
In addition, if you should happen to purchase a PCI version rather than ISA, note that you’ll be getting a different chipset entirely, and will need to download the Ensoniq es1370 or Ensoniq es1371 driver. (link not working, waiting for update).

 

Get needed libraries for an application

To get a nice printout of which libraries are required by a given application, cut and paste the text below into your .profile. Once you’ve done that, you can just type

getlibs appname

(where appname is the name of the application you want to investigate) in your Terminal to find the needed libraries.

getlibs()
{
        if [ "$#" = "0" ]; then
                echo "No executable specified."
                return 1
        fi
        if [ -f "$1" ]; then
                objdump --all-headers "$1" | grep NEEDED | awk '{
print $2 }'
        else
                echo "Can't find executable '$1'."
                return 1
        fi
        return 0
}
 

Add a scripts directory to your path

While the official place to put executable files that you’ve added to the system yourself and want to be accessible from any Terminal prompt is /boot/home/config/bin, many people who work with a lot of scripts find it useful to store them in a separate directory, to keep them separate from the uneditable, actual binaries living there. I recommend creating a folder at /boot/home/config/scripts for this purpose. To make this path accessible from any prompt, add the line

PATH=$PATH:/boot/home/config/scripts

to /boot/home/config/boot/UserSetupEnvironment or /boot/home/.profile. If you add it to the former, you’ll need to reboot for it to take effect. If you add it to the latter, you’ll need to open a new Terminal window (because UserSetupEnvironment is applicable to the whole environment, whereas .profile is read into memory every time you open a Terminal window).

 

Controlling RC5DES with clickable icons

The RC5DES project is an attempt to prove to the governments of the world that proposed encryption standards are easy to break via brute force, by simply dividing up a large problem and distributing its parts out to thousands of networked computers all checking into a central database. Participants band together into teams to promote a spirit of lively competition, and Team BeOS Central is rising slowly but steadily in the ranks. For information on on joining the project, see http://www.distributed.net and http://www.beoscentral.com/ho me/teambeos/. Once you’ve got it up and running, you’ll find that you have to control everything from the command line. To make things a little easier, this collection of brief shell scripts will let you double-click icons on the Desktop to turn RC5DES on and off, etc.
If you’d rather not bother creating these scripts manually, you download them as a prefab collection here. Unpack them and place them in /boot/home/config/scripts, then place links to them on the Desktop.
Note: The location above assumes that you’ve added this path to your PATH environment variable. For instructions on that, see Add a scripts directory to your path.
To do this manually, save the scripts below to /boot/home/config/scripts.
rc5on

rc5des -quiet &

rc5off

kill -term rc5des

rc5flush

Terminal -t "RC5DES Flush" /boot/home/config/bin/rc5des -flush

rc5fetch

Terminal -t "RC5DES Fetch" /boot/home/config/bin/rc5des -fetch

rc5update

Terminal -t "RC5DES Update" /boot/home/config/bin/rc5des -update

Next you’ll need to make your scripts executable. From the Terminal, cd to the directory containing your scripts and type:

chmod 755 *

This will make all of the scripts in the directory executable, which is essential to making them clickable. The last thing to do is to create links to them on your Desktop. Select all five scripts, right-drag them to the Desktop, and choose Create Link from the context menu.
You should find that you can now start, stop and flush the RC5DES cruncher by simply clicking the icons! Optionally, you can add custom icons to your new scripts for easy identification (icons are already included in the download mentioned above).

 

Find out where your downloads came from

When you download files with NetPositive, the download URL is stored in the file’s META:url attribute. So if you want to be reminded of where you downloaded a file from, open a Terminal and type:

catattr META:url filename.zip

Alternatively, open the file with DiskProbe and use its Attributes menu to learn the URL. But be careful with DiskProbe — don’t edit anything while you’re in there! Death or nausea may ensue.


Here’s a little script contributed by Alexander Paersch to comfortably get the URL of a downloaded file (save as whatURL):

if [ -z $@ ] ; then
echo
echo Syntax of whatURL :
echo
echo whatURL  path/file
echo
echo
elif [ -z $(echo | catattr META:url $@ 2> /dev/null | awk '{ print $5; }')
 ] ; then
echo Cannot find the URL for that file.
elif [ -f $@ ] ; then
Output=$(echo | catattr META:url $@ 2> /dev/null | awk '{ print $5; }')
echo The URL is:  $Output
else
echo Couldn't find the file or maybe the path points to a folder or a symlink.
fi

If you replace the line

echo The URL is: $Output

with

NetPositive $Output &

Net+ will automatically open with that URL. Nifty for cancelled downloads…

 

Install/remove the DUN replicant

If for some reason you need to restart the Deskbar, you’ll find that any replicants that were in the Deskbar’s shelf are no longer there. You can reinstall any of these by copying the appropriate lines out of ~/config/boot/UserBootscript and pasting them into the Terminal.
To reinstall the Dial-Up Networking replicant, just establish a connection from the DUN panel itself. Alternatively, open a Terminal and type:

/boot/beos/preferences/DialUpNetworking -E

If you move to a DSL or Cable solution and no longer want the DUN replicant to take up space in the Deskbar, delete all connections from the DUN panel. The next time the Deskbar is started, the DUN replicant will not be present.

 

Rebuild your MIME database

The FileTypes preferences panel simply reads attributes out of the hierarchy of files stored in /boot/home/config/settings/beos_mime/ and its subdirectories. In certain rare instances, things can go whack and your filetype associations could start acting screwy. It may become useful to have this database rebuilt. For example, if you restore your home directory from a backup and overwrite your current MIME database with a later version, you might lose some of your application-document associations, icons, etc. (it’s sort of like reinstalling Windows and then replacing the new Registry with your old Registry that you saved before reformatting, though this analogy breaks if you press on it too hard).
To try rebuilding your beos_mime database, quit any non-essential applications, leaving only the Tracker/Deskbar and a Terminal. Move your ~/config/settings/beos_mime folder elsewhere and rename/archive/etc it. You’ll also want to delete or rename ~/config/settings/MIMEPrefs_settings. Now, type:

mimeset -F -all
sync
shutdown -r -q

in a terminal. Then start praying to your favorite deity. When your computer starts back up, you should (emphasis on should) have a fresh new beos_mime database. If not, well, you’re no worse off than before. ^_^ If it did work, sacrifice your old beos_mime folder to your deity by putting it in the trash and emptying it. Always keep your computer deity happy.

 
 

Kategorien

 
 
Blogroll
Resources