I’ve got a qml file and I just want to ssh to the phone and do
Is it possible without doing all that stuff with SDK and packages? Just vim and some simple commands that can fit into person’s memory.
Here is Solutions:
If you already have your qml file on the phone, it’s pretty easy. All you have to do is to call
qmlscene with an extra argument.
Start a connection from your desktop/laptop with
$ qmlscene --desktop_file_hint=/usr/share/applications/dialer-app.desktop $HOME/Documents/myfile.qml
Wasn’t so simple on OTA 10.1 (Ubuntu 15.04), BQ E5, with
phablet-shell ssh connection, I had to issue this one-liner command line to get it to run:
APP_ID=com.ubuntu.clock_clock_3.7.456 \ QML2_IMPORT_PATH=/usr/share/click/preinstalled/com.ubuntu.clock/3.7.456/lib/arm-linux-gnueabihf \ QML_IMPORT_TRACE=1 \ /usr/bin/qmlscene \ --desktop_file_hint=/usr/share/click/preinstalled/com.ubuntu.clock/3.7.456/share/applications/ubuntu-clock-app.desktop \ /usr/share/click/preinstalled/com.ubuntu.clock/3.7.456/share/qml/ubuntu-clock-app.qml
Note, when you run the app like this, all of its output is dumped to the calling terminal, while there is nothing in
~/.cache/upstart/application-click-com.ubuntu.clock_clock_3.7.456.log. Should start also when the phone is sleeping, and it blocks in terminal, and Ctrl-C will terminate it (and its window on device). The
QML2_IMPORT_PATH solves the:
file:///usr/share/click/preinstalled/com.ubuntu.clock/3.7.456/share/qml/ubuntu-clock-app.qml:22 module "Alarm" is not installed file:///usr/share/click/preinstalled/com.ubuntu.clock/3.7.456/share/qml/ubuntu-clock-app.qml:20 module "WorldClock" is not installed
Note that without the
--desktop_file_hint, you’ll get:
Loading module: 'libubuntu_application_api_touch_mirclient.so.3.0.0' UbuntuClientIntegration: connection to Mir server failed. Check that a Mir server is running, and the correct socket is being used and is accessible. The shell may have rejected the incoming connection, so check its log file Aborted
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