I`m experimenting with a way to dectect a suitable tty to inform the user in non-GUI sessions. It is not ready for a pull request know. But I believe that I found a way to dectect terminals without running interactive programs. But probably it would fail with terminals with background jobs and with shells with unusual names.
I don`t know. Systemds loginctl can detect it. But if it is not available it could be not very easy. One way could be parsing the output of ps.
Wow thats not how it should work.... maybe just keep the one for testing and later merge tesing into master?
As I pushed the commit the master branch had more commits than the testing branch so I was unsure which branch to select.
This indentation was a mistake.