AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1111954
Accepted
Alice
Alice
Asked: 2019-01-23 04:51:32 +0800 CST2019-01-23 04:51:32 +0800 CST 2019-01-23 04:51:32 +0800 CST

启动 Ubuntu 系统后恢复以前的应用程序状态

  • 772

以前,我曾经sudo shutdown -h now关闭过 macOS。在此之后开机,系统会将所有应用程序(如 Chrome、VS Code、PDF)恢复到关机前的状态。

现在,我使用相同的命令sudo shutdown -h now关闭 Ubuntu。但是,开机后,系统会启动一个全新的状态,而不会将应用程序恢复到关机前的状态。

macOS 使用了什么功能?我也可以在 Ubuntu 上使用它吗?

gnome shutdown session macosx
  • 2 2 个回答
  • 4348 Views

2 个回答

  • Voted
  1. Best Answer
    Rinzwind
    2019-01-23T05:24:01+08:002019-01-23T05:24:01+08:00

    它被称为“会话管理”

    我可以在ubuntu上使用它吗?

    不在默认桌面中

    但是您可以为此使用Linux 窗口会话管理器或gnome 的Gnome Window 会话管理器扩展。您将在 Gnome Shell 顶部栏上获得一个指示器,您可以在其中保存和恢复会话。从第二个链接安装(第一个有类似的设置):

    设置

    • 确保您已安装 nodejs(例如,执行 node -v 如果没有输出,请安装它)。

    • 通过 npm 安装 lwsm:(npm install -g linux-window-session-manager在某些系统上您可能想要使用 sudo)

    • 下载或克隆存储库并将所有文件移动到/home/your-user-name/.local/share/gnome-shell/extensions/[email protected]

    • 在某些情况下——尤其是当你使用 nvm 时,你可能需要配置你的 lwsm 安装路径(你可以在成功安装后通过哪个 lwsm 找到)扩展通过gnome-shell-extension-prefs.


    设置完成后安装:

    cd tmp
    git clone [email protected]:johannesjo/gnome-shell-extension-window-session-manager.git
    mv gnome-shell-extension-window-session-manager ~/.local/share/gnome-shell/extensions/[email protected]
    
    • 12
  2. GabrieleMartini
    2019-01-23T05:21:42+08:002019-01-23T05:21:42+08:00

    它没有关闭,无论如何看一下以下命令:

    pm-action - 暂停或休眠您的计算机

    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.
    
    • 3

相关问题

  • 为什么我的时钟、指示器小程序和通知区域有时会在我重新启动时移动?我怎样才能防止这种情况?

  • 停止菜单图标闪烁

  • 是否有适用于 IMAP 邮件帐户的 Gnome 小程序?

  • 如果顶部面板中缺少会话小程序,如何注销?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve