Results 1 to 2 of 2

Thread: cups-pdf PostProcessing send email with Thunderbird

  1. #1
    Join Date
    Sep 2009
    Beans
    5

    cups-pdf PostProcessing send email with Thunderbird

    I would like my cups-pdf printer post processing to launch Mozilla Thunderbird with the .pdf as an attachment.

    In /etc/cups/cups-pdf I have the PostProcessing key set to /usr/local/bin/cupscript.sh

    cupscript.sh

    Code:
    #!/bin/bash
    CURRENT_PDF="${1}"
    CURRENT_USER="${2}"
    DISPLAY=:0.0 /
    export DISPLAY
    XAUTHORITY=/home/${CURRENT_USER}/.Xauthority
    export XAUTHORITY
    thunderbird -compose attachment=file:$CURRENT_PDF
    exit
    If I execute the script from the shell it works. Example:

    $ ./cupscript.sh /home/user/PDF/file.pdf

    If I print to the pdf printer it will not launch Thunderbird.

    If I have the script launch Evolution it works but I would rather use Thunderbird.

    Code:
    #!/bin/bash
    CURRENT_PDF="${1}"
    CURRENT_USER="${2}"
    DISPLAY=:0.0
    export DISPLAY
    XAUTHORITY=/home/${CURRENT_USER}/.Xauthority
    export XAUTHORITY
    evolution mailto:?attach=$CURRENT_PDF
    exit
    aa-complain or even stopping the apparmor service makes no difference.

    Setting the loglevel to 7 in cupd-psd.conf does not give any errors about thinderbird.
    If Thunderbird leaves a logfile somewhere I don't know where it is.

    Anyone care to take a stab at this or throw me a bone? I'm stumped.

  2. #2
    Join Date
    Sep 2009
    Beans
    5

    Re: cups-pdf PostProcessing send email with Thunderbird

    Update:

    It works if a Thunderbird is already open.

    The same is true for Evolution (sort-of). It only works if the evolution background processes are running.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •