Monday, November 19, 2012

ligthdm: custom app on login screen

It's not rocket science, but it took me a while to collect all the pieces, so here's a short summary, mainly to serve as a reminder to myself: I need the IP address of a computer displayed on the login-screen (using lightdm), because every day it gets a different dynamic IP address and I want to login over the network, and logging in on the console just to type ifconfig (or ip addr) is cumbersome. No, it's not in DNS. No, using mdns/avahi doesn't work either in this particular instance. It's a laptop sitting just next to me on my desk.

So, without further adue:

  • install conky
  • in /etc/lightdm/lightdm.conf:
    greeter-setup-script=/etc/lightdm/greeter-setup.sh
  • in /etc/lightdm/greeter-conky.conf
    (...)
    xftfont Ubuntu Mono:size=18
    (...)
    TEXT
    (...)
    eth0: ${addr eth0}, eth1: ${addr eth1}

From chris' blog

4 comments:

Jason said...

Using this method in Ubuntu 12.10, Conky is invisible except for a couple of seconds after logging in (ie. after entering my password, but before the desktop environment starts). How can I get it to be visible all the time?

Unknown said...

Jason, I think the problem is with the unity-greeter being a fullscreen window, and now window manager being present. So it is just covering conky completely.

You might consider using the "lightdm-gtk-greeter" (which is what xubuntu uses).

A workaround would probably be to start conky after the greeter has launched.

Jason said...

Indeed - setting a 5 second delay works. Use "conky -p 5 -c ...".

Unknown said...

I'm running into a low graphics mode error.
Can any of you paste you lightdm.conf and concy startup script please?