I'm using a script based on the work posted here: Update pidgin status using cron
I'm trying to make a wicd script that automaticly disconnects before Wifi-disconnect and reconnects on Wifi-reconnect.
But somehow dbus/pidgin can't seem to find the dbus session, eventhough the environment variable is set.
My setup:
- Arch linux
- Pidgin 2.9.0
- Libpurple 2.9.0-2
Autoload script (runs on Xfce start):
#!/bin/bash
touch /tmp/dbus_session_data
env | grep DBUS_SESSION_BUS_ADDRESS > /tmp/dbus_session_data
echo 'export DBUS_SESSION_BUS_ADDRESS' >> /tmp/dbus_session_data
The tmp-file after runnign script:
[skaverat@eeepthought ~]$ cat /tmp/dbus_session_data
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-gZMqzhdS2S,guid=9b8b3169f14346902127832000000043
export DBUS_SESSION_BUS_ADDRESS
Okay, let's get into another environment:
[root@eeepthought ~]# env | grep DBUSD
[root@eeepthought ~]# source /tmp/dbus_session_data
[root@eeepthought ~]# env | grep DBUS
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-gZMqzhdS2S,guid=9b8b3169f14346902127832000000043
[root@eeepthought ~]# purple-remote getstatus
No existing libpurple instance detected.
purple-remote call in normal environment:
[skaverat@eeepthought ~]$ purple-remote getstatus
available
Any idea what could be wrong?