作成/etc/systemd/system/[email protected]
sudo vim /etc/systemd/system/[email protected]
----------------------------------------------------------------------------------------------------
[Unit]
Description=User resume actions
After=suspend.target
[Service]
User=%I
Type=simple
ExecStart=/usr/bin/deepin-wm-restart.sh
[Install]
WantedBy=suspend.target
は/usr/bin/deepin-wm-restart.sh
を作成し、上の[email protected]
はを実行します.
sudo vim /usr/bin/deepin-wm-restart.sh
--------------------------------------------------------------------------------------------------
#!/bin/bash
export DISPLAY=:0
deepin-wm --replace
実行権限を設定し、起動起動サービスを設定し、すぐにを起動する.
chmod +x /usr/bin/deepin-wm-restart.sh
systemctl enable resume@user
systemctl start resume@user