I realize this is a late response (like, years late) but I thought I would go ahead and put something here for anyone else having the same issues. I see this issue all the time. This is just one way to do it that is easy to script and deploy. Keep in mind this is an inelegant solution that is similar to this one: How do I create a popup banner before login with Lightdm?
- Create a file and name it anything you want such as: anythingYouWant
Put the following in that file (replacing the banner text of course):
bannerText="This is my banner and you will love it. Worship it!"
zenity --question --title="Pirate Ninja Banner" \
--text=$bannerText" --no-wrap --width=800 --height=200
until [[ $? = '0' ]]: do
zenity --question --title="Pirate Ninja Banner" \
--text=$bannerText" --no-wrap --width=800 --height=200
done
Adjust width and height to whatever you need.
3a. The idea here is when the login message displays the user can't proceed until they agree to the terms, thus it loops until "yes" is selected.
NOTE (because I didn't know this before): zenity --list can return true yes false no (Boolean values), zenity --question returns exit 0,1
Make your file executable:
sudo chmod +x anythingYouWant
Put it somewhere -- I just stuck it in /usr/bin
sudo mv anythingYouWant /usr/bin
-----------LIGHTDM-----------------------
If you are using lightdm then you'll need to modify your lightdm.conf file. When I went to do this the first time lightdm.conf wasn't there T_T. So, if it isn't, that's okay, go get you a copy by doing this:
sudo cp /usr/share/doc/lightdm/lightdm.conf /etc/lightdm/
If that didn't work then it could be that the file in /usr/share/doc/lightdm/ is zipped up so do:
sudo gzip -d /usr/share/doc/lightdm/lightdm.conf.gz
7a. Then move the file to /etc/lightdm/
Open up lightdm.conf (that should now be in /etc/lightdm/) and add the following beneath the section that says [SeatDefaults], like this:
[SeatDefaults]
greeter-setup-script=/path/to/your/loginMessage
8a. Where /path/to/your/loginMessage is wherever you put the executable you created earlier. I put mine in /usr/bin so mine looks like:
[SeatDefaults]
greeter-setup-script=/usr/bin/loginmessage
8b. Save the file
That should about do it for lightdm. You could also just create your own lightdm.conf file and put the above into it.
9a. Reboot.
-----------GDM-------------------
I tested this popup "loop" on CenOS 7 and Ubuntu 14.04 with GDM as well. Thing is, lightdm.conf doesn't really help in the case of GDM now does it?
Well, there is a work around that works for me (for now).
Open the file /etc/gdm/Init/Default
sudo vim /etc/gdm/Init/Default
Go to the bottom of the file.
Right above exit 0 put:
exec /path/to/your/message
14a. Where /path/to/your/message is the path to your nifty login message. When all done it should look something like this:
fi
exec /usr/bin/loginmessage
exit 0
14b. The "fi" and the "exit 0" are already there, you just put in the "exec /path/to/your/message part of it.
14c. Save and reboot.
All the rebooting probably isn't necessary. I test this stuff in vm's so its easier to just bounce the machine.
If there are better ways to do this I'm all ears/eyes. I know that gconf works swell in CentOS 6.x. I know that dconf kind of works in CentOS 7 but I wasn't getting what I wanted. None of the gconf stuff has worked for me in Ubuntu, even after installing GDM and reconfiguring <- could just be me though.