public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] automounting usb drives
@ 2011-02-26  1:31 luis jure
  2011-02-26  1:42 ` Dale
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: luis jure @ 2011-02-26  1:31 UTC (permalink / raw
  To: gentoo-user



hello list,

i'm old-fashioned and i never cared for this automount thing, but now i
have two pen drives and two usb hard disks that i have to mount and umount
all the time, and doing it by hand every time is beginning to be very
annoying...

i see that distributions like ubuntu and others have this feature by
default: you plug in a pen drive and it creates a mount point under /media
and mounts the device there. but i have no idea to get something like that
working on my gentoo machine. i searched the web, but the documents i
found on the subject are somewhat contradictory and all of them too old
for comfort. 

any hints about a standard "gentoo way" to achieve this?

by the way, i use xfce, so i can't use tools specific for kde or gnome, if
they exist.

best,

lj



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26  1:31 [gentoo-user] automounting usb drives luis jure
@ 2011-02-26  1:42 ` Dale
  2011-02-26 11:43   ` luis jure
       [not found] ` <ik9tsu$l8q$1@dough.gmane.org>
  2011-02-26 12:42 ` [gentoo-user] automounting usb drives Marc Joliet
  2 siblings, 1 reply; 27+ messages in thread
From: Dale @ 2011-02-26  1:42 UTC (permalink / raw
  To: gentoo-user

luis jure wrote:
>
> hello list,
>
> i'm old-fashioned and i never cared for this automount thing, but now i
> have two pen drives and two usb hard disks that i have to mount and umount
> all the time, and doing it by hand every time is beginning to be very
> annoying...
>
> i see that distributions like ubuntu and others have this feature by
> default: you plug in a pen drive and it creates a mount point under /media
> and mounts the device there. but i have no idea to get something like that
> working on my gentoo machine. i searched the web, but the documents i
> found on the subject are somewhat contradictory and all of them too old
> for comfort.
>
> any hints about a standard "gentoo way" to achieve this?
>
> by the way, i use xfce, so i can't use tools specific for kde or gnome, if
> they exist.
>
> best,
>
> lj
>
>    

I know what xfce is but not have no experience with it.  Would this help?

[I] sys-fs/udisks
      Available versions:  1.0.1-r1!t{tbz2} 1.0.2!t{tbz2} 
{bash-completion debug doc nls remote-access}
      Installed versions:  1.0.2!t{tbz2}(18:36:11 02/25/11)(nls 
-bash-completion -debug -doc -remote-access)
      Homepage:            http://www.freedesktop.org/wiki/Software/udisks
      Description:         Daemon providing interfaces to work with 
storage devices

* xfce-extra/xfce4-mount-plugin
      Available versions:  0.5.5 {debug}
      Homepage:            http://www.xfce.org/
      Description:         Mount plugin for the Xfce panel

That last one should put you on the right path for sure.

Hope the helps.

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] Re: automounting usb drives
       [not found] ` <ik9tsu$l8q$1@dough.gmane.org>
@ 2011-02-26 11:40   ` luis jure
  2011-02-26 22:44     ` walt
  0 siblings, 1 reply; 27+ messages in thread
