我想删除通常出现在登录屏幕右上角的几个指示器。特别是,我想删除无障碍、键盘布局、电源和声音指示器,尽管知道如何一般性地添加或删除指示器会很好。我该怎么做?
/usr/share/unity/indicators/
目录下的一些配置文件。打开对应的文件进行编辑
sudo nano /usr/share/unity/indicators/com.canonical.indicator.keyboard
为你想要隐藏的模式注释掉对象路径,例如这将在欢迎界面和锁定屏幕中隐藏它
[Indicator Service]
Name=indicator-keyboard
ObjectPath=/com/canonical/indicator/keyboard
Position=80
[desktop]
ObjectPath=/com/canonical/indicator/keyboard/desktop
#[desktop_greeter]
#ObjectPath=/com/canonical/indicator/keyboard/desktop_greeter
#[desktop_lockscreen]
#ObjectPath=/com/canonical/indicator/keyboard/desktop_lockscreen
[ubiquity]
ObjectPath=/com/canonical/indicator/keyboard/desktop
重启或只是重新启动显示管理器
sudo service lightdm restart
nm-applet
创建的,至于辅助功能指示器,我不确定。 - user.dz$ pstree
init─┬─...
├─lightdm─┬─Xorg
│ ├─lightdm─┬─lightdm-greeter───unity-greeter───4*[{unity-greeter}]
...
$ dpkg -L unity-greeter
...
/usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml
...
$ more /usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml
...
<key name="indicators" type="as">
<default>['ug-accessibility', 'com.canonical.indicator.keyboard', 'com.canonical.indicator.session', 'com.canonical.indicator.datetime', 'com.canonical.indicator.
power', 'com.canonical.indicator.sound', 'application']</default>
<summary>Which indicators to load</summary>
</key>
...
unity-greeter
是由lightdm
用户运行的!而不是四处寻找更改那个幽灵用户的dconf
设置的方法。我覆盖了默认设置。在Ubuntu 14.04 64位(VirtualBox)中进行了测试。
创建新的 dconf
覆盖文件
sudo nano /usr/share/glib-2.0/schemas/90_unity-greeter.gschema.override
在其中添加以下两行,指定你想要保留的指示器:
[com.canonical.unity-greeter]
indicators=['com.canonical.indicator.session']
默认值为:
['ug-accessibility', 'com.canonical.indicator.keyboard', 'com.canonical.indicator.session', 'com.canonical.indicator.datetime', 'com.canonical.indicator.power', 'com.canonical.indicator.sound', 'application']
重新编译 glib
schemas
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
重启显示管理器
sudo service lightdm restart
/etc/lightdm/
目录下应该有一个配置文件,但我不记得是哪个文件了,而且我现在正坐在一台Windows机器上无法查看。请阅读所有文件 - 至少有一个文件应该包含关于你提到的指示器的部分。将该文件复制为备份并找出如何编辑它。或者将其内容发布出来(作为对你问题的编辑!),我会帮你查看。你必须给我留下评论(@ByteCommander)... - Byte Commander/etc/lightdm
目录下有四个欢迎界面的配置文件:lightdm.conf
、lightdm-gtk-greeter.conf
、lightdm-gtk-greeter-ubuntu.conf
和lightdm-webkit-greeter.conf
。我不知道它们之间的区别,但我尝试通过每个文件禁用登录界面的时钟,但都没有成功。 - fouriclightdm-gtk-greeter.conf
中,行show-indicators=~host;~spacer;~a11y;~session;~language;~a11y;~clock;~power;
应该负责显示哪些指示器。你可以尝试从列表中删除项目,看看哪些指示器会消失。我的意思是,“clock”很明显,但不知道“a11y”代表什么...我再做一些研究。 - Byte Commander