Page 1 of 1

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

Posted: Wed Mar 10, 2021 1:22 am
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


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

Posted: Wed Mar 10, 2021 2:18 am
by williams2

/usr/sbin/pupautodetect

Code: Select all

#!/bin/ash
exit

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

Posted: Wed Mar 10, 2021 5:41 am
by bigpup

error


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

Posted: Wed Mar 10, 2021 8:17 am
by April

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


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

Posted: Wed Mar 10, 2021 8:24 am
by 666philb

hi @April

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


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

Posted: Wed Mar 10, 2021 8:33 am
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?


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

Posted: Wed Mar 10, 2021 5:16 pm
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:


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

Posted: Wed Mar 10, 2021 10:45 pm
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.


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

Posted: Wed Mar 10, 2021 11:07 pm
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.