(x-set-selection nil (file-truename buffer-file-name))
Documentation for x-set-selection says:
This function sets a “selection” in
the X server. It takes two arguments:
a selection type type, and the value
to assign to it, data. If data is nil,
it means to clear out the selection.
Otherwise, data may be a string, a
symbol, an integer (or a cons of two
integers or list of two integers), an
overlay, or a cons of two markers
pointing to the same buffer. An
overlay or a pair of markers stands
for text in the overlay or between the
markers.
The argument data may also be a vector
of valid non-vector selection values.
Each possible type has its own
selection value, which changes
independently. The usual values of
type are PRIMARY, SECONDARY and
CLIPBOARD; these are symbols with
upper-case names, in accord with X
Window System conventions. If type is
nil, that stands for PRIMARY.