[ale] Multiple questions

Master Wizard mainwizard at vei.net
Mon Oct 15 01:28:29 EDT 2001


Needed to do much more than that :-), but it was a good start.

For anyone else who wants to do this, here is what worked for me:
1. Get a printout of the SMB-HOWTO, chapter 10. (
http://www.linuxdoc.org/HOWTO/SMB-HOWTO-10.html )
2. Create a spool directory for your printer. Mine was /var/spool/lpd/epson .
3. Create an acct file in the directory you just created. don't really
understand this but use 'touch acct' from within the directory.
4. Create a .config file in the same directory (from step 2.). The file should
have the following format:
    server=<name of windows computer the printer share is on>
    service=<share name of printer on above server>
    user=<username to log onto printer with, there may be a way for this to be
blank for a win95 or 98 box, but I don't think so>
    password=<password for the above user, this can definitely be blank, but
really, really shouldn't be>
5. Edit your /etc/printcap.local file to add your printer. Follow the
instructions from chapter 10. Be sure to use the items from steps 2 and 3. You
can put the smbprint file anywhere you want. I put mine in /usr/local/etc .
6. Create the smbprint file. This is the most difficult part. If you have an
smbprint file from the samba install, you can copy it. I had to make some
changes to get it to work. Using the example from chapter 10 as a guide, make
the following changes:
    logfile: I put it in the spool directory
        logfile=/var/spool/lpd/epson/smb-print.log
    spool_dir: add an eval line and change the spooldir line as follows:
        eval acct_file=\$$#
        spool_dir='dirname $acct_file'
    echo to logfile: use this for troubleshooting. I changed it to be the same
as what comes after the smbclient in the last line. You can change the >> to a
single > to overwrite each time you restart lpd.
7. TEST. I tested by running /etc/rc.d/init.d/lpd restart and using either lp or
lpr to print a file (I used the /etc/printcap file).

If it doesn't print, check the log file to ensure the values are correct.
I believe the acct file and the eval line are a dynamic way to get the spool
directory path info, but that's just a guess. If you have copied the smbprint
file from elsewhere, check it carefully and comment out what you don't need. The
one I had that was installed during system installation had a lot of problems.
Or maybe I just didn't know enough to use it correctly. The changes for step 6
where from that file.

This should be generic enough to work for any Linux system as long as you have
lpr and the smbclient software installed.

This is just a start to get you printing from the command line but it's a great
help when troubleshooting other problems to be able to print out config files,
make files, long error messages and other sundry system info. My next forray is
to connect from an Xsession:-)
Ed.


Matt Shade wrote:

> I'll go for #1 - First, the easiest way, of course, is to use something like
> Webmin or linuxconf to setup your printers, whether locally or remotely. If
> not using one of those, you'll have a bunch of manual editting of
> /etc/printcap, maybe a filter.... Best place to start is
> http://www.linuxdoc.org/HOWTO/Printing-HOWTO/index.html
> and check out both setting up LPR and printing to a Windows or Samba
> printer.
>
> matt shade
> www.threekay.com
>
> ----- Original Message -----
> From: "Master Wizard" <mainwizard at vei.net>
> To: "ALE ORG" <ale at ale.org>
> Sent: Sunday, October 14, 2001 13:15
> Subject: [ale] Multiple questions
>
> > I've been using Linux for many years and thought I had a handle on most
> > things, but recently I've been spinning my wheels and need
> > someone(two,three) to point me in the right direction.
> >
> > 1. How do I connect to a shared printer on an NT 4.0 server? I need to
> > be able to send text only, no color, from a terminal session to my Epson
> > Stylus color 640 connected as a share on my NT4.0 box. It is not
> > feasable to move the printer at this time unless someone can direct me
> > to a resource on connecting serveral different windows (95, 98, NT4.0,
> > 2000) machines to it using all it's color capabilities.


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list