termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

"termux-wallpaper -u <url>" says "Unknown host!"

Open mayureshw opened this issue 3 years ago • 8 comments

termux-info 
Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_VERSION=0.108
Packages CPU architecture:
arm
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main/ stable main
Updatable packages:
All packages up to date
termux-tools version:
1.31.0
Android version:
9
Kernel build information:
Linux localhost 3.18.120-21534220 #2 SMP PREEMPT Mon Jun 21 22:40:05 KST 2021 armv7l Android
Device manufacturer:
samsung
Device model:
SM-J415F

Problem description

termux-wallpaper -u option with a valid URL to a jpg, gives "Unknown host" error


$ termux-wallpaper -u <URL>

Unknown host!

mayureshw avatar Oct 29 '22 11:10 mayureshw

Still a problem? It works for me. Maybe supply the url too

drui9 avatar Jul 25 '23 08:07 drui9

It is an http:// URL. Would that matter. I tried some https:// URLs and those are working.

mayureshw avatar Jul 26 '23 03:07 mayureshw

It is an http:// URL. Would that matter. I tried some https:// URLs and those are working.

http urls never accepted. It's not secure. If you're the host of that url's domain/subdomain apply ssl/tls certificates

If it's helpful please close this issue

HusniMuhammad avatar Sep 06 '23 12:09 HusniMuhammad

http vs https is a separate topic. How would that matter to a tool that just needs to download a file from a given URL? For example, wget, curl still download fine from http URLs.

mayureshw avatar Sep 06 '23 14:09 mayureshw

HTTP issue is related to API changes described in Android 9. Details explained in Google blog: https://android-developers.googleblog.com/2018/04/protecting-users-with-tls-by-default-in.html

sylirre avatar Sep 06 '23 19:09 sylirre

http vs https is a separate topic. How would that matter to a tool that just needs to download a file from a given URL? For example, wget, curl still download fine from http URLs.

HTTP issue is related to API changes described in Android 9. Details explained in Google blog: https://android-developers.googleblog.com/2018/04/protecting-users-with-tls-by-default-in.html

Yes

HusniMuhammad avatar Sep 06 '23 21:09 HusniMuhammad

http vs https is a separate topic. How would that matter to a tool that just needs to download a file from a given URL? For example, wget, curl still download fine from http URLs.

Because some times that tool needs to verify the url safe/not according Android sdks & older sdks doesn't have this feature

Alternative is, your can download that image from other tools like lftp and fetch it

If it's useful please close this issue as completed

HusniMuhammad avatar Sep 06 '23 21:09 HusniMuhammad

HTTP issue is related to API changes described in Android 9. Details explained in Google blog: https://android-developers.googleblog.com/2018/04/protecting-users-with-tls-by-default-in.html

Can you know how to make packages in termux github? I have problem here.

HusniMuhammad avatar Sep 06 '23 22:09 HusniMuhammad