Restore previous state of apps after powering on Ubuntu system












4















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?










share|improve this question





























    4















    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?










    share|improve this question



























      4












      4








      4


      1






      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 46 mins ago









      Melebius

      4,57651839




      4,57651839










      asked 2 hours ago









      AliceAlice

      347110




      347110






















          2 Answers
          2






          active

          oldest

          votes


















          4














          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 /home/$(whoami)/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro





          share|improve this answer


























          • Didn't Unity/Compiz also have something like that ?

            – Sergiy Kolodyazhnyy
            1 hour ago











          • @SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.

            – Rinzwind
            1 hour ago



















          1














          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.





          share|improve this answer























            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
            });


            }
            });














            draft saved

            draft discarded


















            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









            4














            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 /home/$(whoami)/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro





            share|improve this answer


























            • Didn't Unity/Compiz also have something like that ?

              – Sergiy Kolodyazhnyy
              1 hour ago











            • @SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.

              – Rinzwind
              1 hour ago
















            4














            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 /home/$(whoami)/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro





            share|improve this answer


























            • Didn't Unity/Compiz also have something like that ?

              – Sergiy Kolodyazhnyy
              1 hour ago











            • @SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.

              – Rinzwind
              1 hour ago














            4












            4








            4







            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 /home/$(whoami)/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro





            share|improve this answer















            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 /home/$(whoami)/.local/share/gnome-shell/extensions/lwsm@johannes.super-pro






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 24 mins ago

























            answered 1 hour ago









            RinzwindRinzwind

            205k28391526




            205k28391526













            • Didn't Unity/Compiz also have something like that ?

              – Sergiy Kolodyazhnyy
              1 hour ago











            • @SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.

              – Rinzwind
              1 hour ago



















            • Didn't Unity/Compiz also have something like that ?

              – Sergiy Kolodyazhnyy
              1 hour ago











            • @SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.

              – Rinzwind
              1 hour ago

















            Didn't Unity/Compiz also have something like that ?

            – Sergiy Kolodyazhnyy
            1 hour ago





            Didn't Unity/Compiz also have something like that ?

            – Sergiy Kolodyazhnyy
            1 hour ago













            @SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.

            – Rinzwind
            1 hour ago





            @SergiyKolodyazhnyy yes. github.com/johannesjo/linux-window-session-manager is the same but more generic.

            – Rinzwind
            1 hour ago













            1














            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.





            share|improve this answer




























              1














              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.





              share|improve this answer


























                1












                1








                1







                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.





                share|improve this answer













                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.






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 1 hour ago









                TDKTDK

                1597




                1597






























                    draft saved

                    draft discarded




















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    SQL Server 17 - Attemping to backup to remote NAS but Access is denied

                    Always On Availability groups resolving state after failover - Remote harden of transaction...

                    Restoring from pg_dump with foreign key constraints