OESF Portables Forum
Model Specific Forums => Gemini PDA => Gemini PDA - Android => Topic started by: Pete G. on June 20, 2018, 09:23:06 pm
-
I've been trying to find a way to communicate between termux work and android apps, and eventually stumbled across xdg-open, which in Linux "opens a file or URL in the user's preferred application". I have a test html file in my termux area that I'd like to open in Firefox -- which I've set as my default. However if I invoke xdg-open on it, it only gives me a choice of Chrome, plus some other irrelevant options. Anyone know what's going on here -- and how to get what I want?
-
I've been trying to find a way to communicate between termux work and android apps, and eventually stumbled across xdg-open, which in Linux "opens a file or URL in the user's preferred application". I have a test html file in my termux area that I'd like to open in Firefox -- which I've set as my default. However if I invoke xdg-open on it, it only gives me a choice of Chrome, plus some other irrelevant options. Anyone know what's going on here -- and how to get what I want?
As a matter of interest, why don't you use termux-open or termux-open-url. I think you have to install termux utils to get these. You can specify content-type as an argument if you want to override the defaults. Choose a type which firefox supports (I would have thought html would do it) and it starts the android app and opens the file.
-
As a matter of interest, why don't you use termux-open or termux-open-url. I think you have to install termux utils to get these. You can specify content-type as an argument if you want to override the defaults. Choose a type which firefox supports (I would have thought html would do it) and it starts the android app and opens the file.
It turns out that xdg-open _is_ termux-open! {a link) And this is just a script that uses 'am' to call a common handler that termux provides. It must in there somewhere that it's deciding that Firefox isn't eligible. I'm getting a crash indoctrination into am and intents, though, so maybe I can figure it all out!
[I still can't figure out how to add italics and emoticons from the Gemini, though]