[Solved] How to download and install Apps from OpenStore via CLI?
-
I want to write a small bash script which can be used to auto-configure my Ubuntu Touch devices after resets to factory defaults.
Is there any option available to download and install newest versions of desired apps from OpenStore via command line interface (CLI)? For example, how to install Dekko 2 via CLI?
Maybe something like...
wget https://open-store.io/api/v3/apps/dekko2.dekkan/download/xenial/dekko2_armhf.click
pkcon install-local --allow-untrusted /Downloads/dekko2_armhf.click
-
@custello said in How to download and install Apps from OpenStore via CLI?:
Maybe something like...
looks ok. does it work?
-
@doniks said in How to download and install Apps from OpenStore via CLI?:
@custello said in How to download and install Apps from OpenStore via CLI?:
Maybe something like...
looks ok. does it work?
-
Let's assume I always want to downoad the newest version of respective
.click
-packages. Therefore I can not use the URL of a specific version, but have to use the overall URL to the package. Hereby I am not sure if this attempt could work withwget
, because the following user prompt appears when opening the URLhttps://open-store.io/api/v3/apps/dekko2.dekkan/download/xenial/
in browser:It seems that opening the URL in browser will forward the user to the actual file. I am not sure if
wget
could handle that request correctly, because the URL does not refer to the file directly. I've tried it in terminal, herebywget
mistakenly downloaded theindex.html
-file instead of the desired.click
-file. Funny fact: Theindex.html
file has exactly 6.53 MB (what would be the same size as Dekko's.click
package). Maybewget
just renamed the downloaded file asindex.html
? -
Do I need to use
pkcon install-local --allow-untrusted
or would it work withoutallow-antrusted
as well?
-
-
@custello said in How to download and install Apps from OpenStore via CLI?:
Do I need to use pkcon install-local --allow-untrusted or would it work without allow-antrusted as well?
The
--allow-untrusted
is required, because by simply downloading a click directly, you are missing the additional metadata, and are not verifying that what was downloaded, is trusted. -
@custello said in How to download and install Apps from OpenStore via CLI?:
Funny fact: The
index.html
file has exactly 6.53 MB (what would be the same size as Dekko's.click
package). Maybewget
just renamed the downloaded file asindex.html
?Thanks to @Ingo's knowledge, this is partly true!
wget
will ignore the response headers, because this is an experimental feature at that time. Thereforewget
uses a standard name for the downloaded file, and this one will be a classicindex.html
.@dobey said in How to download and install Apps from OpenStore via CLI?:
The --allow-untrusted is required, because by simply downloading a click directly, you are missing the additional metadata, and are not verifying that what was downloaded, is trusted.
Okay, thanks a lot!
So the final (working) command should be:
wget https://open-store.io/api/v3/apps/dekko2.dekkan/download/xenial/ -O /home/phablet/Downloads/dekko2.dekkan_armhf.click
Afterwards:
pkcon install-local --allow-untrusted /home/phablet/Downloads/*.click