1

I am trying to display the output of a python file on the login screen of Ubuntu 22.04. For example, say I had a file startup.py that simply prints my IP address. I would like to display that printed output on the login screen so that the user does not have to log in to see their IP address.

My guess is that I have to create a bash script that runs a python3 command. Then, open Ubuntu's "Startup Applications" app and create a new startup application that runs the created bash script.

Not sure how to display it on the login screen without entering a password.

Thanks in advance for your help!

Andrew Campi
  • 51
  • 1
  • 7

1 Answers1

0

For login screen on gnome https://c-nergy.be/blog/?p=15628

For login screen on terminal shell: Edit these files as per your need:

/etc/issue --> For console access (Login in text mode directly from the device), the messages stored in this file are displayed before the login line.

/etc/issue.net --> For remote access, via telnet or ssh, messages in this file are displayed before user login.

/etc/update-motd.d --> Messages from this will only be displayed after login