Debian Configuration Log

Home Computers Writings Trips

Installation

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
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

# 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

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.
find /src -mount | cpio -pdmuv dest

X Configuration

# Load   "glx"           -->                Load   "glx"
Load    "dri"            -->                # Load  "dri"
Load    "GLcore"         -->                # Load  "GLcore"
Driver  "nv"             -->                Driver "nvidia"
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
`mv /etc/rc2.d/S20freewnn_jserver /etc/rc2.d/_S20freewnn_jserver`
*.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".
alias char-major-195 nvidia

Be sure to `update-modules;  depmod -a`.

USB

Window manager configurations

xloadimage -onroot -fullscreen -shrink -border black image

System administration

" 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.
emacs -batch -f batch-byte-compile *.el
/etc/bash.bashrc:    export GS_LIB=/usr/share/fonts/type1/gsfonts
/etc/csh.login:      setenv GS_LIB /usr/share/fonts/type1/gsfonts
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.

Apache

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> ...
    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

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

Sound

alias char-major-116 snd
alias snd-card-0 snd-card-ens1371
# 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
adduser user audio
# 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

DVD setup

ln -s /dev/hda /dev/dvd

MPlayer

mkdir ~/.mplayer/font
cp arial-18/* ~/.mplayer/font
-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.
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.

TV tuner

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
useradd username video

Applications

Development

#define    __WX_GTK__    1

Wine

MS Office 97

[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.
[AppDefaults\\WINWORD.EXE\\DllOverrides]
"ole32" = "native"
"rpcrt4" = "native"

Printing

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:

Useful pieces of information


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



Copyright © 2002 - 2004 by Geoffrey Prewett