Blow away file contents while leaving attributes

Say you have a folder full of GIF files that you have converted to
BeOS icons. You want to upload this icon set to BeBits, but your users will only ever use the icon attributes, so why make them download the file contents?
You could create a new folder full of zero-byte files and transfer the attributes one by one, but this really is the sort of drudge work computers were supposed to liberate us from! The following script will change every file in the current directory into a zero- byte file with nothing but attributes, so try not to use it in the directory where you keep your financial reports …

#!/bin/sh
#
for file in `ls`; do
	echo processing $file
	# using file2xyz2 as a dummy file - use a
	# different name if you actually have such a file!
	touch file2xyz2
	cp file2xyz2 $file
	rm -f file2xyz2
done

Now all you need to do is change the MIME types of your icon files into either „generic file“ (application/octet-stream actually) or „application/x-vnd.Icon“, so that ShowImage won’t try to display it when the user double-clicks the file. You can do this in one go by selecting all the icons in the directory, then rightclicking on one and selecting FileType from the add-ons menu.
That’s it! Zip ‚em up and upload to your favourite BeOS depository. On a small collection of 52 icons, my zip file size went down from 72 to 35 KB using this technique.

 

Reinstalling Bootman after installing WinXP

If you installed Windows XP on your computer after you installed BeOS on the same disk you might have some trouble getting into BeOS again. Don’t worry; here is the nice way to do it without bootdisks and installation CDs.
NOTE: This is a bit risky and I take no responsibility if it doesn’t work for you!
You must have Windows XP and BeOS installed on different partitions on the bootable hard disk. This may or may not work if BeOS is located on a separate disk. It’s up to you if you want to try.

  1. Start Windows XP
  2. Select Start -> Run
  3. Type in cmd and click Ok
  4. Type diskpart and hit ENTER
  5. Type list volume and hit ENTER
  6. A listing of volumes on all your disks should appearSample (Swedish Windows XP):
    DISKPART> list volume
      Volymnr.    Enh  Etikett      Fils.  Typ         Storlek  Status     Info
      ----------  ---  -----------  -----  ----------  -------  ---------  --------
      Volym 0      E   rtcw         CDFS   DVD-ROM      661 MB
      Volym 1      C                NTFS   Partition   6659 MB  Felfri     Systemst
      Volym 2      D   WIN98 2      FAT32  Partition   6460 MB  Felfri
      Volym 3                              Partition   6453 MB  Felfri
      Volym 4                              Partition   2059 MB  Felfri
  7. Find the volume that is your BeOS-volume. Normally it should not have a letter, name or filesystem specified
  8. Use the volume number instead of the italic text and type select volume BeOS-volume-number and hit ENTERSample:select volume 3
  9. CAUTION: Be 100% sure that this is your bootable BeOS-volume
  10. The next step will make BeOS boot instead of Windows XP. If anything goes wrong, your system can become unbootable, so make sure you know how to fix the boot record if you mess up.
  11. Type active and hit ENTER.
  12. When you reboot, BeOS should load instead of WIndows XP.
  13. Install bootman by typing bootman in a Terminal.
  14. When you reboot, bootman should let you select the OS to boot.

Editor’s note: There are other ways to boot into a non-booting installation of BeOS, although most techniques require a bootdisk of some description, or an installation of MS-DOS / Windows 9x.
If you have MS-DOS, Windows 9x, or a DOS bootdisk, then you can use LOADBEOS.COM, which is supplied with BeOS 5 Personal Edition. This will let you boot from one or more BeOS partitions (both virtual and real) by pressing space when the screen fades in, and selecting from the volumes list.
Another method you can try is to burn a BeOS bootdisk, such as the image provided with Personal Edition. Floppy images may also be burned onto a CD using a CD burner package which supports El Torito bootable disks.

 

BeZilla and non-western sites

There are two things to know for BeZilla international users, related to font problems:

  1. BeZilla uses system fonts for some elements, even on pages — input fields, lists, drop-down menus, buttons, etc.
    Therefore, you should set the plain, fixed and bold fonts in the BeOS preferences to those with support for your desired language.

  2. There is a „specially introduced“ bug for UTF-* pages (thanks to flaky unicode support and locale system in unices) — for UTF-* pages, it doesn’t use the fonts chosen for „Unicode“ in Preferences->Appearance->Fonts, but for Western (actually, the settings for language group in OS locale, but locale isn’t used in BeOS).

