Authenticate VNC session with ConsolKit?

Posted by lori on Super User See other posts from Super User or by lori
Published on 2012-09-16T08:25:38Z Indexed on 2012/09/16 9:40 UTC
Read the original article Hit count: 322

Filed under:
|

I have a linux machine running Fedora 16 in a cupboard. It has no screen or keyboard. I connect to it using a combination of vnc and ssh.

Recently, after an update, I have had issues with authentication on the machine.

If I vnc to it, the kde desktop pops up an error dialog every few minutes saying Authorization failed. Failed to obtain authentication.

If I plug in a USB drive it fails to mount, Dolphin reports an authentication issue again.

I have had limited success finding the solution. AFAICT, it is an issue with ConsoleKit deeming me to be a non-local user so it prevents authentication.

This is the output from ck-list-sessions:

$ ck-list-sessions 
Session5:
        unix-user = '1000'
        realname = 'steve'
        seat = 'Seat6'
        session-type = ''
        active = FALSE
        x11-display = ':1'
        x11-display-device = ''
        display-device = ''
        remote-host-name = ''
        is-local = FALSE
        on-since = '2012-09-16T08:07:03.137011Z'
        login-session-id = '1'

I have tried to update my .vnc/xstartup script to include ck-launch-session as follows:

$ cat ~/.vnc/xstartup 
#!/bin/sh

exec ck-launch-session vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XKL_XMODMAP_DISABLE=1
OS=`uname -s`
if [ $OS = 'Linux' ]; then
  case "$WINDOWMANAGER" in
    *gnome*)
      if [ -e /etc/SuSE-release ]; then
        PATH=$PATH:/opt/gnome/bin
        export PATH
      fi
      ;;
  esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
  exec ck-launch-session /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
  exec ck-launch-session sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
exec ck-launch-session xsetroot -solid grey
exec ck-launch-session xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
exec ck-launch-session twm &

This has not helped.

How can I either authenticate myself to ConsoleKit, or trick it into believing I am a local user?

© Super User or respective owner

Related posts about linux

Related posts about vnc