File /etc/udev/rules.d/90-test.rules
:
ACTION=="add", SUBSYSTEM=="usb", ENV{DISPLAY}=":0", ENV{HOME}="/home/user", RUN+="/etc/udev/rules.d/test.sh"
File /etc/udev/rules.d/test.sh
:
#!/usr/bin/env bash
/usr/bin/kcalc &
When I plug in an USB device, kcalc starts as expected (2 times because the rule is kept simple). But after 4 to 5 seconds, kcalc closes again. I also tried it with nohup
but without success. Same occurs for other applications like konsole
and kate
.
When I don't run kcalc in the background (no &
), it doesn't close but it seems like further processing is blocked. The Device Notifier notifies me only after I closed kcalc. I dislike this solution because it affects other parts of the system.
So why do the applications close and how can I prevent it?