I want to display a video when a wrong password is entered (say only in GUI login screen or within the display manager).I have added a line to /etc/pam.d/common-auth to run my script /usr/local/bin/movie# here are the per-package modules (the Primary block)auth    [success=2 default=ignore]  pam_unix.so nullok_secureauth    [default=ignore]                pam_exec.so seteuid /usr/local/bin/movieThe script /usr/local/bin/movie is simply:#!/bin/bash/usr/bin/mplayer /usr/local/movie.mp4exit0When entering password, I only get 0.1 s of black screen instead of the film.How can I make my script working?
How to display a video when a wrong password is entered
gui;pam;mplayer;startx;display server
To display within a gnome session, add DISPLAY=<display ID>. For instance:#!/bin/bashDISPLAY=:0 /usr/bin/mplayer -fr /usr/local/movie.mp4exit 0with -fs for full screen. 