Instalar impresora USB en Ubuntu Server.

Después de una investigación previa he encontrado la información para instalar mi impresora USB en el servidor Ubuntu sin gestor gráfico. La información está en inglés pero creo que es util:

Howto: configure cups on Ubuntu Server from command line

I recently installed Ubuntu server on one of my machines at home. I didn’t want to install the Gnome desktop, so when it came time to configure cups as a print server I had a time figuring it out. Nobody seems to be configuring from the command line, but without Gnome, there doesn’t appear to be another way (cups web page doesn’t allow administration, details below).

I’m posting my notes here in the hope that it will save somebody else some frustration. The guide below sets up cups on a server running a fresh install of Ubuntu Server 6.06. The printer will be available to any computer on the network.

I use «smithers» as the hostname for my linux box.  You can substitute the IP address for «smithers» in the guide.

To install on smithers (my Ubuntu server):

1. $ sudo apt-get install cupsys cupsys-client

2. Modify /etc/cups/cupsd.conf

– comment out
#BrowseAllow @LOCAL
#BrowseAddress @LOCAL
– add
BrowseAllow all

– For the block change «Allow localhost»
to «Allow all».

NOTE: If you do this for the other two location
blocks, you can view the admin and config
stuff.  However, the https stuff doesn’t
work so you can’t administer anything.  You
have to administrate from the command line.
for more details as to why you can’t do this
from the web interface, which would be my first
choice, check out /usr/share/doc/cupsys/README.Debian.gz.

3. Modify /etc/cups/cups.d/browse.conf

– Change to «Browsing on»

4. Modify /etc/cups/cups.d/ports.conf

– Change «Listen localhost:631» to «Listen 631»

5. $ sudo /etc/init.d/cupsys restart

6. Get info on the connected printers:
$ lpinfo -v
network socket
direct usb://hp/deskjet%205550?serial=MY25K1K0TC2L
network http
network ipp
network lpd
direct parallel:/dev/lp0

7. Add the printer:
$ sudo lpadmin -E -p hp5550 -v usb://hp/deskjet%205550?serial=MY25K1K0TC2L -P /usr/share/ppd/cups-included/HP/deskjet.ppd -u allow:all

NOTE: substitute my details for your details. You can name the printer anything you like. I don’t think it allows numbers as the first letter, spaces, dashes, or underscore characters. I’m not positive about these rules, so if I’m wrong, post a follow up. alt As for the ppd file, there are only a few that come with cups, but I believe they cover the vast majority of printers. Just take a guess and try the one you think will apply. I think there were only 5 or so files.

8. To delete a printer (shouldn’t need to do this):
$ sudo lpadmin -x hp5550

NOTE: you shouldn’t need to do this, but I included this just in case you wanted to remove a printer.

9. To set the default printer:
$ sudo lpadmin -d hp5550

10. Enable the printer (required):
$ cupsenable hp5550

11. Start accepting jobs (required):
$ accept hp5550

NOTE: I read that the «-E» option is the same as the cupsenable and accept commands. However, it didn’t work for me. I had to issue both commands before it would work. You can check the status of the printer using the «printers» link below to see the printer status.

12. You can now browse the server using a web browser on
port 631.  For example: http://smiters:631.  To see the
printers, navigate to http://smithers:631/printers

13. To allow Windows XP to print to the cups printer, use the
add printer wizard.  Start->Printers and Faxes.  Then
select add printer.  Select network printer.  For the IP
address use: http://smithers:631/printers/hp5550.  Click
next, find the appropriate driver.  Continue until wizard
is complete.  Print a test page.  Enjoy!

La información original se puede encontrar en este foro.

Publicaciones Similares

Deja una respuesta