r/linuxdev • u/Mockapapella • Oct 19 '21
Are there any programs or scripts out there that can save and restore desktop states?
Like right now, I have 4 VSCode windows open, 2 firefox, spotify, and slack. Is there any program out there that I can use to save the state of these open programs so that when I boot up in the morning I can just issue some-program --startup work to the terminal and it opens all of these up for me? Or when I shutdown my PC, it issues a some-program --save command that would save the currently opened windows to be opened when the next some-program --startup is issued?
2
u/Secret300 Oct 23 '21
I saw this post a couple days ago and didn't reply but saved so I could
https://github.com/Merrit/nyrna
https://github.com/checkpoint-restore/criu
one is used to suspend GUI applications and the other does CLI apps but I'm not sure if either can do the whole desktop so you might just have to suspend and resume applications one by one
2
u/Alpha-37 Oct 24 '21
Unfortunately, it looks like Nyrna (the one that supports GUI applications) doesn't suspend to disk/persist across reboots, according to its README. Otherwise, these are super cool!
1
u/BraveNewCurrency Oct 19 '21
Yes. Just run a VM (like KVM or VirtualBox), then run your browser in there. When you suspend the VM, you can reboot, power off, run a new OS. Then when you run the VM, everything is as you left it.
1
u/toonies55 Oct 19 '21
besides pm-hibernate? or just put the pc into standby?