/usr/share/doc/ltspfs/examples/notify is in ltspfs 1.5-1.
This file is owned by root:root, with mode 0o755.
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 | #!/usr/bin/python3
# Issue notification on device insertion or removal. Useful for desktops such
# as KDE or LXDE which do not automatically display icons for ltspfs mounts.
#
# To use this feature, copy this file into /etc/ltspfs/mounter.d and
# mark as executable.
#
# Requires python3-notify2 to be installed.
import sys
mode=sys.argv[1]
ltspfs_mount=sys.argv[2]
if mode == 'cleanup':
# do nothing in cleanup mode.
sys.exit(0)
import notify2
if not notify2.init("ltspfs"):
sys.exit(1)
n = notify2.Notification("ltspfs","%s" % mode+' '+ltspfs_mount)
n.show()
|