On Fri, 17 Nov 2017 00:01:29 +0000, Martin Gregorie wrote:
> On Thu, 16 Nov 2017 23:19:49 +0000, Frank Miles wrote:
>
> Call your program or startup script as the last action in the
> .bash_profile file belonging to the user where you want the Python
> program to run.
Hey, that actually works! And it's so simple and (to this old guy)
obvious. I was looking for something more Pi-centric, apparently
unnecessarily. There's no .bash_profile; there was a .bashrc and
a .profile; since /etc/profile called .bashrc midstream I added it to
the .profile - and joy!! {My Debian desktop has a .bash_profile}
[snip]
> You'll still have to login to that user, but the program will start
> immediately you've done so. Stopping the program will leave you still in
> the console looking at a bash prompt. If you want to be logged out as
> soon as your program exits, just add the command "logout" immediately
> after the command that starts your Python program.
>
> However, I strongly suggest that you create another user just to run
> this program and install the program and any date it needs in it.
> Otherwise you'll end up fighting with the auto start and stop in your
> normal pi login.
As indicated in my query, this is a dedicated device. Users will power
the thing up and expect a particular set of functions that will be
controlled by the GUI. They would be confused to see a full blown
computer. If someone needs to change something, they can pop the lid,
connect the network cable, SSH into it and -if necessary- change the
.profile entry.
Thanks so much Martin!
-Frank
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|