What is the FULL procedure printing? (frugal)
Topic: What is the FULL procedure printing? (frugal)
started by: jhsu
Posted by jhsu on June 22 2008,04:36Here's my procedure so far. (This is for the frugal install.)
1. Make sure that the printer is on and properly connected to the computer.
2. DSL Menu -> System -> Printing/lpd -> configure printer
3. Accept the license, use the default owner and group values for spooldir, and overwrite existing entries.
4. Select Printer Drive Selection
5. Go through each of the printer types until you find your model of printer. When you find your model of printer, select it.
6. Select the appropriate Interface Setup.
7. Select the appropriate paper format (probably US letter)
8. Print the test page to verify that the configurations are correct. If nothing prints, or if gibberish comes out, at least one of your configuration settings is incorrect.
9. When the test page prints out correctly, select the option to install the printer with the values shown. Note that the name of the printer is "lp".
10. Select the option to finish the installation.
11. DSL menu -> System -> Printer/lpd -> start
12. In a shell, type "export PRINTER=lp".
13. To save the settings, open Emelfm, go to the directory /home/dsl/, and click on the H button to reveal the hidden files.
14. Edit the file .filetool.lst, which contains the list of directories whose contents are to be saved during reboots. Add the following directories: /opt/printcap, /opt/apsfilter, and /var/spool/lpd/lp .
WHAT AM I MISSING? It seems that I'm able to get it working fine for awhile, only to later have the printing malfunction sometime later, as if something isn't saving properly or I missed one crucial step.
Posted by roberts on June 22 2008,05:00How are you trying to print? From shell, from an app?
If you issue a ps | grep lp command do you see lpd Waiting?
If you issue the command env does PRINTER show up?
Do you actually have something in /opt/printcap?
Can you print a simple text file from shell specifying your printer name like:
lpr -h -Plp some_text.txt
or do you see error messages?
Unless you are running a very old version of DSL, .filetool.lst is in /opt/ and not your home directory. So, perhaps you are not getting the necessary files in the backup.
Typically, an attempt to setup a printer, will automatically cause a prompt to save your printer setting upon the shutdown process, see /usr/local/bin/exitcheck.sh.
Posted by curaga on June 22 2008,13:16Also, starting a new shell and exporting something is no use for anything not started under that shell. It should be done in bootlocal.sh or in .xinitrc..
Posted by jhsu on June 22 2008,15:20I put "export PRINTER=lp" in the file opt/bootlocal.sh before shutting down, but I just booted up DSL again, and the PRINTER=lp does NOT show up when I type "env" in a shell. Why not?
Posted by jhsu on June 22 2008,15:31The "ps | grep lp" command does not yield the " lpd Waiting" response.
I put "export PRINTER=lp" in the file opt/bootlocal.sh before shutting down, but I just booted up DSL again, and the PRINTER=lp does NOT show up when I type "env" in a shell. So I typed "export PRINTER=lp" in the shell again, so that's the only reason "PRINTER=lp" shows up when I type "env".
The "lpr -h -Plp" still yields error messages now even though it was able to print the last time I booted up.
I'm using DSL version 3.4.8, and .filetool.lst is in the home directory, not the opt directory.
Posted by jhsu on June 22 2008,15:38In which configuration file do I enter the directory/file "/usr/sbin/lpd"? The instructions seem to say to put it in bootlocal.sh.
Most fundamentally, can anyone PLEASE explain why I have to keep reinstalling the printer every time I boot up? IT'S SO ANNOYING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Posted by ^thehatsrule^ on June 22 2008,19:23You'll probably want to put the export command in either /etc/profile (global) or ~/.bash_profile (user, depending on shell).
~/.xinitrc could work as well, but only for X sessions. I think bootlocal.sh is executed as root in another shell session so it might not be kept/propagated.
Posted by jpeters on June 22 2008,20:02
..you don't...but need to save (and load) configuration files. I put
/usr/sbin/lpd in /opt/bootlocal.sh DSL runs in ram, which is why it's so fast.
Posted by jhsu on June 23 2008,00:30When I type in the command "/usr/sbin/lpd" in a shell, I get the error message "Fatal error - Another print spooler active, possibly lpd process '529'".
What does this mean?
Posted by jpeters on June 23 2008,01:59
just write it in /opt/bootlocal.sh and reboot. Maybe you've got multiple spoolers loaded, I don't know.
Posted by curaga on June 23 2008,10:35The thing about /etc/profile and /etc/bashrc is, that most scripts are migrating to ash and as far as I know it doesn't read any of those files (at least the busybox ash)..
Posted by jhsu on June 23 2008,14:37What's wrong with having multiple spoolers loaded? How do I tell if I have multiple spoolers loaded? If having multiple spoolers loaded is a problem, how do I get rid of the excess spoolers?
Posted by jhsu on June 23 2008,14:45The contents of my /opt/printcap file:
# - don't delete start label for apsfilter printer1
# - no other printer defines between BEGIN and END LABEL
# APS1_END - don't delete this
The contents of /opt/apsfilter look OK.
However, there is NOTHING under /var/spool/lpd/lp, not even hidden files. IS THIS MY PROBLEM?
Posted by jhsu on June 23 2008,15:05I reinstalled the printer, printing (using the lpr -h -Plp some_text.txt command) now works, and there is content under the /var/spool/lpd/lp directory.
So my problem is that the /var/spool/lpd/lp wasn't saving even though I have this directory included in the .filetool.lst file. Everything else listed saves, but /var/spool/lpd/lp does not. WHY NOT?
Posted by jpeters on June 23 2008,16:15
..because /var files are generally invoked by other programs, in this case printcap. (work to be done; printer spool directory) Here is a definition of spool:
"To spool (which stands for "simultaneous peripheral operations online") a computer document or task list (or "job") is to read it in and store it, usually on a hard disk or larger storage medium so that it can be printed or otherwise processed at a more convenient time (for example, when a printer is finished printing its current document). One can envision spooling as reeling a document or task list onto a spool of thread so that it can be unreeled at a more convenient time." from Whatis?com
Posted by ^thehatsrule^ on June 23 2008,17:12
Obviously the bash scripts are only for bash, but /etc/profile is globally used afaik (yes, busybox ash uses it) and the user file is something like ~/.profile (which bash might read as well) iirc. I'm not sure if there's an equivalent *rc file though.
Posted by curaga on June 23 2008,18:02It was several versions back when I tried, but at the time busybox ash didn't read my environment at all. Glad to see things have changed.
Posted by jpeters on June 23 2008,19:10
Busybox seems quite busy. Maybe it's timely to look at its lawsuits over GPL violations:
June 9, 2008: Super Micro Computers, Bell Microproducts
Settlements for undisclosed amounts:
Mar 6, 2008, High Gain Antennas, Verizon Communications
Dec 17, 2007*: Xterasys
Posted by curaga on June 23 2008,19:15Dec 17, 2008??
Posted by chaostic on June 23 2008,19:30
Seems to be a typo.
< http://lwn.net/Articles/262396/ >
Also, September 2007, Monsoon
< http://www.linux.com/feature/119355 >
Posted by curaga on June 24 2008,14:55I was afraid they now knew in advance when they'll sue and get a resolution
Posted by jhsu on June 25 2008,17:23Can anyone PLEASE give me a troubleshooting procedure?
No matter what I do, THE SETTINGS I NEED DO NOT SAVE BETWEEN BOOTS! I have to go back into apsfilter, print out the test page, and then go through the install command, start command, export command, etc. mumbo jumbo before I can print again. I HATE HATE HATE SPEED TRAPS ON THE INFORMATION SUPERHIGHWAY.
When I'm in apsfilter and install the printer with the values shown (after verifying that the test page prints), what files are created/modified?
When I'm in apsfilter and select the option to finish the installation, what files are created/modified?
When I execute DSL menu -> System -> Printer/lpd -> start, what files are created/modified?
When I type "export PRINTER=lp" in a shell, what files are created/modified?
Posted by curaga on June 25 2008,19:13
Posted by jhsu on June 25 2008,23:22So why exactly do I have to go through these steps EVERY time I boot up just to print one little thing?
When I'm in apsfilter and install the printer with the values shown (after verifying that the test page prints), what exactly happens?
When I'm in apsfilter and select the option to finish the installation, what exactly happens?
When I execute DSL menu -> System -> Printer/lpd -> start, WHAT HAPPENS?
When I type "export PRINTER=lp" in a shell, what happens?
All I want is to be able to print without having to reload everything every time. Is that too much to ask? Why isn't anyone here able to answer my questions?
Posted by jhsu on June 25 2008,23:34Where do I save that export PRINTER=lp command? The wiki and the printer how to pdf file insist that the command belongs in /opt/bootlocal.sh . But I can clearly see by the fact that the "env" command does not show PRINTER=lp that putting the export command in /opt/bootlocal.sh isn't doing it. Putting the export command in the .bash_profile file doesn't do the job either.
One of you suggested putting that export command in the /etc/profile file, but I can clearly see that not all of the aliases get executed.
SO WHERE IS THE EXPORT COMMAND SUPPOSED TO GO?
Posted by jhsu on June 25 2008,23:59I even tried putting the command "& export PRINTER=lp &" at the end of the .xinitrc file to no avail.
Can anyone PLEASE tell me where to put "export PRINTER=lp"?