unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Pierre Neidhardt <ambrevar@gmail.com>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Package requests: Udisks helpers (udiskie, udevil)
Date: Sun, 01 Apr 2018 12:43:29 +0530	[thread overview]
Message-ID: <87o9j3flgm.fsf@gmail.com> (raw)
In-Reply-To: <87lgea41ml.fsf@gmail.com>

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


Chris Marusich <cmmarusich@gmail.com> writes:

>> Some udev rules might be enough though.
>
> That could very well be true!  I don't know a lot about how the various
> desktop environments like GNOME auto-mount removable storage devices,
> but I'd be surprised if you couldn't whip something up with udev rules.

Thinking about it, I don't think that would work.  I haven't tested the
following, but let's consider the Udev rule:

	(define %automount-udev-rule
	  (udev-rule
	   "90-automount.rules"
	   (string-append "KERNEL=\"sd[a-z][0-9]\", ACTION==\"add\", SUBSYSTEM==\"usb\", "
	                  "RUN+=\"/run/current-system/profile/bin/udisksctl mount -b /dev/%k\"")))

It would mount the drive as root, not for the current user.
It's possible to mount the drives for every one though:

	(define %automount-udev-rule
	  (udev-rule
	   "90-automount.rules"
	   (string-append "KERNEL=\"sd[a-z][0-9]\", ACTION==\"add\", SUBSYSTEM==\"usb\", "
                    "ENV{UDISKS_FILESYSTEM_SHARED}=\"1\","
	                  "RUN+=\"/run/current-system/profile/bin/udisksctl mount -b /dev/%k\"")))

Conclusion: a udev rule might solve part of the problem (auto-mounting) but
it does not allow for per-user mount points.

In the end, udiskie might be the better option.  What do you think?

-- 
Pierre Neidhardt

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

  parent reply	other threads:[~2018-04-01  7:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29  9:02 Package requests: Udisks helpers (udiskie, udevil) Pierre Neidhardt
2018-03-29 10:17 ` Ricardo Wurmus
2018-03-29 10:22   ` Pierre Neidhardt
2018-03-30  4:40     ` Chris Marusich
2018-03-30  4:45       ` Pierre Neidhardt
2018-03-30  9:49       ` Ricardo Wurmus
2018-03-31 17:13         ` Ludovic Courtès
2018-04-01  7:01         ` Pierre Neidhardt
2018-04-01  8:12           ` Pierre Neidhardt
2018-04-01 19:42             ` Chris Marusich
2018-04-01  7:13       ` Pierre Neidhardt [this message]
2018-04-01  8:01         ` Pierre Neidhardt
2018-04-01 19:45         ` Chris Marusich
2018-04-02  4:10           ` Pierre Neidhardt
2018-04-02  4:17             ` Pierre Neidhardt

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87o9j3flgm.fsf@gmail.com \
    --to=ambrevar@gmail.com \
    --cc=cmmarusich@gmail.com \
    --cc=help-guix@gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).