Skip to content

Instantly share code, notes, and snippets.

@benjjo
Created June 10, 2021 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjjo/9a12019d83ca0b9297be34843ede8406 to your computer and use it in GitHub Desktop.
Save benjjo/9a12019d83ca0b9297be34843ede8406 to your computer and use it in GitHub Desktop.
A small script to display the IP address of your Raspberry Pi, on start up. Requires figlet, lxterm
[Desktop Entry]
Encoding=UTF-8
Name=Terminal autostart
Comment=Start a terminal and list directory
Exec=/usr/bin/lxterm -e 'sleep 60 ; figlet `hostname -I` ; sleep 600'
@benjjo
Copy link
Author

benjjo commented Jun 10, 2021

Display IP address on startup

Hi all, thought i'd share this as it was another thing I found that was harder than it feels it should be.

If you're like me and you log into your Pi with VNC at the office, its a bit of pain to have to locate the IP address of the Pi when your IT department refuses to give you a static IP.

I use the following:

vim ~/.config/autostart/lxterm-autostart.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Terminal autostart
Comment=Start a terminal and list directory
Exec=/usr/bin/lxterm -e 'sleep 60 ; figlet hostname -I ; sleep 600'

It works for me. Obviously iv'e installed figlet for a bit of flare because without flare we are simply just animals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment