Welcome to Eric Hameleers (Alien BOB)'s Wiki pages.

If you want to support my work, please consider a small donation:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

slackware:cups [2009/11/12 20:09]
alien Backend needs to be run as root.
slackware:cups [2010/02/14 21:46] (current)
alien Set the pfd script executable for all users (including user 'lp' which cupsd uses nowadays)
Line 210: Line 210:
  
   * Next, we are going the create the file that provides or "pdf backend" functionality. Defining a new backend is really no more than creating an executable file called in CUPS's backends directory ''/usr/lib/cups/backend'' - this file's name will become the name of the backend. So, for the "pdf" backend we create the file ''/usr/lib/cups/backend/pdf'' and make this a shellscript, the contents of which you can find in the section below - [[#pdf_printer_scripts|PDF Printer Scripts]]. Do not forget to make this new "pdf" script executable: <code>   * Next, we are going the create the file that provides or "pdf backend" functionality. Defining a new backend is really no more than creating an executable file called in CUPS's backends directory ''/usr/lib/cups/backend'' - this file's name will become the name of the backend. So, for the "pdf" backend we create the file ''/usr/lib/cups/backend/pdf'' and make this a shellscript, the contents of which you can find in the section below - [[#pdf_printer_scripts|PDF Printer Scripts]]. Do not forget to make this new "pdf" script executable: <code>
-chmod 754 /usr/lib/cups/backend/pdf +chmod 755 /usr/lib/cups/backend/pdf 
-</code> This backend will in turn call two other scripts which we shall place in the library directory ''/usr/lib/cups/pdf'' - see next bullet point. The reason the script did not get world-executable permissions, is that in this case the backend program will be run as the //root// user. Otherwise, the backend is run using the unprivileged user account, typically "lp". The script needs to be run as root in order to change ownership of the resulting PDF file to the user who printed it.+</code> This backend will in turn call two other scripts which we shall place in the library directory ''/usr/lib/cups/pdf'' - see next bullet point.\\ The reason the script did not get world-executable permissions, is that the backend program needs to be run as the //root// user - CUPS will only do that if the program is not world-executable. Otherwise, the backend would be run using the unprivileged user account, typically "lp". //The script needs to run as root in order to be able to change ownership of the resulting PDF file to the user who printed it.//
  
   * Now that we have the ''pdf'' backend file in place, the next step is to create the two helper scripts that our ''pdf'' script uses. One script does the conversion of PostScript to PDF, while the second does the actual email delivery.\\ Install these two files called "''ps2pdf.cups''" and "''sendpdf''" into the cups library directory which we just created: ''/usr/lib/cups/pdf''. You can find these scripts in the section below called [[#pdf_printer_scripts|PDF Printer Scripts]]. Do not forget to make these files executable: <code>   * Now that we have the ''pdf'' backend file in place, the next step is to create the two helper scripts that our ''pdf'' script uses. One script does the conversion of PostScript to PDF, while the second does the actual email delivery.\\ Install these two files called "''ps2pdf.cups''" and "''sendpdf''" into the cups library directory which we just created: ''/usr/lib/cups/pdf''. You can find these scripts in the section below called [[#pdf_printer_scripts|PDF Printer Scripts]]. Do not forget to make these files executable: <code>

Personal Tools
sponsoring