Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-07-2016, 03:41 PM
|
#1
|
Member
Registered: Dec 2016
Posts: 242
Rep: 
|
cd to MTP device in bash shell?
Hi
Have successfully mounted an MTP device on the desktop in Ubuntu and have figured out where the mount point is.
But when I navigate to where the device is mounted in the BASH shell what I see is something similar to
Code:
mtp:host=%5Busb%sldfnsdlfnsddasfdad%5D
Is there any way to navigate to this device(a camera)?
My goal is to copy media from the camera to the desktop using BASH commands.
|
|
|
12-07-2016, 05:16 PM
|
#3
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep: 
|
my bad. Sorry.
|
|
1 members found this post helpful.
|
12-08-2016, 10:10 AM
|
#4
|
Member
Registered: Dec 2016
Posts: 242
Original Poster
Rep: 
|
yes. read the wiki quite a while ago.
Unfortunately doesn't answer my question 
|
|
|
12-08-2016, 10:32 AM
|
#5
|
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
|
Quote:
Originally Posted by eco_bach
yes. read the wiki quite a while ago.
Unfortunately doesn't answer my question 
|
well if ptp is for camera why you trying mpt?
did you try blkid after you hooked up your camera to see if it shows an address to it also?
try looking in /run or wherever that software you installed mounts the camera? see if you can find a directory you know was not there before you did this?
did you try this even?
Code:
sudo find / -iname mpt*
by what means did you mount it mpt? a 3rd party install or with whatever Ubuntututu had it in already?
and I do not have a camera to try this and that is all I can come up with at this moment. without more information.
Last edited by BW-userx; 12-08-2016 at 10:36 AM.
|
|
|
12-08-2016, 10:45 AM
|
#6
|
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
|
if you did this off your other post, that you should have kept all in one post to deal with this same problem.
http://www.linuxquestions.org/questi...tu-4175594971/
it says in here you may have used libmtp9
this is the documentation on it. go through it and I hope you get it up and running. it looks like file manager should work, but look towards the bottom about mounting it and adding ...
well here is the link
https://sourceforge.net/p/libmtp/cod...AD/tree/README
Quote:
Here is what some people do:
1. Plug in the device.
2. USB-mass storage folder will open automatically.
3. Unmount the device.
4. Run mtp-detect. It will most likely fail the first time.
5. Run mtp-detect again, it might work this time, or fail. Keep running
till it works. 99% it works by the third try.
6. Once mtp-detect gives you an "Ok", open either Rhythmbox or Gnomad2,
everything should work.
Linux: Try this, if you have a recent Linux kernel,
add the file (as root):
/etc/modprobe.d/no-usb-storage.conf
|
I am not saying that is what you need to do. only that it is within that README for libmtp9
|
|
|
12-08-2016, 12:31 PM
|
#7
|
Moderator
Registered: Aug 2002
Posts: 26,640
|
I assume that nautilus or other file browser is "mounting" the camera using its gvfs-mtp virtual filesystem. Although it appears that you can access the device via its mount point I don't think it is possible to use it in the CLI. There are similar fuse filesystem types i.e. fusemtpfs and go-mtpfs where you can "mount" the camera via the CLI however, I would try using gphoto2 first.
http://wiki.linuxquestions.org/wiki/Gphoto2
|
|
|
12-08-2016, 01:27 PM
|
#8
|
Member
Registered: Dec 2016
Posts: 242
Original Poster
Rep: 
|
OP
Ok, thanks for the feedback. Not a simple problem for a novice like me. Further digging have the solution and wanted to share so others may benefit!
I needed 3 additional packages not already installed
sudo apt-get install libmtp-dev mtp-tools mtpfs
mtp-detect then displays a LOT of info about the MTP device
Then ran mtp-connect followed by mtp-folders to display folders with their ID
mtp-files displays files/folders with their ID
Then use mtp-getfile to copy files by their ID
My one remaining issue is how to reset the file ID since every time I delete the file the ID seems to increment by 1. I need the file ID to remain consistent
Last edited by eco_bach; 12-08-2016 at 02:39 PM.
|
|
|
All times are GMT -5. The time now is 05:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|