pkexec can not open display

I install slim-1.3.4_4 that with consolekit-0.4.3 support, when I use pkexec to run gui-app it tell me "can not open display". polkit, polkit-gnome looks fine.

ck-list-session show below
Code:
Session1:
  unix-user = '1001'
  realname = 'xxxxxxxx'
  seat = 'seat1'
  active = TRUE
  x11-display = ':0.0'
  x11-display-device = '/dev/ttyv8'
  display-device = ''
  remote-host-name = ''
  is-local = TRUE
  on-since = '2013-01-17T14:58:14.608773Z'
  login-session-id = ''
My first question that why my display-device is empty ??

I find the solution from https://alderaan.archlinux.org/viewtopic.php?pid=999012. but still not work.

I did some test that use pkexec to get a root tcsh and run x11-app. but still tell me "can open display". so I check the variable $DISPLAY is not set in root tcsh.

How can I just run "pkexec pcmanfm" then get work with admin permission ??
 
Back
Top