When I log into an Ubuntu system, I get an informative message like this one:
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-34-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Thu Nov 10 11:17:53 CET 2016
System load: 0.0 Processes: 128
Usage of /: 75.1% of 680.78GB Users logged in: 1
Memory usage: 37% IP address for eth0: xxx.xxx.xxx.xxx
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
37 packages can be updated.
24 updates are security updates.
New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Your Hardware Enablement Stack (HWE) is supported until April 2019.
When I log into the system via the GUI and opening putty terminals, I don't get those messages. Is there a way to automatically display them after login (say, in a special window popping up on the GUI)?
EDIT: The code should be able to handle German language. Testing Serg's code I got the following error message:
E: Unbekannter Fehler: \xbb<class 'UnicodeEncodeError'>\xab ('ascii'
codec can't encode character '\xf6' in position 20: ordinal not in
range(128))Traceback (most recent call last):
File "./greeter_window.py", line 92, in <module>
win = GreeterWindow()
File "./greeter_window.py", line 29, in __init__
lines.append('\n\n' + self.get_updates())
File "./greeter_window.py", line 41, in get_updates
return self.run_cmd(cmd).decode().strip()
AttributeError: 'NoneType' object has no attribute 'decode'
obviously caused by the letter "ö" in the German word "können".
