Saving Printer Settings In Damn Small Linux
In a frugal installation, printer settings are NOT automatically saved when you shut down or reboot the computer. Once you have fully implemented the frugal installation, persistent opt directory, persistent home directory, and printer setup, you must take the following steps to retain the printer settings and ensure that the printer is ready to go every time you boot up:
- Edit the file /home/dsl/.filetool.lst, which contains the list of directories whose contents are to be saved during reboots. Add the following directories:
/opt/printcap
/opt/apsfilter
/var/spool/lpd
- Go to the file /home/dsl/.bashrc and add the following line:
export PRINTER=lp
- Go to the file /opt/powerdown.sh and add the following lines:
>/var/spool/lpd/*/acct
>/var/spool/lpd/*/control.pr
>/var/spool/lpd/*/status.pr
>/var/spool/lpd/*/status
>/var/spool/lpd/*/lock
>/var/spool/lpd/*/log
rm /var/spool/lpd/*/cf*
rm /var/spool/lpd/*/df*
rm /var/spool/lpd/*/hf*
rm /var/spool/lpd/*/unspooler.pr
rm /var/spool/lpd/*/lock.pr
mkdir /home/dsl/.spool
cp -aprv /var/spool/lpd/* /home/dsl/.spool
-
Go to the file /opt/bootlocal.sh and add the following line:
/usr/sbin/lpd
cp -aprv /home/dsl/.spool/* /var/spool/lpd
chown -R daemon:lp /var/spool/lpd/*
Please note that this procedure is different from the one described in the book, the wiki, and other documentation (as of 8-11-2008). The above procedure works for me. When I tried the procedure described in the documentation, I found that /var/spool/lpd was NOT being saved when added to the file /home/dsl/.filetool.lst and that "export PRINTER=lp" (which needs to be executed by user dsl) did not automatically execute when placed in the /opt/bootlocal.sh file (which is executed by root) but did work when placed in the /home/dsl/.bashrc file. Note also that the permissions of the files and directories within /var/spool/lpd/* must be properly set. Thanks to the DSL forum participants for suggesting /home/dsl/.bashrc as an alternative to /opt/bootlocal.sh .