public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Samuli Suominen <ssuominen@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
Date: Fri, 25 Jul 2014 12:35:23 +0300	[thread overview]
Message-ID: <53D224DB.7040507@gentoo.org> (raw)
In-Reply-To: <20140725063607.GA14402@waltdnes.org>


On 25/07/14 09:36, Walter Dnes wrote:
> On Fri, Jul 25, 2014 at 08:07:10AM +0300, Samuli Suominen wrote
>
>> Install gnome-base/gvfs with USE="gphoto2 mtp" and then use gvfs-mount
>> to mount the device, because gvfs-mount
>> will make use of your PolicyKit with ConsoleKit or systemd-logind
>> authorization that allows mounting as a *local*
>> and *normal* user.
>> Then you don't need the mtpfs command, any group, any custom udev rules, ...
>   Pulling in gnome-base/gvfs and media-libs/libgphoto2 isn't that big an
> issue.  The question is... will I be able to mount from a straight text
> console, especially when X is not running?
>

Semi-long answer

Yes, if you have /etc/init.d/consolekit in your default runlevel, and
sys-auth/consolekit built with USE="pam"
and sys-auth/pambase built with USE="consolekit", you get a PAM module
called pam_ck_connector.so
So, when you login to text console, pam_ck_connector.so kicks in and
will tell PolicyKit you are a local user,
it will show up in `ck-list-sessions` command as "active = TRUE" -line
Then, when you run gvfs-mount from text console, it will query PolicyKit
if you are allowed or not, and
you are, since pam_ck_connector.so has done the job

Short answer:

Yes, everything related works from command line outside of X as well

- Samuli


  reply	other threads:[~2014-07-25  9:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24  4:59 [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK Walter Dnes
2014-07-25  3:49 ` [gentoo-user] " walt
2014-07-25  4:58   ` Mark David Dumlao
2014-07-25  5:07 ` [gentoo-user] " Samuli Suominen
2014-07-25  6:36   ` Walter Dnes
2014-07-25  9:35     ` Samuli Suominen [this message]
2014-07-25  9:47       ` Samuli Suominen
  -- strict thread matches above, loose matches on Subject: below --
2014-07-22 22:23 Walter Dnes
2014-07-24 22:52 ` Neil Bothwick
2014-07-24 23:29   ` Walter Dnes
2014-07-24 23:34     ` Neil Bothwick
2014-07-25  9:36     ` Mick
2014-07-25  7:03   ` Helmut Jarausch
2014-07-26 11:56   ` Dark Templar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53D224DB.7040507@gentoo.org \
    --to=ssuominen@gentoo.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox