Steps for Post-install:

Check whether there is already a CUPS-PDF queue with "LC_ALL=C lpstat -v
| grep 'cups-pdf:/'". If so, assign the name of the first queue found to
$queue and skip the next paragraph.

Assign "PDF" to the variable $queue, then start a "while" loop checking
"LC_ALL=C lpstat -v | cut -d ':' -f 1 | cut -d ' ' -f 3 | grep
^$queue\$" and exit the "while" loop if it fails. In the while loop
asign a new name to $queue: PDF, PDF1, PDF2, ... Then create the queue
with queue name $queue.

Then check with "LC_ALL=C lpstat -d | grep 'system default
destination:'" whether there is already a default printer. If not, set
the PDF printer as default with "lpadmin -d $queue".

-- 
add/remove the PDF printer in CUPS at installation/removal time
https://launchpad.net/bugs/82674

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to