Hacker News new | ask | show | jobs
by RotsiserMho 3595 days ago
Have you ever used OS X? Application state can be preserved and restored across reboots. Most apps do this automatically. Actually I haven't encountered one that doesn't.
4 comments

I run almost exactly three things on this MBP: screen (shells), emacs, and Chrome.

- My nested screen sessions with a ton of shells doing things all over the place don't get restored on reboot - My emacs state doesn't get restored on reboot - Chrome reloads all the pages from the network instead of just serializing its entire state and restoring it on reboot

(All of the above are true on linux too.)

I've heard it's possible to persist some of the state of shell sessions across reboot using tmux + the resurrect plugin.
You might check out the latest version of iTerm2. I think it supports saving sessions (including tmux?) over a reboot.
I use OSX and I'd much rather sleep than reboot. Lots of productivity programs will lose state - offhand the Adobe suite comes to mind, for instance. And if you have a bunch of tabs open in a web browser it takes forever for them to reload. If you use multiple desktops there's no guarantee of windows popping up on the same desktop after a reboot, even with Apple apps.

Waking the machine from sleep takes seconds; rebooting with stored state takes minutes.

Casual plug for the Pinboard tabs sets feature (https://blog.pinboard.in/2011/04/new_save_tabs_feature/) or OneTab (https://www.one-tab.com).
I do occasionally, I can't say I noticed it – but that's probably because I spend 99% of my time in a terminal.
iTerm2 keeps state in this way for all my open tabs, except that it does a new login shell, so my history doesn't stay consistent: they all get the same history after a restart.

Still, not having to open all the terminals I use for different things and resize and position them is a win. It's the small things. :)

Which shell are you using? With fish I find that it's history is somewhat context sensitive based on the present directory. Because of this I've found myself less frustrated when working with the history across multiple tabs.
iTerm2 v3 beta doesn't keep tab state across relaunch for me. The tabs come back but on a fresh command prompt without stdout from the previous session. For me it's no better than starting fresh.
I'm using 3.0.5. There's a preference "Use System Window Restoration Setting" which may be helpful.
Perhaps I'm doing something wrong, but this is my experience on 3.0.7 - https://news.ycombinator.com/item?id=12282280.
Most of my post-startup routine in Linux is doing things like re-seeding my development database after the ramdisk has been mounted, starting up screen with database clients, and booting up the local servers (the ones that make up our application) all connected to one another - a single script, but still takes a few seconds to get going and can only happen after the database on the ramdisk has been configured.

Application state for all three GUI apps I use is pretty much restored on every platform. Thing is, there are only three of them.