I added the package pm-utils, too. A possible workaround or true bugfix
would be to integrate the following script in pm-utils (found it here:
http://forum.ubuntuusers.de/topic/136999/):

#!/bin/bash

get_env_var_of_process() {
  local pid="$1" envvar="$2"

  cat /proc/$pid/environ | tr '\0' '\n' | sed -ne 's/^'"$envvar"'=\(.*\)$/\1/p'
}

send_dbus_msg_to_pidgin() {
  local msg="$1"

  for pid in `pidof pidgin`; do
    user=$(get_env_var_of_process $pid USER)
    session_bus_address=$(get_env_var_of_process $pid DBUS_SESSION_BUS_ADDRESS)
    DBUS_SESSION_BUS_ADDRESS="$session_bus_address" su "$user" -c 
"purple-remote $msg" | logger
  done
}

case "$1" in
  hibernate|suspend)
    logger "Setting Pidgin offline..."
    send_dbus_msg_to_pidgin "setstatus\?status=offline" | logger
    ;;

  thaw|resume)
    logger "Reanimating Piding..."
    send_dbus_msg_to_pidgin "setstatus\?status=available" | logger
    ;;

  *)
    send_dbus_msg_to_pidgin "jabber:[EMAIL PROTECTED]" | logger
    ;;

esac

exit $?

Just create it in /etc/pm and add some symbolic links in /etc/pm/sleep.d
and /etc/pm/power.d, don't forget to chmod +x it ;)


** Also affects: pm-utils (Ubuntu)
   Importance: Undecided
       Status: New

-- 
Pidgin should refresh active accounts after coming back from suspend/hibernate
https://bugs.launchpad.net/bugs/135886
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to