Start applications I last used on startup again

A nice feature (on macOS) is the ability for apps, to support a start (with latest settings) together with the system startup.

As a user I shutdown Haiku when I do not work with it. (Is there a hibernation mode?) After a new start I often want to continue work where I left it.

A kind of enableRelaunchOnLogin() might be implemented on application level.

As of beta 4, hibernation is not yet supported. I don’t think sleep mode is either.

As an aside, I always wondered how BeOS pulled off the “pull the power and restart and all programs relaunch on boot” that was shown in the demos that Be employees did at some universities.

Were the previously opened files also reopened?

Was this a BeOS pro feature?

1 Like

On macOS this is more of a “session” feature and I know Finder, Preview, Terminal and Safari support it. Though most web browsers, even WebPositive, maintain the state of tabs at least across shutdown of the app.

Right now in Haiku the only thing which really maintains a session state across shutdown is Tracker. The Terminal session state in macOS (which even maintains previous terminal output) is very nice and I would like to see that added to the Haiku Terminal.

Overall this is generally an application specific feature, though maybe the OS can provide some helper functions to make it easier. But the good news is that initially it should not require anything special in Haiku.

If there are applications you always use and want to start at boot-up they can be added as shortcuts to the user startup folder at /home/config/settings/boot/launch/. Or you can add to the UserBootscript (which also is what launches the programs in the startup folder.) This is the source file though I forget offhand where it ends up on the installed system, but you can search for it in Tracker: haiku/UserBootscript at master · haiku/haiku · GitHub

If you want the exact same window setup of an application which does not maintain that itself, you could always set up some hey scripts to be run in the UserBootscript to move things around.

Good to know that there is a launch folder.

But these are to different things. At lest an OS supported option on shutdown/restart to bring up the last open applications on startup is, what I mean.
Every app then should restore its session by itself.
That’s my idea for this topic.

1 Like

There used to be an app/script (can’t really remember) like that, which opened a terminal window at beos startup at a pre-configured workspace using hey under the hood.

This already exists. This is how Tracker automatically reopens the windows after reboot.

Yeah, feel free to join to the haikuporter team and help to add this feature to every program.

Only half of it. Each application can handle saving and restoring its state, but we also need the OS to remember which applications were running, and restart them (Tracker is “cheating” because it is always restarted anyways)

5 Likes