gdm login screen: how to output current IP address
January 29, 2009 11:52 pm gnomeI could not find a way to put some text (for example, current IP address) into background of the gdm login screen. ImageMagic to the rescue:
cd /usr/share/gdm/themes/MyTheme convert -draw \ "text 10,50 \"`ifconfig wlan1 | awk '/inet addr/{ print $2 }'`\"" \ background.jpg background.hacked.jpg
Put that line into some startup script (for example, /etc/gdm/Init/Default). Then, change your theme xml (/usr/share/gdm/themes/MyTheme/mytheme.xml) to refer to background.hacked.jpg (instead of background.jpg). Voila.
January 30th, 2009 at 4:56 pm
Just a wild guess: there’s no builtin way to do that because “current IP address” isn’t an easily defined concept. You might be connected to several interfaces which might all have one or more working current IP addresses. ^^
(As for putting arbitrary other text there, good job 🙂
January 31st, 2009 at 2:41 am
Seppo: well, for some particular machine you usually know the interfaces/addresses you’re interested in. But in general – yes, you’re right. Anyway, this is just a sample, people can customize it as they like…