MTP Device v0.16 loads when phone camera plugged in.

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

MTP Device v0.16 loads when phone camera plugged in.

Post by April »

When a phone camera is plugged in what script starts it and where is that situated .
The go-mtpfs process is running .

I want to run gmtp 1.3.9 when a camera goes in but I need to find the script that's loading the other version and alter it.
Thanks

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: MTP Device v0.16 loads when phone camera plugged in.

Post by williams2 »

/usr/sbin/pupautodetect

Code: Select all

#!/bin/ash
exit
User avatar
bigpup
Moderator
Posts: 6985
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 906 times
Been thanked: 1522 times

Re: MTP Device v0.16 loads when phone camera plugged in.

Post by bigpup »

error

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: MTP Device v0.16 loads when phone camera plugged in.

Post by April »

Mm do you know?
pupautodetect and pupcamera both do not seem to fit the bill
Not in xenialpup64-7.5 anyhow

Last edited by April on Wed Mar 10, 2021 8:24 am, edited 1 time in total.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
666philb
Posts: 429
Joined: Thu Jul 09, 2020 3:18 pm
Location: wales uk
Has thanked: 111 times
Been thanked: 149 times

Re: MTP Device v0.16 loads when phone camera plugged in.

Post by 666philb »

hi @April

you're possibly after /etc/udev/rules.d/88-puppy-autodetect.rules

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: MTP Device v0.16 loads when phone camera plugged in.

Post by April »

Hello Phil .Thanks . I hashed out the operating line but it did not change the auto loading of that .
Barry sure got his cameras in a knot when he was doing that one . He says its part of "woof" and in all puppies?

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
Jafadmin
Posts: 385
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: MTP Device v0.16 loads when phone camera plugged in.

Post by Jafadmin »

April wrote: Wed Mar 10, 2021 1:22 am

When a phone camera is plugged in what script starts it and where is that situated .
The go-mtpfs process is running .

I want to run gmtp 1.3.9 when a camera goes in but I need to find the script that's loading the other version and alter it.
Thanks

@April a simpler solution might be to rename the current version's binary then use it's original name to make a symlink to the new version. ('swhutialysdo) :thumbup2:

User avatar
bigpup
Moderator
Posts: 6985
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 906 times
Been thanked: 1522 times

Re: MTP Device v0.16 loads when phone camera plugged in.

Post by bigpup »

If you have gmtp installed and working.

I think you need to change this part of /usr/sbin/pupautodetect
.

Code: Select all

case $1 in
 camera)
  pupcamera &
 ;;
 android-device)
  if [ "$(which pupmtp)" != "" ]; then
   pupmtp &
  elif [ "$(which mtpdevice)" != "" ]; then
   mtpdevice mount &
  else
   please_install "mtpdevice or pupmtp"
  fi

.
This part I think is saying to start pupmtp.
.

Code: Select all

android-device)
  if [ "$(which pupmtp)" != "" ]; then
   pupmtp &

So, change it to gmtp

Code: Select all

android-device)
  if [ "$(which gmtp)" != "" ]; then
   gmtp &

.
This part is starting pupcamera

Code: Select all

case $1 in
 camera)
  pupcamera &

Note:
I assume your install of gmtp has put it's files in the normal Puppy path directories.
Just gmpt should run the program.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: MTP Device v0.16 loads when phone camera plugged in.

Post by April »

Thanks bigpup. That worked a treat. Been annoying me for ages.

case $1 in
camera)
which gmtp 2>&1 >/dev/null || please_install "gmtp"
gmtp &
;;
android-device)
which gmtp 2>&1 >/dev/null || please_install "mtpdevice"
gmtp mount &
;;

esac

Jafadmin Didn't try that but thanks also.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

Post Reply

Return to “Users”