10.2. 通知系统安全分类
您可以在 overlay banner 中设置包含预定义消息的通知。这对于在登录前用户需要在哪里读取系统安全分类的部署很有用。
根据您的配置,通知可以在登录屏幕中、登录后、锁定屏幕或用户在一段时间内没有活动时显示。您总是可以在通知显示时清除它。
流程
安装
gnome-shell-extension-heads-up-display软件包:# dnf install gnome-shell-extension-heads-up-display在以下位置之一创建
99-hud-message文件:-
要在登录屏幕中配置通知,请创建
/etc/dconf/db/gdm.d/99-hud-message。 -
要在用户会话中配置通知,请创建
/etc/dconf/db/local.d/99-hud-message。
-
要在登录屏幕中配置通知,请创建
在创建的文件中输入以下配置:
[org/gnome/shell] enabled-extensions=['heads-up-display@gnome-shell-extensions.gcampax.github.com'] [org/gnome/shell/extensions/heads-up-display] message-heading="<security_classification_title>" message-body="<security_classification_description>" # The following options control when the notification appears: show-when-locked=true show-when-unlocking=true show-when-unlocked=true使用描述系统安全分类的文本替换以下值:
- 安全分类标题
- 标识安全分类的简短标题。
- 安全分类描述
- 提供额外详情的较长消息,例如对各种指南的引用。
警告此配置会覆盖那些启用了扩展(如 启用系统安全分类横幅)的类似的配置文件。
要启用多个扩展,在 enabled-extensions 列表中指定它们。例如:
enabled-extensions=['heads-up-display@gnome-shell-extensions.gcampax.github.com', 'classification-banner@gnome-shell-extensions.gcampax.github.com']
更新
dconf数据库:# dconf update- 重启系统。
故障排除
- 如果没有为现有用户显示通知,请以 用户身份登录并使用 Extensions 应用启用 标头显示消息 扩展。