How to automatically remember running applications from your last session in Debian

Sometimes, you are performing an important task on your system using certain applications, but suddenly your system goes into hibernation mode or something else wants your attention and you have to hibernate the system. In this scenario, you might lose your work, as your running applications will be closed.

To make your system remember the application you were running in your last sessions and restoring the system to its previous state, Dconf editor is the best tool that can help you in achieving this. In this article, we will describe how you can install and configure the tool Dconf Editor to achieve this purpose.

We have used Debian 10 OS for running the commands and procedure mentioned in this article.

Step 1: Install the Dconf Editor

First, open the command line Terminal application in the Debian OS. For that, go to the Activities tab in the top left corner of your desktop. Then in the search bar, type terminal. When the Terminal icon appears, click on it to launch it.

In the terminal, enter the following command in order to install the dconf editor.

$ sudo apt-get install dconf-editor

When prompted for a password, enter the sudo password.

Install dconf editor

It will take a while and the Dconf editor will be installed on your system.

Once installed, you can verify the installation and check the version of Dconf editor installed by running the following command in Terminal:

$ dconf-editor --version

Check dconf version

Step 2: Launch the Dconf Editor

To launch the Dconf editor, hit the super key on your keyboard and type dconf on the search bar that appears. When you see the Dconf editor in the results, click on it to launch.

Dconf Editor Icon

Alternatively, you can launch Dconf editor from the command line Terminal. To do so, simply type dconf-editor in the Terminal as follows:

$ dconf-editor

When the Dconf editor will launch, you will see the following view:

Edit GNOME config

Step 3: Configure Gnome with Dconf Editor

From the Dconf editor window, navigate to org > gnome > gnome-session.

GNOME session

Under gnome-session, you will see the list of options. From there, click on the slider in front of the “auto-save-session” to switch it to on position.

Automatically save session

All of the currently running programs will automatically be restored the next time you log in.

Step 4: Hibernate and log in

Now hibernate your system using the following command in the terminal:

$ systemctl suspend

Now login back to the system and you will see all of your previously running programs have restored.

That’s it! I hope it will be helpful whenever you need your system to automatically restore the running applications from your last session.