On Thursday, 14 March 2019 16:42:53 GMT Patrick Wigmore wrote:
> Could you elaborate on what was involved to 'do things properly'?

Well.  In the context of what you're asking, I can't tell you any more than I 
have already. although I now realise that I wasn't doing quite what I thought 
I was doing.

On the Pi, I opened the Raspberry Pi Configuration tool and enabled the Serial 
Port.  This enabled the Serial Console.  The Pi had previously been configured 
to Auto-login to the Pi User's account.

This means that if I attached a normal monitor and keyboard to the Pi, I can 
view the boot messages as they come up and then the program that I have set up 
to start at boot up ends.

When I view the process using the serial port, exactly the same thing happens, 
but the program doesn't start until I've logged in.

> I don't think I understand what enabled you to see the output from
> your program after logging in.

Ah.  I'm not sure that I fully understood myself what was going on.  See 
below.

> I would not expect the output of a running program to appear on a
> terminal without some specific configuration or incantations to tell
> it to do that, especially if you want it to only show up after logging
> in on the terminal. This might be a mistaken assumption on my part.

No.  I don't think you are mistaken.  Your scepticism made me think about what 
I had just done.  In fact, what is happening is that I have set the program to 
start in .bashrc, so in reality, it is a new instance of the program that 
starts when I log in via the serial port; the version started at boot up is 
still running and not visible to me.  I just modified the program so I could 
see that (it was a bit noddy).

> How does getty trigger this program that started on boot to output on
> the terminal after you log in?

See above.

So the news isn't as good as I thought, but restarting the software when I log 
in through the serial port isn't going to be a show stopper.  I would probably 
have to stop the all instances and then restart it to get a true picture of 
what is going on. Alternatively I can disable Auto-Login and catch the first 
instance.   I'll get the information I need, but I will have to work a bit 
harder and I won't see the messages that were being written just prior to the 
login.

Maybe that miniature HDMI screen isn't such a bad idea ;-)

-- 



                Terry Coles



-- 
  Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to