My attempt is this: If a certain USB-device is plugged in, I want to open a gnome-terminal window in my desktop-environment. This newly opened window must be able to be interactive, this means, the script, which, besides, opens the window, must then be able to read from stdin, in order to react to user commands. I managed to open the gnome-terminal as a part of my script, which runs on the specifoc udev-rule. First I exported the display, then I ran "gnome-terminal". Now I want immediately to echo from this script to the newly opened terminal.
From what we can get out of here
udev seems not to be intended for this. The script seems not to know, that it has been invoked in the context of a shell.
From what I could read here
there are some ideas, on how to achieve some similar thing like what I want, via pipes. But there is nothing mentioned about a udev-rule bing the initial invoker.
The question still remains:
Is it still possible in a kind of combined approach to open a gnome-terminal on an udev-rule, and pass, as a first step, a string to it, for prompting let's say: "Target device was plugged in. Enter "a" or "b or "c".
Can these approaches generally be combined ? This seems to be one result, which I could already answer, but it deals with a helper-application
I would like to achieve it with the usage of more deeper technique, also to get in touch with the technical background of challanges like this.
Or is the simple answer NO. You can't ? ( though hard to believe, in an such highly customizable os, what linux really is ).