CUPS
Common setup - DO THIS FIRST
You need certain stuff to use any of this, whether setting up a server,
client, or local printing:
sudo apt-get install cupsys cupsys-client
Local printing (do this for servers too)
IMPORTANT NOTE:
The directions below will totally fuck over apt-get and dpkg. To fix you
can edit (as root)
/var/lib/dpkg/status and remove the
entry for pips-st50 (or whatever package is showing 'half-configured'). (Just delete the entire entry for pips-st50).
END IMPORTANT NOTE:
To use the Epson (and possibly other) printers:
- go to
http://avasys.jp/eng/
- click download
- click the type of printer you have (e.g. inkjet)
- choose the printer model and OS distribution, fill in other info, and click next.
- download the installation file
(e.g. pips-spt50-debian4.0-3.7.0-CG.tgz)
to a temp location
- tar xzf the file in the temp location - it conatains a
pips-spt50-debian4.0-3.7.0-CG.install file
- Run the install file as root, e.g.:
sudo bash ./pips-spt50-debian4.0-3.7.0-CG.install
- answer simple questions. On a machine with X it will bring up a window.
Click OK. On non-X server the install will fail to run the gui thing. In
that case you may have to (as root) edit /var/lib/dpkg/status and remove the
entry for pips-st50 (or whatever package is showing 'half-configured'). This
may be necessary to fix apt-get & dpkg dependancies. Remove the whole
entry (all lines between the blank lines).
- connect the printer to the computer
- run a browser and browse to
http://localhost:631
- If you are doing this on a server with no browser, you can do this:
- on a machine with a browser (e.g. laptop), run:
ssh -X -L 1234:localhost:631 <server-name-or-ip-addr>
replace <server-name-or-ip-addr> with the
name (or IP) of the server the printer is connected to.
replace 1234 with any number greater than
1024 (1234 usually works).
- on the machine with the browser, run the browser and navigate
to http://localhost:1234. This
will use ssh's port forwarding feature to forward the localhost:1234
port on the browser's machine to the localhost:631 port on the server
machine.
- click Add Printer and follow directions.
- You will need a root password for the server machine. On ubuntu set the
root password to 'xyz' with:
Later use the same procedure to set it to some random hard-to-guess value.
- USB printer should be autodetected. Other types might need specification
of port, etc.
- When asked for a .ppd file, look in
/usr/local/EPAva/printer/<name-of-printer>. For
example, the Epson Artisan 50 printer seems to work with the
/usr/local/EPAva/printer/spt50/ekas50.ppd file.
- Once set up go to the printer (in the browser) and
choose print test page from maintenance pulldown. Or open firefox
and print a page to the printer.
Sharing a printer from a server
- Follow directions above to get the printer working
locally on the server.
- Get on the server's CUPS page: http://localhost:631 on the
server (see above).
- go to administration
- check all of:
- Show printers shared by other systems
- Share published printers connected to this system
- Allow printing from the Internet
You can also check
- Allow remote administration
if you want.
- click change settings
- on the server command line run these commands:
cupsctl 'BrowseLocalProtocols="cups dnssd lpd smb"'
(I think these can also be added by editing the config file - not sure.)
Using a shared printer connected to a server from a client over network
- Run browser on client and go to client's cups config
page: http:localhost:631
- click Administration
- check
- Show printers shared by other systems
- click change settings
- You may also need to run this command line:
cupsctl BrowseRemoteProtocols=cups
- click administration
- click Add Printer
- choose Other Network Printers: Internet Printing Protocol (ipp)
- click continue
- choose the printer you want and answer questions.
- You may need a .ppd file - see above
- Now print a test page or print a page from a browser, etc.
- NOTE: When using a remote printer on a cups server, it seems that the client wants to use the servers fully qualified domain name. So if you have trouble printing you may need to add the server's IP address and fully qualified domain name (and/or hostname) to your /etc/hosts file. (This may only be a problem if the server has multiple names.) (xxx)