You are not logged in.
I'm trying to figure out how to do the following;
* Udev detects monitor plugin, sends a signal
* A systemd/user daemon picks up the signal
* Daemon runs a command to adjust monitors
I do not like the wiki solution, which involves hard coding the username and path for the scripts in udev rules; which i don't like for various reasons. (I use different WM on different ttys, which makes the method unportable. What not, each Xorg instance should be able to understand that monitors changed and adapt by themselves)
So far, I have the script part done. I'm sure the systemd process is simple, but I haven't written anything more complicated than a simple service. I do not understand sockets and stuff, so if this is the way to go with these kind of stuff; I would love to learn things.
Can anyone help me out with the first part specifically?
Offline
Offline
Doesn't this script only import XAUTHORITY, USER and DISPLAY variables? I would like to set it up so that the daemon to change screen resolution runs as a user process; and I want to get udev to send a signal to a process agnostically. (Say user1 is on tty1 running DISPLAY=:0 and user2 is on tty2 running DISPLAY=:1 ; they both have their own seperate daemons, they read the signal and they both run their own respective scripts that arranges xrandr)
I think I can use inotify to look for changes in `/sys/class/drm/card0/card*-*/enabled` but would that be a waste of resources? Or run `udevadm monitor`.
Last edited by bbaserdem (2018-09-03 21:52:41)
Offline
This reads as if you want to implement a dbus service which would have a method called by udev which would trigger a dbus signal that a process in each user session would be monitoring that would do something.
Offline
This reads as if you want to implement a dbus service which would have a method called by udev which would trigger a dbus signal that a process in each user session would be monitoring that would do something.
I think that would be the way to implement it. I'll read up on it.
Offline