When Ubuntu was using gnome I was able to create a popup banner like the banner below before the login screen using zenity in the /etc/gdm/Init/Default. The line of code would be like this:
if [ -f "/usr/bin/zenity" ]; then /usr/bin/zenity --info --text="`cat /etc/issue`" --no-wrap; else xmessage -file /etc/issue -button ok -geometry 540X480; fi
How can I accomplish this with Unity?
NOTICE TO USERS
This is a computer system and/or it is directly connected to
a local network system. It is for authorized use only. Users (authorized or
unauthorized) have no explicit or implicit expectation of privacy.Any or all uses of this system and all files on this system may be
intercepted, monitored, recorded, copied, audited, inspected, and
disclosed to authorized site, Department of Energy, and law
enforcement personnel, as well as authorized officials of other
agencies, both domestic and foreign. By using this system, the user
consents to such interception, monitoring, recording, copying,
auditing, inspection, and disclosure at the discretion of authorized
site or personnel.Unauthorized or improper use of this system may result in
administrative disciplinary action and civil and criminal penalties.
By continuing to use this system you indicate your awareness of and
consent to these terms and conditions of use.LOG OFF IMMEDIATELY if you do not agree to the conditions stated in
this warning.
Best Answer
The configuration file /etc/lightdm/lightdm.conf defines the available sessions. The sessions themselves are defined in /usr/share/xsessions. It should be not a problem to modify the default /usr/share/xsessions/ubuntu.desktop to wrap the gnome-session command around in a script that first displays the zenity dialog, and then either exits with a nonzero status or launches the gnome-session command.
Specifically:
Create a file called /usr/bin/mysess.sh which contains, for example, the following:
To edit this file, use
Also, make it executable
Modify the file /usr/share/xsessions/ubuntu.desktop as follows:
Now, if anyone tries to log on, the person has to click "Yes" in order to log in; otherwise, it will return to the login screen.