F-96 CE v4
pmedia=ataflash
The default save on shutdown with no user action, is not to save.
I'd like mine to default to save on shutdown. Advice appreciated on how to modify to do that.
Thanks!
Steve
Moderator: Forum moderators
F-96 CE v4
pmedia=ataflash
The default save on shutdown with no user action, is not to save.
I'd like mine to default to save on shutdown. Advice appreciated on how to modify to do that.
Thanks!
Steve
HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64
My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg
Yep, Bob, thanks. I just want the default action to be a save.
Save IS presently highlighted, but if I don't hit <ENTER> it doesn't save.
I've lost a lot of work because of that. If you don't (or can't) wait around for the right moment to hit <Enter>, goodbye data.
On the odd occasion when I don't want to save due to a system or program malfunction, I'd rather elect to "close without saving" than have it forced on me.
HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64
My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg
@vtpup
Looks like a modification to /etc/rc.d/rc.shutdown
could change the behavior.
Open /etc/rc.d/rc.shutdown
go to around line 228 and we'll have to look at changing what happens after the --timeout 8
Code: Select all
asktosave_func () {
# if $RAMSAVEINTERVAL > 0, session is saved automatically
if [ "$RAMSAVEINTERVAL" ] && [ $RAMSAVEINTERVAL -gt 0 ] ; then
RETVAL=0
elif [ "$ASKTOSAVE" = "false" ]; then
RETVAL=0
else
dialog --timeout 8 --yes-label "$(gettext 'SAVE')" --no-label "$(gettext 'NO SAVE')" --yesno "$(gettext 'Press ENTER key to save session...
Or, press TAB then ENTER to not save session...
Or, wait 8 seconds to shutdown without saving session...')" 0 0 >/dev/console
RETVAL=$?
fi
[ $RETVAL -ne 0 ] && echo "$(gettext "Session not saved")" >/dev/console
return $RETVAL
}
F-96 CE v4
pmedia=ataflash
Sofar I remember if you use pmedia=ataflash parameter in F-96 CE v4, you are in pupmode13 that's mean at shutdown/reboot the system will give you 2 options "save" or "not-save".
Just delete/dont use "pmedia=" parameter. The system will automatically in "AUTOSAVE" mode everytime at shutdown/reboot, what I know from the other pup-derivatives.
@vtpup
Save IS presently highlighted, but if I don't hit <ENTER> it doesn't save.
The thing is, without pressing Enter the return value is 255 (not 0), replacing the function asktosave_func in /etc/rc.d/rc.shutdown with this will save session also if you wait :
(changed the dialog text also to: "Or, wait 8 seconds to save session...")
Code: Select all
asktosave_func () {
# if $RAMSAVEINTERVAL > 0, session is saved automatically
if [ "$RAMSAVEINTERVAL" ] && [ $RAMSAVEINTERVAL -gt 0 ] ; then
RETVAL=0
elif [ "$ASKTOSAVE" = "false" ]; then
RETVAL=0
else
dialog --timeout 8 --yes-label "$(gettext 'SAVE')" --no-label "$(gettext 'NO SAVE')" --yesno "$(gettext 'Press ENTER key to save session...
Or, press TAB then ENTER to not save session...
Or, wait 8 seconds to save session...')" 0 0 >/dev/console
RETVAL=$?
# fredx181 addition, save session also after 8 sec wait, only if you choose "NO SAVE" and press Enter, then the session is not saved
[ $RETVAL -ne 1 ] && RETVAL=0
fi
[ $RETVAL -ne 0 ] && echo "$(gettext "Session not saved")" >/dev/console
return $RETVAL
}
rockedge wrote: ↑Sat Sep 28, 2024 3:00 am@vtpup
Looks like a modification to/etc/rc.c/rc.shutdown
could change the behavior.Open
/etc/rc.c/rc.shutdown
go to around line 228 and we'll have to look at changing what happens after the--timeout 8
Code: Select all
asktosave_func () { # if $RAMSAVEINTERVAL > 0, session is saved automatically if [ "$RAMSAVEINTERVAL" ] && [ $RAMSAVEINTERVAL -gt 0 ] ; then RETVAL=0 elif [ "$ASKTOSAVE" = "false" ]; then RETVAL=0 else dialog --timeout 8 --yes-label "$(gettext 'SAVE')" --no-label "$(gettext 'NO SAVE')" --yesno "$(gettext 'Press ENTER key to save session... Or, press TAB then ENTER to not save session... Or, wait 8 seconds to shutdown without saving session...')" 0 0 >/dev/console RETVAL=$? fi [ $RETVAL -ne 0 ] && echo "$(gettext "Session not saved")" >/dev/console return $RETVAL }
Thanks @rockedge . I don't have an /etc/rc.c/
folder. I have /etc/rc.d/rc.shutdown
though, so that must be it, and it does agree w/above at line 228. So I'm looking at that.
Thanks @esos I believe I do still want pupmode 13 because I don't want immediate saves during a session -- I still want the Save icon on the desktop for optional saves at that time.
I also still want the opportunity not to save at shutdown -- as a choice.
But I want the default shutdown to be a save.
Does that make sense?
Thanks @fredx181 I'll try that!
HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64
My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg
fredx181 wrote: ↑Sat Sep 28, 2024 8:15 am@vtpup
Save IS presently highlighted, but if I don't hit <ENTER> it doesn't save.
The thing is, without pressing Enter the return value is 255 (not 0), replacing the function asktosave_func in /etc/rc.d/rc.shutdown with this will save session also if you wait :
(changed the dialog text also to: "Or, wait 8 seconds to save session...")Code: Select all
asktosave_func () { # if $RAMSAVEINTERVAL > 0, session is saved automatically if [ "$RAMSAVEINTERVAL" ] && [ $RAMSAVEINTERVAL -gt 0 ] ; then RETVAL=0 elif [ "$ASKTOSAVE" = "false" ]; then RETVAL=0 else dialog --timeout 8 --yes-label "$(gettext 'SAVE')" --no-label "$(gettext 'NO SAVE')" --yesno "$(gettext 'Press ENTER key to save session... Or, press TAB then ENTER to not save session... Or, wait 8 seconds to save session...')" 0 0 >/dev/console RETVAL=$? # fredx181 addition, save session also after 8 sec wait, only if you choose "NO SAVE" and press Enter, then the session is not saved [ $RETVAL -ne 1 ] && RETVAL=0 fi [ $RETVAL -ne 0 ] && echo "$(gettext "Session not saved")" >/dev/console return $RETVAL }
That worked perfectly, Fred! Thank you. I tested it both ways -- with a default save, and with an elected no-save, and both did what they should.
(For anyone unfamiliar with this stuff, open /etc/rc.d/rc.shutdown in a text editor, do a find for asktosave_func and replace everything down to the end bracket } with the above version.)
HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64
My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg
vtpup wrote:Thanks @rockedge . I don't have an /etc/rc.c/ folder.
Neither do I! It was a mistyped letter. Should be /etc/rc.d
@vtpup , EasyOs let you choose (go for it...)
added.- @vtpup , I hope you don't consider this an inapropriate answer, I know your question was about F96CE, but I thought knowing the most is the best (excuse me if I disturbed you)
Learning EASY OS https://easyos.org/
DevuanPup XFCE_FUSILLI https://devuanpup.wordpress.com/
f96ce XFCE_FUSILLI https://puppyxfcefusilli.wordpress.com/
YouTube HOW_TO... https://bit.ly/f96ce_xfce_fusilli_HOWTO
The question is clearly about F-96 CE v4 and is already marked as (SOLVED), so very off-topic IMO in this context to advertise about EasyOs.
(in other words, you should learn better about what's appropriate posting and what is not)
pp4mnklinux wrote: ↑Sat Sep 28, 2024 5:29 pm@vtpup , EasyOs let you choose (go for it...)
added.- @vtpup , I hope you don't consider this an inapropriate answer, I know your question was about F96CE, but I thought knowing the most is the best (excuse me if I disturbed you)
Nope not disturbed by it, but I also agree that shutdown functionality in another OS doesn't apply to the question, which was ably answered by Fred's mod. Thank you again, Fred.
HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64
My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg