Linux: Mount android phone directories and open them in tabs
Last time I described the stolen script for opening multiple directories as tabs in Thunar. And now we will use that, to open the two useful directories from an mtpfs-mounted Android mobile phone.
At present, my solution depends on two shortcuts in the main application menu. Eventually I hope to write a udev rule (that works) to detect an mtp device connected, and automount and open the useful directories.
- mount-mtp.desktop
- umount-mtp.desktop
These files are pretty basic.
File /usr/share/applications/mount-mtp.desktop
[Desktop Entry] Name=Connect phone and open photo dirs Comment=After setting phone to "transfer files" Exec=/usr/local/bin/mount-mtp.sh Icon=phone Type=Application Terminal=false Categories=System;Utility;
File /usr/share/applications/umount-mtp.desktop
.
[Desktop Entry] Name=Disconnect phone Comment=Before unplugging phone Exec=/usr/local/bin/umount-mtp.sh Icon=phone Type=Application Terminal=false Categories=System;Utility;
And obviously the script from last time, thunartab, which is described in the link at the top of this post.
Script /usr/local/bin/mount-mtp.sh
Script /usr/local/bin/umount-mtp.sh
Comments