Related projects: oki4linux.
The printer is compatible with PCL, so use the cljet5c
driver
from GhostScript.
The Makefile is missing the command to create the directory.
mkdir -p /usr/local/man/man8/ make install
Check BIOS settings. Changed the BIOS setting as suggested in the man page and can make a big difference.
This script works as a CUPS backend. Configure the printer as a raw device with this backend. This method doesn't require a PPD file.
if [ $# -eq 0 ]; then echo "backend \"Unknown\" \"gs sender\"" exit 0 fi if [ $# -eq 6 ]; then gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=oki4w -r300 -sPAPERSIZE=a4 -sOutputFile=/dev/lp0 $6 else gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=oki4w -r300 -sPAPERSIZE=a4 -sOutputFile=/dev/lp0 - fi
These instructions use the oki4drv program, the oki4w
driver, theoki4daemon
, and the CUPS spooler. This was tested withRedhat v9.
The test printer name is Okipage8z
. Substitute the name as needed.
1. Create a suitable directory to contain all the source files.
mkdir /usr/local/src/oki4drv cd /usr/local/src/oki4drv
2. Download the oki4linux-2.1gst.tar.gz
file into your new oki4drv
directory. The file can be found athttp://www.openprinting.org/download/printing/
3. tar -xvzf oki4linux-2.1gst.tar.gz
cd oki4linux/src
4. Edit the Makefile file, to suit a Redhat install, and change the install
paths to:
install: oki4drv
install -m4755 oki4drv /usr/local/sbin install -m644 oki4drv.man /usr/share/man/man8/oki4drv.8
5.make
make install
6.cp oki4daemon /usr/local/sbin
7. Make sure that both oki4daemon
and oki4drv
are in the /usr/local/sbin/
directory.
ls /usr/local/sbin/
8. Change the permissions for the new printer device so that all users have
full access:
chmod 777 /dev/oki4drv
You may want a more restrictive permissions setting, as this will allow anyone to do anything to your printer.
9. You can now read the man page for oki4drv:
man oki4drv
10. Create and paste the following /etc/rc.d/init.d/oki4daemon
file:
program: /dev/oki4daemon \ DAEMON=/usr/local/sbin/oki4daemon program=oki4daemon RETVAL=0 [ -f /usr/local/sbin/oki4drv ] || exit 0 [ -f /usr/local/sbin/oki4daemon ] || exit 0 if [ -f /etc/init.d/functions ] ; then . /etc/init.d/functions elif [ -f /etc/rc.d/init.d/functions ] ; then . /etc/rc.d/init.d/functions else exit 0 fi start () { echo -n $"Starting $program: " daemon $DAEMON # any arguments? RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/oki4daemon return $RETVAL } stop () { echo -n "Stopping $program: " killproc $DAEMON RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/oki4daemon } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; status) status $DAEMON ;; *) echo "Usage: /etc/init.d/oki4daemon {start|stop|restart|status}" exit 1 esac exit $RETVAL
11. The following adds the startup scripts to the rc.d files:
chkconfig --add oki4daemon
12. To use the oki4daemon:
/etc/local/rc.d/init.d/oki4daemon start
or:
service oki4daemon start
To check the running status of the oki4daemon:
service oki4daemon status
You can also use the stop and restart options Make sure the CUPS service is also running:
service cups status
13. You might want to reboot now, just to test that the rc.d scripts will
automatically start the oki4daemon
. Incremental testing is always good
practice. You should notice the oki4daemon start message appear near the
end of the bootup messages, and before the CUPS service starts. After the
reboot:
service oki4daemon status service cups status
14. The following command tests that the oki4drv driver is working:
oki4drv /usr/share/cups/data/testprint.ps
The next command tests that oki4drv and oki4daemon are both working together
cat /usr/share/cups/data/testprint.ps > /dev/oki4drv
15. To get CUPS, and the Print Manager, and Linux applications to send print
jobs through the oki4w driver, edit the /etc/cups/printers.conf
file, and
change the DeviceURI line to:
DeviceURI file: /dev/oki4drv
Note: all the information available mentions that the device should be/dev/null
. This is correct only if you are using the oki4drv driver by
itself. However we are also going to use the oki4daemon to monitor the
/dev/oki4drv pipe, and so the setting must be /dev/oki4drv
. It is the only
way your print jobs are going to get to the pipe.
16. Find the PPD (Postscript Printer Description) file for your printer:
cnd(find / -name *.ppd)
I found mine in /etc/cups/ppd/Okipage8z.ppd
If you cannot find your printer's PPD file, you can search for and
download it fromhttp://www.openprinting.org/printer_list.cgi
17. Copy your printer's PPD file to a location where CUPS expects to find it. You should change its name to that of your printer name.
cp /etc/cups/ppd/?????????.ppd /usr/share/cups/model/Okipage8z.ppd
18.
Gzip the PPD file:
cd /usr/share/cups/model gzip Okipage8z cd /root
19. Restart the CUPS service:
service cups restart
20. Now you can use any of your Linux applications to print a test page.
21. It is almost certain that your print area will be wrong. I used a utility
called alignmargins and a special margin alignment file called align.ps.
Both are available at http://www.openprinting.org/download/printing/
.
Run the alignmargins program, which will print the alignment page from thealign.ps
file.
./alignmargins
. You will need a ruler to measure the printout margins and a calculator to do some simple calculations, which you will be asked to input into the alignmargins program.
22. You should now have a fully functioning Linux Okipage 8z printer. Good luck and enjoy your inexpensive, quality printouts. It was worth all the effort.
See the entry for 17 October 2002 (17/10/2002).http://www.comworth.co.nz/web/content.asp?cont=notices
The lq850 driver works at a really high resolution. Its extremely slow. At lower resolutions it doesn't seem to work at all. The Epson 24 pin series driver works great for both the Oki 393 and Oki 395.