10

Is that possible to add icons(other than defaults) to the login screen top-panel?

enter image description here

If yes then which applications icons will be added to the login screen top panel other than the defaults(onboard,sound,network-manager,etc).And how do i add that?

I am running Ubuntu 13.10

3
  • Its the lightdm login manager, so you will have to edit its files /usr/share directly. I think there was a lightdm customizer that allowed this and changing background, but I don't if it still works any more..
    – Wilf
    Nov 30, 2013 at 12:56
  • 1
    can i get this wallpaper?
    – user204653
    Jan 2, 2014 at 6:16
  • @Utkarsh i downloaded the above picture from google image search. Jan 2, 2014 at 7:35

1 Answer 1

14
+50

I'm on 12.04, but this will work on 13.10 also.

Yes, it is possible to change the indicators for the unity-greeter. We could use GSettings to modify the settings, but because the unity-greeter is only run by the lightdm user, (so it's settings doesn't affect anyone else) it is easiest to just write a .override file.

1. Check the default indicators

You can see your default indicators in the dconf-editor or int the /usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml file. In the latter file you will see a key similar to this:

 <key name="indicators" type="as">
  <default>['ug-keyboard', 'ug-accessibility', 'session', 'datetime', 'power', 'soundmenu', 'application']</default>
  <summary>Which indicators to load</summary>
</key>

, those are the defaults for me. Check your's first.

On 13.10 this key looks like this:

<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>

2 . Check the available indicators

You can check your available indicators in the /usr/lib/indicators3/7/ directory, or in the /usr/share/unity/indicators/ directory.

3. Write an override file

Just write a file with similar contents and save it as /usr/share/glib-2.0/schemas/myoverride.gschema.override

For 12.04

[com.canonical.unity-greeter]
indicators=['ug-keyboard', 'ug-accessibility', 'session', 'datetime', 'power', 'soundmenu', 'application', 'messaging']

For 13.10

[com.canonical.unity-greeter]
indicators=['ug-accessibility', 'com.canonical.indicator.keyboard', 'com.canonical.indicator.session', 'com.canonical.indicator.datetime', 'com.canonical.indicator.power', 'com.canonical.indicator.sound', 'application', 'messages']

In the 12.04 version I added the messaging indicator to the default list of 12.04. In the 13.10 version I added the messages indicator to the default listof 13.10. I simply added them to the default list shown in STEP 1, you can do that too, or remove some from the default indicators if you don't want them to show up on the login screen. (Watch out for the apostrophes.) IMPORTANT: On 12.04 you have to keep the 'ug-keyboard' and the 'session' indicator in the list, so DO NOT remove them if you have them in the default line, or lightdm will stuck in an endless loop. (like here )

Naming conventions in the override file: For files in the /usr/lib/indicators3/7/ directory the filename's preceding "lib" and the ending ".so" are not important, so for a file named libmessaging.so we could use 'libmessaging.so', 'libmessaging' or 'messaging'. For the files in the /usr/share/unity/indicators/ directory the filename's preceding "com.canonical.indicator." is not important, so for the "com.canonical.indicator.bluetooth" file we could use 'com.canonical.indicator.bluetooth' or simply "bluetooth'.

4. Backup (just in case)

Make a backup of the /usr/share/glib-2.0/schemas/gschemas.compiled file.

5. Compile

After all this run

sudo glib-compile-schemas /usr/share/glib-2.0/schemas

6. Check the results

After this try to logout and see if it worked. Or you can also do a test of the login-screen without logging out, if you try from a terminal:

lightdm --test-mode

or

unity-greeter --test-mode 

For me on 12.04 the messaging indicator worked, my printersmenu indicator doesn't. On 13.10 I tested with the messages indicator and it didn't show up, but neither produced erros, so I guessed that it is by design not showing up on the greeter-screen, because it is mostly useless there. So I checked the /usr/share/unity/indicators/com.canonical.indicator.messages file and it confirmed that it doesn't have a [desktop_greeter] section like e.g the session indicator has. So If you wan't the messages indicator (or another indicator without the [desktop_greeter] section) to show up on the login screen (even if it is mostly useless there), you will also have to edit its file in the /usr/share/unity/indicators/ directory, and make a copy of the [desktop] section in that file and rename the copy to [desktop_greeter] section. E.g for the messages indicator I ended up with this file for /usr/share/unity/indicators/com.canonical.indicator.messages:

[Indicator Service]
Name=indicator-messages
ObjectPath=/com/canonical/indicator/messages
Position=50

[desktop]
ObjectPath=/com/canonical/indicator/messages/desktop

[phone]
ObjectPath=/com/canonical/indicator/messages/phone

[desktop_greeter]
ObjectPath=/com/canonical/indicator/messages/desktop

After doing this change in the file, the messages indicator did show up on the login screen for 13.10 also.

If something goes bad and the login screen doesn't come up, just switch to a virtual console CTRL+ALT+F1 and restore your backup gschemas.compiled file. Or remove your myoverride.gschema.override file and run sudo glib-compile-schemas /usr/share/glib-2.0/schemas again. If the lighdtm stucks in an endless loop, and you can't switch to virtual console, just press the ALT+PrtSc+E magic key combo, this will kill lightdm and after this you can switch to the virtual console and do the repair.

Which indicators can you use? I don't know, I have only the defaults, but I guess you can try out any which installs itself to those directories listed above. (Or you could write an own indicator as always.)

Source for all of these? I looked into the code: link and link

6
  • did you want to say is find the libmessaging.so file then copy an paste it in the /usr/lib/indicators3/7 directory,am i correct? Dec 18, 2013 at 5:57
  • @AvinashRaj No, I meant that it is possible that the directory where the unity-greeter looks for the indicators is different by versions. From the source code I could only get, that there are 2 directories where the unity-greeter searches for indicators. The /usr/share/unity/indicators looks same per versions, but the /usr/lib/indicators3/7 director can be different by version. So I meant to search for the installed default indicators, look where they are stored, and simply look in that directory to see what indicators are available, then you can use their names in the list.
    – falconer
    Dec 18, 2013 at 8:34
  • see i.imgur.com/JPrincG.png Dec 18, 2013 at 8:43
  • @AvinashRaj You can try out all the indicators from those 2 directories. If you use one from usr/lib/... directory, then the naming conventions what I wrote above holds, so syncindicator is enough but you can use libsyncindicator.so also. For the other directory you can also use the whole name of the file, or you can leave out the com.canonical.indicator. section. So in your case a valid line in the override file would be something like this: indicators=['libsyncindicator.so', 'printersmenu', 'libapplication', 'com.canonical.indicator.sound', 'messages']
    – falconer
    Dec 18, 2013 at 9:03
  • i don't want to fall into any critical situation plz try it on ubuntu 13.10 and notify me if it works. Dec 18, 2013 at 9:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .