SRDB ID: 17705 SYNOPSIS: Customizing remote printing. DETAIL DESCRIPTION: User would like to config print queue as follows: On Client: User prints file to network print queue on server (i.e. lp -d /etc/hosts) On Server: Instead of printing to an actual printer, user would like for file to be 'printed' as a file with the same basic name as on client in a pre-specified directory. (ie saved as /tempdir/hosts) User wants files of the same name overwritten and other''s created in the specified directory (i.e., new hosts file will overwrite old but motd creates new file). SOLUTION SUMMARY: 1) Add a local printer on server with device /dev/null (ie. #lpadmin -p fileprinter -v /dev/null) 2) Modify interface file to turn off banner and to output file correctly (ie. #vi /etc/lp/interfaces/fileprinter change nobanner='no' to nobanner='yes' change FILTER line (line 516 in 2.6 standard interface file) from: FILTER='${LPCAT} 0' to: FILTER='${LPCAT} | /usr/bin/tee /tempdir/`basename ${title}`' Add the following line after the FILTER line: chmod 777 /tempdir/`basename ${title}` Save the file (Shift-zz or :wq in command mode) 3) Create the target directory on server and open up the permissions #mkdir /tempdir #chmod 777 /tempdir 4) Create remote printing queue on the client: #lpadmin -p fileprinter -s 5) Print test file on client #lp -d /etc/hosts This should create a file on the server named /tempdir/hosts with the contents of the hosts file of the client.