Tuesday, 4 May 2010

Unable to mount USB

We learn from history that we learn nothing from history.  (You may have noticed my cynical side already).

Xorg is currently going through some changes (again).  hal has been deprecated, with some small amount of confusion about what's coming next, especially if you're not running *nix, but some form of BSD for example, since udev is not for BSD'ers, unless I'm mistaken.

Also watch out for your USB media not mounting again in Gnome.  If you get the error message "Unable to mount USB. Not Authorized" it may be because of the way you log in (gdm, xdm, nodm, startx) or some other random reason.  Here's where to start looking to check it:

  • Of course make sure you're in the plugdev and disk groups
  • Check your lockdown  editor for FUSE options (enable, ie. unlock them)
  • Make sure the output from ck-list-sessions is consistent across your log-in methods
  • Try replacing
    /etc/X11/Xsession.d/90consolekit [ubuntu]
    or
    /etc/X11/xinit/xinitrc.d/90-consolekit [gentoo]
    with the following:
CK_GET_X11_DISPLAY_DEVICE=/usr/lib/ConsoleKit/ck-get-x11-display-device
CK_LIST_SESSIONS=/usr/bin/ck-list-sessions
CK_LAUNCH_SESSION=/usr/bin/ck-launch-session

if [ -x "$CK_GET_X11_DISPLAY_DEVICE" -a -x "$CK_LIST_SESSIONS" -a -x "$CK_LAUNCH_SESSION" ] ; then
    if [ "$($CK_LIST_SESSIONS | grep "$($CK_GET_X11_DISPLAY_DEVICE)")" = "" ] ; then
        STARTUP="$CK_LAUNCH_SESSION $STARTUP"
    fi
fi

Of course, back up first.  Then log out and back in again.
  • Try adding the following to ~/.xinitrc :
    export XDG_MENU_PREFIX=gnome-exec ck-launch-session gnome-session

Thanks to bugs.launchpad.net and the Gentoo forums

4 comments:

Anonymous said...

Works for me on my Gentoo.
Thank you very much!

Anonymous said...

+1 on Gentoo. Thanks. :)

Unknown said...

Sorry but it didn't work for me (Gentoo).
But, the following link solved the problem.

http://forums.gentoo.org/viewtopic-t-833907-highlight-authorized.html

scristian71 said...

Hello,

I have this as response to ck-list-sessions:

Session1:
unix-user = '1000'
realname = 'User Regular'
seat = 'Seat1'
session-type = ''
active = FALSE
x11-display = ''
x11-display-device = ''
display-device = '/dev/tty1'
remote-host-name = ''
is-local = TRUE
on-since = '2011-05-22T06:12:44.352742Z'
login-session-id = '1'
idle-since-hint = '2011-05-22T06:13:18.072074Z'

Is this correct?

Thanks.

Cristian

 
Copyright 2009 Another Blog. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan