I want some kind of tool or way, which gives me option to save open application before restart/shutdown and open them as soon as I login. This kind of feature is available in MacOS. I'm using Ubuntu 19.04 with Gnome Desktop Environment.
I want some kind of tool or way, which gives me option to save open application before restart/shutdown and open them as soon as I login. This kind of feature is available in MacOS. I'm using Ubuntu 19.04 with Gnome Desktop Environment.
Problem is: there might be no good solution. Sorry to disappoint, but an honest answer depicting the situation is better than no answer.
In older versions of Gnome, you could enable the option to save a session. Then on logout, the open applications would be saved, and on next login, they would be launched again. This feature did not always work reliably, and was dropped.
Currently, to achieve the effect of being able to continue where you left, you may put your computer in sleep modus or in hibernate modus. Sleep means that everything is kept in memory. Then the computer goes in a very low power mode, just supplying power to the memory so its content is safeguarded. In hibernate modus, the contents of the RAM is written to SWAP memory on a swap partition. Then the system fully powers down. On startup, the system checks is a previous session is in SWAP, and restores that to memory.
Issue with sleep and especially hibernate is that it works not reliably in quite some hardware. This is especially a problem with hibernate, to the extent that hibernate is disabled by default on Ubuntu. However, you have more chance to have luck with sleep modus. If that works well on your hardware, it will work to your satisfaction. A laptop can be in sleep modus for quite some weeks before the battery runs out. If you are not using your computer for that long, it is obviously better to fully shut down on these occasions.
The reason it does not always works well is indeed what plagues linux in a more general sense: hardware manufacturers using proprietary systems for power management, or implementing it in a proprietary way such that linux developpers have no good documentation to support it.
Now some laptops are able to perform what is called as "Modern Standby", also called S0 Low power standby... this is an amazing power state similar to Apple's close/open lid standby states...
However, laptops must have compatible BIOS S0 state. You should have to check with your laptop model. Unfortunately I haven't seen until now any Motherboard Desktop having this feature.
I'd suggest you some readings:
Here is an extension that could work for you. It only works on Xorg.
https://github.com/Speedflyer689/reopen_windows-gnome_extension
Start typing “dconf editor” in the search box. When the “dconf Editor” item displays, click on the icon to start the tool.
In the “dconf Editor” window, click the right arrow next to “org” in the left pane to expand that branch of the tree.
Under “org”, click the right arrow next to “gnome.”
Under “gnome,” click “gnome-session.”.In the right pane, select the “auto-save-session” check box to turn on the option.
Close the “dconf Editor” by clicking the “X” button in the upper-left corner of the window.
sourse: it's old but...