Posted on September 9th, 1997 by shacker
By adding a few lines to /boot/home/.profile, you can extend the functionality of the bash shell in BeOS.
For instance, you can use all those freaky ANSI tags to make the terminal prettier. Paste the following block into your ~/.profile (note that this stuff also works for bash on other platforms that support ANSI color stuff, like CygWin32 for NT, etc…)
PS1='
! 33[1;36mw 33[1;33m -> 33[m'
PS2='! 33[1;36mmore 33[1;33m -> 33[m'
bind '"e[1~":beginning-of-line'
bind '"e[2~":paste-from-clipboard'
bind '"e[3~":delete-char'
bind '"e[4~":end-of-line'
bind '"e[5~":history-search-forward'
bind '"e[6~":history-search-backward'
And restart Terminal. This sets up your prompt to display the current command number (for easy !## access), followed by a nice bright blue path, plus a yellow ‚->‘. The number shown at your prompt is the number of bash commands you’ve issued since you last cleared your .bash_history file. To repeat a command from the past, just type ! (exclamation point) and its number.
The bind statements make home/end/pgup/pgdn/insert/delete more useful than beeping and typing a ‚~‘.
Brian D. Ruthrauff (ruthrauffb@knology.net) says:
To help make the text a little more readable by getting rid of the shadow effect on the letters, replace the 1 before the semicolon with a 0. For example:
PS1='! 33[0;34mB 33[0;31me 33[0;34m -> 33[m'
(rather than using 1;34 for blue I use 0;34)
Posted in Allgemein | Tags:
Terminal |
Kommentare deaktiviert für Enhancing bash
Posted on September 9th, 1997 by shacker
Sick of that goofy $ in your Bash shell? Don’t know where the heck you currently are? Here’s a nice prompt that has colors and shows you the current location! Change the colors as needed if you want, or just use the defaults!
Stick this in a file /boot/home/.profile If the file doesn’t exist, create it.
YEL=' 33[1;33m'
BRN=' 33[43m'
WHT=' 33[1;37m'
RED=' 33[1;31m'
NONE=' 33[0m'
CYAN=' 33[1;36m'
BLUE=' 33[1;34m'
PS1=$RED'[d ]'$YEL'$PWD/ '$NONE
Just change the $RED and $YEL variables to some other color to customize. Season to taste.
Posted in Allgemein | Tags:
Terminal |
Kommentare deaktiviert für More prompt customizations
Posted on September 9th, 1997 by shacker
[Editor’s note: This bug is corrected with R3.2 and later]
Many people are finding that they have problems with their R3/Intel installations if the CD-ROM is configured as a slave drive on the secondary bus. In some instances, you’ll need to make sure that if the CD-ROM is alone on a bus, it’s set as master, not slave. e.g. if your CD-ROM is the only thing on your secondary bus, make sure it’s the master.
You should find small jumper pins (tiny black slide-on thingies) on your drives, and hopefully a sticker or something on each drive describing how to set the jumpers. If you can’t find documentation for your drive, check the manufacturer’s web site.
In some cases, R3 won’t install at all if it’s on the secondary IDE channel.
Posted in Allgemein | Tags:
Hardware |
Kommentare deaktiviert für Installation: masters and slaves
Posted on September 9th, 1997 by shacker
If you want to turn your hierarchy of NetPositive bookmarks into a single, Netscape-style HTML document, install the diner Web server. Once you’ve got it up and running, save the following code as an HTML document and load it into NetPositive via diner. Pull down File | Save and you’re done.
<html>
<head><title>Bookmarks</title></head>
<body bgcolor=white>
<table border=0>
<tr><th>Title</th><th>Link</th></tr>
<Block List "/boot/home/config/settings/Netpositive/Bookmarks">
<tr>
<td><Var META:title></td><td><a
href="<Var META:url>"><Var
META:url></a></td>
</tr>
</Block>
</table>
</body>
</html>
Posted in Allgemein | Tags:
Applications |
Kommentare deaktiviert für diner: Convert NetPositive bookmarks
Posted on September 9th, 1997 by shacker
Rather than typing a big ol‘ messy path/filename into Terminal, try just dragging a file from the desktop or Tracker onto a Terminal window — its name will be written at the insertion point. Of course this is only handy if the file in question is already visible (which is drag-and-drop’s biggest problem in general), but it makes for a cool example of BMessages in action.
Posted in Allgemein | Tags:
Terminal |
Kommentare deaktiviert für Drag filenames into Terminal
Posted on September 9th, 1997 by shacker
Attributes can be edited directly from within the Tracker, in much the same way as you might change a filename.
Try this: open up a Tracker window to /boot/home/people
and make sure you’re in List view. Pull down Attributes | Person and select City. A list of the cities in which your contacts live should now be visible. Now just click in one of the cities and edit it normally. The next time you open up that Person file the city field will have been updated.
You can do this with any text-based attribute on any file — so long as the Attributes are marked as editable in the FileTypes Preferences panel. For more on that, see the tip: Custom Control Over Attributes.
Posted in Allgemein | Tags:
Tracker & Deskbar |
Kommentare deaktiviert für Edit your attributes visually
Posted on September 9th, 1997 by shacker
If you prefer to write in a plain text editor such as StyleEdit, Pe, or Eddie, but need the word count feature usually only found in commercial word processors, check out the command-line word counter packaged in BeOS — a version of the Unix „wc“ program.
Just open a Terminal window and CD to the location of the file you’re working on. Type wc -w filename.txt
and the shell will spit back the current word count.
Keep the Terminal window open in the background and all you have to do to repeat the command is hit the Up arrow and hit return. I’ve found this is actually faster and easier than using the word count feature in other word processors.
You can also use wc to count the number of lines in a file by using the -l flag, as in wc -l filename.txt
. This can be very useful in combination with other shell commands. For example, see the tip Parsing web logs with grep.
Posted in Allgemein | Tags:
Terminal |
Kommentare deaktiviert für Get word and line counts
Posted on September 9th, 1997 by shacker
If you look at the BeOS installation CD from within WindowsNT, you’ll find a folder called „NT.“ Within it is a file called addbeos.exe.
Open an NT shell, change directories to your CD-ROM drive’s NT folder, and type addbeos. This will make changes to your boot.ini and drop a file called BeOS.bs in the root of your boot drive. The next time you boot, BeOS will appear on your NT boot menu.
If this does not work for you for some reason, Mark Yen (bemyen@bemail.org) adds the following information:
Requirements
- A working Windows NT (I had 2000 Pro)
- A working Win9x or DOS dualbooting under NT’s boot menu (I had 98SE),
loadbeos.com
and related files (e.g., from PE)
- Not currently triple-booting NT, 9x, and DOS
Procedure
- Back up everything under
C:
- Copy the following files:
If you have Win9x:
BOOTSECT.DOS
to BOOTSECT.W40
IO.SYS
to IO.DOS
MSDOS.SYS
to MSDOS.DOS
If you have DOS:
BOOTSECT.DOS
to BOOTSECT.W40
IO.SYS
to WINBOOT.SYS
MSDOS.SYS
to MSDOS.W40
- Edit Boot.ini in C: to have something like:
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)WINNT="Microsoft Windows 2000 Professional"
/fastdetect
C:BOOTSECT.W40="Microsoft Windows 98" /WIN95
C:BOOTSECT.DOS="BeOS Personal Edition" /WIN95DOS
The first 2 OSes were put in by NT on install for me (to dualboot Win98 and NT).
Be sure to have the /WIN95 and /WIN95DOS switches (even for another Win9x).
- Make
AUTOEXEC.DOS
(or AUTOEXEC.W40
if you had DOS
instead) to something like:
@C:
@CDBEOS
@LOADBEOS
- Reboot and hope.
If you started with Win9x, you might want to edit MSDOS.DOS
to
include Logo=0
under [Options]
to turn off the Win9x
logo when booting BeOS.
Posted in Allgemein | Tags:
Miscellaneous |
Kommentare deaktiviert für Add BeOS to NT's boot menu
Posted on September 9th, 1997 by shacker
To avoid cluttering up your screen with lots of Tracker windows, hold down the right Ctrl key (or left Win key) when double-clicking a folder. This will simultaneously open the clicked folder and close the current window.
The right Ctrl key, by the way, also maps to:
Intel: The left windows key
PPC: The option key (both sides).
Note that this trick also works with the folder pop-up at the lower left corner of every Tracker window!
If you want to do this entirely from the keyboard, skip the mouse and add the Alt key to the mix: Win+Alt+up will open the parent folder while closing the current one, while Win+Alt+down does the opposite.
By the way, all of these tricks work with documents or application icons as well!
Posted in Allgemein | Tags:
Tracker & Deskbar |
Kommentare deaktiviert für Dismiss parent windows
Posted on September 9th, 1997 by shacker
All system finds (queries) are automatically saved to the /boot/home/queries
folder. However, you’ve probably noticed that saved queries get really unintuitive names (until you rename them). But it’s easy to give your queries memorable names while you’re making them.
Begin a query, then check the More Options box and fill in the field with any name you like. Once you’re done, the query will appear in its folder with a name you can identify instantly. You can also use this dialog to search through the Trash.
Posted in Allgemein | Tags:
Tracker & Deskbar |
Kommentare deaktiviert für Name queries before-hand