| Since Aug.26th 1999 |
err | A little Linux newbie guide based on a RedHat6 workstation install |
|
||
| A Choice of Operative
System ..is traditionally based on what we'll use a machine for, but borders between OS aspects of usability are fading. Consider Linux if security, uptime, server- and multi-user abilities, automation, tunability or low costs matter. If you're the only user on your PC and mainly use it for office tasks, games and occasional mail and web browsing - stick with Windows, it's excellent for that use. Then again.. if you can't afford an Office suite, Linux offer a lot. But if you're a designer and used to Mac's.. hmm.. well. Some call Linux a "do it yourself" OS - there's some truth to that. You may have to undergo a steep learning curve to unlock it's treasures. But the hype is hot, the kids screaming for drivers.. I decided to take a harder look. And I'm impressed. Linux is getting
ready for the desktop. |
HARDWARE STUFF |
| FOR STARTERS |
| Partition Hints |
When you know your hardware is OK, partitioning disk(s) is next "obstacle". Give that some thought - itcan prove invaluable when you later upgrade your PC. The RedHat Installation Guide is good but there are some points I think could have been made clearer:
| Disk naming conventions |
Linux indicate partition names different than MS operative systems. A Linux partition name also tells what kind of disk we're dealing with, and which partition of that disk it is. There are different types of disks. Single user systems normally use (E)IDE and/or SCSI disks.
If a partition is named hda1:
hd indicates an IDE
type drive
the next letter - a
- indicates which IDE drive it refers to, alphanumeric.
the following number - 1
- indicates which of the partitions it is on the that
drive.
hda is the first IDE
drive
hda1 is the first IDE
drives first partition, what Windows would know as C:
hdb is the second IDE drive
hdb1 is the second IDE
drive's first partition
SCSI disks on Linux have
names starting with sd
SCSI disks would be sda1,
sda2, sdb1 etc.
The quickest IDE disks are
as fast as SCSI disks. SCSI's benefit is "unlimited"
number of HD's. Most mainboards only have controllers for up to 4
IDE disks, one of these normally used for a CD-ROM.
Real RAID disks are not worth considering for workstations. Typically used on servers demanding 100% uptime, mirrored disks, hot swapping etc. Linux does, however, also support "soft RAID", providing the mirroring abilities from the RAID system but used on "normal" disks. Private users aren't very likely to need this.
Example:
My install look like this
after just some weeks. I considered this a test-install and I was
right - it's not an ideal partitioning of a 2 gigabyte disk for a
single user machine.
$ df -h
Filesystem
Size Used Avail Use% Mounted on
/dev/hdb1
97M 46M 46M 50% /
/dev/hdb3
97M 55M 37M 59% /home
/dev/hdb5
97M 100k 92M 0% /tmp
/dev/hdb2
1.3G 740M 547M 57% /usr
/dev/hdb7
208M 84M 113M 43% /usr/local
/dev/hdc1
3.0G 2.4G 653M 79% /mnt/fat32
/dev/hda1
811M 771M 40M 95% /DOS
/dev/hdd
549M 549M 0 100% /mnt/cdrom
The /tmp dir is too big:
a separate partition for /tmp was overkill on a single user
machine.
Let install create it as a
plain directory under / *unless* you plan to have more users
added to the system later.
Mind you: we're now talking
about *simoultanous* users - in other words networking.
The /home partition is too
small - but it IS a partition :) Means i can replace /home with a
20 gig disk later. Netscape saves your cached files under your
homedir so if you set up a big cache you can run out of space if
/home is too small.
| A user called root |
When the installation
guide refer to the root partition it means the partition called
just /
In addition, a user
called root is a basic concept in unix. A home directory for the
user root will automatically be created under / and named /root
Again: That is the user
root's home directory. Do not make a separate partition
called /root
User root is the default
account for the superuser with "a license to kill" -
the system administrator account, with all priviledges. During
install you're prompted for a password: it's the root password
you then set.
root is NOT the account you
use on a daily basis. Your first vital task as root, after
install, is to create a private account for yourself. After you've
created your account, you from then on log in as your private
user and only change to user root to do serious system work,
installations etc. (and then you swiftly log out from root again).
Using root as your normal login would sooner or later prove
disastrous. One slip of the finger can erase vital files and mess
your system up for good. The user "root" is a key
concept in how unix based systems deal with security.
| Users and groups: Make a new account |
Linux by default create
common users home-directories as sub directories under /home
What you assign as the new
users login-name will become the name of his/her home
directory.
Each user is set up to
belong to a certain group or groups. These group associations
give the user certain rights and restrictions. A set of default
groups and users are predefined. If a new user is to be a common
user on the machine, assign this user to the group "users".
Someone you want to only be
able to ftp into the machine, you would assign to the group
"ftp" to restrict their access to ftp only.
The user identification is called UID. The group identification is called GID. Internally, Linux use numbers to say something about users or groups: root always has UID 0. The first common user root creates on the system will be assigned UID 500, the next one UID 501 and so forth. There is no reason to change that on a fresh install UNLESS you're already in a permanent network and a mailserver for instance know users by different UID's. If that is the case, you should probably conform to UID's already in use, and you will find them on the existing system in a file called /etc/passwd (if you don't find it consult the network administrator.)
For each new user you create a set of default initialization files will be copied to that users home directory. Later, the user can modify these to her own liking. These files start with a dot when found in a homer and can later be modified by the user. The basis for them can only be changed by root, and are located in /etc and various sub directories there.
Do not use special characters in usernames, and do not use spaces in usernames or passwords. They should be continuos strings up to max 11 characters long. Longer usernames is possible but NOT practical! As a rule, short usernames is best. If you want to have a mail address with a full name in, this is arranged via mail aliases and not the system username.
Then we're about ready to create a new user account:
[walktrough to come]
| How to maneuver on disk |
| pwd The default prompt only show the name of the directory you're in at the moment. If you wonder where you've dug yourself down, write pwd - print working directory. Full path displays. |
cd
change directory. "cd /path/somesubdir" to move around. The command cd alone is the quick way "home" - to the home-dir of the user you are currently logged in as. |
tab
If you've written enough of a file- or path-name for it to be unique, click on the tabulator key and the rest of the name will be filled in. If several files match what, a list of alternatives appear when you key tab once more. |
| Configuration of X |
Workstation users will typically want a GUI (Graphical User Interface). For that, you need X configured. Three different configurators are installed:
/usr/X11R6/bin/XF86Setup
/usr/X11R6/bin/xf86config
/usr/X11R6/share/Xconfigurator
These all write to the same textfile: XF86Config. The names may confuse you - they're much alike: Remember that UNIX/Linux differ between uppercase and lowercase letters. All lowercase xf86config is a program that can write to a textfile, and the textfile X read it's configuration from is XF86Config - capital X,F and C.
During install you are given an option to start X by default. I advice you don't select that till all your setup is guaranteed correct. Most fiddle around for a week before settling down with X, tuning resolution and fonts. During that you're "safer" if you've made a habit of logging in from commandline (at runlevel 3) instead of from an X-enabled login-manager (at runlevel 5). More about runlevels later - just remember X can get grumpy if it disagrees with your typos.
startx from
commandline starts an X session.
The startx command is a
front-end to something called xinit. Xinit reads the script .xinitrc
- a prototype script provided with the installation, with heaps
of settings you'll never use. When you get smarter you can edit
that and for instance remove redundant lines, which will cause
slightly less text fly by as you start X. Just never experiment
without having a backup of some sort. To force X to start with
another colordepth than your default, here's a sample to start
with 32 bits per pixel (your card must support it): startx --
-bpp 32
Mouse:
If you have a two-button
mouse, select "emulate three buttons". This makes it
act in special ways when you click both buttons. In Unix, that
third button is used to paste with, drag scrollbar buttons and
more. You'll want this! To set up a wheel mouse correct, add the
line "ZAxisMapping 4 5" as the last line under "section
pointer" in XF86Config, or select "5 button mouse"
in the setup menu. It doesn't actually have 5 buttons, but it
does in effect have three, and events the wheel generate (scroll
up/down) add for two more types of behavior. Most
applications understand the wheel.
Virtual Resolution
With enough memory on your
graphics card, you can set up a virtual desktop larger than the
actual display size. You can have a display resolution at 1024x768
on a 15" and a *virtual resolution* of 1280x1024. The effect
of this is NOT the same as the "desktop" options (1,2,3,4
etc.) where you can "jump" between desktops via a pager
(or sensitive screen-edges). Virtual desktops are valid for the current
desktop and let you "slide" or "pan" the
visible area, so when your cursor hits the edge of the screen it
will move slightly right/left etc. and display the rest of the
virtual resolution you set it up for. Personally I detest that
feature - makes me sea-sick.
Desktop Environments
and Window Managers
X is the fundament for any
GUI [Graphical User Environment] on Linux for now. KDE, GNOME, or
any other of those more or less good looking desktop environments
and also the window managers utilize X. RH6 comes with KDE/KDM,
GNOME/Enlightenment, fvwm, fvwm2 and AnotherLevel. In RH6 the
default GUI is GNOME. It's worth while to also test out KDE. You
find RPM packed upgrades of GNOME and KDE at the RedHat site and
I strongly recommend to install these.
X also has it's own
minimalistic GUI: If no desktop environment is specified, a
simple X session with one instance of the Xterm terminal window
will start.
A desktop environment
is a complete GUI solution, providing toolbars, icons, applets,
applications, and abilities like drag/drop. A window manager
is just an application, working in cooperation with the desktop
environment and specializing in "makeup and behavior".
It deals with wallpapers, frames, handles, borders and let you
choose how you want windowing events to perform: whether a window
shall rise to top when the mouse is over it, be transparent while
moved etc. A desktop environment can run with one of several
different window managers. KDE is a desktop manager and comes
with its own window manager called KDM, but you aren't obliged to
run KDM under KDE.
Gnome doesn't have a window
manager of it's own and the RH6 version comes bundled with a
setup that gives you the choice of several window-managers. I
fell flat in love with Enlightenment :)
Since a desktop manager
provide programs, it has to conform to some suitable programming
language. GNOME is based on GTK+ , an Open Source GUI toolkit
primarily developed for use with the X windows system.
KDE is based on QT - a GPL licenced
cross platform GUI toolkit by a norwegian company called Troll
Tech. QT2.0 got the 1999 LinuxWorld Editor's Choice Award for
Best Programming/Library Tools.
If you want to compile programs made for GNOME or KDE on your own, you need these libraries installed. Both are found on the RH6 disk, but newer versions exist.
In addition to applications the desktop environments provide there's a plethora of "pure" X applications and widgets included. As a new user I kept wondering about why there were so damn many filemanagers, editors and process viewers added - it took me days to get oriented in menus...even learn the names. A wilderness . Then again - there's something for every taste and CPU so.. why not.
Switchdesk:
Let you select between KDE,
GNOME and AnotherLevel as the desktop environment to start the
next time you run startx. Start it by writing "switchdesk"
from a terminal window.
"Runability":
Programs written for X run
under any Desktop environment. In addition a Desktop environment
can use extra libraries that X don't know too much about.
Applications written for KDE *may* not run under GNOME and vice
versa. Most do, however. If you're on KDE and start a GNOME
application, just avoid using it's docking features or the GNOME
toolbar will start and mess up your display. (it's gone again
next time you start x though.)
Toggle Resolution:
Monitor resolution toggles
on the fly with "ctrl alt +" and "ctrl alt -"
IF you set up more than one resolution when you configured X. You
can also define your own F-keys for resolutions.
For the curious:
To save the text that
flicker past your screen as you startx, redirect the standard
output- and error messages to a file. This syntax is valid for
the shell called bash:
startx > startx.txt 2>&1
If you don't want to see
it at all you can dump the output to /dev/null (think of it as a
trashbin with no recovery)
startx > /dev/null 2>&1
Multiple monitors:
Linux doesn't mind and
leaves that to the X server. Check out the XFree86 homepage for
compatibility. Keywords: Xinerama, dualhead. This tehcnology as
GPL is currently in beta versions. For broader card support there
are commercial solutions: MetroX and AccelleratedX.
Multiple terminals: Each display has a "tty" number. A practical excample: To direct log-output to one special display, and have that as the permanent log-terminal, add a line like the following to your syslog.conf file
*.* /dev/tty5
Substitute tty5 with
which the tty# you want to use.
| How to abort the X session - shortcut |
Ctrl+Alt+Backspace
Takes you down to
command line level and you can run startx again. It does
NOT necessarily stop running processes. If you were online via a
modem - you're still online. If you were running single user
licensed StarOffice, you may have to kill it's processes to
restart it.
| Copy/Cut/Paste - shortcut |
In applications you will
normally find that Alt+c Alt+x Alt+v will copy/cut/paste.
Some Linux-app's even use MSWindows standard, for
reasons unknown. (Ctrl instead of Alt)
In virtual terminals it suffice to select the text
with the cursor and then click the middle button to autopaste.
Watch out for linefeeds if you're pasting commands: If you select
a whole line you also copy a linefeed.
| Fix garbled fonts - shortcut |
Sometimes your font display gets messed up and look all cryptic. For instance if you by mistake run "cat" on a binary file. Control sequences in that file can happen to set your display wrong. To reset it write:
^V^O
Ctrl+V followed by Ctrl+O
(the letter)
| Terminal emulators under X |
In a virtual terminal
window you can run commands and start programs. start programs. A
common icon for virtual terminals is the "X" or an
image of a monitor. Linux comes with a variety of terminal apps.
What happens when you start a terminal window is comparable to
what happens when you choose "run DOS in a window", but
you can only start one shell called command.com this way in
Windows, and the terminal emulator will always look and
behave the same way (apart from fonts). Linux has plenty of
terminal types AND shell-options, highly adaptable. Xterm
is "the mother of all virtual terminals". It's unlikely
that you will need all it's features. I use rxvt instead -
a smaller and quicker xterm clone. (The transparent borderless
terminals you see on many screeshots are either Eterm or Gnome
Terminal. You need a "wall to wall" wallpaper to
get a full background shine through - tiled wallpaper doesn't
translate right.)
I made a kdelnk to start rxvt, containing the following command
rxvt -sr -fn fixed -bg black -fg white -sl
2000
(if you already found a terminal program and test
this from command line, add a & and push enter
rxvt will now start with:
-sr scrollbar on right side (default is
left)
-fn fixed the "fixed" font
- a font alias that's available on all unix systems
-bg black a black backgroud
-fg white a white foreground (the text)
-sl 2000 a buffer of the latest 2000 lines
that displayed.
A better look, valid if you installed the RH6
type1 fontpack:
rxvt -sr -fn lucidasanstypewriter-12 -bg black
-fg grey -sl 2000
The parameter -pixmap somepicture.xpm
will load a "wallpaper" inside the terminal window.
The -bg color must be indicated even so, to give
correct reverse effect when you select text.
Virtual terminals are not smart about font spacing, they like order and will place variable fonts too far apart according to their own ideas about a grid. Don't use - looks weird.
Now... write: ls -latr --color and see
what happens
Then write xlsfonts
To exit a terminal window you write exit
or simply click the close-button.
To terminate a process running in the window you
can break it use ctrl+C. This isn't considered a nice way to do
things but at least it gives you the prompt back.
| Colors in X |
The RGB color names your system know are
listed in /usr/X11R6/lib/X11/rgb.txt
Read it with more /usr/X11R6/lib/X11/rgb.txt
Click spacebar on full page to proceed the listing.
Ctrl+C terminates.
Wonder what OliveDrab2 look like? A utility Color
Browser added with GNOME convert RGB (red/green/blue) values
in rgb.txt and display them as colors + names. ColorBrowser runs
OK under any X desktop.
| Screenshots |
Quick and easy:
Download Xview - an image browser and snapshot
utility, and a "must". Free for private use and
supports all common file formats and then some. The rpm is found
under the powertools section at the RH ftp site. Start it with
the command "xv" - or "xv filename"
Already on disk:
X comes with a heap of utilities - amongst others xvd
for snapshots of windows, and xmag for magnifying.
xwd will default dump a snapshot of the active
window.
To make a snapshot of the whole display: Use in
combo with xmag, running at 1:1 ("xmag -mag 1") -
select the whole display (or whatever portion is relevant) and
then run an xwd of the root window (being "xmag") -
with forinstance:
xwd > filename
Display the file: xwud -in filename
Or pipe it to a postscript file at "snapshot
time":
xwd | xpr > filename.ps
The overkill:
The Gimp and ImageMagick are two good but BIG
graphics applications that also do screenshots.
| Access a DOS formatted disk[ette] |
A package you want from the RH6 CD is mtools.
mtools let you access DOS type files on non-mounted partitions.
See the manpage; here a basic example:
To read all files from "a:" to the
directory you're giving the command from in Linux:
mread a:* .
There's a space between the * and the dot.
Linux has native support for DOS and fat32 formatted HD's. Linuxconf let you choose what type you want to mount a disk as, and whether it shall mount during boot or not. Remember: Whatever you want to mount a partition as: you must create that directory first. (For instance "mkdir /DOS") It's "tidyer" (but no "must") to put mounting-point directories under /mnt.
NT's generic filesystem - NTFS - is incompatible with about everything but itself. NTFS Read-Only drivers have been written for Linux as well as DOS and BEOS. If you need to network versus NT machines, check out SAMBA.
There's a file-manager style utility to let you
access Linux disks from Windows.
It's in beta - go easy.
| Multiboot from C:\ with Lilo to Linux/DOS and.. screwed up ? |
If you're at the point where NOTHING boots and
you only want your Windows back, use a DOS system formatted
diskette with fdisk copied onto it. (fdisk is in the
windows/dos dir) Boot from that. After booting and still on A:
write:
fdisk /mbr
This writes a DOS Master Boot Record to your C-disk, in effect wiping out LILO - and your PC is back to it's "pre-lilo" self. You could check BIOS settings before the fdisk-stunt to verify it still looks like a DOS partition. Or just go for it.
NOTE: Separate NT description for multiboot/recovery
yet to come. The above is not valid for NT.
| TrueType fonts |
Alternative 1
RedHat6 has support for displaying TrueType fonts. It won't automatically let you print with truetype fonts but things sure look better. xfsft - a truetype fontserver - is made a part of xfs, the x fontserver. In order to make this work you should install the Freetype library and ghostscript rpm from the install CD. To install a rpm package you must be user root. Logged in as a common user: just write su in a terminal window, provide root's password, write gnorpm & and a graphical rpm administration program starts. Mount the CD-rom, click "add", find freetype and ghostscript and install. So far, so good.
Quirk 1: Font-names must be in lowercase and contain no spaces. If you already have tt-fonts on a partition containing Windows, a quick way to copy them all in lowercase is to mount the partition as a DOS filesystem instead of fat32. This way they'll all seem to be lowercase without spaces, whatever they might look like on a fat32 partition. Afterwards you can change partition type back to whatever is relevant. The file that needs modyfying if you want to do this is /etc/fstab. Unmount first - change filesystem - remount and the files will be 8.3 type DOS files se seen from Linux. If you don't feel comfortable with editing this file by hand, use linuxconf to unmount. change filesystem, and remount. That way you don't risk typos.
Quirk 2: Fonts can be more or less broken, and not so "true" to their type as the name indicate. Below is a reference to a little program you shall run: "ttmkfdir". We testrun this first and watch the output, to see if some fonts look completely crappy. You'll know when that happens IF it happens - it looks pretty wild. Delete offending fonts and try again. If you think it ALL looks wild, it's probably OK. If unsure, compare with an existing file called fonts.dir in /usr/X11R6/lib/X11/fonts/misc
Here the suggested approach to get TT fonts up and running. Commands are done as user root. What you write is annotated in bold fonts. Open a console window, su root, then:
cd /usr/X11R6/lib/X11/fonts
ls -la
If a directory called TrueType is not there - make
it with
mkdir TrueType
then
cd TrueType
Now copy your truetype fonts to the new directory
cp /dir/with/ttfonts/*.*
.
(the last dot is a pointer to "current
directory" - here applied as your target directory)
When that is done (still in the TrueType directory)
we do the mentioned testrun of ttmkfdir, to see that the font
descriptions we store afterwards is set up ok in the long unix-wise
manner. If one or more fonts seem to vary wildly from the other
descriptions there's something crappy with the internal font
description of that font. Delete it (rm somefont.ttf) and try
again - till the output seems reasonable uniform. The line-lengths
can vary but should contain the same "elements".
/usr/sbin/ttmkfkfdir
If the output seem to follow the same type of
pattern for all fonts we proceed:
/usr/sbin/ttmkfdir
fonts.scale
/usr/X11R6/bin/mkfontdir
/usr/sbin/chkfontpath
--add /usr/X11R6/lib/X11/fonts/TrueType
(Remember Linux "fill out" paths/filenames for you when you hit the tab, once you've written enough to make it unique. You don't HAVE to type your fingers off.)
Your fonts should now be readable in X . Check
it with "xlsfonts". If you later add or remove fonts in
the truetype font directories you must make a new fonts.scale and
fonts.dir file there. (It's only fonts of variable width, like
truetype fonts, that you have to make a fonts.scale file before
you make the fonts.dir). Then you remove and add the fontpath
again, to make xfs restart with the new information:
chkfontpath --remove
/usr/X11R6/lib/X11/fonts/TrueType
chkfontpath --add /usr/X11R6/lib/X11/fonts/TrueType
OR you can restart it the "old" way: /etc/rc.d/init.d/xfs
restart
Many TT fonts don't contain a full character
set. ttmkfdir by default only tolerate max 5 missing characters.
This you can easily change. "ttmkfdir --help" to see
options.
ttmkfdir -m 100 -o
fonts.scale tells ttmkfdir to tolerate
up to 100 missing characters in a font, and write the output to
fonts.scale. This is useful if you know a font to be very limited
- often the case with various decorative fonts.
NOTE: RH6 version of xfs now listen to a
different port than earlier (now set to -1) If you've upgraded
from an earlier version of RedHat: Edit /etc/X11/XF86Config and
replace all references to fontpaths with:
FontPath ``tcp/localhost:7100''
You must also make sure that xfs runs and is
started at boot time - to ensure that write:
/sbin/chkconfig --add xfs
Those with fresh installs do not have to bother
about this point.
Alternative 2
xfstt is another truetype fontdisplay server for X and doesn't require any additional libraries. It's easy to set up and can use the fonts right from your windows-disk, if you have fonts there.
In the Makefile for xfstt a default path to
your windows fonts is given. Modify the relevant line to reflect
where your Windows disk is mounted, if you want to use the fonts
located there. (they're in /whatevermount/windows/fonts)
Then "make" and (as root) "make install".
Then - as whoever you want to - from the commandline run:
xfstt --synch &
Now WAIT... some 4 seconds BEFORE starting X, so
xfstt gets time to unwind :)
After X is started - with startx or what you
use - you must set a fontpath that xfstt will find fonts at.
xfstt doesn't cooperate with the native xfs fontserver. Write:
xset fp+ unix/:7101
This tells X that there's an additional fp =
fontpath found at that port. Since xfstt runs independently of
xfs, the command "chkfontpath" does not affect it.
NOTE: It is only the very first time you
start xfstt you need the --synch parameter. This creates a
database of the installed fonts. Synchronizing is only required
when xfstt needs to know about added or removed fonts.
| Fuzzy small fonts on web |
Some webpages use tiny fonts, unreadable in Netcape unless we tune for them. A "font deuglification" page is out there, but I found the suggested fix of perm "swapping" the 100 and 75 dpi fonts result in too big fonts in menus and elsewhere. Instead: Here is THE fix for those with the truetype font Arial installed:
This fix assumes RH6* xfs (or xfsft) correct
set up and working already. Furthermore TT fonts in /usr/X11R6/lib/X11/fonts/TrueType
and ISO8859-1 character set. (All easily adjustable to other dir's
/ character sets.)
If you haven't got a file there called fonts.alias:
make it (must be saved as user root). Use the contents below.
This will give you size 14 as an option under preferences/fonts
in Netscape. After the file is created, to rehash xfs you can
write
/usr/sbin/chkfontpath --remove /usr/X11R6/lib/X11/fonts/TrueType
/usr/sbin/chkfontpath --add /usr/X11R6/lib/X11/fonts/TrueType
Make a typo and xfs will fail - and X won't start. If that happens, check your fonts.alias file for typos. The error is guaranteed your own. If it still doesn't work you have to rename or delete fonts.alias and rehash xfs again to get X working.
Restart Netscape. Go to "preferences/fonts" and select "Allow Scaling" for variable width font AND "use document-specified fonts". Select "Arial (monotype)" as your Variable Width Font. Then choose font-size 14 (or 15) in the upper dropbox, where there now are several selectable pont sizes for for Arial. Click ok. Here is a comparition of the looks "after" in Netscape, under Linux and Windows - and here the contents of a fonts.alias - the file should end with one linefeed!
-monotype-Arial-medium-r-normal--6-60-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--6-60-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--7-70-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--7-70-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--8-80-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--8-80-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--9-90-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--9-90-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--10-100-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--10-100-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--11-110-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--11-110-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--12-120-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--12-120-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--13-130-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--13-130-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--14-140-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--14-140-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--15-150-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--15-150-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--18-180-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--18-180-75-75-p-0-iso8859-1 -monotype-Arial-medium-r-normal--24-240-0-0-p-0-iso8859-1 -monotype-Arial-medium-r-normal--24-240-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--6-60-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--6-60-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--7-70-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--7-70-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--8-80-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--8-80-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--9-90-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--9-90-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--10-100-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--10-100-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--11-110-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--11-110-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--12-120-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--12-120-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--13-130-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--13-130-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--14-140-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--14-140-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--15-150-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--15-150-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--18-180-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--18-180-75-75-p-0-iso8859-1 -monotype-Arial-bold-r-normal--24-240-0-0-p-0-iso8859-1 -monotype-Arial-bold-r-normal--24-240-75-75-p-0-iso8859-1
| CharacterMap |
| Modem and PPP |
This is an area with a few pitfalls and I'll give you a link covering it better than I could. There's a variety of protocols for dialup connections. PPP is the one you'll want for Internet use. RedHat has an ecellent and up to date howto, full of hints and details about how to see what responses the modem in the other end expect. There is no such thing as a "windows" or "Linux" ISP. If they can be connected to - they CAN be connected to - period. It's common that ISP's won't know up from down on a Linux system however, so their user-support for Linux users can be meager.
Before you start you need to know the IP of your ISP's nameserver. In my case, it turned out all I needed of info apart from that IP was the instructions under "Setting up PPP with Linuxconf". After having read that it took me 5 minutes to connect to my ISP first time and I had never done this before.
If you notice errors about missing compression - it's there but not yet aliased: Add this to /etc/conf.modules (may be called modules.conf on non-redhat systems)
alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate
Hints:
| Automate tasks on your PC via remote dialup |
You may want to tell your machine to go online or do other stuff while you're not at home. You can use some tools to achieve this - and "program" the machine to respond by simply dialing the machine in certain preset sequences. These hints were posted in comp.os.linux.misc:
Q:
Is it possible to have my modem detect an incoming
call, hang up on that call and immediately run pppon? I'd like to
connect to my home machine from office, and I don't have a modem
there.
From: Robert Clare <Robert.Clare@cern.ch
Hi. I know of two programs on the market
that can do this. There are probably more... Take a
look at ringconnectd and xringd. Both should be available
at your local sunsite mirror. I have used ringconnectd in
the past and it worked perfectly
From: Peter Caffin <peter@ptcc.it.net.au>
I believe that mgetty is capable of doing this.
Have a look at the Mgetty Homepage at http://www.leo.org/~doering/mgetty/index.html
and the Usenet newsgroup de.alt.comm.mgetty.
From: Robert Clare <Robert.Clare@cern.ch>
Dont know about ringconnectd, but xringd is
capable of pretty complex "sequence detection" - like 3
rings, then 30-60 seconds silence, then 1 ring, then at least 30
seconds silence, etc.
I have used this in the past to make the computer
do different things (one sequence would grab the From: and
Subject: of all my new emails and send it to my pager, another
would connect to my ISP, etc.)
| Netscape Plugins |
RealAudio5 will screw up in RH6. The simple fix is also the one RealNetworks inform about: Get it and follow instructions.
-download by right-clicking on the file-link
and choose "Save Link As.."
-unpack (tar -zxvf filename)
-Run a simple "make" in the dir it
unpacked to
-After the make: copy open.so and rplayer to the
dir where your (compiled) rvplayer is.
-Edit the file "rplayer" to contain the
real path to your rvplayer.
-Then point your browser's association with
realaudio to rplayer INSTEAD of rvplayer
Now things should work, apart from the fact that
the RedHat rpm version will work as a application and not a
plugin.
RealAudio G2 is also said to work but
according to RealNetworks it hasn't even been released for RH6.
*Something* is there for download now and then,
higher than v.5 - it's a beta and has it's quirks. Some have
problems with G2 and can't hear it play. Various solutions and
rumored links are posted in comp.os.linux.misc almost every day.
ShockWave Flash
Unproblematic install - works fine.
| Netscape JAVA crashes |
Due to a slip in the RPM install, the fontpath
to the unscaled 75dpi fonts isn't always set.
This cause JAVA crashes in Netscape. If you have a
problem with Netscape crashing whenever it tries to load a java
applet, that is the problem. Here the solution, extracted
from RedHat's own fix: Write:
chkfontpath --list
You should get output that looks something like the following:
Current directories in font path:
1: /usr/X11R6/lib/X11/fonts/misc:unscaled
2: /usr/X11R6/lib/X11/fonts/75dpi:unscaled
3: /usr/X11R6/lib/X11/fonts/100dpi:unscaled
4: /usr/X11R6/lib/X11/fonts/misc
5: /usr/X11R6/lib/X11/fonts/Type1
6: /usr/X11R6/lib/X11/fonts/Speedo
If /usr/X11R6/lib/X11/fonts/75dpi isn't listed: Verify they are
installed:
ls -la /X11R6/lib/X11/fonts/75dpi
If you get a long list of files, now add them to your fontpath
like this:
chkfontpath --add /usr/X11R6/lib/X11/fonts/75dpi
If javascript pages give you problems even
after this, check your ~/.mailcap file (cat .mailcap)
Remove this line if you find it:
application/x-javascript;;\ x-mozilla-flags=save
RedHat offer an upgrade to version 4.7-1. Find a suitable mirror site close to you. Download the files from the update directory - here's how you upgrade of the full communicator suite:
CLOSE ALL your Netscape stuff, and (as user
root) write:
rpm -Uvh --force --nodeps netscape-common-4.7-1.i386.rpm
rpm -Uvh --force netscape-communicator-4.7-1.i386.rpm
For changes in v.4.7, see: http://home.netscape.com/eng/mozilla/4.7/relnotes/unix-4.7.html
| Unpacking files: archive formats |
RPM:
The first "new" format you meet on
RedHat: RedHat Package Management. These are compressed files but
also contain whole installation routines. You use the program rpm
from command-line, or a graphical interface for it (like gnorpm)
to unpack and install in one operation.
TAR:
Tape Archive format. This is one of the "old"
unix formats, originally intended to copy files to tape for
backup purposes. Like ZIP files they can contain detailed file-information
(file accesses, timestamps, directory structures.) A TAR file isn't
compressed, it's just a heap of files assembled together in
"one container". Often referred to as tarballs.
When you unpack a tar file you can force it to restore the
directory structure it was packed with. Quite handy, almost a
necessity.
GZ:
The original unix ZIP format. These are compressed
files. It's common to first "tar" files and then
compress afterwards. These files are normally given the
extentions .tar.gz to tell something about the contents
and packing routines involved. Another abbreviation may be TGZ.
To unpack a tar file: tar -xvf filename.tar
To unpack a gz file: gzip -d filename.gz
New versions of tar also let you unzip: tar -zxvf
filename.tar.gz
bz2:
Made with a program called bzip2 which uses a more
effective compression algorithm than gzip. Files will typically
be around 20% smaller than gzip'ed files. Bzip2 isn't included in
the RedHat6 distribution but they have a good howto on it, with download
links.
For backups: Also see manpages for dd
and cpio.
| Compiling programs |
C is a programming language, as you probably know, and Linux is based on C. If you want to compile applications for Linux, install the GNU C-compilers that come with RH6: gcc and g++, (aka egcs), the C library glibc and the "make" utility and you're half way there.. While you're at it - throw in the libraries you can find, if you have enough space on your HD - gtk, qt, the whole lot. (The latter are used when you compile apps made specially for Gnome and KDE)
Newcomers to Linux are often confused by the
plethora of C libraries - not without reason.
The libraries contain the routines the various
flavours of the kernel has used over the times.
Comparable to DLL files under Windows. Here a
quick overview of the major versions:
libc-4 - a.out libc - this is a real OLD one -
not needed on a fresh install.
libc-5 - The original "ELF libc" - often
referred to as only libc (Linux2.2)
libc-6 - aka "GNU libc" aka "glibc".
RedHat6 is based on this one!
GNU libc also have versions. glibc 2 is the
current. You will often find it referred to as libc2 also, to add
to the confusion.
Often you will find programs in different versions, for "glibc" and "libc" for instance. RH6 users shuld pick "glibc". If you can't find glibc sources, but ELF sources are available - go for ELF. Install libc5 (on CD) and tell your ld.so.conf file where it is. As you realise now, you can perfectly well install older C libraries but this must be done with care, so you don't overwrite files or links to your primary libc library. For that purpose, see what ldconfig does. Ldconfig tries to make some system in your local madness and writes to /etc/ld.so.conf. The order of the paths there is vital if you install more libraries. glibc should be mentioned before anything else. And - that means you keep glibc in /usr/lib and if you install other versions, keep them in other directories, mentioned later in the config file.
Just for the "fun" of it - here's my own /etc/ld.so.conf file
/usr/lib
/usr/i486-linux-libc5/lib
/usr/X11R6/lib
/usr/openwin/lib
/usr/local/lib
/usr/local/lib/gtk/themes/engines
/usr/lib/qt-1.44/lib
When your C-stuff is onboard, you're ready to go:
Unpack whatever you downloaded:
tar -zxvf program-0.1.tar.gz
cd program-0.1
ls
It is common to find files called "Makefile"
and "configure".
Furthermore, a README and INSTALL is normally
added. Untill you get used to it all: READ the files that are in
all uppercase - they can contain important information. If
required: edit the Makefile to reflect "private"
oddities. Which can be paths, settings, card-types, dis and dat.
It will be described in these files what changes you eventually
should make and why.
To compile is simple (if everything goes smooth and "configure" and "Makefile" are well written)
./configure
make
su
(password)
make install
If anything goes badly wrong during congfigure or make, the compilation will terminate with an error. It isn't uncommon that you see SOME errors fly by, warnings of various kind etc.. those aren't fatal: The critical ones will terminate the whole process, and tell something about what went wrong.
If you compile gnome-apps from sources on a RedHat6 system, do ./configure --prefix=/usr instead of only ./configure or the apps will "land" in the wrong directory (we want them to eventually overwrite older versions and in any case keep the gnome-stuff together; god knows when an rpm will contain the same app and it'll only confuse you to have several versions on disk in different dir's)
More about glibc:
The GNU libc site:
http://www.gnu.org/software/libc/libc.html
A glibc FAQ:
http://sourceware.cygnus.com/glibc/glibc-faq.html
and about ELF and having multiple libraries on
disk:
http://metalab.unc.edu/mdw/HOWTO/ELF-HOWTO.html
| KDE quirks and a first date with PICO |
Vanishing panel:
I tuned KDE panel to sit at bottom of desktop, as
small as possible and to auto-hide/display real quick. Then
decided I wanted it on the left side instead and FOOF: it
vanished for good. To recover manually you must edit ~/.kde/share/config/kpanelrc
(in your homedir)
There's a line that reads "Position=....".
If you want it at the bottom again - change that from for
instance "Position=left" to "Position=bottom".
This could be your first encounter with command-line based
editors: check out pico (For instance with "pico -w filename"
where -w means don't wrap lines.) Pico is easy peasy - you'll
master it in a few minutes! Commands are explained on
bottom line. The ^ means you should use the Ctrl-key in
combination with some letter. ^x will exit and you are prompted
to save changes (y/n) and then for a filename (defaults to opened
file.) Press enter, changes are saved and you're returned to the
shell.
"grep -n someword filename.txt" will
list the lines where the word "someword" is found in
filename.txt
"pico -w +644 filename.txt" will bring
the cursor right to line 644 in filename.txt
Stuck process records in /tmp
In the /tmp dir you may after a while discover a
heap of "files" beginning with kio_, kfm_ and orbit
There's some bug in the KDE that came with RH6
that doesn't let it clean up properly after a session. These
files don't take any space and you can safely delete files from
previous sessions of KDE if they bother you. After a while - if
your machine is up and running at the time, you probably have a
cron-job that automatically deletes files in /tmp "older
than x hours". [/etc/cron.daily/tmpwatch]
| core and kcore |
Files called only core are dumps done when a
program crashed. You can safely delete those files (rm core)
If you wonder what program was the sinner: gdb /bin/ls
core
Somewhere down the output you'll see what dumped it and why. Doesn't tell you too much though - coredumps are useful for debugging purposes, which is an artform in it's own right.
If you don't want coredumps to take place at
all you can prevent it: the syntax depends on which shell you use:
If you want to globally disable it on the system -
do the following as user root:
bash: add following line to /etc/profile
ulimit -c 0
tsch: add following line to /etc/csh.cshrc
limit coredumpsize 0
If you want to disable it only on a particular user-account you place the lines in the users .profile and .cshrc
kcore is something entirely different. You find
it in /proc/kcore and it isn't a real file but a listing of your
onboard RAM. User root can read from it to see what resides in
memory. Again: this is not a file, it's a process and doesn't
occupy space on disk however huge it looks.
| Common newbie misunderstandings |
The reboot syndrome:
Users who are accustomed to MS Windows often think
they have to reboot Linux - like in Windows - to make changes
take effect. The "reboot-nightmare" is MS specific, and
has to do with the way the registry works there. Rebooting Linux
is the wrong approach in 99% of the cases.
In Linux you instead restart only the one process or the set of processes that you want changes to take effect for. Saves time and doesn't wear your disk out.
In Linux the operative system and most processes run in the background and don't care whether you run X or not. "Services" that always run in the background are often called "daemons" (and often have a name ending with a d). You can stop/start the single daemon as you wish - without tearing down the whole system.
Examples:
If you have established a modem connection from
KDE and then log out: pppd is still active in the background and
your modem connection remains up and running. You can continue
using it from commandline - or you can startx again and go on
using xwindows applications to access it.
Or if you're in KDE and want to make changes to
your mouse setting: "su" with appropriate password, run
"/usr/sbin/mouseconfig" - modify the setup - log out
from KDE - startx - and the changes take effect.
| Processes, PID's and signal sequences |
To see a long list of all running processes,
maximize a terminal window and write ps -edalf |more
Various fields display, amongst them the UID, PID,
PPID, the name of the job and the parameters it was started with.
The PID is the Process IDentification.
The PPID is the PID of the Parent process. A
process can spawn "child processes". The parent process
owns the child process and if you kill the parent chances are you
kill it's children too.
The UID field tells about the ownership of a
process: which User ID originally started it.
The process ID's are referred to as numbers.
[....more to come...]
To rehash one particular daemons processes you
could try this command:
killall -HUP processname
After having made changes in your mail
configuration files you "killall -HUP sendmail" for
instance.
This will not only reset one single PID belonging
to sendmail but ALL processes that has to do with "sendmail"
If you see mentioning of sending SIGHUP to a
process, it's the above procedure that's referred to.
You'll run across the term "SIG..." in
various connections and it has to do with unix process signals.
The signals that can be called are textual or numeric - as you
prefer. Textual petnames are most common and safest to use. Write
killall -l to see the list.
When you run "kill -9 PID" the number
9 is the signal squence, and 9 is the signal to terminate
relentlessly - disregarding dependancies of other processes etc.
A nicer kill would be done with only "kill
pid" - in which case the process can respond in a variety of
ways, depending again on how it's programmed to react to a "kill"
command. Some ignore it - others rehash then...all is possible,
you have to consult the individual manual to find this out.
| How to find help, programs and files |
This section is about how to find it all on your OWN disks, but here's the authoritative link for RPM fans: http://www.rpmfind.net/linux/RPM
To the matter: Manual pages are common UNIX type help-files. You read them from a shell by writing "man commandname". Linux also come with a X-based man-page reader (xman under utilities). When run from a terminal window: While you still haven't reached the end of a man-file, your display will usually indicate this with a colon. At that point you can search in the manpage, and scroll with page up/down keys. Write "man man" for usage. When you're at the end of a manfile it displays "(END)". Towards the end of manualpages is usually a list over closely related commands. Exit the manual-program by typing Q (for "quit").
Some of the man-pages related to signal
sequences and kill-commands are:
alarm(2), bash(1), fuser(1), pidof(1), ps(1),
kill(1), kill(2), killpg(2), pause(2), raise(3),
sigaction(2), signal(7), sigsetops(3), sigvec(2), and tcsh(1)
It isn't for nothing people write extremely thick books about these things.
Manual pages are referred to with a number as a
reference to which manpage directory it can be found in.
(man1 through man8). "man" by default
delivers the first "hit" it finds. As you see above,
pages for "kill" can be found in two man-page
directories. (kill(1) and kill(2))
To read the manpage for kill in the first
directory, all you have to write is "man kill".
To read the manualpage in the second directory,
you have to specify it: "man 2 kill".
And if this sounded spooky - here's more to test
out:
info command
about command
apropos command [or a topic]
To find a program located somewhere in your
default path (and see which path it is in)
which program
If it doesn't show up then you can try:
locate filename
(can give a long list if a directory has that name)
Each night - if up and running - some jobs
described in scripts in /etc/cron.daily/ will run.
slocate.cron is one of those. Slocate itself is a
program that builds a little database over files and their
locations - according to given criteria. This little database is
what "locate" consults when you ask it to.
And then there's find
find finds files. With one short command you can
search for a file on all the disks you have mounted. That would
be the approach of a desperado however, and can take a lot of
time if you have a big system: you're hereby warned.
Note: stdout (your terminal(-window)) is NOT
find's default output. You must tell "find" where to
place what it finds.
To see it there and then you add the parameter -print
(which will "print" to stdout - standard output - which
is the terminal(window) you gave the command from.
To find all files ending with .txt ANYWHERE on
your disks: find /* *.txt -print
To find files somewhere in the dir you're in - or
any subdir: find ./* *.txt -print
The output in this case will be a listing of all files searched and then list of hits at the end of the output.
Remember how you also can pipe and redirect
commands and output in unix, to files for instance.
Remember enough about it and you're close to start
shell-scripting.
In addition, helpful files in various other
formats are found on the RH6 CD, from plain text to html and
postscript. They are a good source to understanding Linux but as
mentioned, not always up to date. README files that accompany
installed programs may indicate that you need to install them all
over again for instance. Efforts are made to make more consistant
documentation, but for now it can be a jungle of good advice.
| 3D |
3D acceleration under Linux is still close to "bleeding edge" technology. The openGL/Mesa 3D apps and demos only understand maximum 16 bpp colormode and can't yet emulate colordepth. To toy with 3D you have to install additional drivers and libraries and set up a video mode at 16-bit or lower
NVidia has a patched version of XFree86 and xfs
(including xfsft) for Riva TNT based cards. There are also Matrox
drivers of course. A growing range of applications and games like
Doom3D and Freeflight (a flight simulator) use these 3D engines.
To install it all is a serious pain and still don't run as fast
as on the same hardware under Windows. Some keywords for 3D is
Mesa, Glut, openGL, plib. You find Mesa and glut rpm-packages on
the RedHat PowerTools CD or at the RedHat ftp site. After that
you're on your own.
If you have installed a fresh RedHat6 and not yet
patched the xfree files (see errata) you have yet an option: A set of RPM files based on
the RedHat version, but including BOTH the NVidia and the RedHat
patches is found in the contribution directory at gurulabs.com's
ftp server.
| Path-quirks in RedHat |
RedHat packed their version of KDE, a popular
desktop manager, with a non-standard path.
This means that if you aren't quite "into"
things, you depend on RedHat rpm distributions of KDE
applications if you want painless upgrades. Furthermore it means
that KDE applications you get as normal tar.gz files are likely
to screw up to some degree during install - they'll expect to
find KDE is in /opt/kde/.... which is where a normal KDE install
would be. There is no /opt dir in a RH install. How to make a
path of symbolic links to "cure" this is partly
described below under "quirks with KDE".
| Upgrades and fixes |
An invaluable page for all RedHat users is the Errata, where updates and
various bugfixes are posted with a description about how to
update the files and what is being fixed.
Bookmark that page and keep an eye on it.
If you download rpm, gz or tar files with Netscape: Download by right-clicking on the link and choose "Save link as" instead of just clicking on the link. Unless you have told Netscape that this is an "application" MIME type, it doesn't understand these formats properly and will try to display them as text instead, or worse..reformat them during download (unpacking tar.gz files, but maybe leave them on disk with the wrong filename. If possible, use a dedicated FTP program: They're better, faster, and usually let you resume aborted downloads.
Xfree86-3.3.5 upgrade:
If you get X crashes: First thing to do is run XF86Config
and set up your graphics card again. (Type only.) If you have an
ordinary scrollwheel mouse the setting for that will probably
vanish during this operation: either reconfigure that too or
simply add the line "ZAxisMapping 4 5" to /etc/X11/XF86Config
under "Section "Pointer"" (also comment away
the line with Emulate3Timeout")
| Security |
One vast area you never really get "finished"
with. If your machine is online there's some basic precautions
you should take right away. In comp.os.linux.security a link to
Lanze Spitzners page about Armoring
Linux was posted.
If you've overlooked it till now - check out what
"umask" does. (Displaced on the unix commands page.)
You can test if your mailer is
vulnerable by a telnet to mail-abuse.org.
Mail relay exploit is further explained at http://maps.vix.com/tsi
| H A R D W A R E R E L A T E D |
So called "unsupported hardware" MAY
still work under Linux, but takes more work to get going. A great
effort is made by the Open Source community to keep up with new
hardware, and a lot of drivers is available in alpha or beta
versions. Hardware producers hesitation to publish specs to GNU
developers is the main reason for this lack of Linux drivers.
Many major HW companies are are announcing future support for
Linux these days as the OS is becoming increasingly more popular.
This section contain a private mix of info and links regarding
both GPL and commercial vendors, based on my own interest in or
experience with various hardware.
| UPS'es: APC and PowerCom |
GPL applications and info found at:
http://www.exploits.org/~rkroll/smartupstools/
http://www.brisse.dk/site/apcupsd/
APC now have native
Linux support for their UPS'es
| USB questions and links |
USB is not supported in kernel 2.2.* but partly supported in 2.3.* and under development.
Links:
http://www.linux-usb.org/
Linux USB Project Homepage
http://www.kroah.com/linux-usb/ USBView and other Linux USB stuff
| Parallel port SCANNERS |
[under construction and wildly unorganized]
RedHat6 hardware compatibility list sort scanners under "unsupported". There is some "stuff" out there however, providing general support for most SCSI scanners, and also increasingly more support for parallel port scanners. It's bleeding edge technology and in beta or alpha for now, but people have made it work and if they can - I can.
Being in early beta, stability and features isn't up to par with Windows versions yet, and it can be a bitch to install and configure it all. I developed profound SCSI angst almost a decennium ago when it wasn't a standard but more a means of psychological warfare. I'm not gonna touch those creatures if i can avoid it and 65$ for a parallel port scanner looked like the right price back when I got a new Microtek Phantom. So there it sat. And right next to it was Linux. I rolled up my silken sleeves, cracked some fingers and went to work.
Familiar with the TWAIN? Forget it. THE Linux
Scanner project is known as SANE (Scanner Access Now - EASY)
where I found an rpm site linked.
http://developer.redhat.com/rhcn/browse/conventional/packageinfo.php3?package=sane
and downloaded:
sane-1.0.1-2.i386.rpm
sane-client-1.0.1-1.i386.rpm
sane-devel-1.0.1-2.i386.rpm
sane-clients-1.0.1-2.i386.rpm
sane and sane-devel installed fine. The others
whined for libgimp.so.1. Since I located something on disk called
/usr/lib/libgimp-1.1.so.6.0.0, well equipped with a jungle of
symbolic links already, I made one more.
locate libgimp.so - then cd to where you
found it (or install the rpm if you don't find it at all)
cd /usr/lib
ls -la libgimp*
decide which version you actually have there
if it isn't libgimp.so.1, link the one you have to
a "dummy" file, in effect pointing to the real file:
su
(password)
ln -s libgimp-1.1.so.6.0.0 libgimp.so.1
then rpm -Uvh the other files (just in case you
had some version from before) and exit from root.
So far, so good. But it turned out I
needed a lot more. The latest kernel patch that includes drivers
for chips used in parallel port scanners was ftp://ftp.torque.net/pub/ppSCSI-0.91.patch
Piece of advice, in case you want to dive deeper:
print out the info found here:
http://www.torque.net/parport/
http://www.torque.net/parport/ppscsi.html
The doc's for this patch bluntly stated that it's a patch for kernel 2.2.10. RH6 comes with 2.2.5-15. It suddenly seemed outdated. New kernels are found via http://www.kernel.org, and as I write the latest version is 2.2.11, around 14 mb big.
QUIRK: When unpacking the tar.gz - place it
first in /usr/src - then delete the current "linux"
link there to linux-2.2.5, mkdir linux-2.2.10, then make a new
symbolic link to linux-2.2.10
(ln -s linux-2.2.10 linux)
tar -zxvf linux-2.2.10.tar.gz and it nicely
unfolds in linux-2.2.10
Then move the patch you downloaded to /usr/src/linux-2.2.10/drivers
cd to it
write:
patch -p1 < ppSCSI-0.91.patch
Now I'd come to the point where I was worse off than when i started. I actually had to compile a new version of the whole operative system. This can be scary stuff and I've failed miserably before - my kernel angst is almost as big as my SCSI angst ;) None the less - this medicine was required to blow life into the beloved Microtek - so I couldn't resist one more attempt.
See: How to make a new kernel under RedHat6
| QuickCam and digital photo links |
QUICKCAM LINKS
The cqcam Homepage (application)
http://www.cs.virginia.edu/~patrick/cqcam/
QuickCam color and Linux mini-HOWTO
http://www.dkfz-heidelberg.de/Macromol/wedemann/mini-HOWTO-cqcam.html
"My Web Cam on Linux" - A user
page with practical hints
http://home.sol.no/~robertgr/linux/webcam.html
Third-party Quickcam software
http://www.cs.duke.edu/~reynolds/quickcam/
DIGITAL PHOTO LINKS
gPhoto - the GNU Digital Camera Program
http://gphoto.fix.no/
| Portable Linux: Laptop links |
Dreaming of a Toshiba I keep half an eye on this. Problem areas can be pointing devices, docking, display. Normally overcomable problems but can take some inventive tweaking to get running properly. Be aware that so called WinModems and IBM MWave are not normal modems but a similar type of communication devices, depending on MSWindows to work at all. They will not work on Linux. Many laptops come with internal "modems" of this type - be warned.
Links of interest:
Linux on Laptops The Linux
Laptop authority page with tons of resources. Linux Laptop HOTWO.
Lists machines with links to users HOWTO pages for particular
machines.
Toshiba
Computer Engineering Corp. Linux Page -
Page created in July 1999 and under construction. It has an eye-catching
disclaimer and not so much is there yet, but they're obviously
working on it.
Exchanging ZIP files between MS-DOS/Windows and Linux - A
Toshiba US whitepage describing how to deal with large zip-files
(spanning several diskettes.)
| TV and TeleText: Hauppauge WinTV/PCI under Linux |
|
|
If you have a card combination that worked
under Windows, it will 99,9 % certain work under Linux.
Exeptions: The trouble with Cirrus Logic 5446 is
still active in the Linux driver. This most likely also goes for
Trident cards. You'll get a crisp clear TV image - and all the
fonts on your desktop get garbled. Consider these cards
incompatible for now.
For the curious: RedHat and Hauppauge provide extensive lists over compatible / incompatible graphic cards. A benefit with Hauppauge cards is that you don't tie yourself up to one particular graphic card manufacturer and don't need connectors beyond the PCI bus.
A still developing standard to deal with video/multimedia
devices, video4linux, is now part of the kernel. (2.2.*). So
contrary to what all official HOWTO's and FAQ's indicate: After a
fresh install you do NOT
have to compile a new Linux kernel. RH6 drivers are placed
in/lib/modules/2.2.5-15/misc. Download and
compile a TV app, load the modules and you're up and running with
your favorite soap in *almost* no time at all ;)
TV-APPLICATIONS: kWinTV or Xawtv
kWinTV only runs under the KDE desktop. xawtv is a more "pure" X app, and runs on any desktop. Both are good TV applications and even if they claim beta status they don't stand much back for the Hauppauge app for Windows. You may find them even better in some respects. These applications have a slightly different touch and feel but are equally good.
To guide you through an installation process from A to Z and because the kWinTV install can be the trickiest, this is the installation that's described here in detail.
xawtv and sound: The worst "quirk" with xawtv: You have to figure out which device you add manually in .xawtv to enable volume tuning with the +/- keys. In my case "mixer = vol" did the trick but this is a sound card dependent setting. If you run out of ideas: let that line read "mixer = mixer" and you'll get an error message when you start xawtv manually, listing available devices. Try, fail and succeed from there - it's one of them.
kWinTV and sound: kWinTV let you choose sound device in a menu, and the sound device on a Hauppauge card is "line in". If you upgrade to v. 1.1.1-1 of the multimedia pack from KDE you may experience a bug that cause the sound not to cease when you exit kWinTV. For now i start xawtv and make it "force" the sound device to respond again.
kWinTV requires a C compiler and the QT library
and development files installed. If you installed them earlier
they are in the development category of the rpm packages, else
you find them on disk 1 of the RH6 CD set:
qt-1.44-6.i386.rmp
qt-devel-1.44-6.i386.rpm
Also install everything C related if you haven't already. (Apart from the sources (src).)
Now start a terminal window. (How to read files from DOS diskettes is described further down this page.) If you already have the kwintv archive in your homedir you write:
tar -zxvf kvintv-0.7.1.tar.gz
(unzip's and places in the right sub-dir's)
cd kwintv-0.7.1
Check out the README, the INSTALL-file and Makefile and edit according to your needs. There are two generations of the Hauppauge card and you should set card-type and possibly tuner-type in one of these files. Most Hauppauge cards will be auto-detected though, which is the default setting.
When the files are edited write
./configure
make
su
("su" without a login-name sets user to
superuser aka root. Provide password when prompted)
make install
./MAKEDEVICE
(MAKEDEVICE will create the required device "files" in /dev, with the correct filemodes and ownership.
Here some useless links to my kwintv and xawtv
configuration files, valid for the Norwegian cable operator Avidi.
The kwintv configfile must be located to a dir
called .kwintvrc and should be called "default.ch"
The .xawtv resides as a file in your homedir.
THE MODULES
Modules must be loaded before you can run the TV-application / TeleText etc.
videodev.o [the v4l basic videodevice module)
bttv.o [driver for Hauppauge cards]
i2c.o [interface to a bus thingie most
framegrabbers/TV-cards use]
tuner.o [the tuner-module: you might want to
switch channels]
For those with stero capable cards look for msp3400.o
Radio-tuners are also installed, but I'm not
blessed with one so haven't checked out that part.
A dependency between the required videodev.o and the i2c.o modules is already made. (As far as I remember) This means that when you load the bttv module, it auto-loads it's "friends" videodev and i2c.
In addition you must load the tuner-module with the required parameter for your tuner-type - for the Hauppauge WinTV/PCI bt848 TEMIC tuner it's type=0. It shouldn't be required to add this extra setting though.
To load, what you write (as user root) is:
/sbin/modprobe bttv.o
/sbin/modprobe -t misc tuner.o
exit
(exits the root-shell and you're back on your own
login)
cd
(changes directory to your homedir). Full path is
only needed if /sbin isn't in your path-statements. (To get a
quick overview over the variables set for your user, write "printenv".)
If you aren't already running the KDE desktop,
make sure you change to it. If you're out there in the dark on
commandline, write startx and when a desktop has appeared, open a
terminal window and write "switchdesk" and make sure it
is KDE you're using.
After a KDE session is running you write:
kwintv &
kWinTV will make a configuration dir in your homedir, .kwintvrc - where it later will store your channel settings and preferences in a file to read at startup. That "&" at the end tells the shell to run this as a background process - in effect "freeing" the shell-window for additional commands. If you don't add "&" the window is locked till you close it, Ctrl+C will then stop the running process.)
Now you should be up and running and can scan
for your favorite channels. Look around and enjoy.
You might want to read /usr/src/linux/Documentation/video4linux/bttv/INSTALL
to learn more about the driver. You should *definately* read
about quirks with the bttv driver.
TELETEXT / VIDEOTEXT AleVT
A very different look and feel and a simpler program than the Hauppauge app for MSWindows, but quicker.
I went through how to unzip, read README's and Makefile's above - the procedure here is even simpler : you don't have to ./configure this application, just check out the Makefile if changes are required and do a simple "make". Don't run "make install" - you keep this app in it's install-dir. (According to the author).
The bttv driver provided in RH6 is an old
version. Start AleVT from the dir you unpacked and ran make in
with this commandline to avoid warning-beeps:
./alevt -oldbttv
You'll want to make a kdelnk file for it, this
procedure is explained in the KDE helpfiles. Remember to give
full path since it's not in any of the default path statements.
| MODULES IN GENERAL |
Modules are drivers and a way to add functionality to the kernel. The modular concept allows you to keep the kernel small and load/unload modules as required - which prevents the system from being a memory hog. Most private users would prefer a kernel with some additional slack for modules, to allow them to just load an already existing module if a new device is added to the system. A kernel that's built to be capable of listening to a whole lot of modules isn't so much bigger than one that doesn't. A RedHat install will throw in heaps of "popular" modules - the kind it's likely a user could need at some point. This is done to save you the trouble of compiling a new kernel if you add a standard device to your computer later, but if you really want a sleek system you can of course compile a kernel that suits your system like a glove - no extras. The sourcefiles and HOWTO's for that are included in the distribution.
If you want the modules to load already during boot you can do that too of course, read up on runlevels and how Linux boot.
| QUIRKS in kwintv-0.7.1 |
1: paths
RedHat makes life pretty hard for KDE users - they've
changed the path for it so a KDE app like kwintv sets wrong path
to the icons (/opt/kde/share/icons). I guess I could have changed
this in the Makefile but at that time i wasn't aware of the
problem. kwintv install doesn't create that dir though - it just
expects to find it. My own lazy solution was a symbolic link and
a dummy directory structure should the event ever occur again.
After copying the icons in ~/kwintv-0.7.1/kwintv/icons to /usr/share/icons
the commands would be:
cd /
mkdir opt
cd opt
mkdir kde
cd kde
mkdir share
cd share
ln -s /usr/share/icons icons
"ls -la" now looks something like
this:
lrwxrwxrwx 1 root
root
16 Jun 1 02:39 icons -> /usr/share/icons
You know you didn't put any files there...but
write "cd icons"...and do ls -la again.
Symbolic links are powerful shortcuts.
2: Sound
In the options setup of the running application,
sound defaults to "CD". To adjust volume on the
WinTV card you should probably change this to "Line In".
| QUIRKS with bttv |
Ugly quirk to all bttv usage:
You risk ruining the eeprom chip on the Hauppauge
card if you use TWO applications utilizing the card simultanously.
This is a quirk related to the i2c driver, which can get unstable
and act up because various apps utilizing the card don't know
about eachother.
Thus, to watch teletext with AleVT you should
start kwintv, tune to the channel you want to browse videotext
from and then QUIT kwintv BEFORE starting AleVT.
The phenomena is further described in /usr/src/linux-2.2.5/Documentation/video4linux/bttv/README.
There's a utility added with xawtv to read the
eeprom settings and save to disk, and another utility to
eventually write the settings back to the EEPROM if things go
wrong. If you only want to copy the contents from the eeprom and
still have windows installed, you also find the contents of the
eeprom in device properties. (A paired hexadecimal annotation
like in "E1 02 F5 11" etc etc etc)
Cirrus Logic 5446 PCI cards and Trident:
These cards are probably best classified as
incompatible with the Linux drivers for now, even if they list as
compatible at Hauppauge and RedHat. The TV-app seems to "take
over the universe" and garble text in buttons and apps. This
bug was earlier found in several versions of Hauppauge's own
drivers. Hauppauge finally sorted it out for Windows. Before I
managed to compile a newer version of bttv I had bought a new TNT128
based card which works fine. I doubt the problem is solved yet
but if someone really really want to know I'll reinstall the GD5446
and test it.
Garble snapshot (1024x768)
RH6 bttv driver is old - how to compile a new
You may want a newer driver, 0.6.4 is out and
another version, bttv-0.6.4e is found at the xawtv page.
If it whines about your kernel not being modular
when you try to compile it:
-Install the linux sources (linux****src.i386.rpm)
-cd to /usr/src/linux
- as root: run xconfig and choose "modular",
then save and exit - and don't make a new kernel.
The bttv driver will now compile just fine. Pay
some attention to where the files are saved! There will be made
symbolic links to these files.
Reason for this needlessly awquard approach is
that the fresh sources don't indicate that you have a modular
kernel, and RedHat don't provide you with your original
configuration file after an install.
Then copy the FILES (not symbolic links) bttv.o,
i2c,o, videodev,o and whatever you might need to /lib/modules/2.2.5-15/misc/
If you "ls -ltr" in the drivers dir you
see the newest files list last.
You may want to rename the existing modules to
bttv.o.old etc before you do this stunt, or else you overwrite
them. Do make sure the modules aren't loaded (/sbin/lsmod to list,
/sbin/rmmod bttv to remove. (also videodev, tuner, i2c and other
files you may want to upgrade.)