"Linux Gazette...making Linux just a little more fun!"


More 2¢ Tips!


Send Linux Tips and Tricks to [email protected]


New Tips:

Answers to Previous Questions:


Multiple booting.

Date: Mon, 01 Feb 1999 07:04:20 -0500
From: "Richard E. Veldwijk", [email protected]

As I've got kids and kids tend to play games, I have to have Micro$oft products on my machine. As I use OS/2 and Linux myself, here's a nice tip: Install OS/2's boot manager. If you have OS/2 installation floppies, you can run an OS/2 FDISK and install the boot manager, even without installing OS/2 itself.

On my machine, I have two primary C-partitions. The 1st is DOS 6.2, the 2nd is WIN98. I created these with Partition Magic and the OS/2 boot manager will take care of hiding and unhiding of these partitions. The 3rd option is Linux, where LILO is loaded from the Linux partition, instead of the MBR, so it doesn't interfere with M$ crap. Last option is, needless to say, OS/2 itself. This works really good! One drawback: Only the last booted C-partition is visible. If you need to access the other, you'll have to hide one and unhide the other.

--
Richard E. Veldwijk


Spell checking an single word

Date: Mon, 8 Feb 1999 01:01:43 -0500 (EST)
From: "Ben 'The Con Man' Kahn", [email protected]

Many times I want to spell check a single word while I'm using an application which doesn't support ispell. I created a small tcsh alias which can check a single word from the command line. Here is the alias:

alias spell 'set j=`mktemp /tmp/spell.XXXXXX`; rm -f ${j}*; echo \!:1 >
${j}; ispell ${j}; cat ${j}; rm -f ${j}*; unset j'
Please note that the inner quotes are back quotes. This makes the command run and assigns the output to a variable. I have no idea how to do this in bash. :^/

--
Benjamin Kahn


Keyboard Macros in Emacs

Date: Mon, 01 Feb 1999 19:09:16 +0500
From: Vishwas Narendra, [email protected]

This is my $0.02 tip on how to use Emacs for programming with a bit of lesser work for your fingers. Emacs has something known as keyboard macros. To create a keyboard macro type `C-x (' when you're editing any file(let's say a C source file). Now when the minibuffer says `Defining kbd macro' type in whatever you want to automate. Take for example you want to automate the line :