So for now you have two choices — either add the multi-language fonts to the Western fonts, or try to set LC/locale in BeOS, as it is done in unices.

 

Configuring an 802.11b wireless network card

How to configure an 802.11b wireless network card

  1. Install Bone7a (Do a Google search for
    Bone7a.zip
    ).

  2. Enter /boot/home/config/settings/kernel/drivers/sample and find prism.conf . Load it up in a text editor and set your SSID. Rename the file to "prism" .
  3. Configure it as you would a normal PCMCIA ethernet card (see Configuring PCMCIA cards), with the binding in the pcmcia file set to "prism" (or "prism.conf", I suppose, if you didn’t rename the file).

Note: BeOS is still horrible with DHCP, so be prepared to manually enter your network information. Also note that Boneyard is inclined to crash, so enter in as much as you can, kill its process, and continue when this happens.

See also:
BeTips: Configuring PCMCIA cards
THE Wireless How-To for BeOS
 

BeShare: Share files which are still downloading

It sometimes takes a while for large popular files to be distributed on BeShare, since it doesn’t support multiple download sources.
There are two solutions:

  • Re-share files on a file by file basis

    You can re-share on a file by file basis by creating a link from the file you’re downloading in your „shared“ folder. Do this either by right-clicking on the file and navigating your through the file hierarchy or simply dragging the file with the right-mouse button held into the „Shared“ folder, and selecting „create link here“.

  • Share all downloading/downloaded files

    If you replace the „Shared“ folder in BeShare with a link to „Downloads“ called „Shared„, all downloaded files will automatically be shared as well.

People downloading incomplete files may need to restart their transfers, especially if they are downloading quicker than the file is arriving.

 

StampTV: Fun with overlay

If you are the lucky owner of a graphics card with overlay support in BeOS, then this discovery made by Ben Allen will be of interest and possibly useful application when used in conjunction with StampTV and a video capture card.


While StampTV is on screen, press the Print Screen key to take a screen shot. Hide (minimize) StampTV and open your Home folder to look for the image just saved. Open the screenshot in ShowImage and you’ll notice that the StampTV window in the still image is still being updated by the StampTV app.
Now that you have an image with a „live update“, you can do several things with it. My personal favorite is giving one workspace the screenshot as a background. As long as StampTV remains opened and minimized (you can do this at startup with the ‚hey‘ utility) you have TV straight on your desktop. You can also cut a rectangular region out of the image of the TV window as if you were cropping the image and save that image as a new .PNG file. This image will display a smaller region of the TV screen and can be moved around at will to display different parts of the TV screen. There are probably tons of other things you can do with this phenomenon, have fun!


Editor’s note:
This strange effect is caused by the overlay mechanism on the graphics card, as opposed to fancy replicant support, so while you won’t be able to treat the image as if it were a video file, there are still some interesting and useful effects which can be achieved.
Overlay is a technique used by some graphics cards to improve video performance, and in this case works using the Chroma Keying method. Simply put, StampTV paints the main window with a „magic colour“, and then tells the video capture card to write the video into the StampTV window location directly, bypassing the CPU.
While this makes for extremely fast graphics, since it bypasses the slow CPU, the TV tuner would overwrite any windows, menus or dialog boxes on the screen where the TV image is showing.
To combat this problem, chroma keying is used. The TV image will be written directly to the graphics card as before, with the exception that it will only be displayed in areas which are the „magic colour“. Overlapping dialog boxes and windows will not be covered-up by the TV image, since they do not consist of the magic colour. This effect is very similar to the „blue screen“ chroma keying used on TV weather reports, where the desired image is only displayed in place of a „key colour“.
As you can probably imagine, there are quite a few interesting effects you can get by intentionally using the magic colour. It appears that StampTV continues to update the video card even when the window is hidden. Since the magic colour normally does not occur in the BeOS GUI, there is no immediate visible evidence. While this might be perceived as a bug, it is rather fortunate since it enables the creation of several interesting effects.
By setting the desktop background colour to the value of the magic colour, the desktop background will continue to display a TV image, replicant-style, even when StampTV is hidden. Finding the exact value of the magic colour is a more difficult process than it sounds, since different applications report different values — especially in 16 bit colour or lower.
A possible work-around is to use an image file containing the colour — the ArtPaint colour-picker can be used to extract the magic colour from a screenshot of StampTV. By creating an image file with the magic colour, StampTV will update the areas of magic colour in its old window location, prior to hiding. Zooming StampTV to fill the screen and hiding it will let you create a „video wallpaper“.
Ben Allen suggests another useful application for this effect. It might be possible to „clip“ the stock/sports ticker off the news channel and display it on the desktop, or indeed any other part of a video feed — even the TV output from another PC.
Without a specialized application, this requires some work, but it should be possible to do. Locate StampTV so that the area you are interested in falls on the area of the desktop you want it. Take a screenshot of the desktop, and crop the appropriate area of the TV image out of the screenshot (this requires some guesswork, since you won’t be able to see the image — just the magic colour). Hide StampTV, and set this image as wallpaper. Use „manual placement“, and move it around the desktop until it is in the right location — at this point, it should be displaying the video feed live. Careful manual positioning may be required to get it to line up perfectly — moving StampTV and re-hiding it might be easier for fine positioning.

– Cyan Helkaraxe (tip server editor)

 

Queries not working within Tracker

I recently encountered some strange problems with BeOS: all of a sudden, all of my standard query windows were empty – no new mail, no messages to be answered or to look at any longer. I was frightened.
I made some checks, but the indices seemed to be okay – I tried queries from a Terminal (using the query command), and they worked as expected.
Tracker adds a query for BEOS:TYPE to almost every query, but there is no index for this attribute on a standard system, which is perfectly okay since there are some other (indexed) attributes in the query as well.
Some stupid application I tried recently must have created an index for BEOS:TYPE but of course, no files were listed in there yet, so Tracker could no longer find anything.
Once the problem is revealed, the solution is often very simple:
rmindex BEOS:TYPE
You can use lsindex to get a list of all indices on the current volume – try the -l option to get more information about the indices.

 

101-key keyboards and BeOS

If you’re the extremely lucky owner of a standard 101-key (non-Windows) keyboard, then you may have noticed the apparent absence of an equivalent to the „Option“ key (normally the left Windows key).
However, on any keyboard (101-key or Windows) you will find that the right-control key performs an identical function. Holding down the right-control key will let you type characters from various languages, plus many useful symbols. In addition, holding the right -control key while clicking the „up“ button or a directory in OpenTracker will open the directory in a new window.
The only downside to this approach is that the right-control key is in a slightly more awkward position than the real Option key, although I hope you’ll agree that the absence of the Windows logo on the keyboard more than makes up for this minor inconvenience ;)
See also:

Grok keymappings for Windows keyboards
Typing symbols in StyledEdit and other apps

 

Intel CA810 Video with other graphics adapters

You can disable Intel’s CA810 graphic adapter by removing the symlink i810 in: /boot/beos/system/add-ons/kernel/drivers/dev/graphics
If your system hangs without this symlink, try to uncomment the line:
bios_calls disabled in your kernel config file.

[Editor’s note: The kernel config file usually resides in /boot/home/config/settings/kernel/drivers although on a fresh R5 install, this may not exist. You will find a suitable template in the sample directory, which you can copy out and edit.]

 

Creating a BFS volume on a partition >60GB

The problem isn’t with the BFS itself; it’s with a program called mkbfs. Fortunately, this error was fixed by Be Inc. in an unreleased version of the BeOS nicknamed „Dano“.
– Boot using any working R5 / Dano BeOS installation, from HD or CD.
– Replace the R5
mkbfs (if any) with Dano’s, found in /boot/beos/bin/
– Start DriveSetup and create a partition of the desired size as BFS.

When booting from a CD-ROM, you’ll have to use the Terminal to turn the created partition into a BFS volume.
The partitions can be found in /dev/disk/ and for me the entire path is:
/dev/disk/ide/ata/0/master/0/ which contains the „files“:
0_0 0_1 0_2 raw
You can use DiskProbe to find out which partition is the right one by looking at the total number of blocks.
If you only have:
0_0 raw
you type: mkbfs /dev/disk/ide/ata/0/master/0/0_0
Note: I submit this tip based on the help and tips Bruno G. Albuquerque provided on Beshare.

 
 
 
Blogroll
Tags

Haiku

Resources