Comment 22 for bug 221363

Revision history for this message
Marcelo Boveto Shima (marceloshima) wrote : Re: Policy Kit Unlock Buttons Greyed Out when using NX

A proof of concept, you can try it on a NX session:

convidado@laptop:~$ ck-list-sessions
Session1:
 uid = '1000'
 realname = 'Marcelo Boveto Shima,,,'
 seat = 'Seat1'
 session-type = ''
 active = TRUE
 x11-display = ':0'
 x11-display-device = '/dev/tty7'
 display-device = ''
 remote-host-name = ''
 is-local = TRUE
 on-since = '2008-06-25T16:40:29Z'

convidado@laptop:~$ nx-session-launcher-suid ck-list-sessions
Session1:
 uid = '1000'
 realname = 'Marcelo,,,'
 seat = 'Seat1'
 session-type = ''
 active = TRUE
 x11-display = ':0'
 x11-display-device = '/dev/tty7'
 display-device = ''
 remote-host-name = ''
 is-local = TRUE
 on-since = '2008-06-25T16:40:29Z'
Session3:
 uid = '1001'
 realname = 'Convidado,,,,'
 seat = 'Seat3'
 session-type = 'nx'
 active = TRUE
 x11-display = ':1000.0'
 x11-display-device = ''
 display-device = ''
 remote-host-name = ''
 is-local = TRUE
 on-since = '2008-06-25T17:07:12Z'

convidado@laptop:~$ nx-session-launcher-suid users-admin

How it works?
 - $ ck-list-sessions
        shows my X session
 - $ nx-session-launcher-suid ck-list-sessions
        nx-session-launcher-suid creates a session, then executes ck-list-sessions and the session ends
 - $ nx-session-launcher-suid users-admin
        nx-session-launcher-suid creates a session, then executes users-admin and the session ends
        The PolicyKit button is not grayed