/usr/share/doc/libtrash/README.Debian is in libtrash 2.4-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | libtrash for Debian
-------------------
To use libtrash, you need to get ld to pre-load the library before your
application is run. This can be done by setting the LD_PRELOAD environment
variable:
$ LD_PRELOAD=/usr/lib/libtrash/libtrash.so.2.4
$ export LD_PRELOAD
This will mean that all applications that are started from the shell after
LD_PRELOAD was set will use libtrash. The only issue with this solution is that
the shell you originally set the LD_PRELOAD variable from will not be using
libtrash, ie:
$ export LD_PRELOAD=/usr/lib/libtrash/libtrash.so.2.4
$ rm my_file
will be OK, but:
$ export LD_PRELOAD=/usr/lib/libtrash/libtrash.so.2.4
$ echo "asdf" > my_file
will overwrite "my_file" with "asdf", as the shell (which isn't using libtrash)
handles the ">" redirect. One method which could be used to fix this is set the
LD_PRELOAD variable before the shell is started. You could do this by
re-starting the shell in your ~/.bash_profile with something like the
following (this could be dangerous, however):
LIBTRASH=/usr/lib/libtrash/libtrash.so.2.4
LIBTRASH_dest=$LIBTRASH
if test -L $LIBTRASH ; then
LIBTRASH_dest="$(dirname $LIBTRASH)/$(ls -l "$LIBTRASH" | \
sed -e 's/^.\+ -> //')"
fi
if test x${LD_PRELOAD+set} = x -a -f "$LIBTRASH_dest" ; then
LD_PRELOAD="$LIBTRASH"
export LD_PRELOAD
if test x$0 = x-bash ; then
exec bash ${1+"$@"}
else
exec $0 ${1+"$@"}
fi
fi
Any other ideas on how to set this up would be appreciated. Please email such
suggestions to me.
-- Timshel Knoll <timshel@debian.org> Mon, 18 Mar 2002 02:26:15 +1100
|