Why can't I write to the GDM screen after F18?

asked 2013-01-19 08:17:40 -0600

Peter Scott gravatar image

I've used the following script to warn other family members that I'm updating the laptop they might be using or about to use. After updating to F18 with fedup the message isn't displayed until a user logs in and when they logout the command terminates. I guess this is something to do with the new /etc/dbus-1/system.d/gdm.conf. Any suggestions?

#!/bin/sh
#
# warn - send warning to (laptop) X screen
#
# Tue Jan 15 12:43:25 GMT 2013
#


# usage - display usage message
#
usage(){
  echo "Usage: $NAME" >&2
  exit 1
}


NAME=`basename $0`
test "$1" && usage
xauthority=`(
  cd /var/run/gdm
  sudo ls | grep auth-for-gdm
)`
xauthority=/var/run/gdm/$xauthority/database
(
  cat <<-! |
        I am using this computer (from another one).
        You can use it too.

        Please:

             Don't shut it down when you log off.

             Leave this message on the screen if
             you leave it unattended.


        Thanks,
             Peter
!
    sudo env DISPLAY=:0.0 XAUTHORITY=$xauthority xmessage \
                      -xrm ".Xmessage.Form.Text.scrollVertical:   whenNeeded" \
                      -xrm ".Xmessage.Form.Text.scrollHorizontal: whenNeeded" \
                      -xrm ".Xmessage.*.background:               white" \
                      -xrm ".Xmessage.*.foreground:               black" \
                      -xrm ".Xmessage.Form.Text.borderColor:      white" \
                      -xrm ".Xmessage.Form.Command.foreground:    white" \
                      -xrm ".Xmessage.Form.Command.background:    red" \
                      -nearmouse -file - -buttons "Do not click me!" &
  echo $NAME: info: xmessage pid: $!
  wait
  xmessage "$NAME: xmessage stopped"
)&
edit retag flag offensive close merge delete