1 |
On 25/07/14 09:36, Walter Dnes wrote: |
2 |
> On Fri, Jul 25, 2014 at 08:07:10AM +0300, Samuli Suominen wrote |
3 |
> |
4 |
>> Install gnome-base/gvfs with USE="gphoto2 mtp" and then use gvfs-mount |
5 |
>> to mount the device, because gvfs-mount |
6 |
>> will make use of your PolicyKit with ConsoleKit or systemd-logind |
7 |
>> authorization that allows mounting as a *local* |
8 |
>> and *normal* user. |
9 |
>> Then you don't need the mtpfs command, any group, any custom udev rules, ... |
10 |
> Pulling in gnome-base/gvfs and media-libs/libgphoto2 isn't that big an |
11 |
> issue. The question is... will I be able to mount from a straight text |
12 |
> console, especially when X is not running? |
13 |
> |
14 |
|
15 |
Semi-long answer |
16 |
|
17 |
Yes, if you have /etc/init.d/consolekit in your default runlevel, and |
18 |
sys-auth/consolekit built with USE="pam" |
19 |
and sys-auth/pambase built with USE="consolekit", you get a PAM module |
20 |
called pam_ck_connector.so |
21 |
So, when you login to text console, pam_ck_connector.so kicks in and |
22 |
will tell PolicyKit you are a local user, |
23 |
it will show up in `ck-list-sessions` command as "active = TRUE" -line |
24 |
Then, when you run gvfs-mount from text console, it will query PolicyKit |
25 |
if you are allowed or not, and |
26 |
you are, since pam_ck_connector.so has done the job |
27 |
|
28 |
Short answer: |
29 |
|
30 |
Yes, everything related works from command line outside of X as well |
31 |
|
32 |
- Samuli |