Score:0

How to force start and restart service on specify tty

sd flag

I want to run my python program on tty3. I created a.service. How to force systemd to run and restart on the same tty? Now i have situation that after restart program is running on active tty.

What should I write to: StandardInput? Now i Have StandardInput=tty-force

Regards

Regards?

vn flag
It's not clear what you are asking. A service is not something that run on a particular terminal. Seems a [xy problem](https://en.wikipedia.org/wiki/XY_problem), please tell us your goal
luki avatar
sd flag
I am going to run python program under systemd. Program is closed into loop and should restart after error. When error occure i am logoff from terminal and i have to log in again to check status. I would like to run program on the terminal tty3 and all restart should run on the same terminal.
luki avatar
sd flag
Logging out is annoying.
HuHa avatar
es flag
Normally, a service would not use _any_ tty, but log to its own log file or use _syslog_. Keep in mind that you might some day need to access it from the outside via _ssh_ and not have physical access to any of the consoles.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.