From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: Re: MTP & Guix Date: Fri, 06 Jul 2018 23:57:44 -0400 Message-ID: <87lgank893.fsf@gmail.com> References: <877empbn1e.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbeM2-0000u3-N0 for help-guix@gnu.org; Fri, 06 Jul 2018 23:57:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbeLz-0006vY-KP for help-guix@gnu.org; Fri, 06 Jul 2018 23:57:50 -0400 Received: from mail-it0-x230.google.com ([2607:f8b0:4001:c0b::230]:39905) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fbeLz-0006vJ-Ef for help-guix@gnu.org; Fri, 06 Jul 2018 23:57:47 -0400 Received: by mail-it0-x230.google.com with SMTP id p185-v6so19799572itp.4 for ; Fri, 06 Jul 2018 20:57:47 -0700 (PDT) In-Reply-To: <877empbn1e.fsf@gmail.com> (Pierre Neidhardt's message of "Sat, 23 Jun 2018 16:22:21 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Pierre Neidhardt Cc: help-guix Hello, Pierre Neidhardt writes: > Hi there! > > Do you people have recommendations when it comes to MTP (file sharing > with mobile devices) support on GuixSD? > > Ideally I'd like something as straightforward as an auto-mounted folder > which I can browse with my favourite file browser. > > I see Guix offers a few options: > > - jmtpgs > - gmtp > - libmtp > > What's your setup, people? This is one of the things you'd think "must be dead simple" and then loose a couple evenings trying to make work... eh! I think the best option might be to have a running OpenSSH server on your phone and use Emacs (tramp) to browse the files there (C-x f /ssh:user@host:), but this probably requires to have rooted your phone. Recently after finding that the Emacs builtin FTP browsing support didn't work well with libre FTP servers (available on F-Droid) for Android [0], someone suggested I could use Emacs with ADB (there is ADB support in Tramp). I just tried it now; works as well as any Dired buffer :). It's documented in the chapter 5.3 External methods of the Tramp manual. Basically, add this to your ~/.emacs if you want it to connect automatically to your device: --8<---------------cut here---------------start------------->8--- (setq tramp-adb-connect-if-not-connected t) --8<---------------cut here---------------end--------------->8--- And then fire it up using C-x C-f /adb::. You need the cable for the initial adb connection, but after you continue the connection over TCP/IP wirelessly, by doing [2]: > adb shell ip -f inet addr show wlan0 # Find your phone's IP address > adb tcpip 5555 > adb connect :5555 HTH :) Maxim [0] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31691 [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31691#14 [2] https://stackoverflow.com/a/3623727/2896799