Gnome: Save And Restore Running Applications And Window Positions With Window Session Manager

Being able to save open applications and window positions and restore them later can be useful in multiple situations and environments, like work, easily switching between tasks with predefined running apps and windows, and so on.

Window Session Manager is an extension for Gnome Shell that lets you save and restore open applications and window positions / arrangements over multiple real and virtual displays, for X (including XWayland).

The extension makes use of Linux Window Session Manager, a Node.js library and command line tool that lets you save and reload running apps and the position of their windows.

After installing Window Session Manager, you'll notice a new indicator on the Gnome Shell top bar, which is used to save and restore sessions. Click the indicator, enter a name for your session and click the save button next to it:

Gnome Shell Window Session Manager

To restore a session, click the Play icon next to your saved session name.

The Window Session Manager could use a new design because currently it's quite... unpolished. Also, its icon on the Gnome Shell top panel extends to the height of the panel, so if you use a panel that's larger in height than the default, it won't look pretty. Here's with the Dash to Panel extension as an example:

Gnome Shell Window Session Manager

But, despite its appearance, the extension does it job well and it can prove to be a very useful tool for many Gnome users.

Install Window Session Manager Gnome Shell extension

Before installing the Window Session Manager Gnome Shell extension, you'll need to install the linux-window-session-manager (the extension depends on it) package using npm.

Check out our previous article about how to install Node.js and npm and configure it to install packages without root, before proceeding to installing the package. After you've set up everything, you can install linux-window-session-manager using the following command:

npm install -g linux-window-session-manager

Next, you can install the Window Session Manager Gnome Shell extension from the Gnome extensions website.

The extension supports Gnome 3.18 and newer, and even though it's not displayed on the Gnome Shell extensions website, it does work with Gnome Shell 3.28.

If you get a dialog asking to enter the path to lwsm and you've followed our instructions on installing Node.js and npm, enter this path: /home/<your username>/.npm-packages/bin/lwsm

For other cases, if you don't know the installation path, search for lwsm on your system and enter its exact path.