Add an autoremove in auto start script
Hello
If we enable auto start and auto save script we can have some trouble during a reboot with unnamed screen.
With unnamed screen, a screnrc with pid is saved, on restart this screenrc is loaded but with new pid. Then next auto save will add a new screenrc file. On next reboot will get two screen launched.
I propose to set by default an autoremove when autostart is used. An option could be added to ignore this action ?
could be interesting ?
Good finding.
I suggest removing all previously saved sessions when saving all sessions. (or better, move them to a folder called "removed").
Another option would be to name the screen session after the first PID.
Removing after Autostart has the disadvantage that no saved sessions exist until the next timer is triggered. If the computer crashes or reboots during this time, all sessions will be lost.
Hello
An another idea could be to rename session file after its restart with new PID. I've any idea if it's possible.
Hello
I've test a solution to prevent duplicate context. Looks be ok with renaming approach.