create a dialog box at startup

hi ,
i am running kodi 17.3 krypton on raspberry pi 3.
my question is OS independent.
i want a dialog box to appear on startup that tells the IP my device got.

i have a general idea.
sometime back , i did write a py script that displayed a fixed text for few seconds. somehow , don’t have that py file.
guess , this time i should run command
ifconfig > /storage/current_ip.txt
and display contents of current_ip.txt in dialogbox.
if i add
python script.py
in /storage/.config/autostart.sh
so , need help .

thanks.