Skip to content

A linux desktop app that notifies for user logins, failed systemd services, journal(log) patterns and optionally the status of selected services

License

Notifications You must be signed in to change notification settings

gkarakou/systemd-denotify

Repository files navigation

systemd-denotify

Updated to v1.3

GENERAL

systemd-denotify is a set of classes that leverage the power of systemd-python library and many other great python bindings. These classes provide desktop and email notifications upon a user login, when systemd files are modified and when various patterns match in journal logs. There is also another class that at a specified interval (by default 30 minutes) notifies the user for the status of some services. One can override the notifications he/she gets by editing the file /etc/systemd-denotify.conf.

CAUTION:

if you use vim to edit files that are being monitored by systemd-denotify.py you will be notified when the backup files that vim writes before saving a file that is modified are written too(also known as swap files =.swp). To overcome this annoyance you can edit /root/.vimrc and add these lines:

set nobackup

set nowritebackup

set noswapfile

You can expect data corruption if you dont have a ups installed, you have been warned.

INSTALLATION

Though this module is pypi ready i found it really tedious to install all the dependencies from pip. Unfortunately this module/app wont be uploaded to pypi. Hopefully this package gets its way into the repos. Below are some guidelines to generate packages for debian,ubuntu,fedora. Arch should not be difficult either- only a proper PKGBUILD would be needed.

SOURCE DISTRIBUTION

git clone https://github.com/gkarakou/systemd-denotify.git

cd systemd-denotify

python2 setup.py sdist


BUILD FOR FEDORA 22 AND UPWARDS

git clone https://github.com/gkarakou/systemd-denotify.git

cd systemd-denotify

sudo python setup.py bdist_rpm --requires "python2, systemd-python, notify-python, pygobject2, python-slip-dbus, python-inotify, systemd, systemd-libs, libnotify, dbus, dbus-python" --build-requires="python-setuptools" --vendor="[email protected]" --post-install=postinstall.sh --no-autoreg

sudo dnf --nogpgcheck install dist/systemd-denotify-1.3-1.noarch.rpm

trouble installing?

Verify that you have all the necessary build tools preinstalled:

sudo dnf install auto-buildrequires rpm-build-libs python2-devel

DEBIAN/UBUNTU

sudo apt-get install python-stdeb fakeroot python-all

git clone https://github.com/gkarakou/systemd-denotify.git

cd systemd-denotify

sudo python setup.py sdist_dsc --depends "systemd systemd-libs dbus libnotify python-systemd python-dbus python-notify python-gobject python-gi python-inotify xorg notification-daemon" --build-depends "python-setuptools" bdist_deb

#it should produce a .deb package ready to be installed in deb_dist directory (hint:ls -al deb_dist|grep deb):

sudo dpkg -i deb_dist/systemd-denotify-$VERSION.deb

sudo apt-get -f install

If you find any troubles you can follow this guide: http://shallowsky.com/blog/programming/python-debian-packages-w-stdeb.html

ARCHLINUX

systemd-denotify is already in AUR: https://aur.archlinux.org/packages/systemd-denotify/

USAGE

Simply read and edit the /etc/systemd-denotify.conf file.

About

A linux desktop app that notifies for user logins, failed systemd services, journal(log) patterns and optionally the status of selected services

Resources

License

Stars

Watchers

Forks

Packages

No packages published