Problems and Solutions, If Any

This page summarizes problems I encountered and their solutions, if any. The problems are tried to be listed logically, instead of chronologically, if possible. Once again, be careful that the solutions might not work for your MkLinux box, though it worked for mine. Try them at your own risk.



Problems and Solutions, If Any

  1. Color Problem
  2. Single window session ran with pink on yellow first. When I started X, I found it's then white on light yellow which was almost illegible. Xresouces did't change this behavior!

    Rebooted to MacOS and changed the number of colors to 32000, guessing the problem coming from my Radius video accelerator card.

    Went back then to MkLinux and found that the single window changed to grey on black, which was almost invisible! Nevertheless, I started X and found surprisingly that X ran just fine! Decided to get along with this for a while.

    Found that what's really important was the number of colors. X does not work with 256 colors. It runs with 32000 or greater, though display speed slows down.

    97/05/25
    Decided to remove Radius Thunder/24 GT and use the Apple's video card. --> Works fine!

  3. Default Umask
  4. It is found that default umask is 027, which is set in /etc/csh.login and /etc/profile. This is no good for expanding tar.gz file or application installations. The .login and .bash_profile were thus modified to include umask 022.

    $ su
    # vi /etc/csh.login
    ---> umask 027 --> umask 022
    # vi /etc/profile
    ---> umask 027 --> umask 022

  5. Can't Input * in Kterm (Nov. 13, 1997)
  6. $ vi ~/.bashrc
    ....
    stty susp '^Z'
    ....
    $ source ~/.bashrc
    $ ls *
    ....

    OK. I haven't noticed this problem, since I have been using "tcsh" and my ".cshrc" had "stty susp '^Z'" from the beginning.

  7. Can't Input H in Kterm (Apr. 23, 1998)
  8. $ vi ~/.bashrc
    ....
    stty susp '^Z' lnext '^V'
    ....
    Use "stty -a" to see your current setting.

  9. How to Add New Fonts
  10. Added a12, 6x12rk, and k12 to /usr/lib/X11/fonts/misc
    $ su
    # cd /usr/lib/X11/fonts/misc
    # ls <somewhere>
    a12.pcf.Z 6x12rk.pcf.Z k12.pcf.Z
    # mv <somewhere>/*.pcf.Z .
    # mkfontdir
    # vi fonts.alias
    --> add a12, r12, rk12, and k12
    # cd /usr/lib/X11/fonts/75dpi
    # vi fonts.alias
    --> add helvb08, ....
    # xset fp rehash

  11. Sendmail is Not Running
  12. By default, smtp is used. To use sendmail, do the following.
    $ su
    # vi /etc/inetd.conf
    ---> Comment out line starting with "smtp".
    # cd /etc/rc.d/rc3.d
    # ln -s ../init.d/sendmail.init S80sendmail.init
    # cd /etc/rc.d/rc5.d
    # ln -s ../init.d/sendmail.init S80sendmail.init

  13. How to Mount Mac Disks
  14. In order to mount Mac disks, do the following. SCSI devices are assigned to /dev/sda, sdb, sdc, ..., corresponding to SCSI ID = 0, 1, 2, ....

    For SCSI ID = 6, it goes like:

    $ su
    # disklabel /dev/sdg
    --> to see partition numbers
    # hmount /dev/sdg6
    Now you can do something like:
    # hcd ":System Folder:Extensions"
    # hcopy -r /tmp/Mach_Kernel ":Mach Kernel"
    # hcopy -r ":vmlinux.gz" /tmp/vmlinux.gz
    and to dismount the disk
    # humount
    Type
    $ man hfsutils
    for more information.

    Also available is a Tcl/Tk based GUI called xhfs, which assumes shared library supports.

    To use it type:

    $ su
    # env LANG=ja_JP.SJIS xhfs

    See here for detail.

  15. How to Use CDROM
  16. In order to mount a CDROM, do the following.
    $ su
    # mkdir /cdrom
    # mount -t iso9660 -o ro /dev/scd0 /cdrom

    To dismount it, type:

    # umount /cdrom

    In order to mount a Mac CDROM, do the following.

    $ su
    # hmount /dev/sdd3
    ---> sdd3 means SCSI ID=3, partition 3.

    Just like in the case of a SCSI disk, now you can use

    hdir : to see directory contents
    hcd : to cd
    hcopy : to copy a file
    To unmount it
    humount

  17. How to Use MO (97/08/12)
  18. First setup A/UX partition on a 230 MB MO as we have done to the system disk (see the installation notes) using a modified Apple HD SC Setup. In my case it looks like:
    	
    	+-------------------------------+
    	|  Partition Map and Driver     |
    	+-------------------------------+
    	|  A/UX Root & User (Slice 0)   |
    	|          221.7MB(Max)         |
    	+-------------------------------+
    
    Notice that the A/UX partition is partition No.2 on MacOS where counting starts from 0 with the Apple HD SC Setup, which means partition No.3 on MkLinux where counting starts from 1. In my case the MO drive (Yano J.Compo J230MO) has SCSI ID = 5, thus its device file is /dev/sdf3.

    In order to mount the MO, you need to first set up an ext2 file system on it:

    $ su
    # /sbin/mkfs -t ext2 /dev/sdf3

    Now you are ready to mount the MO by:

    # mkdir -p /mnt/mo
    # mount -t ext2 /dev/sdf3 /mnt/mo

    To dismount it, type:

    # umount /mnt/mo

  19. How to Set Up Network Printers (97/07/10 Revised for Shared Libs.)
  20. Get lpr from ftp://ftp.linuxppc.org/linuxppc/linux-2.0.28/redhat/RPMS/ppc/ first.

    Then do

    $ su
    # rpm -i --force /usr/local/src/lpr/lpr-0.19-1B.ppc.rpm

    Notice that this assumes the shared libraries (DR2.1 update3 or later)

    In order to add a network printer called "qms3g414" for instance, do the following:

    # vi /etc/printcap
    qms3g414:\
    :lp=:rp=lp:rm=qms3g414:sd=/var/spool/lpd/qms3g414:\
    :lf=/var/log/lpd-errs:
    # mkdir -p /var/spool/lpd/qms3g414

    Then restart lpd by

    # /etc/rc.d/init.d/lpd.init start

  21. How to Start Canna Automatically
  22. # su
    # cd /etc/rc.d/init.d
    # mv functions functions.ORIG
    # cp functions.ORIG functions
    # vi functions
    ---> Append /usr/local/canna/bin to PATH
    # cp syslog canna
    # vi canna
    ---> daemon cannaserver to start
    ---> killproc cannaserver to shutdown
    # cd /etc/rc.d/rc3.d
    # ln -s ../init.d/canna S88canna
    # cd /etc/rc.d/rc5.d
    # ln -s ../init.d/canna S88canna

  23. How to Start Wnn Automatically
  24. $ su
    # cd /etc/rc.d/init.d
    # vi functions
    ---> Append /usr/local/wnn/bin/Wnn4 to PATH
    # cp canna wnn
    # vi wnn
    ---> daemon jserver to start
    ---> killproc jserver to shutdown
    # cd /etc/rc.d/rc3.d
    # ln -s ../init.d/wnn S89wnn
    # cd /etc/rc.d/rc5.d
    # ln -s ../init.d/wnn S89wnn

  25. Is FORTRAN Available? (97/07/29 Revised for LibU77 Enhancement)
  26. Here is how to build f2c which translates a fortran code to C. You can use a pre-compiled binary package prepared as an rpm file:

    $ su
    # rpm -i --force f2c-19970709-1A.ppc.rpm
    # rpm -i --force f2c-libs-19970709-1A.ppc.rpm

    Here is how to install its shell wrapper "fort77".

    # rpm -i --force fort77-1.14a-1A.ppc.rpm

    [July 16, 1997]

    As of July 16, 1997, g77-0.5.19 became available as rpm packages.

    [New:July 29, 1997]

    As of July 29, 1997, the g77-0.5.19 rpm packages include libU77. You can find here how I built the packages.

    [August 2, 1997]

    I have rebuilt the packages with the gcc-2.7.2-2L coming with DR2.1update4.

    [New:December 7, 1997]

    I have rebuilt the packages with the gcc-2.7.2-2M retrieved from ftp.linuxppc.org. This new version includes libU77, man, info, and a symbolic link to /usr/lib/libf2c.so which have been forgotten in the previous version. You can find here how I built the packages.

    [New:January 21, 1998]

    I have rebuilt the packages with the gcc-2.7.2-2O retrieved from ftp.linuxppc.org. This version requires the new "binutils" and "glibc" which in turn necessitates upgrading to wip980112 or later. See the update note for system updating instructoins. You can find here how I built the packages. Before installing them read this since it contains very important information.

    Also take a look at this summary of FORTRAN program porting isssues.

  27. Is JLaTeX2e Available?
  28. There is a wornderful site by Uchiyama titled "ASCII pTeX on MkLinux" and there is nothing for me to add.

    For convenience, I have put necessary binary files in one place here:

    VFlib, ASCII-pTeX, gs, xdvi, ghostview

    where the latter three require the shared library supports including the shared X11 libraries.

    To compile and preview a latex file:

    $ platex foo.tex
    $ xdvi -paper a4 -s 4 foo.dvi
    To convert the dvi file to a PS file:

    $ dvips foo.dvi -o foo.ps
    then you can see the PS file by

    $ ghostview foo.ps
    In TkDesk, you can bind file type *.tex or *.jtex to platex, *.dvi to xdvi or dvips by setting ~/.tkdesk/Popups appropriately. See here for detail.

  29. Why No Page Numbers Show Up in Ghostview ?
  30. How come no page numbers show up, when a postscript file made from a dvi file through dvips is ghostviewed?

    $ su
    # vi /usr/local/lib/texmf/dvips/config.ps
    ....
    % Too-smart spoolers and/or printers get confused.
    % Our LJ4 gets `22 Error' (inconsistently) from the structured comments.
    %N
    ....
    # exit
    $ dvips foo.dvi -o foo.ps
    This time, page numbers should show up.

  31. How to Edit PS Figures
  32. In writing transparencies, it often becomes necessary to include some PS figure. It's highly desirable that the include file be editable. Pstoedit allows you to do it. You can translate PS to xfig, tgif, gnuplot, ... etc. so that you can do, for instance:

    $ pstoedit -f fig foo.ps foo.fig
    $ xfig foo.fig
    or
    $ pstoedit -f tgif foo.ps foo.obj
    $ tgif foo.obj
    Precompiled binary packages for xfig and tgif are available from Yasutome's FTP Site.

    Feb. 1, 1998: I have recently found that pstoedit-2.60 is incompatible with gs-5.10 (it worked fine with gs-4.03). The problem is not solved yet, but here is a temporary workaround: You add -psargs "level1.ps".
    For example, what you might try is:

    $ pstoedit -f tgif -psargs "level1.ps" foo.ps foo.obj
    You get some complaints from "gs" but the resultant converted file seems editable.

  33. How to Print 2 Pages Up
  34. First install a2ps and psnup, etc:

    $ su
    # cp somewhere/a2ps /usr/local/bin/.
    # chmod a+x /usr/local/bin/a2ps
    # cd /
    # tar -zxvf somewhere/psutils-1.13-bin.tar.gz
    # exit
    Then do

    $ a2ps <file name> | psnup -2 | lpr
    to print two ascii text pages on a single sheet of paper. For a postscript, do
    $ psnup -2 <file name> | lpr
    instead. The psutils package contains some other useful tools to resize, rotate, or extract some page in a postscript file.

  35. How to Use MkLinux as an X Terminal
  36. In order to use MkLinux as an X terminal, do

    $ X -query <host name> -fp tcp/<font server>:<port no>
    where the font path setting to use a font server is optional. It is, however, mandatory if you want to use CDE, which requires a special font set.

    (e.g.)
    If you want to connect to a host called "jlcux1" running CDE, do the following:

    $ X -query jlcux1 -fp tcp/jlcux1:7000
    To exit from X, press the OPTION and POWER keys at one time.

  37. How For A Non-Root User to Shut Down a Machine
  38. CONTROL+SHIFT+POWER

  39. How to Offline Register Words to Canna Dictionaries
  40. When using tkdesk's builtin editor, no builtin mechanism is available to register Japanese words to user's canna dictionary. One needs to offline-add words to user's dictionary. Here is the way to do it.

  41. Is an Automounter Available?
  42. July 8, 1997: amd-920824upl102-6A.ppc.rpm
    August 15, 1997: amd-920824upl102-6B.ppc.rpm (modified to be able to mount local UFS devices).

    The installation record for the MkLinux automounter (amd) is here. Using rpm packages, it's easy:

    $ su
    # rpm -i --force portmap-4.0-3B.ppc.rpm
    # rpm -i --force amd-920824upl102-6B.ppc.rpm
    Once installed, all you need to do is to reboot the system or

    # /etc/rc.d/init.d/amd.init start
    which starts the automounter. Provided that some directories are exported from a host "foo", you can do, for instance,

    $ ls /net/foo
    ... tmp ...
    $ ls -F /net/foo/tmp
    ... bar/ ...
    $ cp -r /net/foo/tmp/bar .
    If not, you may want to do the following as root on "foo":

    # vi /etc/exports
    ---> add your mklinux box to the list of destinations
    # exportfs -a
    To stop the automounter:

    $ su
    # /etc/rc.d/init.d/amd.init stop
    The configuration files include:

    /etc/amd.conf : a map file which sets up /net by default
    /etc/sysconfig/amd : sets ADIR (temp mount dir) and MOUNTPS (mount point)
    By default, the temporary mount directory is /.automount and the mount point is /net.

    Enjoy!

  43. What About NFS Then? (97/08/13 Revised)
  44. The installation record for the MkLinux NFS (d) is here. Using rpm packages, it's easy:

    $ su
    # rpm -i --force nfs-server-2.2beta26-1A.ppc.rpm
    # rpm -i --force nfs-server-clients-2.2beta26-1A.ppc.rpm
    Edit /etc/exports to tell to which machines you export your file system:

    # vi /etc/exports
    / *.kek.jp(rw,anonuid=65535)
    In this example, you export everything under the root directory to any host in the "kek.jp" domain with read/write permission. Dangerous huh? See the manpage for exports for detail.

    To start NFS, reboot or

    # /etc/rc.d/init.d/nfs start
    Then you can do something like:

    $ rlogin foo.kek.jp
    $ ls /net/bar
    assuming your machine is "bar" and "foo" is running an automounter.

    [Apology: August 13, 1997]

    It was found that the previous version (nfs-server-2.2beta16-7B) from ftp://ftp.linuxppc.org/RedHat/RPMS/ malfunctions when file size exceeds some limit. I was mainly using the automounter so that it took this long to notice this problem. I am very sorry. The new version nfs-server-2.2beta26-1A above is based on the latest nfs server on Linux and the mklinux patch by Murata and looks like working properly: I could copy 100MB Monte Carlo simulation data from an HP-UX workstation to an MO mounted on my MkLinux box via this new NFS.

  45. How to Make an RPM Package (97/07/12)
  46. You need to prepare a TAR-GZIPped source code (foo.tar.gz) and patches (bar1.patch, bar2.patch, ...) and a spec file (howtobuild.spec). Once have this done, the rest is simple:

    $ su
    # cd /usr/src/redhat/SOURCES
    # cp <somewhere>/foo.tar.gz .
    # cp <somewhere>/*.patch .
    # cd ../SPECS
    # cp <somewhere>/howtobuild.spec .
    # rpm -ba --test howtobuild.spec
    # rpm -ba --clean howtobuild.spec
    This creates an RPM binary package in /usr/src/redhat/RPMS/ppc and an RPM source package in /usr/src/redhat/SRPMS.

    See here for example. You can also consult RPM-HOWTO and RPM-Tips retrieved from MkArchive.

    Note 1: If an SRPM file is available

    When a Source RPM file is available, you can install it by

    # rpm -i foo.src.rpm

    then you get everything set up in /usr/src/redhat as was done above by hand. Notice that this does not involve any source compilation but just installs source files and a spec file. You can then modify the source codes or the spec file, if any modifications are necessary:

    # cd /usr/src/redhat/SPECS
    # vi howtobuild.spec
    ... modifications, if necessary
    Then the rest is the same.

    Note 2: If you just want to rebuild the package

    If you don't need to make any modifications but just need to rebuild the binary package, just do:
    # rpm --rebuild foo.src.rpm
    where you have the SRPM file. This rebuilds the binary package and stores it as /usr/src/redhat/RPMS/ppc/foo.ppc.rpm. The rebuilt binary package can be reinstalled as usual by
    # rpm -i --force foo.ppc.rpm
    When some binary rpm did not work, this might help.


Back to Keisuke Fujii's MkLinux Page
fujiik@jlcuxf.kek.jp May 12, 1997