Ранее, я использовал sudo shutdown -h now
выключать macOS. После включения после этого система восстановила бы все приложения (как Chrome, VS Code, PDFs) к их предыдущему состоянию перед завершением работы.
Теперь, я использовал ту же команду sudo shutdown -h now
выключать Ubuntu. Но после включения система запускает абсолютно новое состояние, не восстанавливая приложения к их состоянию перед завершением работы.
Какова функциональность это используемый macOS? Я могу использовать его на Ubuntu также?
Это называют "управлением сеансами"
У меня мог быть он на человечности?
Не в рабочем столе по умолчанию
Но можно использовать менеджер сеансов окна Linux или расширение Менеджера сеансов Окна Gnome для гнома для этого. Вы получите индикатор на Gnome панель вершины Shell, где можно сохранить и восстановить сессию. Установка из 2-й ссылки (1-й имеет подобную установку):
установка
- Удостоверьтесь, что у Вас есть установленный nodejs (например, выполните узел-v и если нет никакого вывода, устанавливают его).
- Установите lwsm через npm:
npm install -g linux-window-session-manager
(в некоторых системах Вы могли бы хотеть использовать sudo),Загрузите или клонируйте репозиторий и переместите все файлы в
/home/your-user-name/.local/share/gnome-shell/extensions/lwsm@johannes.super-productivity.com
В некоторых случаях - особенно при использовании nvm Вы, возможно, должны были бы настроить путь к своей lwsm установке (который можно узнать через который lwsm после успешной установки), расширение через
gnome-shell-extension-prefs
.
Установка после установки сделана:
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
Это не завершение работы, anycase смотрят на следующую команду:
пополудни-действие - Приостанавливает или В спящем режиме Ваш компьютер
pm-hibernate [--help]
pm-suspend [--quirk-*] [--help]
pm-suspend-hybrid [--quirk-*] [--help]
Из страницы справочника:
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.