Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Implement auto executing actions on specific system dbus events #4

Open
MurzNN opened this issue May 3, 2022 · 5 comments

Comments

@MurzNN
Copy link

MurzNN commented May 3, 2022

Will be good to add ability to automate launching scripts not only by schedule, but by system events too (dbus on Linux and events on Windows), is it possible? For example, if the user inserts a specific flash drive, or usb mouse, or bluetooth device is connected/disconnected, WiFi network with specific name is connected, etc.

If something like this already exists, please describe how to use it.

And if such tool is already exists as separate project, please point to it. Thanks!

@gentee
Copy link
Owner

gentee commented May 3, 2022

Unfortunately I have not worked with dbus and Windows events. Therefore, I cannot implement this feature in Go.
If I had the source code (or go library) to use dbus or events, then I could add it.
Another option, if there is a program that implements the desired functionality, then I can integrate Eonza with it.

@MurzNN
Copy link
Author

MurzNN commented May 3, 2022

I've found some info about integration of Golang with dbus:
https://pkg.go.dev/github.com/godbus/dbus
https://github.com/tianon/debian-golang-dbus
https://www.kekskurse.de/posts/2021-03-07-signal-dbus-golang/
https://habr.com/ru/post/223135/ (achtung, Russian language 😏).

Hope they help.

@gentee
Copy link
Owner

gentee commented May 3, 2022

Okay. I will try to implement something for dbus, but I don't promise that I will do it soon.

@MurzNN
Copy link
Author

MurzNN commented May 3, 2022

"лучше поздно чем никогда" © 😉

This will be an unique very cool feature for your app and must bring a new userbase, I hope with commercial part too!

Because I can't find now any ready to use solution for automating script launching by system events via dbus, only long tough instructions with bash bedsheets 😄

@gentee
Copy link
Owner

gentee commented May 30, 2022

I tried using the godbus/dbus library, but I couldn't check if I'm doing something right or not. For example, I could not track the connection / disconnection of a USB flash drive. I need to know a set of interfaces and methods that can be tested on Mint/Ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants