# rpm -Uvh <somewhere>/lpr-0.31-1a.ppc.rpm
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
Is Netscape Available?
Yes!
Take a look at this for more information.
Is Java Developer's Kit Available?
:
jdk117-v1 is out.
Get it from
the PowerPC JDK porting team.
Take a look at this for more information.
Is FORTRAN Available?
:
DR3 is out now, which includes "g77" as a part of its
official compiler suite:
- egcs-1.0-2e
- egcs-g77-1.0-2e
- egcs-c++-1.0-2a
- egcs-objc-1.0-2e
Necessary packages for FORTRAN program development (egcs,egcs-g77)
are installed in your DR3 installation
if you choose to install the "C Development" packages.
The C++ and Objective C packages can also be installed
by adding the "C++ Development" packages to your
selection.
Take a look at my personal note
summarizing FORTRAN program porting isssues.
Is JLaTeX2e Available?
There is a wornderful site by Uchiyama titled
"ASCII pTeX on MkLinux" and there is nothing for me to add.
If you want to skip building the pTeX related packages and
use a set of binary RPM packages instead,
you can get them from
the JRPM ftp site.
For convenience, I have put necessary binary files in one place
in my JRPM directory:
JRPM/tex.
Install them as
- # rpm -Uvh kpathsea-*
- # rpm -Uvh pTeX-*
- # rpm -Uvh asiya-*
- # rpm -Uvh watanabe-*
- # rpm -Uvh vf-*
- # rpm -Uvh pLaTeX2e-*
- # rpm -Uvh LaTeX2e-*
- # rpm -Uvh dvipsk-*
- # rpm -Uvh dviselect-*
- # rpm -Uvh dviconcat-*
- # rpm -Uvh xdvik-20cjp-1a.ppc.rpm
To compile and preview a latex file:
- $ platex foo.tex
- $ xdvi -paper a4 -s 5 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 to platex,
*.dvi to xdvi or dvips by setting ~/.tkdesk/Popups appropriately.
See here for details.
Why No Page Numbers Show Up in Ghostview ?
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.
How to Edit PS Figures
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
Oct. 29, 1998: An unofficial patch applied to make
pstoedit-2.60 work with gs-5.50. With gs-5.10 you still need
"-psargs "level1.ps".
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.
How to Print 2 Pages Up
First install a2ps and psnup, etc:
- $ su
- # rpm -Uvh <somewhere>/a2ps.pl-1.41-1.noarch.rpm
- # rpm -Uvh <somewhere>/psutils-1.17-2.ppc.rpm
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.
How to Use MkLinux as an X Terminal
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 "cdehost" running CDE,
do the following:
- $ X -query cdehost -fp tcp/cdehost:7000
How to Exit from X
COMMAND+CONTROL+BACKSPACE(DELETE)
or
OPTION+POWER
How to Use Virtual Consoles
COMMAND+CONTROL+Fi (i=2,..,6: F1 is the original console)
If you are currently running "X", you may need to
use "F7" instead of "F1" to return to the screen where
the X is running.
Otherwise, you should be able to move from one
virtual console to another by appropriately
choosing a function key.
How For A Non-Root User to Shut Down a Machine
CONTROL+SHIFT+POWER
How to Offline Register Words to Canna Dictionaries
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.
Is an Automounter Available?
Jul 31, 1998: amd-920824upl102-10b.ppc.rpm comes with
DR3 as an extra package.
Using this rpm package, it's easy:
- $ su
- # rpm -ivh amd-920824upl102-10b.ppc.rpm
If the "rpm" complains that it needs a "portmap" rpm,
do the following:
- $ su
- # rpm -ivh portmap-4.0-7b.ppc.rpm
Once installed, all you need to do is to reboot the system or
- # /etc/rc.d/init.d/amd 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 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!
What About NFS Then?
Oct 14, 1998: (nfs-server-2.2beta29-2c) an sprintf buffer
overflow security hole pluged.
Jul 31, 1998: nfs support comes with
DR3 as base packages (portmap,nfs-serever).
These packages are installed as a part of your
DR3 installation if you choose
the "NFS Server" packages.
Using rpm packages, their installation is easy:
- $ su
- # rpm -Uvh portmap-4.0-7b.ppc.rpm
- # rpm -Uvh nfs-server-2.2beta29-2c.ppc.rpm
- # rpm -Uvh nfs-server-clients-2.2beta29-2c.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.
How to Make an RPM Package
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.
You can 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 -Uvh foo.ppc.rpm
When some binary rpm did not work, this might help.
How to Extract Files from an RPM Package
If you want to extract a file called "bar" from an
RPM, foo-xxx-yy.ppc.rpm, try something like
- $ rpm -qpl foo-xxx-yy.ppc.rpm | grep bar
- /usr/bin/bar
- $ rpm2cpio foo-xxx-yy.ppc.rpm | cpio -i -d /usr/bin/bar
- xx blocks
- $ ls
- usr
Try
- $ rpm2cpio foo-xxx-yy.ppc.rpm | cpio -i -d
instead, if you want to extract everything in the RPM package.