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

How can I change the boot bash? #264

Open
SavingPot opened this issue Aug 3, 2023 · 6 comments
Open

How can I change the boot bash? #264

SavingPot opened this issue Aug 3, 2023 · 6 comments

Comments

@SavingPot
Copy link

Why do I want to change them

  1. I want to run code-server with dotnet (.Net, not mono)
  2. I found dotnet can't be directly installed in Termux
  3. I think I can run code-server in debian

What I want to change

  • The bash to run when the user clicked "INSTALL EDITOR", "RUN EDITOR", "START REMOTE"

My steps

  1. I installed debian in Standard-Termux, installed code-server and dotnet in it
  2. I used VHEditor to view the code-server, and everything runs well
  3. I tried to run the codes in VHEditor-Termux, but many of them can't be ran at all
  4. I checked the structures and I found this, but I don't know when it will be ran: https://github.com/vhqtvn/VHEditor-Android/blob/master/app/src/main/res/raw/boot_remote.sh
@SavingPot
Copy link
Author

Sorry, I don't want to change what wil be ran then click "START REMOTE"

And here is the commands to run when using Standard-Termux:

Install Editor

  1. termux-setup-storage && apt update && apt upgrade && apt install proot-distro && proot-distro install debian && proot-distro login debian
  2. sed -i 's/security-cdn.debian.org/mirrors.aliyun.com' /etc/apt/sources.list && apt update && apt install wget && wget https://download.visualstudio.microsoft.com/download/pr/72d1f83c-ad2c-4c9b-88b1-15196f411b9d/a0b863cabea9ac0fe7b92dc70c8d4ef0/dotnet-sdk-6.0.407-linux-arm64.tar.gz && mkdir .dotnet && tar -zxf dotnet-sdk-6.0.407-linux-arm64.tar.gz -C .dotnet && echo -e "export DOTNET_ROOT=$HOME/.dotnet\nexport PATH=$PATH:$HOME/.dotnet:$HOME/.dotnet/tools" > ~/.bashrc && source ~/.bashrc && apt install libicu-dev && wget https://github.com/coder/code-server/releases/download/v4.16.0/code-server_4.16.0_arm64.deb && dpkg -i code-server_4.16.0_arm64.deb && code-server
  3. Click CTRL, and input "c"
  4. echo -e "bind-addr: 127.0.0.1:8080\nauth: none\n\ncert: false" > ~/.config/code-server/config.yaml && sed -i '2i\"extensionsGallery": {\n "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",\n "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",\n "itemUrl": "https://marketplace.visualstudio.com/items",\n "controlUrl": "",\n "recommendationsUrl": ""\n },' /usr/lib/code-server/lib/vscode/product.json && exit

Start Editor (I didn't combine them because when I run "proot-distro login debian && code-server", the command line is blocked, I must input "code-server" to run, how can I combine them?)

  1. proot-distro login debian
  2. code-server

@vhqtvn
Copy link
Owner

vhqtvn commented Aug 3, 2023

@SavingPot
Copy link
Author

Maybe there were some misunderstandings?
I view openned the link you offerd and viewed the kotlin file, maybe this file is used to launch the bash files, but I don't want to do this, I just want to change the bash files to automaticly run the commands I served, thank you

@SavingPot
Copy link
Author

Also, where is the INSTALL bash file and the kotlin file? Thank you, please!

@SavingPot
Copy link
Author

Sorry but, can you tell me how to embed my commands into your project in detail directly? Sorry, if you don't have time, you can refuse me directly, sorry

@vhqtvn
Copy link
Owner

vhqtvn commented Aug 3, 2023

That "Service" is a Kotlin wrapper to manage an instance of code-server process, which "builds" the command and execute.

https://github.com/vhqtvn/VHEditor-Android/blob/master/app/src/main/java/vn/vhn/vhscode/root/codeserver/CodeServerLocalService.kt#L125

If you want to maintain your own fork, just edit boot.sh.

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

No branches or pull requests

2 participants