My RedHat Custom Configurations


This is just a mix of some things that I have written down for myself so I won't forget them. Why not make them available to others? If you have any additions of would like to report errors, please send a mail to the address at the bottom of the page. Thanks


xterm and dircolors

I like xterm with the following settings:

	xterm -geometry 90x55 -sb -bg lightGray -fg black -fn lucidasanstypewriter-12

Because of the bg colors, some dircolors aren't very nice to look at because they were made for a black background. So I changed them:

	/usr/bin/dircolors -p >  ~/.dircolors

And then modified the entries in .dircolors like:

	# This is for files with execute permission:
	EXEC 01;31

Opera and Redhat Linux

Note that Opera requires libXm.so.2 to install (and run). OpenMotif must be installed via the RedHat installation CD and a link should be made:

	ln -s /usr/X11R6/lib/libXm.so.3 /usr/X11R6/lib/libXm.so.2

Now Opera (statically or dynamically linked) will run if the rpm installation is used with the --force option. Note the the libraries are backwards compatible.


Installing linux-wlan on RedHat 7.3

I have a Netgear MA401 WLAN card which is not directly (or correctly) supported with RedHat Linux 7.3 and theWaveLan package and thus I installed the recent version (0.1.13 as of this writing) of pcmcia-cs package.

You will need the kernel sources rpm'd from the RedHat installation CDs:
Grab the latest version and do the usual un-tar-ing and make procedure for pcmcia-cs as described in the README or the web page

You can still use the kernel-built-in pcmcia-cs package even as a module, so you won't have to modify your kernel for this. Note that the make utilities only build the include files as it sees that the kernel already has pcmcia-support enabled.

Then to the un-tar-ing and make procedure for linux-wlan-ng as described in the README or the web page, making sure to give the correct path to the modules, the pcmcia-

After the installation you will find new files in the /etc/pcmcia/ directory:

	wlan-ng
	wlan-ng.conf
	wlan-ng.opts

Note that there is a source ./*.conf at the end of /etc/pcmcia/config which handles the parsing of the wlan-ng.conf file

Edit the /etc/pcmcia/wlan-ng.opts file to suit the needs for your network. Note that nwepgen does not generate the same key as the passphrase option in the Netgear utility which is part of the MS-Windows driver suite of the card, so you will have to enter the key by hand.

This is an excerpt of the of the file (things that need editing, I deleted the rest of the file):

	[...]
	# etc/pcmcia/wlan-ng.opts
	[...]
	USER_MIBS="p2CnfRoamingMode=1"

	#=======WEP===========================================
	# [Dis/En]able WEP.  Settings only matter if PrivacyInvoked is true
	dot11PrivacyInvoked=true		# true|false
	dot11WEPDefaultKeyID=0			# 0|1|2|3
	dot11ExcludeUnencrypted=true	# true|false, in AP this means WEP 
	                                #  is required for all STAs

	# If PRIV_GENSTR is not empty, use PRIV_GENTSTR to generate 
	#  keys (just a convenience)
	PRIV_GENERATOR=/sbin/nwepgen	# nwepgen, Neesus compatible
	PRIV_KEY128=true				# keylength to generate
	PRIV_GENSTR=

	# or set them explicitly.  Set genstr or keys, not both.
	dot11WEPDefaultKey0=FF:EE:DD:CC:BB:AA:99:88:77:66:55:44:33
								# format: xx:xx:xx:xx:xx   or
	dot11WEPDefaultKey1=		#         xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
	dot11WEPDefaultKey2=		#  e.g.   01:20:03:40:05   or
	dot11WEPDefaultKey3=		#         01:02:03:04:05:06:07:08:09:0a:0b:0c:0d

	#=======SELECT STATION MODE===================
	IS_ADHOC=n 					# y|n, y - adhoc, n - infrastructure

	#=======INFRASTRUCTURE STATION START===================
	# SSID is all we have for now
	AuthType="sharedkey"		# opensystem | sharedkey (requires WEP)
	DesiredSSID="MyID"

In order for RedHat to "find" the new card in it's network configuration, create and edit the following file:

	# /etc/sysconfig/network-scripts/ifcfg-wlan0
	#
	DEVICE=wlan0
	BOOTPROTO=dhcp
	ONBOOT=yes
Note that RedHat will automatically use pump as a DHCP client. If you don't want to use DHCP, use the ifcfg-lo file, copy that into the ifcfg-wlan file and edit it accordingly.

Now stop the pcmcia service, restart the network service (see that wlan0 ist started), and start the pcmcia service, e.g.:

	service pcmcia stop
	service network restart
	service pcmcia start

Now insert the Netgear card into the slot and note the console messages, as they should read something like:

	init_module: prism2_cs.o: 0.1.13 Loaded
	init_module: dev_info is: prism2_cs
	p80211knetdev_hard_start_xmit: Tx attempt prior to association, frame dropped.

I haven't figured out the last line but it does not affect the function of the card. Check the link light on the card. If you have a connection, it will stay lit and will not blink.

The usual ifconfig and iwconfig scripts should do the rest.


Printing with Opera with smb and locally

In order for Qt to work correctly with Opera, an alias for "lp" must be introduced into the /etc/printcap file. The reason for this being a faulty behaviour of the Qt printing system, this being true for smb printing: The Qt printcap problem apparently has to do with the alias separator, "|". Without an alias, printconf-gui generates the following printcap entry on my computer:

     lp:\
        :ml=0:\
        :mx=0:\
        :sd=/var/spool/lpd/lp:\
        :af=/var/spool/lpd/lp/lp.acct:\
        :sh:\
        :lp=|/usr/share/printconf/util/smbprint:\
        :lpd_bounce=true:\
        :if=/usr/share/printconf/util/mf_wrapper:

Notice the "|" at the beginning of the "lp=" entry. With this printcap file, Opera/Qt displays the following in its Print dialog:

	Printer
	-------
	lp::ml=0::mx=0::sd=/var/spool/lpd/lp:...::sh::lp=
	
	Comment
	-------
	Aliases: /usr/share/printconf/util/smprint::...::if=/usr/...

If you manually edit the file and remove the | from the lp= entry, Opera correctly displays lp as the printer (although lpd won't print correctly without the |). If you leave the | in the lp= entry and put in a dummy alias (either manually or through printconf-gui), Opera correctly displays the lp printer and its dummy alias (hplj5l in this case):

	lp|hplj5l:\
        :ml=0:\
        :mx=0:\
        :sd=/var/spool/lpd/lp:\
        :af=/var/spool/lpd/lp/lp.acct:\
        :sh:\
        :lp=|/usr/share/printconf/util/smbprint:\
        :lpd_bounce=true:\
        :if=/usr/share/printconf/util/mf_wrapper:

TTF fonts in RedHat Linux

Get font file blah.ttf somewhere (wherever) Then do the following e.g. in /usr/share/fonts/msttcorefonts:

	cd /usr/share/fonts/msttcorefonts
	cp ~/woauchimmer/blah.ttf .
	ttmkfdir > fonts.dir
	mkfontdir .
	chkfontpath -a /usr/share/fonts/msttcorefonts
	/sbin/service xfs restart
	xset fp rehash