如何在登录屏幕中添加或操作应用程序/系统指示器?


11

我想删除通常显示在登录屏幕右上角的几个指示器。特别是,我想删除辅助功能,键盘布局,电源和声音指示器,尽管很高兴知道如何一般性地添加或删除指示器。我怎样才能做到这一点?


您正在使用Unity-greeter?中应该有一个配置文件/etc/lightdm/,但是由于我现在坐在Windows机器上,所以我不记得是哪个文件,也无法检查。阅读所有文件-至少应包含有关您提到的指标的部分。复制该文件作为备份,并了解如何编辑它。或发布其内容(编辑您的问题!),我会看一下。您必须给我留下评论(@ByteCommander),然后...
Byte Commander

1
您正在使用什么系统?14.04?
Sergiy Kolodyazhnyy,2015年

@Serg,是的,我正在使用14.04。
Fouric 2015年

@ByteCommander,有四个迎宾配置文件在我的/etc/lightdmlightdm.conflightdm-gtk-greeter.conflightdm-gtk-greeter-ubuntu.conf,和lightdm-webkit-greeter.conf。我不知道它们之间的区别是什么,但是我确实尝试通过它们中的每一个禁用登录屏幕时钟,但这没有用。
Fouric

我现在在15.04上,恐怕我似乎再也没有这些配置文件了……您能上传四个配置文件(例如,到pastebin.com)并共享链接吗?当我记得我的时候,我可以看看他们,看看他们是否在看。
字节指挥官

Answers:


6

有不同的方法:

$ 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-greeterlightdm用户运行!而不是寻找一种方法来更改该dconf幻影用户的设置。我覆盖默认值。在Ubuntu 14.04 64位(VirtualBox)中进行了测试。

  1. 创建新的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']
    
  2. 重新编译glib架构

    sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
    
  3. 重新启动显示管理器

    sudo service lightdm restart
    

1
这使我可以删除可访问性(ug-accessibility)和无线(应用程序)指示器。在此答案与上一个答案之间,现在可以删除每个预装的指示器。
Fouric

@InkBlend,实际上这涵盖了具有单个设置点的所有指示器。不需要我的其他部分解决方案
user.dz 2015年

8

我曾在Ubuntu 14.04中尝试过使用LightDM(默认)的一种方法;使用一些配置文件存储在/usr/share/unity/indicators/

假设您要隐藏键盘指示器:

  1. 打开相应文件进行编辑

    sudo nano /usr/share/unity/indicators/com.canonical.indicator.keyboard
    
  2. 注释您要隐藏的模式的对象路径,例如,它将在问候屏和锁定屏中将其隐藏

    [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
    
  3. 重新启动或仅重新启动显示管理器

    sudo service lightdm restart
    

1
aa!这是我尝试过的第一件事!但是,我没有看到要隐藏的无线或可访问性指示器。您会碰巧知道这些在哪里吗?
Fouric

我确认由创建的网络指示器,nm-applet并且我不确定辅助功能指示器。
user.dz
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.