Restore previous state of apps after powering on Ubuntu system
Previously, I used sudo shutdown -h now
to power off macOS. Upon powering on after this, the system would restore all the apps (like Chrome, VS Code, PDFs) to their previous status before shutdown.
Now, I used the same command sudo shutdown -h now
to power off Ubuntu. But, upon powering on, the system starts an absolutely fresh state, without restoring the apps to their pre-shutdown state.
What's the functionality that macOS used? Can I use it on Ubuntu as well?
gnome shutdown macosx session
add a comment |
Previously, I used sudo shutdown -h now
to power off macOS. Upon powering on after this, the system would restore all the apps (like Chrome, VS Code, PDFs) to their previous status before shutdown.
Now, I used the same command sudo shutdown -h now
to power off Ubuntu. But, upon powering on, the system starts an absolutely fresh state, without restoring the apps to their pre-shutdown state.
What's the functionality that macOS used? Can I use it on Ubuntu as well?
gnome shutdown macosx session
add a comment |
Previously, I used sudo shutdown -h now
to power off macOS. Upon powering on after this, the system would restore all the apps (like Chrome, VS Code, PDFs) to their previous status before shutdown.
Now, I used the same command sudo shutdown -h now
to power off Ubuntu. But, upon powering on, the system starts an absolutely fresh state, without restoring the apps to their pre-shutdown state.
What's the functionality that macOS used? Can I use it on Ubuntu as well?
gnome shutdown macosx session
Previously, I used sudo shutdown -h now
to power off macOS. Upon powering on after this, the system would restore all the apps (like Chrome, VS Code, PDFs) to their previous status before shutdown.
Now, I used the same command sudo shutdown -h now
to power off Ubuntu. But, upon powering on, the system starts an absolutely fresh state, without restoring the apps to their pre-shutdown state.
What's the functionality that macOS used? Can I use it on Ubuntu as well?
gnome shutdown macosx session
gnome shutdown macosx session
edited Jan 22 at 14:14
Melebius
4,70351939
4,70351939
asked Jan 22 at 12:51
AliceAlice
415110
415110
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It is called "session management"
Could I have it on ubuntu?
Not in a default desktop
But you can use the Linux window session manager or Gnome Window Session Manager extension for gnome for this. You will get an indicator on the Gnome Shell top bar where you can save and restore a session. Installation from the 2nd link (1st one has a similar setup):
setup
- Make sure you have nodejs installed (e.g. execute node -v and if there is no output install it).
- Install lwsm via npm:
npm install -g linux-window-session-manager
(on some systems you might want to use sudo)
Download or clone repository and move all files to
/home/your-user-name/.local/share/gnome-shell/extensions/lwsm@johannes.super-productivity.com
In some cases - especially when you're using nvm, you might need to configure the path to your lwsm installation (which you can find out via which lwsm after a successful installation) extension via
gnome-shell-extension-prefs
.
Installation after setup is done:
cd tmp
git clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git
mv gnome-shell-extension-window-session-manager ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
Didn't Unity/Compiz also have something like that ?
– Sergiy Kolodyazhnyy
Jan 22 at 13:27
@SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.
– Rinzwind
Jan 22 at 13:45
Why not simplygit clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
?
– David Foerster
Jan 22 at 15:53
@DavidFoerster no idea. I took the install from their page and only looked at if it was valid. Not if it was the shortest ;-)
– Rinzwind
Jan 23 at 9:12
You can also install it by going to extensions.gnome.org/extension/1323/window-session-manager and clicking on the toggle switch icon. You'll still have to install lwsm manually as above.
– Michael Mandel
Jan 29 at 17:09
add a comment |
It's not shutdown, anycase take a look at the following command:
pm-action - Suspend or Hibernate your computer
pm-hibernate [--help]
pm-suspend [--quirk-*] [--help]
pm-suspend-hybrid [--quirk-*] [--help]
From man page:
These commands can be used to put the machine in a sleep state. The precise way how this
is done can be influenced by installing executables and configuration snippets. For some
options external programs are needed.
These commands will usually be called by UPower or hald when triggered to do so by a
program in a desktop session such as gnome-power-manager. Calling them from the command
line is also possible, but it is not guaranteed that all programs in your desktop session
keep working as expected.
pm-suspend
During suspend most devices are shutdown, and system state is saved in RAM. The system
still requires power in this state. Most modern systems require 3 to 5 seconds to
enter and leave suspend, and most laptops can stay in suspend mode for 1 to 3 days
before exhausting their battery.
pm-hibernate
During hibernate the system is fully powered off, and system state is saved to disk.
The system does not require power, and can stay in hibernate mode indefinitely. Most
modern systems require 15 to 45 seconds to enter and leave hibernate, and entering and
leaving hibernate takes longer when you have more memory.
pm-suspend-hybrid
Hybrid-suspend is the process where the system does everything it needs to hibernate,
but suspends instead of shutting down. This means that your computer can wake up
quicker than for normal hibernation if you do not run out of power, and you can resume
even if you run out of power. s2both(8) is an hybrid-suspend implementation.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111954%2frestore-previous-state-of-apps-after-powering-on-ubuntu-system%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is called "session management"
Could I have it on ubuntu?
Not in a default desktop
But you can use the Linux window session manager or Gnome Window Session Manager extension for gnome for this. You will get an indicator on the Gnome Shell top bar where you can save and restore a session. Installation from the 2nd link (1st one has a similar setup):
setup
- Make sure you have nodejs installed (e.g. execute node -v and if there is no output install it).
- Install lwsm via npm:
npm install -g linux-window-session-manager
(on some systems you might want to use sudo)
Download or clone repository and move all files to
/home/your-user-name/.local/share/gnome-shell/extensions/lwsm@johannes.super-productivity.com
In some cases - especially when you're using nvm, you might need to configure the path to your lwsm installation (which you can find out via which lwsm after a successful installation) extension via
gnome-shell-extension-prefs
.
Installation after setup is done:
cd tmp
git clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git
mv gnome-shell-extension-window-session-manager ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
Didn't Unity/Compiz also have something like that ?
– Sergiy Kolodyazhnyy
Jan 22 at 13:27
@SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.
– Rinzwind
Jan 22 at 13:45
Why not simplygit clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
?
– David Foerster
Jan 22 at 15:53
@DavidFoerster no idea. I took the install from their page and only looked at if it was valid. Not if it was the shortest ;-)
– Rinzwind
Jan 23 at 9:12
You can also install it by going to extensions.gnome.org/extension/1323/window-session-manager and clicking on the toggle switch icon. You'll still have to install lwsm manually as above.
– Michael Mandel
Jan 29 at 17:09
add a comment |
It is called "session management"
Could I have it on ubuntu?
Not in a default desktop
But you can use the Linux window session manager or Gnome Window Session Manager extension for gnome for this. You will get an indicator on the Gnome Shell top bar where you can save and restore a session. Installation from the 2nd link (1st one has a similar setup):
setup
- Make sure you have nodejs installed (e.g. execute node -v and if there is no output install it).
- Install lwsm via npm:
npm install -g linux-window-session-manager
(on some systems you might want to use sudo)
Download or clone repository and move all files to
/home/your-user-name/.local/share/gnome-shell/extensions/lwsm@johannes.super-productivity.com
In some cases - especially when you're using nvm, you might need to configure the path to your lwsm installation (which you can find out via which lwsm after a successful installation) extension via
gnome-shell-extension-prefs
.
Installation after setup is done:
cd tmp
git clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git
mv gnome-shell-extension-window-session-manager ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
Didn't Unity/Compiz also have something like that ?
– Sergiy Kolodyazhnyy
Jan 22 at 13:27
@SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.
– Rinzwind
Jan 22 at 13:45
Why not simplygit clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
?
– David Foerster
Jan 22 at 15:53
@DavidFoerster no idea. I took the install from their page and only looked at if it was valid. Not if it was the shortest ;-)
– Rinzwind
Jan 23 at 9:12
You can also install it by going to extensions.gnome.org/extension/1323/window-session-manager and clicking on the toggle switch icon. You'll still have to install lwsm manually as above.
– Michael Mandel
Jan 29 at 17:09
add a comment |
It is called "session management"
Could I have it on ubuntu?
Not in a default desktop
But you can use the Linux window session manager or Gnome Window Session Manager extension for gnome for this. You will get an indicator on the Gnome Shell top bar where you can save and restore a session. Installation from the 2nd link (1st one has a similar setup):
setup
- Make sure you have nodejs installed (e.g. execute node -v and if there is no output install it).
- Install lwsm via npm:
npm install -g linux-window-session-manager
(on some systems you might want to use sudo)
Download or clone repository and move all files to
/home/your-user-name/.local/share/gnome-shell/extensions/lwsm@johannes.super-productivity.com
In some cases - especially when you're using nvm, you might need to configure the path to your lwsm installation (which you can find out via which lwsm after a successful installation) extension via
gnome-shell-extension-prefs
.
Installation after setup is done:
cd tmp
git clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git
mv gnome-shell-extension-window-session-manager ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
It is called "session management"
Could I have it on ubuntu?
Not in a default desktop
But you can use the Linux window session manager or Gnome Window Session Manager extension for gnome for this. You will get an indicator on the Gnome Shell top bar where you can save and restore a session. Installation from the 2nd link (1st one has a similar setup):
setup
- Make sure you have nodejs installed (e.g. execute node -v and if there is no output install it).
- Install lwsm via npm:
npm install -g linux-window-session-manager
(on some systems you might want to use sudo)
Download or clone repository and move all files to
/home/your-user-name/.local/share/gnome-shell/extensions/lwsm@johannes.super-productivity.com
In some cases - especially when you're using nvm, you might need to configure the path to your lwsm installation (which you can find out via which lwsm after a successful installation) extension via
gnome-shell-extension-prefs
.
Installation after setup is done:
cd tmp
git clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git
mv gnome-shell-extension-window-session-manager ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
edited Jan 22 at 15:52
David Foerster
28.3k1365111
28.3k1365111
answered Jan 22 at 13:24
RinzwindRinzwind
207k28398528
207k28398528
Didn't Unity/Compiz also have something like that ?
– Sergiy Kolodyazhnyy
Jan 22 at 13:27
@SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.
– Rinzwind
Jan 22 at 13:45
Why not simplygit clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
?
– David Foerster
Jan 22 at 15:53
@DavidFoerster no idea. I took the install from their page and only looked at if it was valid. Not if it was the shortest ;-)
– Rinzwind
Jan 23 at 9:12
You can also install it by going to extensions.gnome.org/extension/1323/window-session-manager and clicking on the toggle switch icon. You'll still have to install lwsm manually as above.
– Michael Mandel
Jan 29 at 17:09
add a comment |
Didn't Unity/Compiz also have something like that ?
– Sergiy Kolodyazhnyy
Jan 22 at 13:27
@SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.
– Rinzwind
Jan 22 at 13:45
Why not simplygit clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
?
– David Foerster
Jan 22 at 15:53
@DavidFoerster no idea. I took the install from their page and only looked at if it was valid. Not if it was the shortest ;-)
– Rinzwind
Jan 23 at 9:12
You can also install it by going to extensions.gnome.org/extension/1323/window-session-manager and clicking on the toggle switch icon. You'll still have to install lwsm manually as above.
– Michael Mandel
Jan 29 at 17:09
Didn't Unity/Compiz also have something like that ?
– Sergiy Kolodyazhnyy
Jan 22 at 13:27
Didn't Unity/Compiz also have something like that ?
– Sergiy Kolodyazhnyy
Jan 22 at 13:27
@SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.
– Rinzwind
Jan 22 at 13:45
@SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.
– Rinzwind
Jan 22 at 13:45
Why not simply
git clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
?– David Foerster
Jan 22 at 15:53
Why not simply
git clone git@github.com:johannesjo/gnome-shell-extension-window-session-manager.git ~/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro
?– David Foerster
Jan 22 at 15:53
@DavidFoerster no idea. I took the install from their page and only looked at if it was valid. Not if it was the shortest ;-)
– Rinzwind
Jan 23 at 9:12
@DavidFoerster no idea. I took the install from their page and only looked at if it was valid. Not if it was the shortest ;-)
– Rinzwind
Jan 23 at 9:12
You can also install it by going to extensions.gnome.org/extension/1323/window-session-manager and clicking on the toggle switch icon. You'll still have to install lwsm manually as above.
– Michael Mandel
Jan 29 at 17:09
You can also install it by going to extensions.gnome.org/extension/1323/window-session-manager and clicking on the toggle switch icon. You'll still have to install lwsm manually as above.
– Michael Mandel
Jan 29 at 17:09
add a comment |
It's not shutdown, anycase take a look at the following command:
pm-action - Suspend or Hibernate your computer
pm-hibernate [--help]
pm-suspend [--quirk-*] [--help]
pm-suspend-hybrid [--quirk-*] [--help]
From man page:
These commands can be used to put the machine in a sleep state. The precise way how this
is done can be influenced by installing executables and configuration snippets. For some
options external programs are needed.
These commands will usually be called by UPower or hald when triggered to do so by a
program in a desktop session such as gnome-power-manager. Calling them from the command
line is also possible, but it is not guaranteed that all programs in your desktop session
keep working as expected.
pm-suspend
During suspend most devices are shutdown, and system state is saved in RAM. The system
still requires power in this state. Most modern systems require 3 to 5 seconds to
enter and leave suspend, and most laptops can stay in suspend mode for 1 to 3 days
before exhausting their battery.
pm-hibernate
During hibernate the system is fully powered off, and system state is saved to disk.
The system does not require power, and can stay in hibernate mode indefinitely. Most
modern systems require 15 to 45 seconds to enter and leave hibernate, and entering and
leaving hibernate takes longer when you have more memory.
pm-suspend-hybrid
Hybrid-suspend is the process where the system does everything it needs to hibernate,
but suspends instead of shutting down. This means that your computer can wake up
quicker than for normal hibernation if you do not run out of power, and you can resume
even if you run out of power. s2both(8) is an hybrid-suspend implementation.
add a comment |
It's not shutdown, anycase take a look at the following command:
pm-action - Suspend or Hibernate your computer
pm-hibernate [--help]
pm-suspend [--quirk-*] [--help]
pm-suspend-hybrid [--quirk-*] [--help]
From man page:
These commands can be used to put the machine in a sleep state. The precise way how this
is done can be influenced by installing executables and configuration snippets. For some
options external programs are needed.
These commands will usually be called by UPower or hald when triggered to do so by a
program in a desktop session such as gnome-power-manager. Calling them from the command
line is also possible, but it is not guaranteed that all programs in your desktop session
keep working as expected.
pm-suspend
During suspend most devices are shutdown, and system state is saved in RAM. The system
still requires power in this state. Most modern systems require 3 to 5 seconds to
enter and leave suspend, and most laptops can stay in suspend mode for 1 to 3 days
before exhausting their battery.
pm-hibernate
During hibernate the system is fully powered off, and system state is saved to disk.
The system does not require power, and can stay in hibernate mode indefinitely. Most
modern systems require 15 to 45 seconds to enter and leave hibernate, and entering and
leaving hibernate takes longer when you have more memory.
pm-suspend-hybrid
Hybrid-suspend is the process where the system does everything it needs to hibernate,
but suspends instead of shutting down. This means that your computer can wake up
quicker than for normal hibernation if you do not run out of power, and you can resume
even if you run out of power. s2both(8) is an hybrid-suspend implementation.
add a comment |
It's not shutdown, anycase take a look at the following command:
pm-action - Suspend or Hibernate your computer
pm-hibernate [--help]
pm-suspend [--quirk-*] [--help]
pm-suspend-hybrid [--quirk-*] [--help]
From man page:
These commands can be used to put the machine in a sleep state. The precise way how this
is done can be influenced by installing executables and configuration snippets. For some
options external programs are needed.
These commands will usually be called by UPower or hald when triggered to do so by a
program in a desktop session such as gnome-power-manager. Calling them from the command
line is also possible, but it is not guaranteed that all programs in your desktop session
keep working as expected.
pm-suspend
During suspend most devices are shutdown, and system state is saved in RAM. The system
still requires power in this state. Most modern systems require 3 to 5 seconds to
enter and leave suspend, and most laptops can stay in suspend mode for 1 to 3 days
before exhausting their battery.
pm-hibernate
During hibernate the system is fully powered off, and system state is saved to disk.
The system does not require power, and can stay in hibernate mode indefinitely. Most
modern systems require 15 to 45 seconds to enter and leave hibernate, and entering and
leaving hibernate takes longer when you have more memory.
pm-suspend-hybrid
Hybrid-suspend is the process where the system does everything it needs to hibernate,
but suspends instead of shutting down. This means that your computer can wake up
quicker than for normal hibernation if you do not run out of power, and you can resume
even if you run out of power. s2both(8) is an hybrid-suspend implementation.
It's not shutdown, anycase take a look at the following command:
pm-action - Suspend or Hibernate your computer
pm-hibernate [--help]
pm-suspend [--quirk-*] [--help]
pm-suspend-hybrid [--quirk-*] [--help]
From man page:
These commands can be used to put the machine in a sleep state. The precise way how this
is done can be influenced by installing executables and configuration snippets. For some
options external programs are needed.
These commands will usually be called by UPower or hald when triggered to do so by a
program in a desktop session such as gnome-power-manager. Calling them from the command
line is also possible, but it is not guaranteed that all programs in your desktop session
keep working as expected.
pm-suspend
During suspend most devices are shutdown, and system state is saved in RAM. The system
still requires power in this state. Most modern systems require 3 to 5 seconds to
enter and leave suspend, and most laptops can stay in suspend mode for 1 to 3 days
before exhausting their battery.
pm-hibernate
During hibernate the system is fully powered off, and system state is saved to disk.
The system does not require power, and can stay in hibernate mode indefinitely. Most
modern systems require 15 to 45 seconds to enter and leave hibernate, and entering and
leaving hibernate takes longer when you have more memory.
pm-suspend-hybrid
Hybrid-suspend is the process where the system does everything it needs to hibernate,
but suspends instead of shutting down. This means that your computer can wake up
quicker than for normal hibernation if you do not run out of power, and you can resume
even if you run out of power. s2both(8) is an hybrid-suspend implementation.
answered Jan 22 at 13:21
TDKTDK
25013
25013
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111954%2frestore-previous-state-of-apps-after-powering-on-ubuntu-system%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown