Installation
- Boot from the CD. Make sure to install the network drivers
(3c59x), but this can only be done if the root partition was not mounted
as pre-formatted.
- On reboot, select the simple installation and don't select
anything. (You can get a list like this again by running `
tasksel `)
- The system is currently synced to the stable branch, but unstable
is much more up-to-date. So edit /etc/apt/sources.list to have:
deb http://http.us.debian.org/debian unstable main
contrib non-free
deb http://non-us.debian.org/debian-non-US unstable/non-US main contrib
non-free
Update the system by doing
apt-get update
apt-get dist-upgrade
- Now run `tasksel` or `deselect` and install X Windows.
(Don't install anything else yet, just in case it requires XFree86
3.3)
- Now install anything else that is needed
Core
|
|
Editors
|
vim
|
Applications
|
emacs
mozilla (needs 'non-US')
gimp
ghostview
|
Games
|
fortunes
|
Utilities
|
unzip
xloadimage
sysutils (dos2unix, memtest)
|
Other
|
sawfish
ssh (a much more secure way to telnet)
ttf-kochi-gothic (Japanese sans-serif font)
(ttf-kochi-gothic-naga10 has non-free glyphs)
ttf-kochi-mincho (Japanese calligraphic font) (see also
ttf-kochi-mincho-naga10)
|
Development
|
xlibmesa-dev (install before the NVidia drivers)
alsa-headers
libdvdread2
libgtk-dev
libjpeg62-dev
bison (unless you want C++ output from the bison++ installed by default)
libwxgtk2.2, libwxgtk2.2-contrib (for OpenGL), wxwin2.2 (for headers)
glutg3 (make a symlink for /usr/lib/libglut.so or -lglut won't find it)
|
Configuration
Booting
- (Jan 8, 2002) Somewhere along the line xdm got installed.
This is probably undesirable until you at least get X configured.
Init is configured with the symlinked scripts in /etc/rcn.d.
Runlevel two is the default, so delete /etc/rc2.d/S99xdm.
(Rename it if you are going to replace xdm with my custom xdm)
- (Jan 10, 2002) Fixed the booting off a floppy problem.
Since the BIOS detects /dev/sdb as 0x80 and /dev/sda as 0x81 I had
to tell LILO that. Also, I needed to put the boot sector on 0x80
(/dev/sdb) instead of /dev/sda. So my lilo.conf file is (changes
highlighted):
# Support large disks
lba32
# Tell LILO about the drive order
disk=/dev/sdb bios=0x80
disk=/dev/sda bios=0x81
# Install LILO where? (The MBR of the
drive at 0x80, e.g. /dev/sdb)
boot=/dev/sdb
root=/dev/sdb1
map=/boot/map
delay=20
vga=normal
default=linux
image=/vmlinuz
label=linux
read-only
- (Mar 16, 2002) Uninstalling gdm is rather difficult.
The uninstaller didn't work (just hung without using CPU time);
use 'dpkg -r -D 2 gdm' to figure out where the uninstall
script is and put echos until you find the problem (was in the
dp_uninstall line or something like that pretty early on). Re-run `apt-get
remove gdm`, remove the /etc/gdm directory.
Unfortunately, all the display manager startup scripts check the
contents of /etc/X11/default-display-manager , which is still
set to /usr/bin/gdm. Change this to /usr/bin/X11/xdm
(verify with `which xdm`) and it should now work. (It is
interesting that /etc/X11 appears to be a hard link to /usr/X111R6/lib/X11
and that /usr/lib/X11 is a symlink to the same place)
- (Mar 16, 2002) Finally got my xdm replacement ready for
installation. Copy it over the original executable (/usr/bin/X11/xdm).
Now copy all the images and objects.txt file to a subdirectory in /usr/lib/X11/xdm
and add
DisplayManager.objectFilePath:
/usr/X11R6/lib/X11/xdm/objects
(assuming you used objects as your subdirectory) to the xdm-config
file. Now make sure you have an /etc/rc2.d/S99xdm file.
Next go to the /etc/X11/xdm/Xsetup file and comment out
the xconsole command (xconsole looks pretty ugly).
Finally, unless you want something different to happen when you
use startx or xdm , make a symlink from ~/.xinitrc
to ~/.xsession , as the Xstartup script sources .xsession.
- (Apr 5, 2002) In order to get halt to turn the
power off is to load the apm module into the kernel. This
really only needs to happen just before the halt command, but
it's easiest to just the line 'apm' in your /etc/modules
file and have it always in the kernel (it's only 8k anyway).
- (July 18, 2003) Got my RMA'd hard drive back from
IBM/Hitatchi. Copied the filesystem over, editied /etc/fstab, rebooted and
everything worked!
find /src -mount | cpio -pdmuv dest
X Configuration
- (Jan 8, 2002) Run xf86config. This will generate
/etc/X11/XF86Config, which needs to be copied to /etc/X11/XF86Config-4.
- (Jan 9, 2002) This is a
good page on configuring the wheel
- (Jan 9, 2002) The Logitech Optical Mouse (M-BD58) seems to have
problems being configured (at least as a PS/2 mouse). The
following works:
Option
"Device" "/dev/mouse"
Option
"Protocol" "MouseMan"
Option "ChordMiddle"
This method will not detect the third mouse button or the wheel.
A web site suggested
Option
"Protocol" "IMPS/2"
Option
"Device"
"/dev/psaux"
Option
"SampleRate" "60"
Option
"BaudRate" "1200"
Option
"Buttons" "5"
Option
"ZAxisMapping" "4 5"
Option
"Resolution" "100"
which works, until you resize a window, at which point the mouse hangs.
(The PS/2 sampling rate can be increased to 100, or even 125,
since this mouse is a USB mouse and USB samples at 125.) At all
sampling rates, moving the mouse quickly causes the cursor to jump
erratically, which isn't a problem with the first settings.
- (Jan 15, 2002) Install xlibmesa-dev. This will
install Mesa, which is undesirable, so it needs to be done before the
NVidia drivers are installed. (Otherwise you will need to
re-install the GLX drivers) This package does need to be installed
for any compiled programs that want to use OpenGL.
- (Jan 12, 2002 gcc-2.95) Download the GLX and kernel drivers
from NVidia. Apt-get the kernel headers (kernel-headers-2.4.16-k7
for me), which will be installed in /usr/src/kernel-headers-2.4.16-k7
(for me). As root, make the kernel driver with `make install
SYSINCLUDE=/usr/src/kernel-headers-2.4.16-k7/include` since the
makefile expects the kernel headers to be in /usr/src/linux.
Now (still as root) do `make install` in the GLX
directory.
- (Jan 12, 2002) In XF86Config-4, make the following changes:
# Load "glx"
-->
Load "glx"
Load "dri"
-->
# Load "dri"
Load "GLcore"
-->
# Load "GLcore"
Driver "nv"
-->
Driver "nvidia"
- (Jan 20, 2002) The suggested IMPS/2 lines given above
actually work if you don't have gpm in repeater mode. Run gpmconf
and turn off repeater mode (protocol "none").
- (Jan 20, 2002) The Wacom drivers are apparently installed
by default by Debian, but are available from
MandrakeSoft. The HOWTO
is excellent.
- (Jan 27, 2002) TV out works as advertised. Connect
the output of the video card to the TV and then boot up and the driver
will automatically put the console on the TV. X requires a bit of
configuration. Create a screen specifically for TV out This
screen should use the TV out monitor definition:
Section "Monitor"
Identifier "Television"
HorizSync 30 - 50
VertRefresh 60
EndSection
The 2313 version of the NVidia drivers has a bug in the XVideo
extension that causes a blue line to show up. The best solution is
to run mplayer in OpenGL mode, but you don't get good framrates unless
you run in 16 bit, 640x480 resolution, so the TV out screen definition
should be set up appropriately. It is important that the actual
virtual desktop size be 640x480 otherwise it seems like 800x600 data is
still transmitted across the bus.
# Screen definition for TV-Out
Section "Screen"
Identifier "tv"
Device
"GeForceDDR TV"
Monitor
"Television"
DefaultDepth 16
Subsection "Display"
Depth 16
Modes
"800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes
"800x600" "640x480"
ViewPort 0 0
EndSubsection
EndSection
- (Aug 6, 2002) Installed Japanese support. I used `tasksel`
to select the Japanese task, but if this didn't work, installing
kinput2-common, kterm, ttf-xtt-wadalab-gothic, ttf-xtt-watanabe-mincho,
watanabe-vfont, x-ttcidfont-conf xfonts-a12k12, xfonts-intl-japanese,
xfonts-intl-japanese-big, xfonts-kappa20, xfonts-marumoji,
xfonts-shinonome, locales should get just about everything.
- (Aug 6, 2002) Make sure that the locales got generated;
check that the locales you selected are actually listed in /etc/locale.gen.
If not, either add them manually and run `locale-gen` or
run `dpkg-reconfigure locales`.
- (Aug 6, 2002) The cannaserver isn't running by default, so
if you want to test it you will need to do `/etc/init.d/canna start`.
Also, the wnn server starts by default and there isn't much use
in having two input method servers, so get rid of it by doing
`mv /etc/rc2.d/S20freewnn_jserver
/etc/rc2.d/_S20freewnn_jserver`
- (Aug 6, 2002) Add the following to ~/.Xdefaults (for Debian
it's supposed to be ~/.Xresources, but apparently that's sort of
non-standard):
*.inputMethod: kinput2
*.preeditType: OverTheSpot
Kinput2*useOverrideShellForMode: true
Kinput2*conversionStartKeys: Shift<Key>space
Now add the following to .xinitrc (or .xsession, or
whatever runs when X starts):
xrdb -merge ~/.Xdefaults
kinput2 -kinput -canna -xim &
Finally, we can set up our environment variables in ~/.login
(or ~/.bashrc if you aren't using tcsh)
setenv LANGUAGE
"C" # UI Language
setenv LC_CTYPE "ja_JP.eucJP" #
Character handling functions
setenv LC_TIME
"C" # Display of time
setenv LC_NUMERIC
"C" # Display of numbers
setenv LC_MESSAGES
"C" # Same as LANGUAGE only less commonly used
setenv LC_COLLATE "ja_JP.eucJP" # Affects
glob bracket ranges and sort order
setenv LC_PAPER
"C" # Default paper size
setenv LANG "ja_JP.eucJP" # Default locale for unset variables
setenv XMODIFIERS "@im=kinput2" # For apps
that don't use the resources
(I am assuming you want an English system with the ability
to input Japanese; if not change the "C" locales to something
else). "ja_JP.eucJP" is the multibyte locale; "ja_JP.utf8"
is the locale to use if you are wanting to use Unicode. You can
probably also get by with using "ja" or "ja_JP" as they are likely to be
aliased to "ja_JP.eucJP".
- (Aug 6, 2002) Potential problems:
- "Locale not defined" error messages: This is either
because your locales weren't generated or because you spelled your
locale wrong.
- Shift-space doesn't start conversion: Check that the
cannaserver is running (`cannastat`), check that kinput2 is
running with the right parameters. Check that XMODIFIERS is set
properly. Check with a fresh execution of xterm or mozilla (`kterm
-xim` works, too).
- (Aug 6, 2002) This web page
gives a bunch of simple configuration instructions.
- (Aug 8, 2002) xterms and kterms will work when X is started
via startx, but not with xdm (although mozilla works
with both)
- (Aug 10, 2002) The problem with xterms not working when
started from xdm is that my .xinitrc file doesn't set the locale
variables, so anything started from that script (i.e. my terminals)
don't get input, but anything started from the shells do (since .login
ran).
- (Apr 14, 2002) Installed the latest nVidia drivers (4349)
which come with a nice installation utility. However, at this
point Debian hasn't completely switched over to GCC 3.2; the
kernel is still compiled with GCC 2.95. To check, do `cat /proc/version`, and if it
is different than `gcc -v`,
temporarily point the /usr/bin/gcc
symlink to the right version. The usual include path problems
exists, so do `./NVIDIA-Linux-x86-1.0-4349.run
--kernel-include-path=/usr/src/kernel-headers-2.4.20-1-k7/include`.
- (Apr 14, 2002) This installer doesn't seem to add itself to
the modules.conf system. So add /etc/modutils/nvidia with the
line
alias
char-major-195 nvidia
Be sure to `update-modules; depmod -a`.
USB
- (Jan 17, 2002) It looks like USB is available with the
Debian kernels. Someone on the Debian lists suggested that the
Logitech optical mouse needs the following modules: usbcore,
usb-uhci, input, mousedev, hid.
Window manager configurations
- (Jan 9, 2002) Change the modifier key from Meta
(Windows-Key) to Alt. (Sawfish >> Bindings)
- (Jan 9, 2002) Add Alt-1("A-1")through Alt-4 ("A-4") to be
the change workspace keys (Sawfish >> Bindings)
- (Jan 16, 2002) xloadimage -onroot -shrink -center
-border black image will set the background image (
-onroot ), shrink to the size of the screen if necessary (
-shrink ), will not tile it (-center), and will place a
black border around it ( -border black).
- (Jan 17, 2002) Actually, yesterday's comments don't work.
-shrink needs -fullscreen to work if -onroot
is present, and -center causes -shrink to be ignored.
So do
xloadimage -onroot -fullscreen -shrink -border black image
- (Apr 9, 2002) Discovered how to add menus in Debian.
Add a file (any name) to ~/.menu.
The format should be "?package(local.mystuff):
needs=x11 section=Menu/Path title="title" command="command".
If the command is a console app, then needs=text should be used and a
terminal will be spawned automatically. The command should not
have an ampersand at the end of it, and the menu path is assumed to
start from the "Programs" menu, so don't include "Programs" in the
path. Then run update-menus
and reload your window manager. More information is given in the documentation.
System administration
- (Jan 9, 2002) Change the shell: Root will need to add /bin/tcsh
to /etc/shells . Then the second user created during the
install will need to `chsh -s /bin/tcsh username ` to change the
shell. (Make sure /bin/tcsh exists, and if not, install
it)
- (Jan 12, 2002) Apparently this file gets overwritten
somehow. Apparently only ash, bash, csh, and sh are supposed to go
in /bin; tcsh and zsh go in /usr/bin. So just use
/usr/bin/tcsh for chsh instead.
- (Jan 17, 2002) While compiling xloadimage, I discovered
that /usr/X11R6/include/X11/Xlib.h:75 has a comment that directs you to
replace the wchar_t typedef with that for your system. So I used
"#include <stddef.h>" and got rid of the re-definition of wchar_t
error.
- (Jan 17, 2002) It seems that there is some problem with the
libpng3 library right now (stuff crashes). So I symlinked libpng3
to the version 2 of the library. This ought to be fixed
eventually, though.
- (Jan 19, 2002) Replace nvi with vim: ` apt-get
remove nvi` then `apt-get install vim `
- (Jan 26, 2002) The default installation uses bison++, which
won't compile Ephemeris, since it will generate a C++ parser if
__cplusplus is defined, which it has to be, or the included headers
won't work. So install bison instead.
- (Feb 3, 2002) /etc/ld.so.conf should include /usr/local/lib,
as that is where wxWindows will put its libraries.
- (Feb 12, 2002) Installed Flash plugin to Mozilla.
Download the plugin from
Macromedia's site, copy ShockwaveFlash.class and libflashplayer.so
to /usr/lib/mozilla/plugins. The plugin seems to hang
mozilla if another program is using audio.
- (Apr 30, 2002) Debian's VIM doesn't have syntax
highlighting turned on by default. Edit /usr/share/vim/vimrc
and find the following lines and uncomment the last three:
" Vim5 and later versions
support syntax highlighting. Uncommenting the next
" 3 lines enables syntax highlighting by default.
if has("syntax") && &t_Co > 2
syntax on
endif
Now make xterms have all 16 colors that XFree86's version gives them
(add the bolded text):
" We know xterm-debian is a
color terminal
if &term =~ "xterm-debian" || &term =~
"xterm-xfree86" || &term =~ "xterm"
set t_Co=16
set t_Sf=^[[3%dm
set t_Sb=^[[4%dm
endif
You might want to uncomment some of the lines at the bottom, too.
- (Apr 30, 2002) It might be useful to copy this
guy's tab-size independent CC-Mode modifications. Copy them
into /usr/share/emacs/21.1/lisp/progmodes. Then
byte-compile everything with
emacs -batch -f batch-byte-compile *.el
- (May 1, 2002) Actually, there are bugs in the new files
that cause wierd things to happen to the CC-mode configurations, so it's
probably best to leave things just as they are.
- (Dec 2, 2002) Debian puts ghostscript's Type1 fonts in /usr/share/fonts/type1/gsfonts
but not in /usr/share/ghostscript/fonts.
If gs (or gv) complains that about
invalid fonts because it can't find them, try `ln -s /usr/share/fonts/type1/gsfonts
/usr/share/ghostscript/fonts`. That didn't work for me, so
I had to add it to the GS_LIB variable in the shell configuration files
so that all users would get it:
/etc/bash.bashrc: export
GS_LIB=/usr/share/fonts/type1/gsfonts
/etc/csh.login: setenv GS_LIB
/usr/share/fonts/type1/gsfonts
- (Jan 29, 2003) boost/format.hpp wants ostream, ios, and
locale which gcc 2.95 doesn't provide.
- (Feb 7, 2003) Static IP settings are stored in /etc/network/interfaces.
Note that when changing a static IP address, /etc/resolv.conf probably needs
to be changed, too.
- (Feb 13, 2003) Upgraded to wxWindows 2.4. Used
configuration commandline `./configure
--with-gtk --with-opengl`. Note that to get the proper
libraries in makefiles you will probably want to use `wx-config --cxxflags` or `wx-config --libs` depending on
whether you are linking or compiling at the time.
- (Feb 28, 2003) I discovered that the margins of the DeskJet
672C are fairly wide and assymetrical:
top:
.04 inches (1 mm)
left: .25 inches (6. mm)
bottom: .59 inches (14.9 mm)
right: .25 inches (6.4 mm)
(This was at HP's
support
site). If you are printing PDFs which are formatted assuming
certain margins (which most are), you will probably want to deselect the
"fit to page" option, unless you alter the PPD file's margins (see
here). Acrobat
Reader will shrink the page to the printable size, giving double
margins. This is particularly bad if you have done some
illustration (with CorelDraw, for example) and already have everything
the correct size.
- (Apr 8, 2003) Daylight Saving Time doesn't work unless your
computer is set to use UTC time. To change this, edit /etc/default/rcS and set the
variable UTC to yes. Reboot.
- (Apr 22, 2003) The first line of /etc/motd is rewritten on
every boot by default. To change this, set EDITMOTD=no in /etc/default/rcS.
- (Apr 22, 2003) The default /etc/issue gives a little too
much information away. Using "\s (\n) \l<blankline>" will print out
"Linux (quasar) pty6<blankline>"
before the login prompt.
- (May 31, 2003) To install CUPS, get the cupsys package. Now
configure it with the web interface by going to http://localhost:631/admin.
Apache
- (Jan 28, 2003) Installed Apache 1.3 (Debian didn't seem to
have packages for 2.0). The default setup puts the site web site
at /var/www. I
changed this to /opt/www:
DocumentRoot:
/opt/www
<Directory /opt/www> ...
<IfModule mod_perl.c>
Alias /perl/ /opt/www/perl/
I also wanted to change the cgi-bin directory to
/opt/www/cgi-bin:
ScriptAlias:
/cgi-bin/ /opt/www/cgi-bin
<Directory /opt/www/cgi-bin> ...
- (Jan 28, 2003) Debian's installation of Apache includes
suexec by default (despite the Apache projects recommendation
otherwise). It's easiest to get CGI scripts working if you disable
it (by renaming /usr/lib/apache/suexec).
- (Jan 28, 2003) All CGI scripts must start with "Content: text/html\n\n" or they
generate an "internal server error" page and a "premature end of script
headers" entry in the error logs.
- (Jan 28, 2003) To test CGI scripts that require parameters
do `perl script.pl param=value`,
or if the script waits for input, type the param/value pairs. I
think if the paramaters do not have an = in them that they may be passed
in the QUERY_STRING environment variable.
- (Jan 28, 2003) If the author of the CGI script had Perl
installed in some non-standard place (like /usr/local/bin/perl) that will
cause Apache to return a bogus file not found error; it really
should be "shell not found" or something like that.
- (Aug 16, 2003) To enable server side includes, edit
/etc/apache/httpd.conf and make sure that
- The LoadModule
includes_module /usr/lib/apache/1.3/mod_include.so line isn't
commented out.
- The directory you are putting the files in has a <Directory> entry and Options Includes or Options IncludesNoExec is in it
somewhere.
- You have the following lines:
AddType text/html .shtml
AddHandler server-parsed .shtml
Make sure that your files end in .shtml, and that you use the
form <!--#include virtual="file"-->.
Samba
- (Feb 25, 2003) Debian's smb.conf file works fine, but you
need to generate the smbpasswd file when the installer prompts for it.
This is because the smb.conf has encrypt passwords = yes, which
requires the use of the smbpasswd file. In case you didn't
generate the smbpasswd file, do
cat
/etc/passwd | mksmbpasswd > smbpasswd
Even though all users are initally
frozen, it's probably a good idea to delete all the "root", "bin", etc.
users. Next, for each user that you want to be able to connect, do
smbpasswdusername
- (Feb 25, 2003) The above system works fine if you are in
control of the users. If not, you will need to disable encrypted
passwords and use a different password server.
Sound
- (Jan 11, 2002) Decided to use ALSA, since it seems to be the
way things are going.
- (Jan 11, 2002) Search the Debian site to find out what
alsa-modules packages they have. For an Athlon, pick a "k7"
kernel. Now apt-get that alsa-modules package, as well as
alsa-base and alsaconf. Run alsaconf afterwards.
- (Jan 11, 2002) Alsaconf didn't work for me (gave me
"modprobe: can't locate module snd") and naturally there is no helpful
information anywhere. However, if you do `insmod soundcore`, then you can
`insmod snd`.
Ideally, I think you'd try `modprobe
snd-card-ens1371` (for a SB PCI 128), but this failed with
"init_module: no such device".
- (Jan 11, 2002) Maybe these commands from
here are needed?
alias char-major-116 snd
alias snd-card-0 snd-card-ens1371
- (Jan 11, 2002)
This page lists a more complete modules.conf.
- (Jan 11, 2002) Oops, it turns out that my SB PCI 128
uses the ens1370 module! A `modprobe snd-card-ens1370`
loaded correctly.
- (Jan 11, 2002) Once you do that, you need to do `amixer
set PCM 100% unmute` and `amixer set Master 75% unmute` to
get any sound.
- (Jan 12, 2002) To get ALSA to start on boot you need to
have the following in /etc/modutils/alsa:
# ALSA sound stuff
alias char-major-116 snd
options snd snd_major=116 snd_device_mode=0660 snd_cards_limit=1
snd_device_gid=29 snd_device_uid=0
alias snd-card-0 snd-card-ens1370
options snd-card-ens1370
# OSS sound stuff
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
Do not use the "snd_id=card0" option that alsaconf puts in its config
file (/etc/alsa/modutils/0.5)for
snd-card-ens1370 (e.g. "options snd-card-ens1370 snd_index=0
snd_id=card0"), as this will cause ALSA (or insmod) to fail with a
message to the effect of "ens1370.c: 1240: Can't find this card" or will
just cause insmod to fail with the usual "init_module: No such
device".
Also, make sure that the alias for snd-card-ens1370 is "alias
snd-card-0 snd-card-ens1370" not "alias sound-card-0 snd-card-ens1370"
as /etc/init.d/alsa looks
for the regexep "snd-card-[0-9]". Similarly, sound-slot-0 must be
aliased to "snd-card-0" not "sound-card-0". (If the last one is
not done then OSS programs won't get their modules loaded automatically,
leading to things like not being able to find /dev/dsp)
After you set up the modules file make sure to remember to do
update-modules
depmod -a
- (Jan 12, 2002) The snd_device_gid is important and should
be whatever the "audio" group-id is (29 by default on Debian). To
let non-root users use the sound card, add the desired users to "audio"
by
adduser user audio
- (Jan 15, 2002) Install alsa-headers for any
compiled programs that want sound.
- (Nov 28, 2002) Something I installed broke ALSA (I think it
was libwine-alsa). Naturally the ALSA package is broken as usual.
Upgraded the kernel, and headers. Downloaded the
alsa-modules .deb (there's a button for it on the web page). If
the package is broken, as root do
# Unpack the files, since we
can't properly install them
cd /var/cache/apt/archives
dpkg --unpack alsa-modules-...
cd /lib/modules/x.y.z-k7
# Move the files out of the way, have apt-get
repair the system,
# them move them back. At this point, we have the files but
# not the package, so upgrades will still work.
mv alsa _alsa
apt-get -f install
mv _alsa alsa
- (Nov 28, 2002) ALSA rc4 removed the "snd_" from the
beginning of the snd.o module's options (e.g. "snd_major" became
"major"). The /etc/modutils/alsa file needs to be changed
accordingly and `update-modules` run. Note that if you
test the new settings with `modprobe ens-1370`, you must
use amixer to unmute the channels (see above). Changing
their volume with alsamixer will not work!
- (Feb 15, 2003) Unfortunately, I uninstalled alsa-base, which uninstalled
init script, so ALSA needs to be manually run (including manual unmuting
channels). This is a pain, and since you don't need to actually
have the ALSA packages installed, you can just make sure that alsa-base in installed. It
seems that rc4 made some other changes, too, as you also need to change "snd-card-ens1370" to "snd-ens1370" in /etc/alsa/modutils/0.9 and run update-modules.
DVD setup
- (Jan 12, 2002) The most common DVD players appear to be Xine , MPlayer, VideoLan , Ogle , OMS.
- (Jan 12, 2002) Ogle has a Debian package, ogle and
ogle-gui. Download those, install them. Then run the
included /usr/share/doc/ogle/examples/install-css.sh .
- (Jan 12, 2002) Finally, make a /dev/dvd symlink for
libdvdread (the symlink should point to the DVD drive).
ln -s /dev/hda /dev/dvd
MPlayer
- (Jan 15, 2002) Ogle doesn't have de-interlacing, so the
fast-moving parts of the image tend to have lines in them.
MPlayer, on the other hand, does have de-interlacing. It
also has beautiful subtitles!
- (Jan 15, 2002) Ogle isn't very big, and it might be
worthwhile to download Ogle just for the ease of installing libdvdcss.
- (Jan 15, 2002) Download the source. Make sure that
libdvdread-dev and libgtk-dev are installed. Run ./configure --with-gui,
then do make . (And of course, make install .)
As of 0.6, ALSA 0.9 didn't work, so just use OSS support
(according to the documentation).
- (Jan 15, 2002) If you want to run with the gui (a bit
iffy), download a skin (available on the downloads page) and copy
it into /usr/local/share/mplayer/Skin/ skin-name .
Then make /usr/local/share/mplayer/Skin/default a symlink
to that skin. (Or you could just copy it to the default
directory in the first place) Start mplayer with the -gui option.
- (Jan 15, 2002) Subtitles need to have the font installed or
they won't show up, and won't give you error messages. Download a
font package from the downloads page, unzip it. Pick the font size
you want (18 pt in this example) and then
mkdir ~/.mplayer/font
cp arial-18/* ~/.mplayer/font
- (Jan 15, 2002) Now you can play movies. The most
useful options are
-dvd 1
|
Seems to be needed
|
-alang ja
|
Selects a Japanese language track.
(This could be other things, like "en")
|
-slang en
|
Selects English subtitles
|
-fs
|
Full-screen. (There isn't a toggle
key, apparently)
|
-osdlevel 0
|
Defaults to putting a timer on the screen
(level 2); 0 turns it off
|
-vo gl2
|
Uses OpenGL video. Avoids the NVidia
blue-line bug.
|
-pp 0x2007f
|
De-interlaces and does some filtering.
You could also use -pp 0x20000
This still helps, even when using TV out.
|
- (Aug 11, 2002) I did some benchmarking on my DVD drive with
hdparm. It looks like the default setting (dma off,
unmasq irq on, 32 bit I/O transfer) gives 3.36 MB/sec. Turning on
DMA gives 5.70 MB/sec. However, changing to 32 bit with sync I/O
transfer doesn't help, nor does using a different DMA mode. The
biggest increase is probably through multicount, which my drive doesn't
support. That's probably why it was so cheap. So it looks
like
hdparm -d 1 /dev/cdrom
Is as good as it's going to get. Still, it does double the
transfer rate. There's a good
page at O'Reilly's site with a good explanation.
- (Apr 16, 2003) The .90 release of MPlayer needs --enable-gui and --enable-largefiles. The
GUI is not very functional; the preferences dialog hangs.
TV tuner
- (Aug 15, 2002) Bought AVerTV Stereo TV tuner. Place
in PCI slot, then connect the audio output on the tuner card to the line
in on the sound card. On the SB PCI-128 the line-in is the
farthest input from the line out. (Or at least that's where
the input that works is).
- (Aug 15, 2002) The required drivers already ship with
Debian; just do `modprobe bttv`.
- (Aug 15, 2002) Make sure that X is using both the DGA
extension and the Video4Lin drivers. Change
SubSection "extmod"
Option "omit xfree86-dga" # don't
initialise the DGA extension
EndSubSection
to
Load "extmod" # A whole bunch
of useful extension, including DGA
Load "v4l" # Video4Lin
extension
- (Aug 15, 2002) Now set the line input to something besides
ALSA's default mute with alsamixer.
- (Aug 15, 2002) Since /dev/video is only readable
by root or users of the group "video", for each user that you want to be
able to watch video, do
useradd username video
- (Aug 15, 2002) At this point you will want to install some
video programs to test everything out. The "xawtv"
package provides a pretty decent TV viewer. Specify NTSC as the
video format if you live in the U.S.
Applications
- (Jan 18, 2002) Tried out kword. It looks pretty nice,
but it doesn't load up Word's tables very well and the lists aren't
indented properly. Has nice options for printing, including
PostScript and PDF.
- (Jan 20, 2002) Tried out OpenOffice 6.41. It looks
pretty nice; it opened up my (simple) table very nicely.
Indenting looked good. Printing options looked pretty
rudimentary, though. (The executable's name is soffice )
- (Sept 5, 2002) mp1e is a good MPEG-1 encoder. At 4.7
Mb/s it requires about 30 MB/min for 720x480 and excellent quality for
cartoons (unless it is a fast-moving scene, in which case some JPEG
artifacts are visible in the stills). AVI/Quicktime is about twice
as large. CPU usage is about 50% when running.
- (Sept 5, 2002) In order to compile GOPchop you need
to install mpeg2dec, libmpeg2-1-dev, libcpuaccel0-dev. Now you
need to download mpeg2dec and compile it. Copy include/*.h to
/usr/include/mpeg2dec and libvo/libvo.a to /usr/lib (the configure
script seems to ignore the --with-libs and --with-include parameters).
It appears to load a 2 GB MPEG-1 file really slowly (it got
about 15% in 20 minutes). Compiling with gcc 3.2 didn't seem to
make much of a difference.
- (Sept 5, 2002) Video information seems pretty sparse.
Here are are number of useful sites
- mp1e. (Debian package works) Good, fast MPEG-1
encoder.
- mpgtx.
(Debian package works) Splits, joins MPEG files. Works ok,
but is pretty much guess and check as its times don't agree with
MPlayer's. Version 1.3 produces more playable output that (the
previous version would sort of fade in to the picture, only the fade was
sort of in squares). The shell needs to have quotes around the
brackets (e.g. `mpgtx -s source.mpg "[m:ss-m:ss]"
-b out`)
- vcr. Another encoder. Looks kind of nice, but
Debian's packages don't work and I couldn't get it to compile.
- dvr. (Debian's packages don't work) Nice gui tool, but
everything encodes too slowly.
- ffmpeg. Very
fast, but lousy voice synchronization. Therefore, pretty unusable.
- sampeg.
Haven't tried this one.
- mjpegtools.
(Debian package works) The encoder, lavrec, works nicely but
doesn't produce MPEG.
- libmpeg. UC-Berkeley library for decoding MPEG-1.
Can only process sequentially.
- libsmpeg. Loki's MPEG-1 decoder.
- libmpeg2.
Library for decoding MPEG-2.
- libavcodec. Included with ffmpeg. Pretty thorough,
nice API.
- GOPchop.
Looks like exactly what I want, but horrendously slow (at least
with MPEG-1)
- This guy
investigated a bunch of programs while trying to hack his TiVo.
- (Sept 22, 2002) Using bzip2 compression on a video file
doesn't help much (5% compression: 10 M on a 210 M file)
- (Apr 17, 2003) Tried out the BasiliskII
Mac emulator. It works pretty well, but sound doesn't appear to
work and the emulation is pretty fast so games like Crystal Quest are
sort of hard to play. There aren't any good installation
instructions except for this
site. Basically you copy his boot disk image, format a hard
drive with BasiliskII, then copy over System 7.5.3 (available from Apple)
over. If you just want to play games, though, his boot disk is
just fine.
Development
- (Feb 3, 2002) The Debian packages leave out setup.h.
Presumably the development package, which does include it, solves
that problem.
- (Feb 3, 2002) If you get errors with fontutil.h saying then
add this to setup.h
#define
__WX_GTK__ 1
- (Feb 3, 2002) If you compile everything from scratch, make
sure that /usr/local/lib is in /etc/ld.so.conf...
- (Mar 8, 2002) Compiling xdm requires that you have the PAM
developement libraries installed (e.g. libpam0g-dev) otherwise you will
get errors about not finding securit/pam_appl.h.
Wine
MS Office 97
- Word appears to work nicely with Wine 20021031.
- Install the wine and the libwine-print
(contains the winspool.drv that Word needs) packages.
- Install the MS TrueType fonts with the msttcorefonts
package. This package appears to put them in /usr/share/fonts/truetype,
which seems a bit odd but it works just fine.
- Either copy or symlink the TrueType fonts to the fake windows <windows>/Fonts
directory or, better, add the following to ~/.wine/config:
[FontDirs]
"1" = "/usr/share/fonts/truetype"
This will ensure that Wine finds the fonts. Otherwise it will use
the X11 fonts, which have different metrics and will mess up your page
layout.
- Word will not save documents unless you use the native ole32.dll
and rpcrt4.dll (available from here). Copy the (Win98, not
2k) DLLs to <windows>/System and add the following
to ~/.wine/config:
[AppDefaults\\WINWORD.EXE\\DllOverrides]
"ole32" = "native"
"rpcrt4" = "native"
- There are some problems, though: cut and paste gives out
of memory errors, moving text doesn't work, and bullets (and other
symbols, like smileys) show up as boxes.
- (Feb 8, 2003) A simple workaround for the bullet problem
for printing is to print to a PostScript file, then substitute
occurrences of "MT-Extra-Regular findfont\n" with "Times-Roman
findfont\n" and substitute "/g0000" with "/bullet".
Printing
- (Jan 14, 2003) Printing in Wine is done through the
PostScript driver. It requires three things to be setup properly.
1. First, the LPTn: port must have a proper command
setup in ~/.wine/config.
For example
[spooler]
"LPT1:" = "| lpr -P hp672c"
"LPT3:" = "/home/xerxes/tmp/print.ps"
LPT1: will print
to the hp672c print and LPT3: will print to the file specified.
2. Next we need to add them to the Registry. Supposedly you
can do `
regapi setValue <
/usr/src/wine/documentation/psdrv.reg `, but Debian
doesn't ship this file. I copied the following from a the CVS
patch
archive:
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Printers\name]
"Attributes"="dword:00000000"
"Default Devmode"=
"Name"="name"
"Port"="LPTn:"
"Print Processor"="WinPrint"
"Printer Driver"="PS Driver"
"Priority"="dword:00000000"
"Start Time"="dword:00000000"
"Status"="dword:00000000"
"Until Time"="dword:00000000"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Printers\name\PrinterDriverData]
"PPD File"="/unix/path/to/PPD/file"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Printers\name\PrinterDriverData\FontSubTable]
"Courier New"="Courier"
"Arial"="Helvetica"
"Helv"="Helvetica"
"Times New Roman"="Times"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Environments\Windows
4.0\Drivers\PS Driver]
"Configuration File"="WINEPS.DRV"
"Data File"=""
"Driver"="WINEPS.DRV"
"Version"="dword:0a000000"
"Datatype"=""
"Dependent Files"=""
"Help Files"=""
"Monitor"=""
The last entry (PS Driver) is common to all printer files and need be
added only once, not per printer.
3. The last thing to do is add them to win.ini:
[devices]
name=WINEPS,LPTn:
[PrinterPorts]
name=WINEPS,LPTn:,15,45
If you want to make the printer the default printer, add (or change)
[windows]
device=name,WINEPS,LPTn:
- (Jan 14, 2003) Theoretically CUPS printers are detected
automatically but that didn't seem to happen.
- (Jan 14, 2003) Created a small Perl script ~/bin/AddWinePrinter.pl to ease
this.
Useful pieces of information
- lsmod lists modules (same as ` cat /proc/modules `),
insmod inserts modules, depmod creates module dependencies, after which `modprobe
module ` can be used (automatically loads modules in the right
order)
- If you need to add anything to /etc/modules.conf in
Debian, you should add the appropriate stuff to a file (your choice of
name) to /etc/modutils and then run update-modules .
- Group ids are stored in /etc/groups .
- Default settings for X Windows programs are stored in /usr/lib/X11/app-defaults
and are overriden by .Xdefaults.
- Signals (e.g. segfaults) are not translated to C++ exceptions
(signals are asynchronous--can happen at any time, exceptions are
synchronous).
- flex seems to choke on files that have \r\n as
their EOL, so run dos2unix on them first!
- Useful tools for memory usage checking: free,vmstat,top
. According to the top manpage, each process counts its
libraries, so if a program has multiple processes, the libraries could
get double-counted. Also, the "cache" field appears to mean "disk
cache". On my current system (384M RAM, with Emacs, Mozilla .9.7,
two XTerms, and gtop running), vmstat re ports that I have 30M
free and 256M in cache, leading me to the conclusion that I am using
about 98 M, despite top listing five mozilla processes at 30 M
each (total of 150 M) and X using 184 M of memory (it appears that the
video card's framebuffers or, more probably, the AGP portal size) are
counted, each about 64M). (The resident size of X is more about 18
M, which is more believable)
- X resources can live either in .Xdefaults or .Xresources,
I'm not sure what the difference is. When you edit the file,
though, you need to run `xrdb -merge file` to have the
changes activated.
- ldd lists the libraries a program is linked to.
- lsof lists open files.
- iso can be verified
for correctness by mounting them via loopback: `mount -o loop file mountpoint`
Personal Setup
" XFree86's xterm can do 16
colors, but Debian's /usr/share/vim/vimrc
" doesn't recognize this...
if &term =~ "xterm"
set t_Co=16
set t_Sf=^[[3%dm
set t_Sb=^[[4%dm
endif
" Set custom colors
" You can get a list of colors with
"
:help cterm-colors
" And a list of possible groups with
"
:help group-name
:highlight Comment
ctermfg=DarkGreen
:highlight Constant ctermfg=Magenta
:highlight Identifier ctermfg=White
:highlight Statement ctermfg=Grey
:highlight PreProc
ctermfg=DarkMagenta
:highlight Type
ctermfg=DarkBlue
:highlight Special
ctermfg=DarkMagenta