From: luis jure @ 2011-02-26 11:40 UTC (permalink / raw
  To: gentoo-user

on 2011-02-26 at 06:00 Nikos Chantziaras wrote:


>Make sure you have udev enabled for your desktop environment.  Or HAL, 
>if it doesn't support udev.  Then it will just work.

hi nikos, the only package in xfce that has a flag for udev is
xfce-base/xfce4-session and it is set. i-m afraid it doesn't just work...




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26  1:42 ` Dale
@ 2011-02-26 11:43   ` luis jure
  0 siblings, 0 replies; 27+ messages in thread
From: luis jure @ 2011-02-26 11:43 UTC (permalink / raw
  To: gentoo-user

on 2011-02-25 at 19:42 Dale wrote:


>* xfce-extra/xfce4-mount-plugin
>      Available versions:  0.5.5 {debug}
>      Homepage:            http://www.xfce.org/
>      Description:         Mount plugin for the Xfce panel
>
>That last one should put you on the right path for sure.

hi dale, i do have the mount panel plugin already, but it's just an
interface to what's in fstab. not very useful when you have several usb
disks and pendrives with different file systems on them, that you want to
mount on the fly...



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26  1:31 [gentoo-user] automounting usb drives luis jure
  2011-02-26  1:42 ` Dale
       [not found] ` <ik9tsu$l8q$1@dough.gmane.org>
@ 2011-02-26 12:42 ` Marc Joliet
  2011-02-26 13:30   ` luis jure
  2 siblings, 1 reply; 27+ messages in thread
From: Marc Joliet @ 2011-02-26 12:42 UTC (permalink / raw
  To: Gentoo-User ML

[-- Attachment #1: Type: text/plain, Size: 1707 bytes --]

Am Fri, 25 Feb 2011 23:31:07 -0200
schrieb luis jure <ljc@internet.com.uy>:

> hello list,

Hi,
 
> i'm old-fashioned and i never cared for this automount thing, but now i
> have two pen drives and two usb hard disks that i have to mount and umount
> all the time, and doing it by hand every time is beginning to be very
> annoying...
> 
> i see that distributions like ubuntu and others have this feature by
> default: you plug in a pen drive and it creates a mount point under /media
> and mounts the device there. but i have no idea to get something like that
> working on my gentoo machine. i searched the web, but the documents i
> found on the subject are somewhat contradictory and all of them too old
> for comfort. 
> 
> any hints about a standard "gentoo way" to achieve this?
>
> by the way, i use xfce, so i can't use tools specific for kde or gnome, if
> they exist.

It seems that for Xfce you want the Thunar Volume Manager plugin
(xfce-extra/thunar-volman):
http://goodies.xfce.org/projects/thunar-plugins/thunar-volman

Otherwise, I know of three modern (i.e. udev or udisks based) desktop
independent ways for auto-mounting:
- uam
  A udev based auto-mounter. It doesn't mount CD/DVD/etc. drives (because, well,
  it's udev-based), but otherwise worked flawlessly on my machine.
- udiskie
  A udisks based auto-mounter, doesn't work properly for me, i.e. one of
  my USB sticks wouldn't mount, apparently because udisks flagged it as
  non-automountable.
- udisks-glue
  A udisks based tool that can execute arbitrary commands on udisks events, e.g.
  auto-mount disks.

(My personal preference is currently udisks-glue.)

HTH
-- 
Marc Joliet

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26 12:42 ` [gentoo-user] automounting usb drives Marc Joliet
@ 2011-02-26 13:30   ` luis jure
  2011-02-26 14:46     ` luis jure
                       ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: luis jure @ 2011-02-26 13:30 UTC (permalink / raw
  To: gentoo-user



hi marc,


>It seems that for Xfce you want the Thunar Volume Manager plugin

i had already installed this plugin, but it doesn't seem to do much: an
icon for the device appears on the side panel, but no corresponding mount
point is created under /media. when i click on the icon a "Not Authorized"
message appears. 

>Otherwise, I know of three modern (i.e. udev or udisks based) desktop
>independent ways for auto-mounting:

thanks for the suggestions. i'm thinking of giving udiskie a try, but i'm
unable to find any documentation about it: what am i supposed to do after
installation? anything to configure, init scripts to run?

alles gute,

lj



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26 13:30   ` luis jure
@ 2011-02-26 14:46     ` luis jure
  2011-02-26 14:53       ` [gentoo-user] " Nikos Chantziaras
  2011-02-26 14:47     ` [gentoo-user] " Marc Joliet
  2011-02-26 15:17     ` Christoph Brendes
  2 siblings, 1 reply; 27+ messages in thread
From: luis jure @ 2011-02-26 14:46 UTC (permalink / raw
  To: gentoo-user

on 2011-02-26 at 11:30 luis jure wrote:


>i had already installed this plugin, but it doesn't seem to do much: an
>icon for the device appears on the side panel, but no corresponding mount
>point is created under /media. when i click on the icon a "Not Authorized"
>message appears. 

i'm getting somewhat closer, it seems. launching an xfce session as root
i can sure mount the device, but not as normal user. from thunar i get the
message above, and typing udiskie on a console, i get this:

failed to mount device /org/freedesktop/UDisks/devices/sdc1:
org.freedesktop.UDisks.Error.PermissionDenied: Not Authorized

hmmmm.... any hints? 



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26 13:30   ` luis jure
  2011-02-26 14:46     ` luis jure
@ 2011-02-26 14:47     ` Marc Joliet
  2011-02-26 15:14       ` luis jure
  2011-02-26 15:17     ` Christoph Brendes
  2 siblings, 1 reply; 27+ messages in thread
From: Marc Joliet @ 2011-02-26 14:47 UTC (permalink / raw
  To: Gentoo-User ML

[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]

Am Sat, 26 Feb 2011 11:30:45 -0200
schrieb luis jure <ljc@internet.com.uy>:

> hi marc,

Hi Luis,
 
> >It seems that for Xfce you want the Thunar Volume Manager plugin
> 
> i had already installed this plugin, but it doesn't seem to do much: an
> icon for the device appears on the side panel, but no corresponding mount
> point is created under /media. when i click on the icon a "Not Authorized"
> message appears. 
[...]
> thanks for the suggestions. i'm thinking of giving udiskie a try, but i'm
> unable to find any documentation about it: what am i supposed to do after
> installation? anything to configure, init scripts to run?

Udiskie runs as a user process, so you just need to start it during login.

According to the README file [0], udiskie uses consolekit to obtain necessary
permissions. That means that you need to emerge xfce4-session with the use
flags +consolekit. If you do not already have that use flag set then that is
probably why thunar-volman did not work correctly. If it is not already the
case, you will need to add consolekit to the default runlevel.

> alles gute,
> 
> lj

[0] viewable online at
https://bitbucket.org/byronclark/udiskie/src/62047ac3fdaf/README

HTH
-- 
Marc Joliet

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [gentoo-user] Re: automounting usb drives
  2011-02-26 14:46     ` luis jure
@ 2011-02-26 14:53       ` Nikos Chantziaras
  2011-02-26 15:09         ` luis jure
  0 siblings, 1 reply; 27+ messages in thread
From: Nikos Chantziaras @ 2011-02-26 14:53 UTC (permalink / raw
  To: gentoo-user

On 02/26/2011 04:46 PM, luis jure wrote:
> on 2011-02-26 at 11:30 luis jure wrote:
>
>
>> i had already installed this plugin, but it doesn't seem to do much: an
>> icon for the device appears on the side panel, but no corresponding mount
>> point is created under /media. when i click on the icon a "Not Authorized"
>> message appears.
>
> i'm getting somewhat closer, it seems. launching an xfce session as root
> i can sure mount the device, but not as normal user. from thunar i get the
> message above, and typing udiskie on a console, i get this:
>
> failed to mount device /org/freedesktop/UDisks/devices/sdc1:
> org.freedesktop.UDisks.Error.PermissionDenied: Not Authorized
>
> hmmmm.... any hints?

Do you have any entries for those devices in /etc/fstab?  If yes, delete 
them.  They interfere with automounting.




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] Re: automounting usb drives
  2011-02-26 14:53       ` [gentoo-user] " Nikos Chantziaras
@ 2011-02-26 15:09         ` luis jure
  2011-02-26 15:35           ` Nikos Chantziaras
  0 siblings, 1 reply; 27+ messages in thread
From: luis jure @ 2011-02-26 15:09 UTC (permalink / raw
  To: gentoo-user

on 2011-02-26 at 16:53 Nikos Chantziaras wrote:


>Do you have any entries for those devices in /etc/fstab?  If yes, delete 
>them.  They interfere with automounting.

i had already deleted them, only after doing so the device icon began to
appear on thunar. but i can't mount it as a normal user, only as root.




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26 14:47     ` [gentoo-user] " Marc Joliet
@ 2011-02-26 15:14       ` luis jure
  2011-02-26 16:47         ` Marc Joliet
  0 siblings, 1 reply; 27+ messages in thread
From: luis jure @ 2011-02-26 15:14 UTC (permalink / raw
  To: gentoo-user

on 2011-02-26 at 15:47 Marc Joliet wrote:


>According to the README file [0], udiskie uses consolekit to obtain
>necessary permissions. That means that you need to emerge xfce4-session
>with the use flags +consolekit. 

i recompiled xfce4-session with +consolekit, but the situation remains
unchanged.


>If it is not already the case, you will need to add consolekit to the
>default runlevel.

ditto.   :-(






^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26 13:30   ` luis jure
  2011-02-26 14:46     ` luis jure
  2011-02-26 14:47     ` [gentoo-user] " Marc Joliet
@ 2011-02-26 15:17     ` Christoph Brendes
  2011-02-26 15:27       ` luis jure
  2 siblings, 1 reply; 27+ messages in thread
From: Christoph Brendes @ 2011-02-26 15:17 UTC (permalink / raw
  To: gentoo-user; +Cc: ljc

Hi, for me it works (xfce 4.8 with udev and udisk)

please check if you

- enable the volume manager (thunar preferences: "Advanced" tab)
- you are in the plugdev group

On Sat, 26 Feb 2011 11:30:45 -0200
luis jure <ljc@internet.com.uy> wrote:

> >It seems that for Xfce you want the Thunar Volume Manager plugin
> 
> i had already installed this plugin, but it doesn't seem to do much:
> an icon for the device appears on the side panel, but no
> corresponding mount point is created under /media. when i click on
> the icon a "Not Authorized" message appears. 

Regards,
Christoph



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26 15:17     ` Christoph Brendes
@ 2011-02-26 15:27       ` luis jure
  2011-02-26 15:41         ` Christoph Brendes
  0 siblings, 1 reply; 27+ messages in thread
From: luis jure @ 2011-02-26 15:27 UTC (permalink / raw
  To: gentoo-user

on 2011-02-26 at 16:17 Christoph Brendes wrote:


>Hi, for me it works (xfce 4.8 with udev and udisk)
>
>please check if you
>
>- enable the volume manager (thunar preferences: "Advanced" tab)
>- you are in the plugdev group

yes to both... :-(



^ permalink raw reply	[flat|nested] 27+ messages in thread

* [gentoo-user] Re: automounting usb drives
  2011-02-26 15:09         ` luis jure
@ 2011-02-26 15:35           ` Nikos Chantziaras
  0 siblings, 0 replies; 27+ messages in thread
From: Nikos Chantziaras @ 2011-02-26 15:35 UTC (permalink / raw
  To: gentoo-user

On 02/26/2011 05:09 PM, luis jure wrote:
> on 2011-02-26 at 16:53 Nikos Chantziaras wrote:
>
>
>> Do you have any entries for those devices in /etc/fstab?  If yes, delete
>> them.  They interfere with automounting.
>
> i had already deleted them, only after doing so the device icon began to
> appear on thunar. but i can't mount it as a normal user, only as root.

Another shot:

Make sure your user belongs to these groups:

   disk usb plugdev




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26 15:27       ` luis jure
@ 2011-02-26 15:41         ` Christoph Brendes
  2011-02-27  3:20           ` Duong "Yang" Ha Nguyen
  0 siblings, 1 reply; 27+ messages in thread
From: Christoph Brendes @ 2011-02-26 15:41 UTC (permalink / raw
  To: gentoo-user; +Cc: ljc

On Sat, 26 Feb 2011 13:27:11 -0200
luis jure <ljc@internet.com.uy> wrote:

> on 2011-02-26 at 16:17 Christoph Brendes wrote:
> 
> 
> >Hi, for me it works (xfce 4.8 with udev and udisk)
> >
> >please check if you
> >
> >- enable the volume manager (thunar preferences: "Advanced" tab)
> >- you are in the plugdev group
> 
> yes to both... :-(

Did you use HAL?

Christoph



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26 15:14       ` luis jure
@ 2011-02-26 16:47         ` Marc Joliet
  0 siblings, 0 replies; 27+ messages in thread
From: Marc Joliet @ 2011-02-26 16:47 UTC (permalink / raw
  To: Gentoo-User ML

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

Am Sat, 26 Feb 2011 13:14:32 -0200
schrieb luis jure <ljc@internet.com.uy>:

> on 2011-02-26 at 15:47 Marc Joliet wrote:
> 
> 
> >According to the README file [0], udiskie uses consolekit to obtain
> >necessary permissions. That means that you need to emerge xfce4-session
> >with the use flags +consolekit. 
> 
> i recompiled xfce4-session with +consolekit, but the situation remains
> unchanged.
> 
> 
> >If it is not already the case, you will need to add consolekit to the
> >default runlevel.
> 
> ditto.   :-(

Hmm, how do you start your xfce session? I assumed that Xfce comes with it's
own login manager, but I can't find any references to one (except in an email
from 2003 mentioning xfce-mcs-manager). The Gentoo Xfce guide only mentions
SLiM.

My understanding is that the session needs to register with the consolekit
daemon, which is done either by the login/display manager or with the help of
ck-launch-session. If you start Xfce via "startxfce4" then you need to preface
that with ck-launch-session, i.e. "ck-launch-session startxfce4". You can try
starting xfce that way from a shell outside of X.

For comparison, I have the following setup:
- consolekit installed with +pam +policykit
- slim as login manager with per-user .xinitrc
- in ~/.xinitrc, start my window manager with "exec ck-launch-session awesome"

One more random idea: maybe xfce4-session needs the policykit use flag set, too?
I really don't know if it's needed here, but you can try.

HTH
-- 
Marc Joliet
--

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [gentoo-user] Re: automounting usb drives
  2011-02-26 11:40   ` [gentoo-user] " luis jure
@ 2011-02-26 22:44     ` walt
  2011-02-27  0:04       ` luis jure
  0 siblings, 1 reply; 27+ messages in thread
From: walt @ 2011-02-26 22:44 UTC (permalink / raw
  To: gentoo-user

On 02/26/2011 03:40 AM, luis jure wrote:
> on 2011-02-26 at 06:00 Nikos Chantziaras wrote:
>
>
>> Make sure you have udev enabled for your desktop environment.  Or HAL,
>> if it doesn't support udev.  Then it will just work.
>
> hi nikos, the only package in xfce that has a flag for udev is
> xfce-base/xfce4-session and it is set. i-m afraid it doesn't just work...

xfce4-session also recognizes the policykit and consolekit USE flag, and
those two things seem to be the way of the future (until tomorrow, anyway)
for desktop managers like kde and gnome.

xfce has always been closely related to gnome, and it still uses the gnome
USE flag, I see.  I'd suggest setting the three USE flags I've mentioned
and see what happens.






^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] Re: automounting usb drives
  2011-02-26 22:44     ` walt
@ 2011-02-27  0:04       ` luis jure
  2011-02-27  0:32         ` Paul Colquhoun
  0 siblings, 1 reply; 27+ messages in thread
From: luis jure @ 2011-02-27  0:04 UTC (permalink / raw
  To: gentoo-user

on 2011-02-26 at 14:44 walt wrote:

>xfce4-session also recognizes the policykit and consolekit USE flag, and
>those two things seem to be the way of the future (until tomorrow, anyway)
>for desktop managers like kde and gnome.
>
>xfce has always been closely related to gnome, and it still uses the gnome
>USE flag, I see.  I'd suggest setting the three USE flags I've mentioned
>and see what happens.

OK, i undid everything i had been trying and decided to try this path. i
recompiled xfce4-session with policykit, consolekit and gnome. 

i don't have a graphical login manager, i start X with startx from the
console, and my .xinitrc is simply:

exec ck-launch-session startxfce4

if i start X as root things work in a more or less satisfactory way: pen
drives appear on the side bar on thunar and i can mount and eject them
(not umount).

but if i start X as a normal user, i get a "not authorized" message from
thunar and i can't mount the devices.

now, i belong to just about every group out there:

root disk lp wheel audio cdrom video cdrw usb users lpadmin portage
plugdev lj vboxusers scanner

any ideas why i don't have permissions to mount the usb drives?
(also, after doing these changes i can't shutdown or reboot form xfce)

anyway, it seems i'm getting closer... a big thank you to all that have
been following this thread, i hope i'll be able to resolve this last
issue...


best,

lj



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] Re: automounting usb drives
  2011-02-27  0:04       ` luis jure
@ 2011-02-27  0:32         ` Paul Colquhoun
  2011-02-27  2:10           ` luis jure
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Colquhoun @ 2011-02-27  0:32 UTC (permalink / raw
  To: gentoo-user

On Sun, 27 Feb 2011 11:04:41 luis jure wrote:
> on 2011-02-26 at 14:44 walt wrote:
> >xfce4-session also recognizes the policykit and consolekit USE flag, and
> >those two things seem to be the way of the future (until tomorrow, anyway)
> >for desktop managers like kde and gnome.
> >
> >xfce has always been closely related to gnome, and it still uses the gnome
> >USE flag, I see.  I'd suggest setting the three USE flags I've mentioned
> >and see what happens.
> 
> OK, i undid everything i had been trying and decided to try this path. i
> recompiled xfce4-session with policykit, consolekit and gnome.
> 
> i don't have a graphical login manager, i start X with startx from the
> console, and my .xinitrc is simply:
> 
> exec ck-launch-session startxfce4
> 
> if i start X as root things work in a more or less satisfactory way: pen
> drives appear on the side bar on thunar and i can mount and eject them
> (not umount).
> 
> but if i start X as a normal user, i get a "not authorized" message from
> thunar and i can't mount the devices.
> 
> now, i belong to just about every group out there:
> 
> root disk lp wheel audio cdrom video cdrw usb users lpadmin portage
> plugdev lj vboxusers scanner
> 
> any ideas why i don't have permissions to mount the usb drives?
> (also, after doing these changes i can't shutdown or reboot form xfce)
> 
> anyway, it seems i'm getting closer... a big thank you to all that have
> been following this thread, i hope i'll be able to resolve this last
> issue...


If it involved PolicyKit, that may be the cause.  Look in 
/etc/PolicyKit/PolicyKit.conf and see if that is blocking your access. I had 
to add/modify mine to allow user mounts. This is the relevent section I had to 
change:


<match action="org.freedesktop.hal.storage.*">
        <return result="yes" />
</match>


-- 
Reverend Paul Colquhoun, ULC.    http://andor.dropbear.id.au/~paulcol
 Before you criticize someone, you should walk a mile in their shoes.
Then, when you do, you'll be a mile away, and you'll have their shoes.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] Re: automounting usb drives
  2011-02-27  0:32         ` Paul Colquhoun
@ 2011-02-27  2:10           ` luis jure
  2011-02-27  2:51             ` Paul Colquhoun
  0 siblings, 1 reply; 27+ messages in thread
From: luis jure @ 2011-02-27  2:10 UTC (permalink / raw
  To: gentoo-user

on 2011-02-27 at 11:32 Paul Colquhoun wrote:


>If it involved PolicyKit, that may be the cause.  Look in 
>/etc/PolicyKit/PolicyKit.conf and see if that is blocking your access.

mmm... i don't have this file (or the /etc/PolicyKit directory, for that
matter). i only have the /etc/polkit-1 directory, belonging to
sys-auth/polkit.

the PolicyKit.conf file should already be there? which package provides
it? or can i just create it from scratch?

best,

lj



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] Re: automounting usb drives
  2011-02-27  2:10           ` luis jure
@ 2011-02-27  2:51             ` Paul Colquhoun
  2011-02-27 12:54               ` [gentoo-user] Re: automounting usb drives [SOLVED] luis jure
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Colquhoun @ 2011-02-27  2:51 UTC (permalink / raw
  To: gentoo-user

On Sun, 27 Feb 2011 13:10:37 luis jure wrote:
> on 2011-02-27 at 11:32 Paul Colquhoun wrote:
> >If it involved PolicyKit, that may be the cause.  Look in
> >/etc/PolicyKit/PolicyKit.conf and see if that is blocking your access.
> 
> mmm... i don't have this file (or the /etc/PolicyKit directory, for that
> matter). i only have the /etc/polkit-1 directory, belonging to
> sys-auth/polkit.
> 
> the PolicyKit.conf file should already be there? which package provides
> it? or can i just create it from scratch?


Hmmm.  "equery b" for  /etc/PolicyKit/PolicyKit.conf or just /etc/PolicyKit 
doesn't return any packages on my system.

I suspect that they belong to some part of KDE, as the permission errors I was 
tracking down came from the Dolphin file manager, and they could thus control 
how KDE uses the policykit framework.  They may also be leftovers from when 
KDE/Gentoo used to use policykit, and have since stopped. It's sometimes hard 
to keep up with these changes.

It's possible that I created the file and directory by hand, after finding 
instructions via Google search, such as 
https://bbs.archlinux.org/viewtopic.php?id=65070

In case you want to risk this, the full content of my file is:

#####################
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">

<define_admin_auth group="wheel"/>

<match user="root">
        <return result="yes"/>
</match>

<match action="org.freedesktop.hal.storage.*">
        <return result="yes" />
</match>

</config>
#####################


-- 
Reverend Paul Colquhoun, ULC.    http://andor.dropbear.id.au/~paulcol
 Before you criticize someone, you should walk a mile in their shoes.
Then, when you do, you'll be a mile away, and you'll have their shoes.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-26 15:41         ` Christoph Brendes
@ 2011-02-27  3:20           ` Duong "Yang" Ha Nguyen
  2011-02-27 11:13             ` luis jure
  0 siblings, 1 reply; 27+ messages in thread
From: Duong "Yang" Ha Nguyen @ 2011-02-27  3:20 UTC (permalink / raw
  To: gentoo-user; +Cc: ljc

[-- Attachment #1: Type: TEXT/PLAIN, Size: 885 bytes --]

On Sat, 26 Feb 2011, Christoph Brendes wrote:

> On Sat, 26 Feb 2011 13:27:11 -0200
> luis jure <ljc@internet.com.uy> wrote:
>
> > on 2011-02-26 at 16:17 Christoph Brendes wrote:
> >
> >
> > >Hi, for me it works (xfce 4.8 with udev and udisk)
> > >
> > >please check if you
> > >
> > >- enable the volume manager (thunar preferences: "Advanced" tab)
> > >- you are in the plugdev group
> >
> > yes to both... :-(
>
> Did you use HAL?
>
> Christoph
>
>

Hal is deprecated.  Try avoiding it as much as possible.

Best regards,
-- 
Dương "Yang" Hà Nguyễn
Web log: http://cmpitg.wordpress.com/
"Life is a hack"

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT/C/ED/L d++ s-:-(:) !a C+++(++++) ULU++++>$ P-- L+++>$ E+++
W++>+++ N+ o+ K w--- O- M@ V- PS+ PE++ Y+>++ PGP++ t+ 5 X+ R-
tv+ b+++ DI+++ D++ G+++ e* h* r* y-
-----END GEEK CODE BLOCK-----

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-27  3:20           ` Duong "Yang" Ha Nguyen
@ 2011-02-27 11:13             ` luis jure
  2011-02-27 12:39               ` Stéphane Guedon
  0 siblings, 1 reply; 27+ messages in thread
From: luis jure @ 2011-02-27 11:13 UTC (permalink / raw
  To: gentoo-user

on 2011-02-27 at 10:20 Duong "Yang" Ha Nguyen wrote:

>Hal is deprecated.  Try avoiding it as much as possible.

that's what i'm doing, for sure!



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-27 11:13             ` luis jure
@ 2011-02-27 12:39               ` Stéphane Guedon
  2011-02-27 16:58                 ` Stéphane Guedon
  0 siblings, 1 reply; 27+ messages in thread
From: Stéphane Guedon @ 2011-02-27 12:39 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 995 bytes --]

On Sunday 27 February 2011 12:13:21 luis jure wrote:
> on 2011-02-27 at 10:20 Duong "Yang" Ha Nguyen wrote:
> >Hal is deprecated.  Try avoiding it as much as possible.
> 
> that's what i'm doing, for sure!

I have read all the discussion, and, unfortunately, I can't help you Luis.
But I am asking the way to assign mountpoint like hal did.

As it is said, Hal is deprecated. But it was easy to say "when you plug 
6566-3243 flash drive, the mountpoint should be my_usbdisk".

Now, automounting works good and great for me with udev/udisks, no problem, 
except that I would like to have the same behavior : having my drives to the 
mount point I want (having good icons rather than just a usual folder icon 
would be a plus !).

I am right now on KDE 4.6, and so...

-- 
Stéphane Guedon
page web : http://www.22decembre.eu/
carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf
clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] Re: automounting usb drives [SOLVED]
  2011-02-27  2:51             ` Paul Colquhoun
@ 2011-02-27 12:54               ` luis jure
  2011-02-27 19:18                 ` walt
  0 siblings, 1 reply; 27+ messages in thread
From: luis jure @ 2011-02-27 12:54 UTC (permalink / raw
  To: gentoo-user

on 2011-02-27 at 13:51 Paul Colquhoun wrote:

>Hmmm.  "equery b" for  /etc/PolicyKit/PolicyKit.conf or
>just /etc/PolicyKit doesn't return any packages on my system.

from what i could find on the web, it seems to me
that /etc/PolicyKit/PolicyKit.conf belongs to a deprecated policykit
package, superseded (at least on my system) by polkit, the configuration
files of which are under /etc/polkit-1

now, i found lots of examples on the web how to configure the old
PolicyKit.conf file to allow normal users mount usb devices, but it took
some time to find out how to configure the polkit files. here's what i
found, and it works:


/etc/polkit-1/localauthority.conf.d/50-localauthority.conf :

[Configuration]
AdminIdentities=unix-group:wheel 


/etc/polkit-1/localauthority/50-local.d/11-my-polkit-udisks.pkla

[udisks full access]
Identity=unix-user:<your username>
Action=org.freedesktop.udisks.*
ResultAny=yes

[http://forums.gentoo.org/viewtopic-t-858965-postdays-0-postorder-asc-start-25.html]

i guess that in the second file i could also use unix-group:wheel (or users
or whatever) instead of unix-user, but i'm the only one using this machine,
so it's just as well.

now automounting "just works", without needing anything else, like udev
rules or additional automonting packages. 

PENDING ISSUE: on thunar (and xfce, the other file manager i occasionally
use) i can eject the drive but no umount it (i mean the ability to umount
the file system but not delete the mount point under /media)

a big thank you (und vielen dank) to everybody!

lj





^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-user] automounting usb drives
  2011-02-27 12:39               ` Stéphane Guedon
@ 2011-02-27 16:58                 ` Stéphane Guedon
  0 siblings, 0 replies; 27+ messages in thread
From: Stéphane Guedon @ 2011-02-27 16:58 UTC (permalink / raw
  To: gentoo-user, linux-hotplug

[-- Attachment #1: Type: Text/Plain, Size: 1200 bytes --]

On Sunday 27 February 2011 13:39:49 Stéphane Guedon wrote:
> On Sunday 27 February 2011 12:13:21 luis jure wrote:
> > on 2011-02-27 at 10:20 Duong "Yang" Ha Nguyen wrote:
> > >Hal is deprecated.  Try avoiding it as much as possible.
> > 
> > that's what i'm doing, for sure!
> 
> I have read all the discussion, and, unfortunately, I can't help you Luis.
> But I am asking the way to assign mountpoint like hal did.
> 
> As it is said, Hal is deprecated. But it was easy to say "when you plug
> 6566-3243 flash drive, the mountpoint should be my_usbdisk".
> 
> Now, automounting works good and great for me with udev/udisks, no problem,
> except that I would like to have the same behavior : having my drives to
> the mount point I want (having good icons rather than just a usual folder
> icon would be a plus !).
> 
> I am right now on KDE 4.6, and so...

solved using mlabel...
I needed to look upon ubuntu doc ! This is a little bit crap !

but thanks ! :-)

-- 
Stéphane Guedon
page web : http://www.22decembre.eu/
carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf
clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [gentoo-user] Re: automounting usb drives [SOLVED]
  2011-02-27 12:54               ` [gentoo-user] Re: automounting usb drives [SOLVED] luis jure
@ 2011-02-27 19:18                 ` walt
  0 siblings, 0 replies; 27+ messages in thread
From: walt @ 2011-02-27 19:18 UTC (permalink / raw
  To: gentoo-user

On 02/27/2011 04:54 AM, luis jure wrote:

> PENDING ISSUE: on thunar (and xfce, the other file manager i occasionally
> use) i can eject the drive but no umount it (i mean the ability to umount
> the file system but not delete the mount point under /media)

The auth/policy landscape has changed so quickly in the last few months
that I can't keep up, but I can tell you that you might want to play with
the command-line tools from consolekit and polkit when root-versus-user
problems occur.

For example, look through the output of pkaction --verbose for this:

org.freedesktop.udisks.drive-detach:
   description:       Detach a drive
   message:           Authentication is required to detach the drive
   vendor:            The udisks Project
   vendor_url:        http://udisks.freedesktop.org/
   icon:              drive-removable-media
   implicit any:      no
   implicit inactive: no
   implicit active:   yes

Look at the last three lines for 'any' 'inactive' and 'active'. What do
they mean?

They refer to your 'console session', which you can list with ck-list-sessions:

Session1:
         unix-user = '1001'
         realname = '(null)'
         seat = 'Seat1'
         session-type = ''
         active = FALSE        <====== NOTE
         x11-display = ''
         x11-display-device = ''
         display-device = '/dev/tty1'
         remote-host-name = ''
         is-local = TRUE
         on-since = '2011-02-27T14:05:03.842279Z'
         login-session-id = '1'
         idle-since-hint = '2011-02-27T14:05:40.005781Z'
Session2:
         unix-user = '1001'
         realname = '(null)'
         seat = 'Seat1'
         session-type = ''
         active = TRUE       <======= NOTE
         x11-display = ':0'
         x11-display-device = '/dev/tty7'
         display-device = '/dev/tty1'
         remote-host-name = ''
         is-local = TRUE     <======= NOTE
         on-since = '2011-02-27T14:05:16.819654Z'
         login-session-id = '1'

Session1 is my original login on tty1, from which I typed 'startx'.

That session is not active because I'm writing this from inside the
gnome desktop, i.e. Session2, which *is* active (note the tty7).

The old defunct policykit also dictated whether a session had to be
'local' to do certain things, but that may have vanished, dunno.

The old policykit came with very simple and understandable tools to
set and edit policies, and the defunct gnome-policykit gave you a
simple gui frontend so you could tell WTF you were doing.

Alas, no more, and the new system is virtually opaque.  Not well done,
IMHO.

My point is (almost forgot it) that automounting stopped working for
many months in gnome because consolekit claimed that my ck-session
was *not* active and *not* local even though obviously it was both.

Some recent update finally fixed that bug, thankfully, but I have
no idea which update.





^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2011-02-27 19:20 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-26  1:31 [gentoo-user] automounting usb drives luis jure
2011-02-26  1:42 ` Dale
2011-02-26 11:43   ` luis jure
     [not found] ` <ik9tsu$l8q$1@dough.gmane.org>
2011-02-26 11:40   ` [gentoo-user] " luis jure
2011-02-26 22:44     ` walt
2011-02-27  0:04       ` luis jure
2011-02-27  0:32         ` Paul Colquhoun
2011-02-27  2:10           ` luis jure
2011-02-27  2:51             ` Paul Colquhoun
2011-02-27 12:54               ` [gentoo-user] Re: automounting usb drives [SOLVED] luis jure
2011-02-27 19:18                 ` walt
2011-02-26 12:42 ` [gentoo-user] automounting usb drives Marc Joliet
2011-02-26 13:30   ` luis jure
2011-02-26 14:46     ` luis jure
2011-02-26 14:53       ` [gentoo-user] " Nikos Chantziaras
2011-02-26 15:09         ` luis jure
2011-02-26 15:35           ` Nikos Chantziaras
2011-02-26 14:47     ` [gentoo-user] " Marc Joliet
2011-02-26 15:14       ` luis jure
2011-02-26 16:47         ` Marc Joliet
2011-02-26 15:17     ` Christoph Brendes
2011-02-26 15:27       ` luis jure
2011-02-26 15:41         ` Christoph Brendes
2011-02-27  3:20           ` Duong "Yang" Ha Nguyen
2011-02-27 11:13             ` luis jure
2011-02-27 12:39               ` Stéphane Guedon
2011-02-27 16:58                 ` Stéphane Guedon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox