Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an autoremove in auto start script #19

Open
camlafit opened this issue Aug 28, 2024 · 3 comments · May be fixed by #22
Open

Add an autoremove in auto start script #19

camlafit opened this issue Aug 28, 2024 · 3 comments · May be fixed by #22
Labels
enhancement New feature or request

Comments

@camlafit
Copy link
Contributor

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 ?

@simonwalz
Copy link
Owner

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.

@camlafit
Copy link
Contributor Author

Hello

An another idea could be to rename session file after its restart with new PID.
I've any idea if it's possible.

@simonwalz simonwalz added the enhancement New feature or request label Aug 31, 2024
@camlafit camlafit linked a pull request Sep 2, 2024 that will close this issue
@camlafit
Copy link
Contributor Author

camlafit commented Sep 2, 2024

Hello

I've test a solution to prevent duplicate context. Looks be ok with renaming approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants