Keyboard into daemonized Python script

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












How can I insert keyboard input into a daemonized process in Debian?



Background: (At a headless raspberry pi,) I want to run a python3 script at startup (via @reboot in crontab) which is waiting for a keyboard input to control another process. Auto-Login to a shell is enabled. The keyboard input is actually a NFC card which is read and gives a number as keyboard output.



Problem: The input is only processed in the current shell and does nothing. Can this be forwarded to the script/daemon?










share|improve this question





















  • Maybe the answer to this Stackoverflow question can be of some help.
    – Johan Myréen
    Oct 1 '17 at 19:02










  • It could help because it sounds very similar to my problem, if only I could understand what I would need to do ;) Guess I need more reading on the subject.
    – Coxeroni
    Oct 1 '17 at 19:33











  • I came as far as loading a device and grabbing exclusive access with Python's. evdev. How do I actually read an input from it then?
    – Coxeroni
    Oct 1 '17 at 21:37










  • Here.
    – Johan Myréen
    Oct 2 '17 at 1:21














up vote
0
down vote

favorite












How can I insert keyboard input into a daemonized process in Debian?



Background: (At a headless raspberry pi,) I want to run a python3 script at startup (via @reboot in crontab) which is waiting for a keyboard input to control another process. Auto-Login to a shell is enabled. The keyboard input is actually a NFC card which is read and gives a number as keyboard output.



Problem: The input is only processed in the current shell and does nothing. Can this be forwarded to the script/daemon?










share|improve this question





















  • Maybe the answer to this Stackoverflow question can be of some help.
    – Johan Myréen
    Oct 1 '17 at 19:02










  • It could help because it sounds very similar to my problem, if only I could understand what I would need to do ;) Guess I need more reading on the subject.
    – Coxeroni
    Oct 1 '17 at 19:33











  • I came as far as loading a device and grabbing exclusive access with Python's. evdev. How do I actually read an input from it then?
    – Coxeroni
    Oct 1 '17 at 21:37










  • Here.
    – Johan Myréen
    Oct 2 '17 at 1:21












up vote
0
down vote

favorite









up vote
0
down vote

favorite











How can I insert keyboard input into a daemonized process in Debian?



Background: (At a headless raspberry pi,) I want to run a python3 script at startup (via @reboot in crontab) which is waiting for a keyboard input to control another process. Auto-Login to a shell is enabled. The keyboard input is actually a NFC card which is read and gives a number as keyboard output.



Problem: The input is only processed in the current shell and does nothing. Can this be forwarded to the script/daemon?










share|improve this question













How can I insert keyboard input into a daemonized process in Debian?



Background: (At a headless raspberry pi,) I want to run a python3 script at startup (via @reboot in crontab) which is waiting for a keyboard input to control another process. Auto-Login to a shell is enabled. The keyboard input is actually a NFC card which is read and gives a number as keyboard output.



Problem: The input is only processed in the current shell and does nothing. Can this be forwarded to the script/daemon?







debian raspberry-pi startup python3






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 1 '17 at 17:59









Coxeroni

12




12











  • Maybe the answer to this Stackoverflow question can be of some help.
    – Johan Myréen
    Oct 1 '17 at 19:02










  • It could help because it sounds very similar to my problem, if only I could understand what I would need to do ;) Guess I need more reading on the subject.
    – Coxeroni
    Oct 1 '17 at 19:33











  • I came as far as loading a device and grabbing exclusive access with Python's. evdev. How do I actually read an input from it then?
    – Coxeroni
    Oct 1 '17 at 21:37










  • Here.
    – Johan Myréen
    Oct 2 '17 at 1:21
















  • Maybe the answer to this Stackoverflow question can be of some help.
    – Johan Myréen
    Oct 1 '17 at 19:02










  • It could help because it sounds very similar to my problem, if only I could understand what I would need to do ;) Guess I need more reading on the subject.
    – Coxeroni
    Oct 1 '17 at 19:33











  • I came as far as loading a device and grabbing exclusive access with Python's. evdev. How do I actually read an input from it then?
    – Coxeroni
    Oct 1 '17 at 21:37










  • Here.
    – Johan Myréen
    Oct 2 '17 at 1:21















Maybe the answer to this Stackoverflow question can be of some help.
– Johan Myréen
Oct 1 '17 at 19:02




Maybe the answer to this Stackoverflow question can be of some help.
– Johan Myréen
Oct 1 '17 at 19:02












It could help because it sounds very similar to my problem, if only I could understand what I would need to do ;) Guess I need more reading on the subject.
– Coxeroni
Oct 1 '17 at 19:33





It could help because it sounds very similar to my problem, if only I could understand what I would need to do ;) Guess I need more reading on the subject.
– Coxeroni
Oct 1 '17 at 19:33













I came as far as loading a device and grabbing exclusive access with Python's. evdev. How do I actually read an input from it then?
– Coxeroni
Oct 1 '17 at 21:37




I came as far as loading a device and grabbing exclusive access with Python's. evdev. How do I actually read an input from it then?
– Coxeroni
Oct 1 '17 at 21:37












Here.
– Johan Myréen
Oct 2 '17 at 1:21




Here.
– Johan Myréen
Oct 2 '17 at 1:21















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395501%2fkeyboard-into-daemonized-python-script%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395501%2fkeyboard-into-daemonized-python-script%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay