[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Xorg reconfigure on keyboard/VGA screen connect with systemd?


Can I use systemd to automatically run scripts as the owner of an
X session when a USB keyboard or a VGA screen are connected to the
local machine? Or what other mechanism would you use?

In the past, doing so automatically would involve some sort of hook
in /etc (invoked as root), which would then have to /bin/su to the
user (hoping it'd even know to whom), import the Xauthority and then
run the command. What a hack.

systemd's integrates with everything desktop-ey, so I am led to
believe it should be possible to do better nowadays.

How? Does anyone have an example?

Or if systemd is (still) not the right tool for the task, are there
more modern approaches people use?


@martinkrafft | http://madduck.net/ | http://two.sentenc.es/
(a)bort, (r)etry, (p)retend this never happened
spamtraps: madduck.bogus@madduck.net

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)

Reply to: