Upgrading From Debian Wheezy to Jessie Breaks Policy Kit (LXDE)

I had 3 problems after migrating to Jessie. I had a window that would come up after logging in from lightdm that said "No session for pid XXXX". I also couldn't run programs that need root access like synaptic and "time and date" would not run. The third problem was I had no shutdown / suspend / hibernate / reboot buttons in lxde. I could do it from the command line. 

I found out from searching it can be related to policy kit so ran this command:

dpkg --get-selections | grep polkit

I saw that libpolkit-backend-1-0 was set to deinstall and I have no idea why. So I reinstalled it. Still no progress so I did this:


> My solution to the problem was to edit the file /etc/xdg/autostart/lxpolkit.desktop by adding the text 'LXDE' to the line 'NotShownIn' thus:

Still nothing so then I saw this bug report which was close to my problem:


Am 01.04.2014 14:47, schrieb программист некто:
> I found a workaround for lxdm.
> http://askubuntu.com/questions/303309/cant-mount-usb-devices-shut-down-etc-as-a-user/375346#375346
> append to /etc/pam.d/lxdm these lines:
> session required pam_loginuid.so
> session required pam_systemd.so

Hm, aside from the fact lxdm doesn't seem to exist for Debian,
/etc/pam.d/lxdm should include /etc/pam.d/common-session (as other
display managers do).

/etc/pam.d/common-session already includes an entry for pam_systemd.so

It was missing an important piece of information (I think because it's referring to experimental and not Jessie?). You add the second line to lightdm instead of lxdm. After that everything was working but I might have rebooted.