Questions tagged [events]

59 questions
48
votes
2 answers

How do I find out what program 'owns' a hotkey?

I'm running XFCE 4.12 on top of Gentoo with a 4.2.0 kernel. My PlayPause button on my keyboard used to work as a global hotkey for VLC. Now VLC won't even recognize the key. It does see "Alt + Media Play Pause" but not the key alone. Is there a…
Andrew Redd
  • 1,279
  • 3
  • 14
  • 24
36
votes
1 answer

monitoring events (keyboard, mouse) in X

Is it possible to display all events that are generated in Xorg? Such as keyboard pressed, mouse events...?
fstab
  • 880
  • 4
  • 11
  • 18
18
votes
1 answer

Explain EV in /proc/bus/input/devices data

Can anybody explain to me what the EV value in /proc/bus/input/devices is? The keyboard always has value 120013. Why?
Gabriel
  • 287
  • 1
  • 2
  • 5
18
votes
5 answers

Execute a shell command upon a click event in a web page

Is there a way to execute a bash command when I click on a text in a browser? The web page is on computer A, the browser is on computer B : I want to execute the code on computer B, e.g hsetroot to change the wallpaper when clicking an image.
bob dylan
  • 1,832
  • 3
  • 20
  • 31
13
votes
3 answers

With systemd-networkd, perform an action upon network configuration change

I am switching from Debian’s ifupdown to systemd-networkd, and it mostly works fine. One missing bit is that upon every network change, I want to call killall -ARLM tinc, so that my VPN is going up in a timely manner. Does systemd or…
Joachim Breitner
  • 1,347
  • 2
  • 16
  • 25
12
votes
2 answers

Can I stop Linux from listening to a USB input device as a keyboard, but still capture events with a program?

I have a USB barcode scanner at /dev/input/event0 (/dev/input/by-id/usb-Metrologic_Metrologic_Scanner-event-kbd), and scanning a barcode causes it to send keypress events. I'm capturing these keypresses using the libdevinput Ruby library, which…
ndbroadbent
  • 341
  • 2
  • 12
11
votes
2 answers

`xdotool` does not send keys

I am trying to send keystrokes via xdotool. However, sending does not work properly. Below is the log of a script that should select all the text in Gedit and copy it (but it does nothing instead), along with its output (captured by redirecting…
Eleno
  • 1,849
  • 4
  • 27
  • 39
10
votes
2 answers

Capturing key input from events device and mapping it (toggle TouchPad key is unmapped)

I have a Lenovo IdeaPad Yoga 13 with Ubuntu 13.10 Installed. The device has a "Toggle TouchPad" button on the keyboard (F5). The keyboard's F* buttons are reversed (so to get F5, I need to press Fn + F5, and F5 is actually the toggle key). I've…
Hosh Sadiq
  • 415
  • 2
  • 5
  • 14
6
votes
2 answers

(ubuntu 16.04) How can I detect a device independent USB insert event

I am trying to detect an USB insert regardless of the device it is. Eg: A phone, a battery pack, a biometric system etc., which may or may not be recognized by Linux (no drivers or nothing to "Drive/run"). Presumably, Linux will detect the USB…
Vivek
  • 91
  • 1
  • 2
  • 4
4
votes
1 answer

How can I secure my Ubuntu 13.04 to prevent network attacks?

Is there a way I could protect my pc computer from being hacked in an event where the internet conection will be opened? Thing is I am going to Campus Party Colombia 2013 and I was sugested to format my computer before going and after the event, Is…
Francisco
  • 163
  • 9
4
votes
3 answers

strace a short-lived process

I'm trying to learn about the behavior of a short-lived process that's created by one of my applications. I know these things about this process: Part of the name of the process. The name and PID of the application that will create this…
user288221
4
votes
3 answers

How can I run a shell script on input device event

I have a USB remote presenter that appears as a keyboard. Using evtest I can see the input events from the device. How can I capture those events in a shell script? I had see some solutions using C but I would prefer something with only bash if…
paulequilibrio
  • 216
  • 1
  • 3
  • 9
4
votes
0 answers

Monitor the creation of new processes

I want to get a notification whenever a new process is created. I've tried to use inotify on /proc, but it didn't report any event even though a new directory appeared in /proc. I could list the /proc directory in a loop and check if one more…
linuser
  • 126
  • 1
  • 8
4
votes
1 answer

xautolock: how to auto-unlock on user activity?

I need to run a script after a period of user inactivity. For that I use the wonderful program xautolock. Now, I also need to run another script when the activity is resumed (e.g. mouse is moved or a key is pressed). How do I do that? Any sort of an…
Alexander Shcheblikin
  • 1,768
  • 1
  • 14
  • 16
3
votes
0 answers

How to run a script when a directory is accessed?

I want a device mounted to a mountpoint only when it is needed, when it is accessed (for the first time). How to run a script when a folder is accessed in Linux (or Ubuntu)? Please note that the device is an encrypted container and the script will…
ñull
  • 151
  • 5
1
2 3 4