From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Let non-root users use MTP devices Date: Sun, 25 Dec 2016 16:59:03 -0800 Message-ID: <20161226005905.1796-1-cmmarusich@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLJdS-0007E8-T6 for guix-devel@gnu.org; Sun, 25 Dec 2016 19:59:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cLJdS-0006zk-4e for guix-devel@gnu.org; Sun, 25 Dec 2016 19:59:30 -0500 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:33504) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cLJdR-0006yz-U8 for guix-devel@gnu.org; Sun, 25 Dec 2016 19:59:30 -0500 Received: by mail-pf0-x243.google.com with SMTP id 127so6192318pfg.0 for ; Sun, 25 Dec 2016 16:59:29 -0800 (PST) Received: from garuda.hsd1.wa.comcast.net. ([2601:602:9d02:4725:4e0f:6eff:fef6:70b9]) by smtp.gmail.com with ESMTPSA id k5sm12527313pfb.81.2016.12.25.16.59.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Dec 2016 16:59:28 -0800 (PST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org These small patches enable easier MTP file transfer for devices, such as Android phones, on GuixSD. Previously, you had to run a program as root (e.g., "sudo gmtp") to do this, and the MTP backend for gvfs was not functioning properly (i.e., you could not use a program like Nautilus to transfer files). This was because we were missing some udev rules that the libmtp package provides. These patches add those rules and configure libmtp so that the rules will grant the "audio" group access to the MTP-related device files. After these patches are applied, any user in the "audio" group will be able to use tools like "gmtp" without running them as root, and the MTP backend for gvfs will "just work" for any user who is in the "audio" group. I've verified that this works in GNOME and also Xfce; I was successful in transferring files to an Android device using drag-and-drop via Nautilus. Note that in order to use a program like "gmtp," you'll probably need to make sure no other programs (e.g., "gvfs-mtp-volume-monitor") are using the device at the same time. Apparently, when using MTP, only one process can use a device at a time. For details, please refer to the documentation in the libmtp source. -- Chris