Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can links be opened in the system browser? #213

Closed
redthing1 opened this issue Feb 21, 2020 · 23 comments
Closed

Can links be opened in the system browser? #213

redthing1 opened this issue Feb 21, 2020 · 23 comments

Comments

@redthing1
Copy link

Base termux provides ~
termux-open, can I interface with that?

@lypanov
Copy link

lypanov commented Apr 1, 2020

My local hack to get this working has been to ssh back to localhost and call termux-open. I've also created a termux-open.desktop file in my user XDG application folders such that gnome GUI applications open links in my Android default browser.

@sudomain
Copy link

sudomain commented Apr 8, 2020

clever use of ssh to use termux-open. Termux-api commands such as termux-open can be accessed by editing the proot command in startarch (see my comment here. I'm hoping to simplify this process with a PR to this project pending a reply to this comment

@github-actions
Copy link

github-actions bot commented Jun 8, 2020

Stale issue message

@sudomain
Copy link

sudomain commented Jul 10, 2020

@xdrie @lypanov recent commits in TermuxArch/TermuxArch allow for using termux-api commands such as termux-open in TermuxArch

@lypanov
Copy link

lypanov commented Sep 9, 2020

@xdrie @lypanov recent commits in TermuxArch/TermuxArch allow for using termux-api commands such as termux-open in TermuxArch

Weirdly while eg termux-toast works for me termux-open does not. I just get "am: not found".

@SDRausty
Copy link
Owner

SDRausty commented Sep 9, 2020

This is being re-implemented for the second time:

declare -a PRFXTOLS # declare array for device tools that should be accessible in the PRoot environment
PRFXTOLS=(am getprop toolbox toybox) # patial implementaion : system tools that work and can be found can be added to this array

It was dropped twice due to serious errors which impeded the functioning of this installation and configuration script. @lypanov @sudomain @xdrie can you please share what other commands should be added to this array?

Suggestions are welcome about how this feature should be re-implanted. If you are not worried about collisions and other possible issues, simply add Termux PATH to .bash_profile, and you will get the commands you want from Termux in the PRoot environment.

@SDRausty
Copy link
Owner

SDRausty commented Sep 9, 2020

Linking is an option to using PATH. For example command ln -s /data/data/com.termux/files/usr/bin/termux-open issued in ~/bin will give termux-open in the PRoot environment. This is why I'm asking:

what other commands should be added?

I don't use all the commands. Really I don't. One of the reasons is there is too many of them. This doesn't mean I don't want you to use the command that you want to use. When I don't know the name of the command that you wish to use it makes it difficult to implement this command into the configuration and installation script. Please share the names of the Android and Termux commands you would like to have included.

@lypanov
Copy link

lypanov commented Sep 9, 2020

I've for now simply linked am into /usr/local/bin and this works around my issues. I'm personally fine with using the full termux path manually for the termux-* tools themselves. As such, for me at the very least: Documentation is all I'd need as long as "am" is linked.

@SDRausty
Copy link
Owner

SDRausty commented Sep 9, 2020

using the full termux path

If you would like to see how this affects the system in a negative way try this command developed in August 2020, makeyay && yay pikaur with Termux development tools also installed in the same smartphone. More than likely makeyay && yay pikaur will not succeed.

@lypanov
Copy link

lypanov commented Sep 9, 2020

using the full termux path

If you would like to see how this affects the system in a negative way. Try this command developed in August 2020; makeyay && yay pikaur with Termux development tools also installed in the same smartphone. More than likely makeyay && yay pikaur will not succeed.

Sorry I was ambigious. I mean, I'm just typing in /data/data in all places I need termux-* scripts.

@SDRausty
Copy link
Owner

SDRausty commented Sep 9, 2020

typing in /data/data in all places

See if trying a for loop like this one; for i in $(find /data/data/com.termux/files/usr/bin/ -name "termux*") ; do ln -s $i ; done will help in typing. Let the for builtin command do the typing for you.

Repository owner deleted a comment from sudomain Sep 9, 2020
@SDRausty
Copy link
Owner

SDRausty commented Sep 9, 2020

functioning of this installation and configuration script. @lypanov @xdrie can you please share what other commands should be added to this array?

PRFXTOLS=(am getprop toolbox toybox) # patial implementaion : system tools that work and can be found can be added to this array

what other commands should be added to this array?

@SDRausty
Copy link
Owner

SDRausty commented Sep 9, 2020

for i in $(find /data/data/com.termux/files/usr/bin/ -name "termux*") ; do ln -s $i ; done

Thank you for sharing your request; need termux-* @lypanov 😃

@SDRausty
Copy link
Owner

SDRausty commented Sep 9, 2020

Your requests are not presently implemented. In the meantime please enjoy the command; bash ~/storage/downloads/setupTermuxArch o : enter the matrix :

Screenshot_20200908-203250

Screenshot from recent developments at issue TermuxArch/TermuxArch#25 that requests attention. The current question in this issue is:

what other commands should be added to this array?

PRFXTOLS=(am getprop termux-* toolbox toybox)

This BASH array PRFXTOLS=(am getprop termux-* toolbox toybox) should migtrate to one of the axillary files. This file espritfunctions.bash is a good candidate to receive array PRFXTOLS.

@SDRausty
Copy link
Owner

SDRausty commented Sep 9, 2020

I find this topic and your comments very inspiring. You may want to try what I'm trying right now:

  1. Open a Fail-Safe session,
  2. :/data/data/com.termux/files/home $ echo $PATH > tmp.PATH,
  3. exit # then in new session,
  4. $ echo "PATH=$(cat tmp.PATH):$PATH" >> .bash_profile,
  5. Then open a new session again, and test the reconfigured system.

I'm enjoying learning what this change does; How about you? Are you enjoying the change too? Please share your findings here.

@SDRausty
Copy link
Owner

SDRausty commented Sep 9, 2020

https://www.reddit.com/r/termux/comments/ipod6z/what_termux_and_system_commands_work_well_with/

What Termux and system commands work well with Termux: API? I'd like to know which ones are the most fun to use? Also I'd like to know which ones give the most interesting results. Can you share this with me please?

Suggestions are welcome here. This is the current model of array PRFXTOLS:

PRFXTOLS=(am busybox getprop termux* toolbox toybox)

@SDRausty SDRausty unpinned this issue Sep 11, 2020
@SDRausty
Copy link
Owner

SDRausty commented Sep 11, 2020

Retesting the install feature is requested as, "Issues with Libreoffice #252" is open. Should device space be an issue with your device smartphone, wearable, smartwatch and more, please run this command:

bash setupTermuxArch re

This command should refresh the installation to the newest version for development, testing and the ux (user experience). Should space on device NOT be an issue please use the alternate directory install feature; setupTermuxArch h has more information about the alt directory install feature if device space is unlimited for this project; Cocurrent Linux versions on smartphone and more with the setupTermuxArch i option are possible. Please see option setupTermuxArch h for more information.

@redthing1
Copy link
Author

I tried it and it seems to work! Thanks!

@SDRausty
Copy link
Owner

SDRausty commented Sep 12, 2020

I tried it and it seems to work! Thanks!

@xdrie you are very welcome, and thank you very much for confirming Libreoffice works on Android smartphone!

@SDRausty
Copy link
Owner

SDRausty commented Sep 15, 2020

@xdrie this commit TermuxArch/TermuxArch@10db9b3 dropped termux-open support as it did not pass testing. Can you please check if adding it again with what it wants resolves this issue?

@SDRausty
Copy link
Owner

SDRausty commented Sep 16, 2020

This commit 33c875f adds temporary developer support for these commands @xdrie:
PRFXTOLS=(am dpkg getprop termux-change-repo termux-info termux-open termux-open-url termux-wake-lock termux-wake-unlock)

In order to access these commands, you can use the option setupTermuxArch o after installing. Diagnostic information will be helpful to improve this installation script.

@Ape
Copy link

Ape commented Nov 21, 2020

I tried using setupTermuxArch o, but when I try to run the commands I this this error:

CANNOT LINK EXECUTABLE "/system/bin/app_process": library "libnativeloader.so" not found: needed by main executable

Is this a known issue?

@SDRausty
Copy link
Owner

Which command did you run to get this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants