Saving printer settings (frugal)


Forum: DSL Tips and Tricks
Topic: Saving printer settings (frugal)
started by: jhsu

Posted by jhsu on Aug. 11 2008,17:57
From my web site at < http://www.jasonhsu.com/linux-print-save.html: >

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:

  1. 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
  2. Go to the file /home/dsl/.bashrc and add the following line:
     export PRINTER=lp
  3. 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
  4. 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 .

Posted by roberts on Aug. 11 2008,20:12
No wonder the standard procedure are not working for you.
You should perhaps look at lprm and lpc, as you are not managing your print jobs But then in normal circumstances that is not even necessary. Very likely you have large hanging spooler items that were blowing you backup. But to hack at them via ">" is not the way to manage your system neither is copying items in your home directory and back.  Posting such is not really helpful. You should learn how to do to do things correctly. Printing and saving the configuration has worked in DSL litterally for years.

Posted by clivesay on Aug. 11 2008,23:18
Did you happen to take a peak at this in the documentation folder in the download area? Saving settings is pretty simple.

< printerhowto >

Posted by jhsu on Aug. 12 2008,00:16
The procedure described in the printerhowto.pdf document, the book, and the wiki didn't work for me.  The new procedure I've described isn't that much more complicated than the old one.

I don't understand what could possibly be incorrect about my procedure.  My procedure works for me.  The others did not.  I put /var/spool/lpd in the /home/dsl/.filetool.lst file, but the contents of the directory did NOT save like they were supposed to.

How does my procedure constitute cheating?  What rule(s) did I break?

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.