Tag Info

New answers tagged

1

I have a system configured to do the same and it looks like this: SUBSYSTEM=="input", ACTION=="remove", RUN+="/usr/local/sbin/yubikey_gone" Then the script /usr/local/sbin/yubikey_gone contains: #!/bin/sh if [ "x$ID_MODEL" != "xYubico_Yubikey_II" ]; then exit 0 fi exec su vandry -c "DISPLAY=:0.0 gnome-screensaver-command --lock" This invokes the ...


0

If you must have it automatically detect the display when it is plugged in, it seems that the cleanest solution is to add a UDEV rule to run a script containing your xrandr commands. Here is an example from one user's solution1: Monitor (output) UDEV events with udevadm This step will be most important for each user. Run udevadm monitor --environment ...


0

udev? The best alternative is not to use it. And by learning how to not use it Linux and the *NIX world will begin to make more logical sense. The best long-term alternative is to use static devices (see note). If you've got the driver, the Linux kernel manages hot-plugging. I prefer not having udevd running, ever. dbus is another matter. It does slow ...


3

Unless you can't (or don't want to) use persistent device naming (mentioned by @jasonwryan in his comment), you can: try swapping the installed drives until you achieve the desired outcome. This however, will be tedious and error prone, plus it is likely to break the other installed OSes. tell your bootloader to pass root=/dev/sdc1 to the kernel when ...


2

So, assuming your device sits are /dev/sdc try an ls -la /sys/dev/block/* | grep sdc That should be a good start. However, I will say that Bus 001 Device 011: ID 058f:6387 Alcor Micro Corp. Flash Drive looks rather suspicious :) Also, remember that sdX will get generated on the fly due to udev. So you might be hard pressed to make a constant script. ...



Top 50 recent answers are included