How to restore the last running app when you log in again in Ubuntu

Source: Internet
Author: User
Tags sleep function

in your Ubuntu, if you need to do some work, you don't need to close the apps that are running, just manage the windows and open the apps you need to work on. However, if you need to leave to deal with something else or your machine has low power so that you have to shut down the computer immediately, these programs may need to be closed for termination. Fortunately, you can let Ubuntu remember all the apps you're running and restore them the next time you log in.

Automatically save sessionsnow, in order for our Ubuntu to remember the apps that are running in the current session and restore them the next time we log in, we'll use the dconf-editor. This tool replaces the Gconf-editor installed in the previous Ubuntu version, but by default the Ubuntu version is now (note: This refers to Ubuntu 14.04 LTS) and is not installed. In order to install Dconf-editor, you need to run the sudo apt-get install dconf-editor command:
$ sudo apt-get install dconf-toolsonce the dconf-editor is installed, you can open it from the app menu (note: This is the Unity Dash), or you can start it by running it directly in the terminal or by running the following command using ALT+F2:
$ dconf-editorIn the dconf Editor window, click the right arrow near "org" in the left pane to expand the branch of this option.

then under "org", click on the right arrow near "Gnome".

then click on "Gnome-session" under "Gnome". In the right pane, select the Auto-save-session option box and turn it on.

after you confirm that you have ticked the options you just made, click the Close button (X), which is located in the upper-left corner of the window by default, to close the Dconf editor.

when you log out and sign back in, all the apps you're running can be restored.
cheer up, we have successfully configured our Ubuntu 14.04 LTS "trusty" to automatically remember the app that we were running in the last session.
In addition to resuming applications after shutting down, you can also sleep to achieve similar functionality.
Sleep functionnow, in this tutorial, we will also learn How to turn on hibernation in Ubuntu 14.04 LTS :
before you begin, press ctrl+alt+t on your keyboard to open the terminal. After it is turned on, run:
sudo pm-hibernateafter your computer shuts down, turn it back on again. At this point, did you open the app that was reopened? If the Hibernate function does not work, check your swap partition size, which is at least as large as the amount of RAM you have available.
You can view the size of your swap partition in System Monitor, which can be turned on by running the following command in the App menu or in the terminal:
$ gnome-system-monitor Enable hibernation in the system tray:the session indicator inside the system tray is now using logind instead of upower. By default, the Hibernate menu is disabled in Upower and Logind.
to open its Hibernate menu, run the following command to edit the configuration file:
Sudo-icd/var/lib/polkit-1/localauthority/50-local.d/gedit Com.ubuntu.enable-hibernate.pklahint: If for you, this configuration file does not play a role, please replace the above code/VAR/LIB for/etc to try another configuration file
copy and paste the following code into the file and save:
[re-enable hibernate by default in Upower] identity=unix-user:* action=org.freedesktop.upower.hibernate Resultactive=yes[re-enable hibernate by default in Logind] identity=unix-user:* action= Org.freedesktop.login1.hibernate Resultactive=yesReboot your computer and you are ready to go.
when you cover the back cover of the notebook, let it hibernate:

    • Edit the file "/etc/systemd/logind.conf" with the following command:

      $ sudo nano/etc/systemd/logind.conf

    • Change the #HandleLidSwitch =suspend (hang) line to handlelidswitch=hibernate (hibernate) and save the file;

    • Run the following command or restart your computer to apply the changes:

      $ sudo restart Systemd-logind

That 's it. Have you succeeded? Now we have the dconf set up and the Hibernate feature turned on:) This way, whether you're shutting down or closing the notebook lid, your Ubuntu will be able to fully remember the apps and windows you've opened.
if you want to dive into the Linux system novice, you can also download a German Linux software center trial.
Free: Http://www.nfs-cloud.cn:81/appCenter/open/softcenter

How to restore the last running app when you log in again in Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.