Print directly from your Ubuntu computer

From ImageWiki

Jump to: navigation, search

HOWTO: Print directly from your Ubuntu computer

You can always print by copying files from your computer to e.g. ask and issue lp filename, with filename being the name of the file to print. Getting printing to work without having to do the copying step is a little work tricky. If you are using Ubuntu or comparable Linux system, read on...

Commands to be issued in a shell are written in italic. The guide is certainly incomplete. Please ask with questions/suggestions (authors email below).

  1. get the file cups_backend.tar.gz
  2. decompress and untar the file: tar xvzf cups_backend.tar.gz
  3. copy the file 'ssh to /usr/lib/cups/backend and call it sshlpd
  4. copy the file PostScript.ppd to /etc/cups/ppd and call it e.g. diku.ppd
  5. The next couple of lines will allow the lp user to log in to ask.diku.dk. Execute sudo mkdir /var/spool/lpd and sudo chown lp.lp /var/spool/lpd
  6. execute sudo su - and su lp
  7. still as user lp execute cd and verify that pwd outputs /var/spool/lpd
  8. execute ssh-keygen -t dsa and press return a couple of times
  9. append the contents of the file /var/spool/lpd/.ssh/id_dsa.pub to your ~/.ssh/authorized_keys file at ask.diku.dk
  10. execute ssh username@ask.diku.dk with username your login. Answer yes to the warning
  11. log out from ask and execute the above command once more. You should now be logged in to ask.diku.dk without entering your password
  12. log out from ask and press CTRL-D two times to get you back to your usual user
  13. restart cups: sudo /etc/init.d/cups restart
  14. goto to the System -> Administration -> Printing and choose New
  15. choose Other and enter sshlpd:username@ask.diku.dk/n1a under 'Enter device URI'. Remember to replace username with your login
  16. click 'Forward' and select 'Provide PPD file'
  17. click the selection box and choose the file '/etc/cups/llp/diku.ppd'
  18. click 'Forward' and complete the wizard
  19. say a prayer and hope for the best :-)
  20. .. and try a test page


05-25-2010 Stefan Sommer <sommer@diku.dk>

Personal tools