Posted on September 9th, 1997 by shacker
Chris Herborth has done a magnificent job porting Python, and building additional Python modules that let you access the BFS database. However, the modules documentation doesn’t give a lot of usage examples, and it isn’t immediately obvious how to access particular attribs with the fsattr module.
The following block will serve the same function as the shell’s catattr
command, but in native Python:
attrs = BeOS.fsattr.read_attrs( path_or_filename ) ThisArtist = attrs.get( "Audio:Artist", ( 0, "No artist" ) )[1]
The value of „ThisArtist“ will now equal the contents of the artist attribute for the MP3 or .ogg file in „path_or_filename“. The example also includes error correction so your script won’t hork if it hits an unattributed file.
Props to Chris for this example.
Posted in Allgemein | Tags:
Scripting |
Kommentare deaktiviert für Python: Accessing attributes
Posted on September 9th, 1997 by shacker
You can use your choice of Tracker add-ons to quickly open a Terminal on the current Tracker window, but what if you want to go the other way and open a Tracker window on the Terminal’s current directory? There are a number of ways to do this, but the easiest way I’ve found is to add this to /boot/home/.profile
:
alias th="/system/Tracker ."
Now all you have to do is type „th“ at any time (remember this as Tracker Here) and a Tracker window will instantly display the current directory’s contents.
Posted in Allgemein | Tags:
Terminal |
Kommentare deaktiviert für Open a Tracker window on the current directory
Posted on September 9th, 1997 by shacker
Later versions of OpenTracker bring the long-awaited „Single Window Browse“ option, which lets you double-click a folder and have its contents open in the same Tracker window that’s already open, which reduces desktop clutter. However, this can be a problem if you actually need a 2nd (or 3rd…) Tracker window open for purposes of copying, comparison, etc.
If you’ve got Single Window mode enabled but need a second window open anyway, hold down your Opt key (usually the left Win key) while double-clicking a folder. This bypasses the single window mode and allows the second window to open normally.
Alternatively, right-click the folder, scroll out over it, and release.
Posted in Allgemein | Tags:
Tracker & Deskbar |
Kommentare deaktiviert für Open new Tracker windows in single window mode
Posted on September 9th, 1997 by shacker
Tired of having the words „Welcome to the Beos Shell“ greet you every time you launch the terminal?
Navigate via Tracker to /boot/beos/etc/profile
. You’ll need to make this file writeable. Right-click and select Get Info, then click on the little arrow at the lower left next to „Permission.“ Make the file Writable by Owner.
Next, double click on profile
, and change this line:
echo -e "
Welcome to the BeOS Shell.
"
to something like this:
echo -e "
Welcome to the NeoLAB.
"
Posted in Allgemein | Tags:
Terminal |
Kommentare deaktiviert für Change the Terminal's MOTD
Posted on September 9th, 1997 by shacker
Some users may have controllers that cause problems for BeOS during boot. You’ll know this applies to you if the splash screen appears and stops at the 5th icon (The Disk Icon). To fix this problem, you can select ‚Disable IDE DMA‘ from the safe mode options. If disabling DMA does the trick for you, here’s how to make the change permanent:
1.) Go into your ~/config/settings/kernel/drivers
directory.
2.) Cut and paste this text into StyledEdit:
matchdevices {
match {
# all devices
}
use {
nodma
}
}
3.) You need to save this as two files. Name the first one ‚ata‘ and save it. Name the second ‚atapi‘ and save it again. This should take care of having to Disable IDE DMA everytime you start up.
If you do the above, plus disable the „PnP OS“ option in your BIOS, you will be able to start BeOS.
This worked for me on a system with an AMD K6 with a VIA chipset and a WesternDigital hard drive.
Posted on September 9th, 1997 by shacker
If you have a file that stoped downloading in NetPenguin and want to resume the download, just double-click the file again, or drag it to the same location of the previously interrupted download. You’ll be asked you if you want to resume the previous download, overwrite or cancel the download. If you select „resume,“ a duplicate download will be added to the download list, which will start off from where the previous left off.
Posted in Allgemein | Tags:
Applications |
Kommentare deaktiviert für NetPenguin: Resume stoped downloads
Posted on September 9th, 1997 by shacker
If you are using a Win95 keyboard, open StyledEdit and hold down the left Win key while typing. You will see other characters appear (like the TM symbol, copyright symbol, etc.)
[Editor’s note: This key mapping applies to all BeOS applications that use the standard BeOS Text View, including BeMail, dialog boxes, etc. To see the special keys visually, open the Keymap preferences panel and press the Win key. -sfh]
Posted in Allgemein | Tags:
Applications |
Kommentare deaktiviert für Typing symbols in StyledEdit and other apps
Posted on September 9th, 1997 by shacker
Some users may have the bad experience where BeOS is neither able to mount nor „see“ any partitions (logical ones mostly) on a hard disk that was re-partitioned by Linux’s fdisk or DiskDruid.
The reason for this is that BeOS is trying to identify partitions named after their physical position in the drive. For example, hda3
is the third physical partition of a drive on primary master channel. This is the model that DOS/Windows partitioning tools follow as well.
Linux tools, however, do not name a partition after their physical order on the disk, but relative to WHEN they were created. So, if you keep re-partitioning your hard drive to create swaps or / partitions for Linux, you will end up with partitions having names like hda10 or hda11 etc depending on when they were created. So, the number on the name of a partition does not reflect the position of the partition inside the drive.
MS-DOS and Windows are capable of reading such overlapping partitions, which is why FAT32 partitions are sometimes rendered unbootable after installing Linux.
BeOS 5, on the other hand, does not allow this. Because it „sees“ the partitions as a linked list, it does not allow any differentiations in order to protect itself. This is also why you can’t see any logical partitions on a drive that has been re-partitioned with Linux (most likely BeOS will be able to see only the primary one).
Because Linux most definitely is not going to change the way it is creating partitions and because Be may never „fix“ this security „gotcha,“ there is only one way to fix this situation. Note: the following tip is NOT for newbies and not for the faint of heart:
The linux program sfdisk lets you reshuffle partitions. Another tool is cfdisk, which you can try if you don’t trust the plain fdisk (for the love of God don’t use DiskDruid).
Find the exact partition boundaries with this command:
fdisk -l /dev/hdX
And write them down on paper. Next, delete them all and recreate them in the correct physical order again. As long as you don’t make any typos and enter the exact partition boundaries again, no data will be lost. Be aware that you must boot Linux afterwards with the reshufled root=/dev/hdX
LILO option, since the numbering changed, and make any changes that have to be made accordingly to the /etc/fstab
file. BeOS will now be able again to read the partition’s table.
Posted in Allgemein | Tags:
Miscellaneous |
Kommentare deaktiviert für Making "hidden" Linux partitions visible to BeOS
Posted on September 9th, 1997 by shacker
If you want to debug BeOS or low-level programs like drivers, you can have debug output sent to the syslog, which appears at /var/log/
. With this enabled, you’ll find trouble reports at this location each time you boot.
Enable syslog debug output by editing /boot/home/config/settings/ernel/drivers/kernel
.
It this file does not exist on your system, copy the sample file from /boot/home/config/settings/kernel/drivers/sample/kernel
to that dir. Uncoment theline that reads:
syslog_debug_output true
Then just do a tail -f /var/log/syslog
in a Terminal window.
If you have two serial ports and a null modem cable, you can plug the null modem cable into both serial ports, boot with serial debugging enabled, start up SerialConnect on the other machine, and have it listen on serial port 2. You should see the serial debugging output.
If you happen to boot without serial debugging enabled, you can press [Command]-PrintScreen-D to break into the kernel debugger, then type ‚c‘ and hit Enter to get out of the debugger. Once in the Kernel Debugging Land (KDL), type help
for tons of other commands which can be used from within the debugger.
Posted in Allgemein | Tags:
Miscellaneous |
Kommentare deaktiviert für Trapping debug output
Posted on September 9th, 1997 by shacker
You probably already know you can use SoundPlay to decode MP3s to WAVs or AIFFs. Right click on the track name in SoundPlay, then from the pop-up menu select Special-Decode To File.
However, this won’t work for audio-input, which means it’s not obvious how to save out a WAV file including special effects you may be applying, or microphone input. What you can do is abuse the „LiveEncoder“ plugin, and specify
/bin/dd of=/boot/home/input.raw
as the encoder. This will create a raw dump of the input, including all effects you applied, as the specified file. If you enable the „allow raw audio“ option of the „default decoder“ plugin, you can play it back in SoundPlay (and apply more effects or save it again in a different format). If your computer is powerful enough, you can also use something like:
/boot/home/config/bin/lame -b 128 -s 44.1 -r -x - /boot/home/input.mp3
as the encoder setting to generate an MPe file of it on the fly, again including all the effects.
Posted in Allgemein | Tags:
Audio & Video |
Kommentare deaktiviert für Exporting audio files with FX from SoundPlay