So, here's what I'd really love to do. My Arch Linux laptop is put to sleep with the help of pm-utils, some X apps (transmission, banshee, etc.) need to be manually shutdown (via script in /etc/pm/sleep.d/00script.sh) and restarted on sleep resume. However, as pm hooks are run as root user running a X app for normal user AS root is quite a challenge. It all comes down to having DISPLAY and XAuthority exported, I know, but I've ran out of ideas how to make it work, and I've tried a number of approaches but none of them ever worked.
So, I decided to throw this out and see if any of the superusers here know what can be done about this :)
