Linux – command line method to paste file into Thunderbird compose window

clipboardlinuxthunderbirdUbuntu

I'm trying to paste a 3K file into Thunderbird's "Write" window (i.e. for composing new messages).

This (sometimes) works:

date | xclip
# then use middle button to paste

This doesn't work:

cat /tmp/out.txt | xclip
xclip -o | wc    # just to make sure it got there - reports:      70     309    3233
# press middle mouse in Thunderbird's "Write" window - nothing is pasted

But this works:

cat /tmp/out.txt | xclip
# open gedit, paste into gedit, then select-all and copy
# paste into Thunderbird

Is there a limit to what Thunderbird can accept via the X-clipboard?

Is there another way to insert the contents of a file into a Thuderbird compose window?

I'm using Ubuntu 10.10.

Best Answer

How about using the compose command line?

thunderbird -compose "to='recipient@domain.com',subject='Test',body='`cat /tmp/out/txt`' "
Related Question