[CentOS] How to display the IP on the welcome screen

Wed Apr 21 08:14:08 UTC 2010
Georghy <fusco at wanagain.net>

MOKRANI Rachid a écrit :
> Hi,
>
> Add the content of the file  /etc/issue in the file /etc/gdm/custom.conf .
> See the line :
>
> ....
> .....
> .....
> [gui]
>
> [greeter]
> TitleBar=true
> LockPosition=false
> ConfigAvailable=false
> BackgroundType=1
> BackgroundImage=YOUR BACKGROUND IMAGE
> Logo=YOUR LOGO
> DefaultWelcome=false
> Welcome=%s: %r - %n
> InfoMsgFile=/etc/issue <--------------ADD HERE THE FILE
> Use24Clock=true
>
> ....
> ....
>
>
>
> Restart X11, and a new window will be appear with the content of the file /etc/issue
>
>
> Regards.
>
>
>
>
>
>
>
> -----Message d'origine-----
> De : centos-bounces at centos.org [mailto:centos-bounces at centos.org] De la part de Patrick Derwael
> Envoyé : mardi 20 avril 2010 19:49
> À : 'CentOS mailing list'
> Objet : Re: [CentOS] How to display the IP on the welcome screen
>
> This is a good step, but how do I get the contents of /etc/issue on the gui
> ??
>
>
>
> Patrick Derwael
> Rue Hubert Larock, 20
> 4280 Hannut - Belgique
> G: +32 (0)479.80.50.79
> T : +32 (0)19.63.64.45
>  
>
> try a bash script like the following :
>
> #!/bin/sh
> ADRESS=`ifconfig | grep "inet addr" | awk '{print $2}' | sed s/addr:// | 
> head -n 1`
> echo "The IP adress is : $ADRESS." > /etc/issue
>
>   
Nice trick, I'll try it thanks ;)

-- 
Cordialement, / Greetings,
Georghy FUSCO