Tips

Random ramblings.

Linux
Tips
CDRW
Sound

Adding Windoze Fonts

When browsing the web, some sites are designed using special Windoze fonts, which can come out looking pretty ugly on Netscape. Also, some Windoze applications, when run under Wine, also sometimes work better with the real Windoze fonts. Fortunately, they are mostly TrueType fonts, and are easily installed into the Redhat font server, xfs. Here are the steps:

Make a directory called /usr/X11R6/lib/X11/fonts/winfonts. Copy all the fonts from a Windoze installation, located in C:\windows\fonts, into the directory. If you have fonts named chillern.ttf or hollywei.ttf, just delete them.

From within the /usr/X11R6/lib/X11/fonts/winfonts directory, execute:

# ttmkfdir > fonts.scale
# mkfontdir

Edit /etc/X11/fs/config and add /usr/X11R6/lib/X11/fonts/winfonts to the end of the list in the catalogue section. Then go to the /etc/rc.d/init.d directory and restart the font server :

# ./xfs stop

# ./xfs start

Speed up your harddisk

Why doesn't Redhat do this by default? These simple changes changed my data transfer rate from my harddisk from 2.67 MB/sec to 21.48 MB/sec ! I would call that a lot more than a tweak!

http://www.linuxnewbie.org/nhf/intel/hardware/hdtweak.html

The parallel port

I think everyone who has tried to get printing via the parallel port to work under Redhat 6.1 has run into this one. It apparently only applies to this version of Rehat. I'll bet the guy at Redhat that screwed this up has been kicked around pretty good.

To get the parallel port to work, a line needs to be added to the file /etc/conf.modules:
alias parport_lowlevel parport_pc

PCL LaserJets and 11x17 paper

When I finally got tired of my slow, noisy inkjet and decided that I just had to buy a laser printer, I decided to go for broke and get one that could do 11x17. A PCL printer was significantly cheaper, so I got it and was happy until I tried to print an 11x17 page. After much research and poking around in ghostscript source code, I came to the conclusion that 11x17 was not supported by the part of the code that handled PCL printers!

I wanted it to work, so I fixed the code, then decided I might as well make the work available to anyone that wants it. So here are RPMs which incorporate the changes I made. These are based on Ghostscript version 6.01, obtained from ftp://ftp.cs.wisc.edu/ghost/aladdin/gs601/linux/, with the binaries compiled under Redhat 6.1. Tested by printing to a LaserJet 4V.

Binaries(2.0MB): ghostscript-6.01-1.i386.rpm
Source(4.6MB): ghostscript-6.01-1.src.rpm
Patch(2.5KB):
ghostscript-6.01-post.patch

Or you can get your own source from the official site and just apply the patch (the source download includes the patch). Patching separately is done by putting the patch into the gs6.01 directory and executing:

patch -p0 -b < ghostscript-6.01-post.patch

After installation, to use it, I created a printer using printtool. I named the printer "tabloid", then in the Select dialog I selected the non postscript Laserjet 4/5/6, 600x600 resolution, and ledger paper (which apparently doesn't do anything). Then in the box at the bottom labeled "Extra GS options", I entered the string:

-sPAPERSIZE=11x17

ADSL and PPPoE

I have ADSL from PacBell, using PPoE, and of course Pacbell is not aware of the existence of Linux. Redhat does not include support for PPPoE, and I had read some ominously vague warnings about the difficulty of getting this to work. Fortunately, there is a very good PPPoE client available from:

http://www.roaringpenguin.com/pppoe.html

I just downloaded and installed the RPM and ran adsl-install. It prompted for my ADSL user name and password, and DNS servers. Then I run adsl-start, and in a few seconds it returned to a prompt. Could it really have been this easy? A quick test with Netscape, and wow! - blazing speed. That was certainly an easy install!

Partitioning

First allow me to vent a bit, and then I will give my partitioning philosophy. My one major complaint with Redhat is partitioning. Frankly, in my opinion disk druid is barely mediocre, and not really acceptable for a commercial product (and yes I paid for a boxed "Official Redhat"). In particular, I object to disk druid determining by its own twisted logic which partition, or even which disk!!!, to install a particular part of the file system on. If I know how I want things installed, I should have the option of determining where things go. In this respect, the partitioning program that comes with Solaris is the best I have used.

So I decided to use PartitionMagic; a pretty slick program but not without its own little quirks. As I discovered, if you decide to go with PartitionMagic, then ONLY use PartitionMagic and don't attempt to make any "minor little changes" with another program. If you do, you can easily get the partitions into a state where PartitionMagic will just exit with an error message when run. It this point it apparently requires more knowledge of partitions than I have to get things back to a normal state (I eventually reformatted and repartitioned the disk from scratch).

The subject of how to partition a disk is virtually a religion to some people, so if you are happy with your philosophy please stick with it, but here is my philosophy. There are good reasons for someone running enterprise servers or 24/7 machines to create a bunch of partitions. But for people like me who are the main user of a desktop machine, I fall into the "main filesystem on one or two big partitions" camp. I have installed and managed quite a few HPUX and Solaris systems, where I have always followed the same philosophy.

So here is how I arrange Linux partitions, in order.

  • 15MB for /boot at the root of the disk.
  • Everything else in an extended partition (which makes adding and changing partitions easy).
  • DOS partitions.
  • /swap partition the size of physical memory.
  • / (root) partition of 4GB. I make it this large only because this is where I install software, and I tend to install some very large packages. I backup this partition occasionally.
  • /home partition. Probably 500MB is more than enough. I back this partition up daily to another harddisk. Then I burn a CDR of it every week or two for archiving


Leeward Engineering, Culver City, CA
TEL: 310-641-7905, E-mail: dclark@akamail.com