System Setup: Other

  SlashDot  Python Home

 

Configuration
Hardware
Linux
Disks
X Windows
Printer
Modem
Sound
Network
Scanner
CD-RW
Windows
Other

Table of Contents

Emacs Setup

SUSE installs gnu-emacs with console and X style interfaces. It automatically generates an associated .gnu-emacs, and requests that changes be added from there. I copied my .emacs from redhat to .gnu-emacs-local and added this line to .gnu-emacs:
(load "/home/hgg9140/.gnu-emacs-local")
Then went to emacs's own customization process, which builds gnu-emacs-custom. Current settings for both files are:

/home/hgg9140/.gnu-emacs-local

;;; -*- Mode: Emacs-Lisp -*-

;;;-----------------------------
;;;Set buffer list to use current window if >1 else split
;;;
(defun my-list-buffers (&rest args)
  (interactive)
  (let ((buff-window (get-buffer-window "*Buffer List*")))
    (if (and (not buff-window)                ; Not visible
	     (not (one-window-p 'no-mini)))   ; Multi-window
	;; Attach "*Buffer List*" to current window
	(switch-to-buffer "*Buffer List*")))
  (apply 'list-buffers args)
  (pop-to-buffer "*Buffer List*")            ; Go there
  (forward-line 3))                          ; Skip uninteresting stuff

(global-set-key "\C-x\C-b" 'my-list-buffers)

;;;----------------------------------
;;; bury menu buffer after selecting buffer
;;;
(defun Buffer-menu-this-window ()
  "Select this line's buffer in this window, and bury buffer menu"
  (interactive)
  (let ((menu-buffer (current-buffer)))
    (switch-to-buffer (Buffer-menu-buffer t))
    (bury-buffer menu-buffer)))

;;;-----------------------
(setq column-number-mode t)

;;;-----------------------
(setenv "MAILHOST" "pop.seanet.com")

;;;------------------------
;;; pdx
 (load "pdx-mode")
 (setq auto-mode-alist
       (append
       '(("\\.pdx\\'" . pdx-mode))
       auto-mode-alist))

;;;------------------------
;;; python
;;;(setq load-path (cons "/dir/of/python-mode/" load-path))
 (load-library "python-mode")
 (setq auto-mode-alist
       (cons '("\\.py$" . python-mode) auto-mode-alist))
 ;;;(add-hook 'python-mode-hook 'turn-on-font-lock)
 (setq indent-tabs-mode ())

;;;------------------------
;;; mime
;;;------------------------
;;(load-library "rmime")
(add-hook 'rmail-show-message-hook 'rmime-format)
(add-hook 'rmail-edit-mode-hook    'rmime-cancel)
(autoload 'rmime-format "rmime" "" nil)
;;;------------------------
;;; etach
;;;------------------------
(load-library "etach")
(global-set-key "\C-c\C-f" 'find-file-at-point)
(global-set-key "\C-c\C-u" 'browse-url-at-point)

(define-key rmail-mode-map "F" 'mime-forward)
(define-key rmail-summary-mode-map "F" 'mime-forward)

(define-key rmail-mode-map "K" 'kill-label-detached)
(define-key rmail-summary-mode-map "K" 'kill-label-detached)
;;;------------------------
;;; mailcrypt
;;;------------------------
(load-library "mailcrypt")
(mc-setversion "gpg")
(add-hook 'rmail-show-message-hook 'mc-install-read-mode)

;;;------------------------
;;;GPL Copying
;;;
;;;(require 'gpl)
;;;(require 'gpl-copying)

/home/hgg9140/.gnu-emacs-custom (showing only safe lines)

(custom-set-variables
 '(mail-yank-prefix "  > ")
 '(pdx-run-on-save nil)
 '(mail-setup-hook (quote (hilit-rehighlight-buffer-quietly rmailgen-get-archive-file-name mc-write-mode)))
 '(mail-default-reply-to "hgg9140@seanet.com")
 '(mail-host-address "seanet.com")
 '(rmail-enable-mime t)
 '(default-tab-width 4 t)
 '(rmail-display-summary t)
 '(gnus-show-mime t)
 '(gnus-local-domain "seanet.com")
 '(mail-signature t)
 '(mail-bury-selects-summary t)
 '(mail-alias-file nil)
 '(standard-indent 4)
 '(indent-tabs-mode nil)
 '(mail-send-nonascii nil)
 '(user-mail-address "hgg9140@seanet.com")
 '(gnus-check-new-newsgroups nil)
 '(delete-selection-mode nil nil (delsel))
 '(scroll-bar-mode (quote right))
 '(user-full-name "Harry George")
 '(mail-interactive t)
 '(rmail-primary-inbox-list (quote ("po:hgg9140" "/var/spool/mail/hgg9140")))
 '(gnus-nntp-server "news.seanet.com"))
(custom-set-faces)

Postgresql

SUSE came with 6.4, but I wanted 6.5.1. As root:
  • Turn off old postmaster:
      cd /etc/rc.d
      postgres stop
    
  • Edit the /etc/rc.d/postgres script to point to the new location, e.g.:
      H=/usr/local/pgsql/bin/postmaster
      LOGFILE=/var/log/postgresql.log
      DATADIR=/usr/local/pgsql/data
    
  • Remove the old binaries from harms way
      cd /usr/lib
      mv pgsql pgsql.6.4 
    
  • Revise /etc/ld.so.conf
      /usr/local/pgsql/lib
    
  • Use Yast to add postgres group, and put postgres user in it. (Group Administration).
  • Make a postgres dir
      cd /usr/local
      mkdir pgsql
      chown postgres:postgres pgsql
    

As postgres:

  • Copy the tar.gz to /usr/local/src/pgsql and untar it. Cd to the untarred dir. Read INSTALL -- I followed it, except for the items I've noted.
  • Run configure:
      cd src
      ./configure --with-tcl --with-perl --with-template=linux_i386
    
  • Install the documentation
  • Run make,
  • As root, run ldconfig
  • Back as postgres, run make test and make install

Reboot. This

  1. Starts the new postmaster.
  2. Cleans up the locate db, so that the right binaries are found.
  3. Cleans up ld.so.cache.

As postgres, run:

  createuser -d -u <my userid>
Thus, I become a superuser.

As myself:

  • Get and make the Perl DBD::Pg module (e.g., version 0.92).
  • Run make test -- I got ok on all tests.
  • su to root and run make install
  • Back to myself, begin experimenting with DBI, using the test.pl as an example.

ITRANS

ITRANS is a system for handling Sanskrit (and other Indian languages). Steps:
  • Make a working dir. It could have been in /usr/local/src, but due to the instructions I went with ~/proj/sanskrit.
  • Download materials from http://www.aczone.com/itrans/ and untar. Get itrans-5.2 dir.
  • Link it to homedir:
      cd
      ln -s ~/proj/sanskrit/itrans-5.2 ITRANS
    
  • Read INSTALL.
  • Copy src/itrans.linux to /usr/local/bin/itrans
  • Copy src/itrans.1 to /usr/local/man/man1
  • Install tex:
      cd /usr/share/texmf/tex/latex
      mkdir itrans
      cd itrans
      cp ~/proj/sanskrit/itrans-5.2/lib/*.sty .
      cp ~/proj/sanskrit/itrans-5.2/lib/*.tex .
      texconfig ... REHASH
    
  • Copy the lib/DVIPSRC into ~/.dvipsrc, changing the homedir. I also changed the "#" comments to "%".
  • Edit ~/.bashrc to include:
      #-----------------------
      #---sanskrit via ITRANS
      #-----------------------
      
      #------------------------------------------------------------
      # ITRANSPATH is used by itrans, to look for the files it needs
      # (such as devnac.ifm, devnac.afm) ~ stands for the home directory.
      
      export ITRANSPATH=:~/ITRANS/lib:~/ITRANS/lib/fonts
      
      #------------------------------------------------------------
      # TEXFONTS is used by tex, latex, etc,
      # In some systems, even system wide paths have to be mentioned again here..
      
      export TEXFONTS=${TEXFONTS}:~/ITRANS/lib/fonts:
      
      #------------------------------------------------------------
      # looks like dvips does not look for the pk files in TEXFONTS (it
      # does look for TFM files there), anyway, define TEXPKS for dvips
      # to be same as the TEXFONTS definition
      export TEXPKS=$TEXFONTS
      
      #------------------------------------------------------------
      # TEXCONFIG is used by dvips, and it understands the empty path
      # to mean search in the system wide area, so just need to 
      # provide our path here.., system wide paths are taken care of
      # automatically.
      
      export TEXCONFIG=${TEXCONFIG}:~/ITRANS/lib:~/ITRANS/lib/fonts
      
      #------------------------------------------------------------
      # TeX and MF input files (\input TeX command, and MetaFont *.mf files)
      export TEXINPUTS=${TEXINPUTS}:~/ITRANS/lib/fonts:
      export MFINPUTS=${MFINPUTS}:~/ITRANS/lib/fonts:
    
  • I made a script, ~/bin/goitrans:
      #!/bin/sh
      itrans -v -i $1.itx -o $1.tex
      latex $1.tex
      latex $1.tex
      dvips -o $1.ps $1.dvi
      rm -f $1.tex $1.idx $1.aux $1.toc $1.dvi
      gv $1.ps
    
    
    Only problem so far is that the pk fonts are generated in the dir of the file. Will have to fix that.

Docbook

Installed sgmltools 2.0.2. Took quite a while to get a useful combination of features. Ended up with:

  • Install sgmltools to /usr/local, which places things in /etc/sgml and /usr/local/share/sgml. The /etc/sgml/aliases file translates, e.g., sgmltools-html to the sgmltools stylesheet for html.

  • Let's call /usr/local/share/sgml "SGMLCAT". Moved SGMLCAT/docbook to SGMLCAT/docbook-30, because that is an out of date docbook (v 3.0). Copied docbk31.zip to SGMLCAT and unzipped, making a new docbook dir (v 3.1).

  • cd to docbook and edit the docbook.cat to comment out (using "--...--") the ISO entities. I don't know where the docbook official ones are, but the sgmltools versions don't have that same name, and are in SGMLCAT/entities. So we'll just put in a catalog entry for them.

  • Edited .bashrc:
    #---sgmltools---
    SGMLCAT=/usr/local/share/sgml
    export SGML_CATALOG_FILES=
       $SGMLCAT/docbook/docbook.cat
      :$SGMLCAT/docbook/catalog
      :$SGMLCAT/entities/iso-entities-8879.1986/iso-entities.cat
      :$SGMLCAT/dtd/jade/dsssl.cat
      :$SGMLCAT/stylesheets/docbook/catalog
      :$SGMLCAT/stylesheets/sgmltools/sgmltools.cat
    
    Don't know how much of this is needed, but the first three certainly are, and must be first in the list.

Run:

  sgmltools --verbose --backend=html  --dsssl-spec=sgmltools-html myfile.sgml
I've checked html, dvi, ps, rtf.

Per a note in dejanews comp.text.sgml, to beat the "pool size" problem on dvi and ps, add to /etc/texmf/texmf.cnf:

% settings for jadetex
hash_extra.jadetex = 15000
hash_extra.pdfjadetex = 15000
pool_size.jadetex = 500000
pool_size.pdfjadetex = 500000
string_vacances.jadetex = 45000
string_vacances.pdfjadetex = 45000
max_strings.jadetex = 55000
max_strings.pdfjadetex = 55000
pool_free.jadetex = 47500
pool_free.pdfjadetex = 47500
nest_size.jadetex = 500
nest_size.pdfjadetex = 500
param_size.jadetex = 1500
param_size.pdfjadetex = 1500
save_size.jadetex = 5000
save_size.pdfjadetex = 5000
stack_size.jadetex = 1500
stack_size.pdfjadetex = 1500
Then run fmtutil --all

Dosemu

Just setup and ran dosemu:

  • Read /usr/doc/packages/dosemu. I looked at quickstart.
  • In /var/lib/dosemu, run setup-bootdir. It was able to find my dos dirs, and built a bootdir.first.
  • In /var/lib/dosemu/bootdir.first:
      ln -s /mnt/win95 dos
      ln -s /mnt/hgg hgg
      ln -s /mnt/dosa floppy
    
  • Probably ought to do something useful to the /var/lib/dosemu/bootdir.first/dosemu/autoexec.bat. Left it as is for now.
  • In /etc/dosemu.conf, change the:
      $hdimage = "hdimage.first"
    to
      $hdimage = "bootdir.first"
    
  • Set an alias in .bashrc:
      alias rundos='dos -O 2> /tmp/error.out'
    
  • Run it; wander around, trying to remember why I liked dos in the first place...
  • Finish session with exitemu

I then installed Lotus 123 v 2.2, and was able to bring up and print some old spreadsheets.

tomsrtbt

Just installed and tried tomsrtbt-1.7.140. Steps:

  cd /usr/local/src
  mkdir tomsrtbt
  cp tomsrtbt-1.7.140.tar.gz tomsrtbt
  cd tomsrtbt
  gzip -cd tomsrtbt-1.7.140 | tar xvf -
  cd tomsrtbt-1.7.140

Then read the instructions (tomsrtbt.RAQ), and checked for existence of a /dev/fd0u1722. I had one, so didn't need the instructions for making one. Read the install.s script, and since it was safe, I opend a root window and did the install: ./install.s. It formatted and loaded my disk.

Then I used it to boot my practice system (486 66MHz, 32MByte, also SUSE 6.1). Worked fine. First thing, I mounted the local harddisk:

  fdisk (do "p" to see the partitions: found /dev/hda3 was wanted)
  cd /mnt
  mkdir hda3
  mount /dev/hda3 hda3
  cd hda3

At this point, I had access to local executibles. I tried cd'ing to usr/bin and running ./pico, but it didn't go. However, emacs did. May want to add pico to the rtbt disk (or add it to a second compressed disk), since I'm hopeless in vi and emacs is too big. ...Doing ldd on pico shows my copy uses ld-linux.2 and tomsrtbt uses .1. Similarly libc.so.6 vs .5. So I'd better look at his web site to see if he already has pico built. It would have to go in /tmp apparently, since / and /usr are full. ...Nope, just modules. We'll suffer with vi for a while.

Rt-Linux

I wanted to set this up on my 486 66MHz, but compile it on my Pentium 266MHz. After many gyrations, I gave up and installed both the linux2.2.10 and the rtlinux stuff on the 486. Basic layout:

  ~proj/rtl/:
drwxr-xr-x   3 hgg9140  users        1024 Jul 25 11:41 beta11
drwxr-xr-x   2 hgg9140  users        1024 Sep  5 20:33 doc
-rw-r--r--   1 hgg9140  users    13902979 Sep  6 07:51 linux-2.2.10.tar.gz
drwxr-xr-x  14 hgg9140  users        1024 Jun 13 11:01 linux22
-rw-r--r--   1 hgg9140  users      122291 Sep  5 19:57 rtl-beta11.tgz
-rw-r--r--   1 hgg9140  users        5353 Sep  5 19:58 rtl-install.html

Here, the linux-2.2.10.tar.gz is the recommended kernel and rtl-beta11.tgz is claimed to be stable for that kernel. Then:

  gzip -cd rtl-beta11.tgz | tar xvf -
  gzip -cd linux-2.2.10.tar.gz | tar xvf -
  mv linux linux22    (because rtl's patch expects that name)
  patch -p0 <beta11/kernel_patch
  cd linux22

Configure the kernal: make xconfig. Items to remember:

  • We are compiling for a 486, so change the default processor family to that.
  • Turn on hard-real-time. Turn on loadable modules. Turn on SLIP.
  • After the config, go into makefile and set INSTALL_PATH to /boot/rtl. That way, we can put in the new System.map without messing up the normal install.

Build it:

  make dep; make clean
  make zImage
  make modules
  make install
  make module_install

Next, build the rt modules. Edit the makefile:

  LINUX_KERNEL_DIR=../linux22
  ...
  MOD_DIR=../modules
  ...
  INC_INSTDIR=include/rtlinux
  ...
  INSTALL_PATH=boot-rtl
  ...
  #(in install:, path was hardcoded to /usr/include/rtlinux)  
  @mkdir -p $(INC_INSTDIR)/asm-i386   

Next, setup lilo to use it:

  /etc/lilo.conf:
    image=/boot/rtl/vmlinuz
        label=linux-rtl
        root=/dev/hda3

Then run lilo. Then reboot. Use tab to see options, select linux-rtl. It comes up showing Kernel 2.2.10-RTL_BETA11. But the test:

  ksyms -a | grep " "rt_ | wc -l

does not find rt_ items. However, that may be because kysyms isn't looking at the System.map in /boot/rtl. That map does in fact have the needed symbols.

cd to beta11/rtl/examples and try them. I found:

  • sound doesn't work because it says the device is already busy.
  • frank works.
  • measurement seems to work
  • couldn't figure out the others.

PowerP4

Wow! This is a postprocessor for pdftex, resulting in powerpoint-like slide shows. Installation:

  • Download stuff from http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4
  • Move pp4.jar to /usr/lib/java/jars. I'm putting add-on jars there.
  • Move ppower4 to ~/bin as pp4. Edit to:
      #!/bin/sh
      basedir=/usr/lib/java/jars
      CLASSPATH=$basedir/pp4.jar java de.tu_darmstadt.sp.pp4.PPower4 "$@"
    
  • Move the .sty's to /usr/share/texmf/latex/misc and run fmtutil --all
  • Play with the examples. Setup scripts:
    go:
      pdflatex exm1.tex
      acroread exm1.pdf
    go2:
      pp4 exm1.pdf exm1_x.pdf
      acroread exm1_x.pdf
    
    Notably, the new sty's are not being found. I thought fmtutils --all was supposed to solve that. However, asl ong as I manually enter its path the system works as advertized.

gcc 2.95.1

Download the full distribution, and the java lib.

  • Setup dirs
      cd /usr/local/src
      mkdir gcc
      cp .....gcc-2.95.1.tar.bz2 .
      bzip2 -cd gcc-2.95.1.tar.bz2 | tar xvf -
      mkdir objdir
      cd objdir
    
  • Make a "go" to do the configure:
    go:
      ../gcc-2.95.1/configure --enable-shared --with-gnu-as --with-gnu-ld \
      --enable-cpp --enable-version-specific-runtime-libs \
      --enable-languages=c++,java
    
  • Run go
  • Run make
  • As root, run make install

Similarly for the Cygnus-supplied java library:

  • Setup dirs
      cd /usr/local/src
      mkdir libgcj
      cp .....libgcj-2.95.1.tar.gz  .
      gzip -cd  libgcj-2.95.1.tar.gz | tar xvf -
      mkdir objdir
      cd objdir
    
  • Make a "go" to do the configure and make:
    go:
     CC=gcc ../libgcj-2.95.1/configure
     make
    
  • Run go
  • As root, run make install

Test it on a java program:

  gcj hello.java

Nope, not finding the libstd++. Which one does it need?

  gcj -print-libgcc-file-name
  /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/libgcc.a

Ah Ha! As root, put that path in /etc/ld.so.conf, and rerun ldconfig... That took care of the lib issues, but then got:

  /usr/lib/crt1.o(.text+0x36): undefined reference to `main'
  collect2: ld returned 1 exit status

Looked on dejanews (search "gcj"), and found others had the same problem. But went to gcj documentaiton and found there was a commandline option for main:

go:
  gcj --main=hello -o hello hello.java
  ./hello

Success! Found I had to compile the other classes with

  gcj -c Stack.java
  ...
  gcj --main=StackTest -o StackTest Stack.o Stacktest.java

 
Creator: Harry George
Updated/Created: 2001-01-07