Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vodolaz095/scream
Recieve and show freedesctop.org notification-daemon events from remote machine via curl
https://github.com/vodolaz095/scream
Last synced: about 4 hours ago
JSON representation
Recieve and show freedesctop.org notification-daemon events from remote machine via curl
- Host: GitHub
- URL: https://github.com/vodolaz095/scream
- Owner: vodolaz095
- License: mit
- Created: 2015-10-26T08:22:40.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-19T19:22:06.000Z (almost 9 years ago)
- Last Synced: 2024-04-09T23:07:25.275Z (7 months ago)
- Language: Go
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Scream
======================[![Build Status](https://travis-ci.org/vodolaz095/scream.svg)](https://travis-ci.org/vodolaz095/scream)
Application for receiving notifications by POST requests via `curl` and
displaying them via `notification-daemon` service in modern `linux` distrosRequirements
======================You need to install package `notification-daemon` to be able to start application.
It can be done via your favourite package manager, like `dnf````shell
$ su -c 'dnf install notification-daemon'
```
I have created this package on recent versions of Fedora/Centos Linux distributions,
so i wrote path to `notify-send` and unit tests in assumption you have this, or similiar distros.
So, i assume the `/usr/bin/notify-send` is in place, the daemon of `/usr/libexec/notification-daemon`
is running, and executing in console```shell
$ notify-send test
```
draws you a fancy notification with text `test`.
Usage
======================Firstly, you need to start application on you desktop PC.
```shell
$ scream --key=someHardKeyToMakeSpammersSad --listen=0.0.0.0:8082
```
Also you need to open port for this application
```shell
su -c 'firewall-cmd --permanent --add-port=8082/tcp'
```
On `Fedora 22` with `LXDE` environment, you can autostart your application
by using the startup scripts to start `notification-daemon` and `scream` as the ones
in `contrib/.config/autostart/`. You need to save them to `~/.config/autostart`.Then, you can send notifications to your desktop from remote\local machine using this, or analogous CURL commands
```shell
$ curl -X POST -d '{"type":"Notification","message":"Hello!","key":"topSecret"}' http://localhost:8082/
$ curl -X POST -d type=Notification -d message=Hello! -d key=topSecret http://localhost:8082/
```
Parameters:
======================- `key` - secret key to verify that message is send from known host
- `listen` - address to bind application to - examples - `127.0.0.1:8082`, `0.0.0.0:8082`,`192.168.1.2:8082`. Default is `0.0.0.0:8082`The MIT License (MIT)
======================Copyright (c) 2015 Ostroumov Anatolij
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.