Answer the question
In order to leave comments, you need to log in
How to start script execution from one tty in another?
All the best!
I have a script on the node that I run: node /pathtoscript/index.js 2>&1 > /dev/tty6 &
In it, at a certain moment, the command line command is executed:
exec(DISPLAY=:0 firefox -p "default" http://google.com)
Answer the question
In order to leave comments, you need to log in
If I understand correctly, you want to send the result of the index.js script execution to the /dev/tty6 virtual console, and send the exec result that is executed during the script to the current console.
Here are the options:
1. Pass the result of the exec to /dev/tty0 or /dev/console (i.e. to the current active console)
2. At the time of running the index.js script, pass the value of the current console inside, this is /dev/tty (if you run the script yourself) and send the result of exec there.
But there is some strange task before you, if I understood everything correctly)
I suspect that the problems here are not in tty, but in access to $ DISPLAY
On this occasion, I can only advise reading about xauth and the XAUTHORITY environment variable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question