|
Tuesday, 24 March 2009 23:01 |
|
I hated the look of the printer sitting in the sitting room by the laptop so I decided to move it upstairs to the office, connect it to my Linux box, and use it as a networked printer. Doing this worked out surprisingly easy to be honest, with just one or two niggles to be worked out. For the record the printer is an Epson Stylus C64, and the Linux box is running Ubuntu 8.04.
- Installing the printer. This turned out to be a real challenge.
- Plug the USB cable from the printer into the Linux box.
- Power on printer.
- Walk through Ubuntu's on-screen prompts to auto-detect & configure the printer
- System -> Administration -> Printing -> "Print Test Page"

- Rejoice.
- Sharing the printer. I already have samba installed and running so I simply enabled printer sharing in /etc/samba/smb.conf I wanted this to be as hassle-free as possible so I enabled the automatically load your printer option. I don't actually know if this is needed, but this setup works and if it ain't broke... I modified two sections of /etc/samba/smb.conf:
########## Printing ##########
# If you want to automatically load your printer list rather # than setting them up individually then you'll need this load printers = yes
# lpr(ng) printing. You may wish to override the location of the # printcap file ; printing = bsd ; printcap name = /etc/printcap
# CUPS printing. See also the cupsaddsmb(8) manpage in the # cupsys-client package. ; printing = cups ; printcap name = cups #======================= Share Definitions ======================= [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = yes read only = yes create mask = 0700
# Windows clients look for this share name as a source of downloadable # printer drivers [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = yes # Uncomment to allow remote administration of Windows print drivers. # Replace 'ntadmin' with the name of the group your admin users are # members of. ; write list = root, @ntadmin
- Installing an Ink Monitor. It probably wouldn't have occured to me to install this until my wife's question "Why isn't the printer printing?" appeared to require the answer "I think its run out of ink............but I can't tell which colour(s) have run out....." Broadly speaking I just followed the instructions in a Linux.com article on choosing an ink-level monitor.
- Install mtink using Ubuntu's Add/Remove programs tool.
- On my machine the printer installed as /dev/lp0 with group lp, however my username wasn't in that group so I changed the group of the printer to lpadmin, which I was in.
cianer@Detritus:~$ ls -al /dev/lp0 crw-rw---- 1 root lpadmin 6, 0 2009-03-12 19:10 /dev/lp0 cianer@Detritus:~$
This still didn't sort the problem, and for a while I simply ran mtink setuid root cos it was easier than thinking about it. Anyway my mate Jérémy ragging on (......and on.......and on.... ) at me about how setuid was a stupid thing to do finally persuaded me to look into the problem again, whereupon I discovered that the printer seems to be /dev/usb/lp0 and not /dev/lp0 as I initially thought. I changed /dev/usb/lp0 to the lpadmin group and there was much rejoicing. cianer@Detritus:~$ ls -la /dev/lp0 crw-rw---- 1 root lpadmin 6, 0 2009-03-12 19:10 /dev/lp0 cianer@Detritus:~$ ls -la /dev/usb/lp0 crw-rw---- 1 root lp 180, 0 2009-03-24 22:52 /dev/usb/lp0 cianer@Detritus:~$ sudo chgrp lpadmin /dev/usb/lp0 cianer@Detritus:~$ ls -la /dev/usb/lp0 crw-rw---- 1 root lpadmin 180, 0 2009-03-24 22:52 /dev/usb/lp0 cianer@Detritus:~$ This time when I ran mtink it prompted me to select the model of the printer, however Stylus C64 wasn't on the list so I selected Stylus C62 instead. There was a brief delay while mtink queried the printer and then it automagically detected it was a Stylus C64 and returned my ink levels. Happy days.Create a quicklaunch button in the top bar so your wife can find the application easily after going to all that trouble! |