Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #160468

Xorg reconfigure on keyboard/VGA screen connect with systemd?

From martin f krafft <madduck@madduck.net>
Newsgroups linux.debian.user
Subject Xorg reconfigure on keyboard/VGA screen connect with systemd?
Date 2015-11-12 07:20 +0100
Message-ID <qtToJ-5fA-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hello,

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?

Thanks,

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

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Xorg reconfigure on keyboard/VGA screen connect with systemd? martin f krafft <madduck@madduck.net> - 2015-11-12 07:20 +0100
  Re: Xorg reconfigure on keyboard/VGA screen connect with systemd? Andreas Henriksson <andreas@fatal.se> - 2015-11-12 14:40 +0100
  Re: Xorg reconfigure on keyboard/VGA screen connect with systemd? Julien Cristau <jcristau@debian.org> - 2015-11-12 16:40 +0100

csiph-web