-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Ability for Scripts to Launch Commands for Arch Linux in Termux PRoot on Device #54
Comments
Hello, Thank you for your time and insight. Can you explain this a little bit more? First, what is the intended outcome? Second:
This is a very good suggestion. Can you provide some examples? |
Sure, let me see if I can explain a little more detailed. The purpose is so that, from Termux point of view, you can "access" arch just as if it were another part of Termux, being able to run scripts and binaries in arch, from termux. Since arch still has access to the system, this is easy to do, as long as we can pass commands to it like we can do with bash So, the outcome is to make it possible to run arch binaries and commands directly in Termux. Arch has tons more packages that can be useful, especially when there isn't a Termux package available. It gives more versatility, augmenting Termux shortcomings (the fact it doesn't have every package there is) I imagine the implementation to be simple, just pass any commands to arch via Termux example
I first got this idea because I wanted to use my imagemagick script on Termux, but Termux imagemagick is broken, where termuxarch one works. In the end I found a clang compiled imagemagick , but I'd rather use a "more official" method. Did that make sense? Or do you need a little more clarification? |
Thanks for contributing f88b9d1 and expanding this topic. Options have been introduced to Does option @tomty89 thank you for participating and expanding upon this issue. Can you explain Use |
@cherryleafroad
Can you provide some examples? This does sound useful. |
Forgive the beginner question, but how do I update the script when arch is already installed? I'll write a simple example once I get it working |
Thank you for your question. Thanks to your request one more enhancement has just been implemented with this 4615d7e commit.
|
You don't want And you need double-quoted
If you want direct execute for other users (if it ever make sense), you should do it seperately ( And you always want the login shell ( In conclusion, you should have four variants:
(The |
@SDRausty oh for your question
I use these instead of Btw you probably want to omit |
Greetings! Metasploit, I run Pacman -Su routersploit. Says terget not found. They say edit by adding: /etc/pacman.conf and add: [archstrike] Server = https://mirror.archstrike.org/$arch/$repo [blackarch] Server = http://blackarch.org/blackarch/$repo/os/$arch Next run pacman -Syu to update your repository listing. To install either distribution, run one of these commands: pacman -S archstrike –needed pacman -S blackarch –needed If that is so Can't i grab these tools without adding and installing help please! |
@tomty89 awesome advice with details. Thank you. TermuxArch v.1.2 is available for testing and should meet all the requirements of this topic. |
Well you are still using Should I be glad that you at least got |
Geez
|
@tomty89 compare
Can any of these |
I already told you:
Whether to have su variants is your choice. I don't think it's necessary coz in my experience "reverting" to normal user in proot with And this variant should be dropped totally:
And please please please drop the setting of LANG (and PATH) because it prevents |
The reason |
|
|
@SDRausty I created a helper run-arch-script.sh
In Tasker, use command Convert-image.sh
|
For what is worth:
That's why |
LANG=$LANG is depreceated; So is $PATH. Awesome. Thanks for pointing out the Arch way @tomty89. This makes the @cherryleafroad I am glad to hear that the script is working for you. |
Please read carefully what I told you **multiple times.
In both cases, you successfully executes Arch's But you didn't got Arch's whoami executed but Termux's. When you are passing more than just a command (multiple commands linked with You really want to understand these:
Please at least get to know a bit more about bash before testing inappropriately and saying what "work" and "not work" blindly. |
More fun:
|
"The implementation of "$*" has always been a problem and realistically should have been replaced with the behavior of "$@". In almost every case where coders use "$*", they mean "$@"," from https://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_02.html All the
Raw is raw, complete control. Choose the desired shell and options to login. Default no options tap enter can echo usage with examples: |
It's pointless to quote random sources while ignoring the context. The reason why we need
No. Complete control is write your own start/execute script (more of "line" actually). The raw variant you are having could only mislead people to think that it could be safely used for executing any program in Arch, while it is not because you need a login shell to set all the env vars for you (except the two that need to be hardcoded with If you want non-root direct execution, write a variant for it, And your "example" is still wrong. You always need to quote the command line passed to
Otherwise you will be running |
Hi,
It would be incredibly useful if scripts had the ability to launch commands in Arch Linux, much the same way you can do a
bash -c
, maybe astartarch -c
This would benefit scripts that run from Termux:Boot or Termux:Task
The text was updated successfully, but these errors were encountered: