3

With every screen unlock by providing credentials in, my aim is to have a popup for the user to click "agree" for terms & conditions.

I am using xmessage for this, simple bash script that throws the file out and two buttons: -agree; -no;

I can't seem to find a way of this xmessage popup showing up every time user logs into their machine.

This is for AWS WorkSpaces Linux 2 - which runs MATE2.

I have build a script, sample.sh and dropped in the following:

  • profile.d -> this is showing the popup from the script every time a new shell is started which means when launching terminal, this is also launching.
  • init.d -> this is not working
  • /etc/skel/ -> this doesn't seem to work either, even using the .desktop extension with +x and 755.

This is the xmessage code:

  answer=$(xmessage -button ok -center file - "THIS IS A SAMPLE TEST -buttons yes,no -print)
  if [ $answer = "no" ]
  then
         mate-session-save --force-logout
  fi
sredwopclub
  • 51
  • 1
  • 3
  • 2
    How exactly does the screen get locked in the first place? I find it extremely unlikely that unlocking the screen is performing a login, even if the same credentials are involved. – chepner Sep 05 '19 at 16:14

0 Answers0