We have moved to a new Sailfish OS Forum. Please start new discussions there.
79

Why is Jolla/sailfish so hard to connect to linux?

asked 2014-05-06 11:18:21 +0300

Mr.Thumb gravatar image

updated 2015-05-14 08:52:03 +0300

rdmo gravatar image

tldr; Please don't mistake mitigating workarounds for solutions to this problem. Simple connection with another Linux computer is tough or problematic for many users of Sailfish devices.

Why is a Linux/open-source phone so hard to sync/connect to a Linux computer? It should be easier than a walk in the park! What is missing? Why is it so important to force Linux users through circuitous MITM-style hubris just to connect?

Update : Ok, I see this issue still is hot and not solved in an nativ jolla app. So here is what I do at the moment.

Update (not OP): Ten step workarounds vs. plug and play? I should be able to connect and set up a read-only connection without device root or deference any third party (yes, even Jolla) ssh/root permission monitor/authenticator. For Read-only, this should be a user level permissions/connection fix. Write/Execute are distinct problems. Is the wireless/USB technology/security standard that bad, or is this a user auditability/security management issue?

  1. I have to be root - set under settings -> system ->developer mode . Set USB LAN to 192.168.1.11 set a SSH password
  2. make a script on my /home/(your user) f.eks. 'mountjolla'
  3. Script :

#!/usr/bin/bash
localIp='192.168.1.10/24'
localBroadcast='192.168.1.255' 
netAdp=$1
mountPath='/home/(your user)/jolla'
user='nemo'
jollaIp='192.168.1.11'

sudo ip addr add $localIp broadcast $localBroadcast dev $netAdp
# First umount if all ready mounted
fusermount -u $mountPath
sleep 2
sshfs $user@$jollaIp:/home/$user -p 22 $mountPath

  1. do a "mkdir /home/(your user)/jolla . If it is not there allready

  2. do chmod 755 to your script "chmod 755 ~/mountjolla"

  3. plug usb cable in phone & computer

  4. if not check usbnet module is loaded with "lsmod"

  5. do "ip link" ( on Archlinux ) and I guess others Linux OS's

  6. notice what net device pop up ( f.eks. enp0s29u1u2u1u3 )

  7. run your script "mountjolla enp0s29u1u2u1u3"

And you have you jolle "nemo" dir mounted at /home/(your user)/jolla !

  1. umount it with "fusermount -u /home/(your user)/jolla"

Still not an "easy way" tough :-/ but it works

Another way is using firefox with "FireFTP" extention: , after setup ssh settings + password etc , connect USB cable, get usbnet setup with "ip link" and "sudo ip addr add (localIP) broadcast (localBrodcast) dev (jollaIP)" and point browser to "sftp://(jollaIP)/". Then you get a nice "mc" like interface :P (thanks coderus for the hint)

edit retag flag offensive close delete

Comments

1

Please provide some details, how were you trying to sync? Sailfish OS uses the MTP Protocol - https://en.wikipedia.org/wiki/Media_Transfer_Protocol Depending on your derivative there should be MTP support installable, please check the wikipedia page or post your exact operating system (example Ubuntu 12.04 LTS).

Otherwise you could enable SSH and build yourself a little bash script that connects and sync's.

I know its a bit inconvenient, but if you are using Gnu\Linux and a Jolla, you are probably a person that likes to hack their own stuff ;)

ozzi ( 2014-05-06 11:34:11 +0300 )edit
3

I find the use of the MTP Protocol problematic, at least for older Linux systems. If I connect my Jolla to my Ubuntu (11.10) laptop, it is recognized as digital camera, but no transfer is possible. I wonder about the reason why that protocol was chosen. Never mind, I decided to disable USB connectivity on my Jolla, and I now use ssh to connect to the phone.

barral ( 2014-05-06 11:59:08 +0300 )edit
2

I just think it is abit of a pain(and something to make better working ) to just plug the phone (USB) and transfeer some files to it. (MPT do not work under Archlinux at the moment) And I had no problems with my old "shitty" HTC on Linux ? So why can a Jolla just work on Linux with USB ? Now I run Bittorrent sync (andriod) to sync the phone but then I have to move stuff around and is not able to "browser" the dirs ? SSH sounds nice but my WiFi is not connected to my intranet so I have to lock in on the WIfi router to login on the Jolla !?

Mr.Thumb ( 2014-05-06 12:37:17 +0300 )edit
1

My system is Ubuntu 10.04 LTS, and has no support for MTP neither.

Macilaci457 ( 2014-05-06 14:06:09 +0300 )edit
3

Jolla connects well with Ubuntu 13.10 and 14.04. Already transfered many files to my phone and barely ever had a problem.

molan ( 2014-05-06 14:29:00 +0300 )edit

28 Answers

Sort by » oldest newest most voted
2

answered 2014-11-05 20:26:48 +0300

molan gravatar image

Another solution for Ubuntu and Ubuntu based distributions:

From my experience MTP works well out of the box starting with Ubuntu 14.04. If you use an older version (or for example elementary OS, based on 12.04), try this in terminal:

  1. sudo add-apt-repository ppa:langdalepl/gvfs-mtp
  2. sudo apt-get update
  3. sudo apt-get upgrade
  4. sudo reboot

Now connect again your Jolla and it should work. In case you want to downgrade/revert Gvfs do:

  1. sudo ppa-purge ppa:langdalepl/gvfs-mtp
  2. reboot
edit flag offensive delete publish link more
3

answered 2014-12-10 22:14:09 +0300

Sorry, I can't stand this discussion. I am proud to have a Jolla phone especially because I got rid of the f... MTP protocol. If you really have got a Linux computer (are you sure???), why the hell not using ssh, sftp or scp? One may even rename folders on the Jolla. Did you ever try this using MTP?

Ok, here are the steps:

  1. Follow the guide to make your Jolla developer friendly (settings->system->developer mode).
  2. Your Linux desktop should provide "Connect to server". Click. Protocol: ssh. Server: the IP, Jolla provided. User: nemo, pass: the password you have chosen on your Jolla. Click.
  3. Voila! That's it. You now may navigate your Jolla phone as if it was another hd.
  4. If in doubt, simply open a terminal on your desktop and type ssh nemo@[from jolla provided IP]. Type the password, you have selected on your Jolla. Now type things like ls (ouh! Even ls -la) or cd [somewhere], ls should give you a hint (same as on W...).

Isn't that amazing? It works!

edit flag offensive delete publish link more

Comments

3

Not all linux users are $root and capable to do more than "click" items, just as most windows users do not know what super+d does or beware of super+pause or even ctrl+shift+escape...

chemist ( 2014-12-11 02:13:38 +0300 )edit
1

Believe me: there isn't yet any win user having a Jolla in his pocket. They want to have "Ahh" and "Ohh" and other crab.

So we are still a community, having fun to improve. So we ARE root!

If there's a shithead among us payed by ms or apple or google, writing bullshit here, f.. him. And this indeed happened, I'm sure.

Besides: I give a damn shit on everybody voting me down or even up.

atmin ( 2014-12-14 19:52:55 +0300 )edit
5

answered 2015-04-07 11:01:23 +0300

smoku gravatar image

There is definitely something fishy with Sailfish OS MTP support. On Fedora 21 workstation connecting Jolla Phone (with latest firmware) is just a game of luck. If I win (1/20?) MTP connects and I can see internal card and SD card. Connection is very unreliable though and hangs after a while. On the same workstation connecting an Android phone over MTP works every time and the connection is rock-solid.

edit flag offensive delete publish link more

Comments

Your issues with the MTP connection coild possibly be caused by this bug. Check this out.

wanderer ( 2015-07-29 08:54:29 +0300 )edit
0

answered 2015-04-07 12:44:56 +0300

r0kk3rz gravatar image

Is there a possibility to get Jolla to advertise the local filesystems when using RNDIS (Developer Mode)?

This is probably a better solution than MTP for linux hosts since RNDIS seems to be well supported out-of-the-box and also allows for ssh-over-usb.

edit flag offensive delete publish link more
1

answered 2015-04-07 15:13:30 +0300

coderus gravatar image

I just added bookmark to following location: sftp://nemo@192.168.2.15 (replace with actual ip address, if needed) and I have no problems in connecting Jolla to Linux PC :D

edit flag offensive delete publish link more
0

answered 2015-04-07 16:00:39 +0300

Marzanna gravatar image

Jolla uses MTP. It works for Android phones with minor issues. For Jolla I also had to add udev rule to /etc/udev/rules.d/51-android.rules It looks like:

SUBSYSTEM=="usb",ATTR{idVendor}=="2931",MODE="0666",GROUP="plugdev"

Then I got it detected. But the file manager (Thunar) does not recognize my Jolla (but it detects other Android smartphones). I temporary solved it by using gmtp.

edit flag offensive delete publish link more
0

answered 2015-04-08 07:34:40 +0300

Check this link to connect with Ubuntu : http://www.jollausers.com/2015/04/jolla-communicator-an-easy-way-to-communicate-between-ubuntu-desktop-sailfish-os/

edit flag offensive delete publish link more
3

answered 2015-04-08 20:24:40 +0300

zash1958 gravatar image

For our Linux Mint LMDE2 system I installed "jmtpfs" additionally.

The phone and it´s SD card are properly detected, mounted and we transferred a lot of Gigabytes in between!

Runs like a charm!

edit flag offensive delete publish link more

Comments

1

Hey, that works nicely on arch also !!. on archlinux install package "jmtpfs"

  1. Plug USB cabel in . Press "PC connection" on phone
  2. run : jmtpfs ~/(your dir for Jolla)
  3. Load up file browser and point it to ~/(your dir for Jolla)
  4. Vola you can see nemo home dir and sdcard - Nice!!
  5. Close all programs pointing to ~/(your dir for Jolla)
  6. do : fusermount -u ~/(your dir for Jolla)
  7. And pull cable from phone and smile ;-)

p.s. If you want to see all dir on the phone ssh/usbnet is the way to go

Mr.Thumb ( 2015-04-09 00:06:41 +0300 )edit
0

answered 2015-04-24 20:59:13 +0300

corsarium gravatar image

updated 2015-04-24 21:12:25 +0300

Hi all.

Im my linux system (Archlinux) im able to connect my jolla phone using simple-mtpfs. The usage is quite simple.

  • For mounting: simple-mtpfs <device> mountpoint [options]</device>
  • For unmounting: fusermount -u <mountpoint></mountpoint>

Now recently i managed via udev to at least trigger some rules:

vim  /lib/udev/rules.d/52-jolla.rules

And add the following content

# Skip this section below if this device is not connected by USB
SUBSYSTEM!="usb", GOTO="jolla_usb_rules_end"

#LABEL="jolla_usb_rules_begin"
ACTION=="add", ATTR{idVendor}=="2931", ATTR{idProduct}=="0a05", SYMLINK+="Jolla" RUN+="/usr/bin/jollaMounter.sh -a ", OPTIONS="last_rule"

ACTION=="remove", ATTR{idVendor}=="2931", ATTR{idProduct}=="0a05", SYMLINK+="Jolla" RUN+="/usr/bin/jollaMounter.sh -r", OPTIONS="last_rule"


LABEL="jolla_usb_rules_end"

And this are the contents of /usr/bin/jollaMounter.sh (don't forget to add execution rights )

#!/bin/bash

usage() { echo "Usage: $0 [-a ] [-r ]" 1>&2; exit 1;}

########
#vars
userName=`whoami`
deviceName=`simple-mtpfs -l | grep -in jolla | awk '{print $2}'`

#if its unpluging theres no device so... deviceName=JollaSailfish
if [ -z $deviceName ]; then
    deviceName="JollaSailfish"
fi

mountPath="/home/${userName}/Desktop/${deviceName}"
desktopPath="/home/${userName}/Desktop/${deviceName}"

#now its not used becuse mountPath is no equal at desktopPath

########
#chech arguments

if [ $# -ne 1 ]
then
        usage
        exit 1
fi

while getopts ":ar" o; do
    case "${o}" in
        a)
        echo "simple-mtpfs ${mountPath}"
        mkdir -p ${mountPath}
        simple-mtpfs ${deviceName} ${mountPath}
        #ln -s ${desktopPath} ${mountPath}
            ;;
        r)
        echo "fusermount -u ${mountPath}"
        fusermount -u ${mountPath}
        #rm ${desktopPath}
            ;;
        *)
            usage
            ;;
    esac
done

Usage: Plug your JP and set it to PC Suite (udev will do the rest)

Usage jollaMounter.sh (if udev does not work): Plug your JP and set it to PC Suite

to mount it on $mountPath:

/usr/bin/jollaMounter.sh -a

To umount the JP:

/usr/bin/jollaMounter.sh -r

If none of the above work connect th JP via ssh/sftp see previous posts

Issues: (2015/04/24): the remove rule is not triggered

edit flag offensive delete publish link more
3

answered 2015-05-19 01:54:49 +0300

Thaodan gravatar image

If you use KDE, use the kio slave for sftp this makes it very easy to connect to the device.

edit flag offensive delete publish link more

Comments

It's really easy with dolphin for example.

Arhangel64 ( 2017-01-17 18:30:43 +0300 )edit
Login/Signup to Answer

Question tools

Follow
25 followers

Stats

Asked: 2014-05-06 11:18:21 +0300

Seen: 16,657 times

Last updated: Aug 23 '17