int main(int argc, char **argv)
{
 
Once you've finished typing this type `C-x )', emacs should say `Keyboard macro defined'. Now you must name your macro, so that you can call it later. Just type `M-x name-last-kbd-macro'. It then prompts for the name. In our example, let's call this as `main-type' or something like that. Now open your .emacs file. When the .emacs file is open, come to the end of the file and type `M-x insert-kbd-macro'. When it asks for the name of the macro to insert type in the macro name you had given last time. And emacs automatically inserts the Lisp code for your macro.

Now in order to call the macro you must use `M-x <macro-name>'. But this doesn't do much good because the whole idea of macros is to decrease your typing and this makes it worse. This problem is overcome by using keyboard mapping. The next step is to map the macro to one of the function keys.

Depending on whether you need the macro in all modes or not you can use the functions global-set-key or define-key.

1. Here is an example for the global-set-key which you can add to the end of the .emacs file:

(global-set-key "\C-cm" 'main-type)

Now the next time you reload emacs, when you type C-c m the whole code (not really, just this one line) gets typed for you. Please note here that it is a bad idea to use keys that have already been mapped. The most preferable combination is Control C + <yourkey>.

2. If you want the keys to be mapped only in the cc-mode, then place the following code in your c-mode-common-hook:

(define-key c-mode-base-map "\C-cm" 'main-type)

The only problem with the first method is that since you have only limited keys on the keyboard, they get used up very quickly. Moreover, when you're editing something like a html file, you wouldn't wan't emacs to spew out characters like `int main' etc.
 

PS to gurus: Please note that I myself am a beginner in emacs. I've used it for only six months now. If there is any mistake in what I've written, please don't hesitate to write to me.

--
Vishwas


Tips in the following section are answers to questions printed in the Mail Bag column of previous issues.


ANSWER: Re: A question please: two modems

Date: Wed, 24 Feb 1999 17:56:21 +0100
From: Christophe Fonteyne, [email protected]

It is impossible to connect two modems over a telephone line at a speed of 56 Kbps. The reason for that is that the maximum traffic over a telephone line is 64 Kbps. In order to obtain that speed, both parties need to have a didgital connection. When you dial up to your provider at 56 Kbps, you're not dialling to an analogue modem, like you have yourself, but insteed, you're dialling an ISDN modem...ie digital. Therefore you cannot have the full 64 Kbps, but only 56 Kbps (loosing 8 KBPS). Now if you set up a connection between 2 anaolgue modems, you will loose twice the 8 Kbps, leaving you with a maximum transfer rate of 48 Kbps. This is only when the lines are in optimal condition, which is rarely the case. Also, make sure the transfer rate of your serial ports is set high enough (eg stty 57600 ).

--
Christophe


ANSWER: Re: Boot SCSI with IDE Disk Too

Date: Tue, 2 Feb 1999 21:54:40 +0100
From: "Böszörményi Zoltán", [email protected]

A local ISP tried to install LILO in a machine that has both IDE (three disks) and SCSI, and for him the only variation that worked was when there was no primary master IDE disk, one of the IDE disks was the slave on the primary controller.

The BIOS of course allowed to boot from SCSI but LILO complained all the time that /dev/sda in not the first disk until the above setting.

After installing LILO the primary slave could be jumpered as master but not recommended.

--
Zoltan Boszormenyi


ANSWER: Question in lg-37

Date: Tue, 9 Feb 1999 10:52:04 +0100
From: Ian Carr-de Avelon, [email protected]>

A reaction to:

I have two 3com modems v90's one is internal "3com v90 voice" and the other is External 3com v90 .... I am using each one with a Linux System and have them connected to each others by a telephone line .... my problem is that I don't get the 56 speed that v90 should have. I get 33 or some thing like that... is there a way to tune up the modems in Linux operating systems? Thanks a lot.
Unfortunately this is nothing to do with Linux, so normal folks can't meddle with it, as they could if it were something in Linux. The "56K" speed is possible only in one direction, and relies on there being a digital connection to the phone system at the faster sending end. To get 56K in one direction you will need to change one end to ISDN and purchase suitable equipment for that end Eg. USR Courier-I. Depending on the cost of ISDN where you are, you may be better looking at ISDN at both ends as equipment for straight digital ISDN is much cheaper.

--
Ian


ANSWER: Supra SupraSonic Int Modem with Linux

Date: Mon, 08 Feb 1999 09:58:51 PST
From: "tom poplawski", [email protected]

I have seen the Red Hat page and this about Supra Modems and Linux. I am writing this from my Linux box connected to the Internet with my diamond SupraSonic II modem. I am using Red Hat 5.2 and made no changes at all to get this modem working. I haven't tried using both modems at once - yet! At first glance it appears Linux has recognized the other modem as well. I haven't been able to tell why Red Hat says it won't work but it may need some configuration as a Plug and Play board that Linux can't provide. I did use it first in another plug and play operating system before Linux.

--
Tom


ANSWER: From .02 Tips issue 36: SupraExpress Modem

Date: Tue, 1 Dec 1998 09:48:10 -0500
From: "Brower, William", [email protected]

Richard wrote:

I have a PII (350MHz) running with an AGP ATI 3DRage graphics card (which works fine) and a Sound Blaster 16 PnP (which also works fine). But, I can't get my internal SupraExpress 56k modem to work.
Your modem sounded familiar from a past search I had done, so I went to Red Hat's www site (http://www.redhat.com/) and followed the support | hardware link. You will find this reference in the modem category:

Modems that require software drivers for compression, error correction, high-speed operation, etc. PCI Memory Mapped Modems (these do not act like serial ports) Internal SupraExpress 56k & also the Internal SupraSonic 56k

It appears that your modem is inherently not compatible with Linux. I use an inexpensive clone modem called the E-Tech Bullet, pc336rvp model - paid $28 for it and it operates with no problems at all. Good luck in finding a compatible modem!

--
Bill


ANSWER: MIDI question

Date: Tue, 23 Feb 1999 18:47:56 -0500
From: Paul Winkler, [email protected]

Subject: Idea for an article

How about a primer on how to set up one's sound card to do true MIDI?

Good idea, big topic.

I have an Ensoniq AudioPCI card and have been successful in getting it to play WAV files via the audio out port and also simulated MIDI using TIMIDITY.
That is all the card is capable of. The AudioPCI _does_not_have_ a hardware midi synth of any kind!
But I can't figure out how to get TRUE MIDI rendering like I get with the same card in Windows 95.
You've been fooled, I'm afraid. Under Win95, the AudioPCI uses a software synth (which is what TiMidity is!). Check your system resources while playing MIDI... CPU usage should go up.

If you really want / need a card that really has built-in wavetable synthesis, make sure you get one that stores the samples in ROM, not RAM. If the samples go in RAM, you need software to load them at boot time. This software is provided by the manufacturer and guess what... it won't run on Linux.

I have a Turtle Beach Malibu which has a 2MB ROM sample set which sounds OK. The other snag is I've hardly found any Linux apps which work with it! (Jazz++ sequencer works.).

--
Paul


Published in Linux Gazette Issue 38, March 1999


[ TABLE OF 
CONTENTS ] [ FRONT PAGE ]  Back  Next


This page maintained by the Editor of Linux Gazette, [email protected]
Copyright © 1999 Specialized Systems Consultants, Inc.