screen-save
screen-save copied to clipboard
Auto save doesn't work when session are unnammed
Hello
Save script wait session named : https://github.com/simonwalz/screen-save/blob/master/screen-save#L147-L149 but auto save script call it and send all in /dev/null Then auto save ran with success without save anything.
I think we have three options :
- add an option to force session name (based on pid or other) or ignore it
- force a session name base on pid when it's a pts/tty session
- ignore session name feature when is unset (I don't know if it's possible)
Hi
Thank you for participating in this project.
I am not sure that I understand your problem. Could you please describe the actual problem?
As far as I can remember, the current implementation should behave as you describe in option 2:
In an autosave script, there is no user available to answer questions. So the screen save script is called with </dev/null as standard input (in https://github.com/simonwalz/screen-save/blob/master/screen-save-all-sessions#L36 ). This forces the read' command (in the code you linked) to set SCREEN_NAME' to an empty string. So the following lines ( https://github.com/simonwalz/screen-save/blob/master/screen-save#L150-L152 ) will set SCREEN_NAME to pid-{PID_OF_SCREEN_SESSION}.
Kind regards Simon
Hello
Yes I have seen SCREN_NAME auto setting. But doesn't look working after. Maybe I've got a trouble with next step and dynamic screen name from pid.
I'll do some tests to confirm or not this problem. Thank a lot
Hello
I thinks was related to my different test if </dev/null is set as an argument, behavior about auto-naming is broken. I propose to close this issue, looks more related to a bad usage