Some usage and integration information.
* On KDE, LD_PRELOAD can be set in a file in the
.config/plasma-workspace/env directory. This will enable libtrash
throughout the KDE session.
* libtrash is not active in the Dolphin file manager which has its own
trash can.
* Some user defaults can be set. There are some system defaults and any
settings in the user directory will override the system defaults. Here
is what I have in my $HOME/.libtrash file
$cat $HOME/.libtrash
IGNORE_EXTENSIONS = o;log;aux;swp;bak;tmp;vmdk;out;lrz;file;h;lck
- don't preserve files with these extensions.
TEMPORARY_DIRS = /tmp;/var;/share/software/cache;
- ignore these directories and don't preserve files in them
IGNORE_RE = conftest.*;*cache;config.*
- use regular expressions and don't preserve matching files
REMOVABLE_MEDIA_MOUNT_POINTS = /run;/media;/mnt;/dev
- ignore these removable directories
USER_TEMPORARY_DIRS = mnt;tmp;temp
- ignore user-owned temporary directories
PRESERVE_FILES_LARGER_THAN = 1G
- do not preserve files larger than...
Here are the system defaults.
TRASH_CAN = "Trash"
- name of user trash can in $HOME
IN_CASE_OF_FAILURE = PROTECT | ALLOW_DESTRUCTION
- if there is some failure in calling the unlink() or other function,
preserve the file
SHOULD_WARN = NO
- if libtrash is disabled (i,e, TRASH_OFF=YES) issue a warning on stderr
PROTECT_TRASH = YES
- do not delete files in the user trash can
IGNORE_EXTENSIONS = "o;log;aux"
- (see above)
IGNORE_HIDDEN = YES
- do not preserve hidden files
IGNORE_EDITOR_BACKUP = YES
- do not preserve editor backup files
IGNORE_EDITOR_TEMPORARY = YES
- ignore editor temporary files
LIBTRASH_CONFIG_FILE_UNREMOVABLE = YES
- protect user .libtrash file
GLOBAL_PROTECTION = YES
- IF the user has permission in a foreign directory, not excluded above,
move files to ~/Trash/SYSTEM_ROOT/dir/file. (See SYSTEM_ROOT below)
If GLOBAL_PROTECTION=NO, then the foreign file will be removed directly
if the user has permission.
TRASH_SYSTEM_ROOT = "SYSTEM_ROOT"
- subdir that will contain foreign mount point files
UNREMOVABLE_DIRS = "/bin;/boot;/dev;/etc;/lib;/lib64;/opt;/sbin;/usr"
- do not remove these directories or files inside them. Ever.
TEMPORARY_DIRS "/run;/tmp;/var"
- (see above)
REMOVABLE_MEDIA_MOUNT_POINTS "/cdrom;/media;/mnt/run"
- (see above)
EXCEPTIONS
"/etc/mtab;/etc/resolv.conf;/etc/adjtime;/etc/upsstatus;/etc/dhcpc"
- These files can be removed even if in an UNREMOVABLE_DIR
USER_TEMPORARY_DIRS ""
- (see above)
IGNORE_REĀ = "files*"
- ignore files matching anything listed using regular expressions
--
Peter Hyman