rockedge wrote: Fri Aug 11, 2023 3:13 pmI am working in QEMU on a build and it boots in regular mode but upon shutdown there is a query message asking about saving or not. This message is not from our configurations and doesn't seem to work
You can change operation any way you like of course. I don't use same save2flash dialog shutdown routine most of you do since I prefer yad gui on desktop to occur at shutdown. That is what wd_save2flash is used for in my repo's 12KL sfs addon - it is for xfce installs. The way it works is that the standard /usr/bin/xfce4-session-logout is temporarily hijacked by a /usr/local/bin/xfce4-session-logout script (with /usr/local/bin being given higher precedence in the path to /usr/bin). That /usr/local/bin/xfce4-session-logout has the following content:
Code: Select all
#!/bin/sh
if grep -q "w_changes=RAM2" /proc/cmdline || grep -q "w_changes1=RAM2" /proc/cmdline; then
wd_save2flash
fi
exec /usr/bin/xfce4-session-logout
BUT THERE IS A MISTAKE I SHOULD FIX (that turns out to be an old 12KL sfs addon I've stored I think):
The script wd_save2flash ends with line: exec save2flash - that shouldn't have the exec in it I think since should end up back in /usr/local/bin/xfce4-session-logout for the final exec /usr/bin/xfce4-session-logout to correctly use official xfce4-session-logout at the end. I must have accidentally reverted to older 12KL sfs that still had the unwanted 'exec' in it (maybe). I'm going out again, but will think about that when I get home and test it. EDIT: No, I think the exec save2flash in wd_save2flash is in fact correct... once wd_save2flash completes the logic will return to the final exec /usr/bin/xfce4-session-logout, which is correct. I will double check later...
No xterm is needed for save2flash procedure itself, and not everyone prefers xterm (though you can install xterm and, as Soniya says use it to exec save2flash, but that's not what I want in my own wd_save2flash implementation).
If you want to avoid that /usr/local/bin/xfce4-session-logout coming into operation (and thus calling my script wd_save2flash, which provided yad Cancel or OK to save2flash gui) then you could rename /usr/local/bin/xfce4-session-logout since that would disable it being used. I use the same 12KL sfs in my KL_full2fr so not something I can conveniently change without wrecking my preferred shutdown approach (I believe your standard mechanism used dialog commandline save2flash message instead - I don't do use that).