I have a system that runs a bash script when it starts (I use
/etc/init.d/rc.local to execute it without needing to log in).
For reasons I won't go in to here, I need to launch a graphical terminal to run the script. It does things like display diagnostic messages while starting an application. The way I start everything in
rc.local is like this
xinit urxvt --hold -e /path/to/script
After doing all its diagnostic stuff, the script launches a full screen application. When that application dies (for whatever reason) the user gets dropped back at the urxvt terminal exactly where the script left off before launching.
What I would like to happen is that when the application dies, the script launches a new urxvt terminal with a login prompt. I have tried
urxvt --ls and
urxvt --loginShell but every time the new terminal is launches, I get a shell with the root user logged in - obviously not idea.
How can I make it launch a login prompt with no user logged in?