Running X window programs from PM suspend-resume scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Is there a trick to run X window programs from PM suspend-resume 
hooks? For example, I need to restore keyboard mapping after suspend 
to RAM using 

xkbcomp some_file.xkm :0.0

Running this in

#!/bin/bash
DISPLAY=":0.0"
export DISPLAY
case $1 in
    hibernate | suspend)
	;;
    thaw | resume)
        sleep 2
	chvt 1
	sleep 1
	xkbcomp /home/mirsev/GoodKeyMap.xkm $DISPLAY
	;;
    *)
        ;;
esac
exit 0

gives an error: Cannot open display ":0.0"

Any idea?

Serguei.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux