LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-14-2015, 11:27 AM   #1
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Debian 8 + Xfce, Thunar mount MTP (Android) device


Hi all!

This is not a big deal, since I have solved the issue of mounting my Samsung phone by simply:
Code:
apt-get install jmtpfs

mkdir ~/Android
jmtpfs ~/Android
With the result that my phone and its external memory card shows up in Thunar (obviously as well as being accessible via the terminal).

But, still I wonder why I can't get the blasted thing to automount in Thunar, I am not all that interested in installing a different file manager, and I have tried installing gvfs-backends but that amounted to no change at all regarding this behaviour.

Like I said, this is no biggie since I can access my phone, but if anyone knows the proper solution to this I am curious to hear about it.

Thanks for reading.

Last edited by HMW; 06-14-2015 at 01:41 PM. Reason: Spelling
 
Old 06-14-2015, 12:24 PM   #2
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
I've been working on the same thing over the last few days. My better half has an Android phone and I needed to get her photos backed up to RAID 1 (OpenBSD box). I took the easy route and installed Debian jessie (with systemd) and KDE and use gwenview to transfer all of the photos to an ext2 partition (read/writeable by OpenBSD) . I couldn't even get normal usb mass storage to mount in thunar, so didn't even bother trying anything else.

I didn't really look into jmptpfs that much, so your post has inspired me to give that another go. Thanks.
 
Old 06-14-2015, 12:25 PM   #3
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Have you tried Edit → Preferences → Advanced → tick the "Enable Volume Management" box in the thunar menu?

If you have, check the "Configure" options in that tab.

EDIT: Well, that doesn't work on my system but I swear it used to...

I've just switched from GDM/GNOME to dwm from a console log-in so it may be connected to that.

I'll get back to you when I figure it out.

Have you tried nautilus?

Last edited by Head_on_a_Stick; 06-14-2015 at 12:35 PM.
 
Old 06-14-2015, 01:33 PM   #4
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773

Original Poster
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by Head_on_a_Stick View Post
Have you tried nautilus?
No. But apparently it should work, but like I said, I'd rather not change file manager.

Quote:
Originally Posted by cynwulf
I couldn't even get normal usb mass storage to mount in thunar
That's strange, it has ALWAYS worked for me!

Thanks for your replies!
 
Old 06-15-2015, 10:43 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i think it's rather a question of optional dependencies for gvfs (gvfs-gphoto2 gvfs-mtp) and setting it up correctly.
at least pcmanfm uses that, i guess thunar is no different.
i have to admit, i don't own a modern android phone, but this has solved the issue for my camera.
 
Old 06-15-2015, 12:27 PM   #6
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773

Original Poster
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by ondoho View Post
i think it's rather a question of optional dependencies for gvfs (gvfs-gphoto2 gvfs-mtp) and setting it up correctly.
at least pcmanfm uses that, i guess thunar is no different.
i have to admit, i don't own a modern android phone, but this has solved the issue for my camera.
Hi there!

I actually read somewhere that some users switched to pcmanfm from Thunar just because pcmanfm could handle mtp devices whilst Thunar could not. But, again, I am perfectly happy with Thunar, and this is a mild annoyance, nothing more.

However, if you have clear directions on how to set up gvfs-mtp etcetera to get it working in Thunar, I would be interested.

Thanks for your reply!
 
Old 06-15-2015, 01:48 PM   #7
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
@OP: Do you have thunar-volman & udisks2 installed?

In my Arch system, thunar will mount and browse my Samsung Galaxy SIII with thunar-volman, gvfs-mtp & udisks2 installed.

According to this page of the Debian wiki, you should only need gvfs-backends...

I'll try this later in Debian.
 
Old 06-15-2015, 02:42 PM   #8
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773

Original Poster
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by Head_on_a_Stick View Post
@OP: Do you have thunar-volman & udisks2 installed?

In my Arch system, thunar will mount and browse my Samsung Galaxy SIII with thunar-volman, gvfs-mtp & udisks2 installed.

According to this page of the Debian wiki, you should only need gvfs-backends...

I'll try this later in Debian.
I have thunar-volman & udisks2 installed, but I don't have gvfs-mtp, and it doesn't seem available in the Debian (stable) repos either.
 
Old 06-15-2015, 02:52 PM   #9
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by HMW View Post
I don't have gvfs-mtp, and it doesn't seem available in the Debian (stable) repos either.
According to the wiki page I have linked above, this should be covered by the gvfs-backends package.

I am absolutely certain I could mount & browse my smartphone under Debian sid using the GNOME (3.14) desktop (I used Debian to install CyanogenMod on it) so it is at least possible...

EDIT: Update:

I can mount the phone in thunar in the GNOME desktop (started from GDM) in Debian sid:

http://s11.postimg.org/vlg2xicf7/201...1080_scrot.png

However, it will not mount in thunar in dwm started from a console log-in (ie, `startx`).

Which desktop environment/window manager are you using and how are you starting it?

Last edited by Head_on_a_Stick; 06-15-2015 at 04:06 PM.
 
Old 06-16-2015, 08:04 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i really think it's independent of the file manager; one has to get the underlying structures right.
gvfs, and then permissions, i remember i installed lxsession for this because it provides lxpolkit.
something with dbus getting started when you log in (there's a shells cript for that somewhere in /etc/X11, you'll know it when you see it).
but if you have a desktop environment, these things should be taken care of.

everything can be found in archwiki, good instructions, not sure how they carry over to debian.

if you want to solve it, maybe provide some hard info, maybe dmesg output (just the bit that comes when you plug the phone into the computer), maybe something more...
 
Old 06-16-2015, 01:15 PM   #11
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by ondoho View Post
everything can be found in archwiki, good instructions, not sure how they carry over to debian.
This is the problem -- in Arch there are scripts to start the dbus session correctly in /etc/X11/xinit/xinitrc.d which are run by the example script in /etc/X11/xinit/xinitrc which is copied to ~/.xinitrc and modified for use with console log-ins and pure window manager environments.
https://wiki.archlinux.org/index.php/Xinitrc

In Debian, there is no folder at /etc/X11/xinit/xinitrc.d so it is not clear exactly how to achieve a similar set up.

I will try copying the Arch files to Debian (they are just scripts and both use systemd so they should be transferable) and see if that allows thunar to browse my smartphone in a pure window manager environment.

As I said above, it all works just fine under GNOME/GDM in Debian.
 
Old 06-16-2015, 03:24 PM   #12
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
I have managed to get this working in dwm with a console log-in and no display manager.

Add this snippet to the start of ~/.xinitrc (sid) or ~/.xsession (jessie) to start the dbus session:
Code:
#!/bin/bash
if [ -z "${DBUS_SESSION_BUS_ADDRESS-}" ] && type dbus-launch >/dev/null; then
  eval $(dbus-launch --sh-syntax --exit-with-session)
fi
Note that the shebang needs to specify /bin/bash as the script uses BASHisms and /bin/sh is symlinked to DASH in Debian.

With this, thunar mounts & browses my Samsung Galaxy SIII i9300 with thunar-volman & gvfs-backends installed even in a bare-bones window manager environment using a console log-in.

This will also work with display managers that parse ~/.xinitrc
 
Old 06-16-2015, 08:02 PM   #13
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
What Android phone are you using.

We have Samsung here and it requires the package;
Code:
bitpim
to work.

Thunar has no problem accessing my phone (G3) or the wifes G4.

When first plugged in Thunar does give me the message that the CD has been mounted which is fun. After a few seconds it changes the entry in the left pane to "SAMSUNG Android". That, I think has to do with some of the crap Verison puts on the thing, undoubtedly as a service I desperately need.

Many device manufacturers and service providers add stuff to the phones. The best thing to do is run something like;
Code:
ac search <company that built the phone>
Mine;
Code:
sam@lounge:~$ ac search samsung
bitpim - utility to communicate with many CDMA phones
bitpim-lib - architecture-dependent helper files for BitPim
heimdall-flash - tool for flashing firmware on Samsung Galaxy S devices
heimdall-flash-frontend - tool for flashing firmware on Samsung Galaxy S devices - Qt GUI
libimage-exiftool-perl - library and program to read and write meta information in multimedia files
madwimax - user-space driver for mWiMAX equipment based on Samsung CMC-730
pkpgcounter - computes number of pages or quantity of ink needed to print documents
skyeye - Embedded Hardware Simulation
printer-driver-splix - Driver for Samsung and Xerox SPL2 and SPLc laser printers
firmware-samsung - Binary firmware for Samsung MFC video codecs
There is a phone management package for Motorola phones.
 
Old 06-17-2015, 02:48 PM   #14
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773

Original Poster
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Ok, this is seriously odd. I reinstalled gvfs-backends, rebooted, and now the phone pops up in Thunar as a, eh, network device:
Code:
mtp://[usb:002,004]/
I am not familiar with this kind of ”mounting”, and the device is not listed at all if you do a
Code:
mount -l
But I really don't care at the moment. This was the behaviour I was looking for, and it makes it possible for me to access the phone without fiddling in a terminal. Not that it was much of an issue, I like fiddling in terminals, in fact that's what I prefer to do!

Anyway, I digress... thank you all for your replies and efforts. Much appreciated!
 
Old 06-21-2015, 11:03 AM   #15
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773

Original Poster
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Screenshot

...and here is a screenshot of how it looks when Thunar mounts my device.
Attached Thumbnails
Click image for larger version

Name:	Thunar_mount_android.png
Views:	3531
Size:	9.6 KB
ID:	18768  
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I auto mount SD card with Thunar instead of Shotwell by default in Xfce? linustalman Linux - General 8 06-12-2013 02:23 AM
Using thunar to mount usb device on pekwm. ewlabonte Slackware 2 10-02-2012 07:05 PM
[SOLVED] thunar stopped to mount USB storages (Debian squeeze) kaz2100 Debian 11 09-27-2011 02:21 AM
Cannot mount hotpluggable device in xfce (Slackware 13.0) valsiterb Linux - General 3 03-28-2010 02:50 AM
Samsung YP-K3 > MTP Device < How to mount!? Thoddy Linux - Hardware 3 07-14-2007 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration