Skip to content

create a code-server app optimized for android #3370

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

Closed
ThiagoSilm opened this issue May 12, 2021 · 8 comments
Closed

create a code-server app optimized for android #3370

ThiagoSilm opened this issue May 12, 2021 · 8 comments
Labels
feature New user visible feature

Comments

@ThiagoSilm
Copy link

ThiagoSilm commented May 12, 2021

Many people who use this project are on their cell phones for the simple fact that if we had a pc we would be using vscode itself, there is an app called vheditor that uses this project, but it is not very optimized, we will not be able to create a version of this project for android ? we would love it if that were possible or create an app with the same functionality as vs code.

Originally discussed in #2840

@ThiagoSilm ThiagoSilm added the feature New user visible feature label May 12, 2021
@jsjoeio jsjoeio added this to the Backlog Candidates milestone May 12, 2021
@jsjoeio jsjoeio changed the title App code server create a code-server app optimized for android May 12, 2021
@bpmct
Copy link
Member

bpmct commented May 13, 2021

Relaying some of my thoughts from #2840 here:

Currently, code-server has a PWA feature that makes any code-server instance appear as an app on a phone's home screen.

In terms of hosting code-server itself:

  • there cloud free providers such as Railway that can host code-server, which can then be accessed on any device (including an Android/iOS phone)
  • code-server can also be hosted on Termux, but requires some setup, as you have to download the termux app and run some setup commands.

Are you looking for an app that does the following?

  1. can be downloaded from Google Play
  2. hosts code-server on the phone
  3. starts code-server / has a webview of code-server when you open the app
  4. can stop code-server on the Ui, or by closing, to save compute power on the phone
  5. (optional): uses --link so that any device can also use code-server, but using your phone's compute
  6. (optional) allow you to connect to code-server hosted elseware (ex. Railway, Google Cloud), besides local Termux. The PWA may be better for this, unless the app handles extra stuff such as stop/start
  7. (i think you mentioned this): reduced features from existing VS Code/code-server for improved performance? Could you provide more details here?

If so, that would be pretty cool. Just trying to get a sense of the feature-set you are looking for.

One pitfall of # 2, is I believe that many development workloads are still not supported without an underlying Linux environment, such as Termux. I also don't think it would be possible to run code-server without Termux on Android.

It looks like VHEditor includes Termux built-in. I am not sure if this is something we would do ourselves as the Termux app itself offers a lot of goodies. I think a tighter integration with Termux + instant PWA support could get us a lot of the way there, but want to make sure I'm understanding your request correctly @Piposo.

@ThiagoSilm
Copy link
Author

ThiagoSilm commented May 13, 2021

well termux is a great terminal that we cannot deny, but if you really want to program using frameworks that need administrator permission it will not be possible because no cell phone,has root or administrator mode that gives you full access to the cell. the code-server itself is great but the terminal / termux is limited in itself, but I know a way to have a ubuntu terminal in termux. knowing this it would no longer be necessary to use the original termux, but to run the ubuntu terminal, it gives us administrator access to the projects, but again you do not have access to other local projects, only projects that were created in the ubuntu terminal, knowing that they could integrate the app to create a folder to create the projects and the users access. the idea is as follows:

  1. create an application that can be used by android with an optimization and easy to find.
  2. update the termux terminal so that after starting the code-server app it runs the ubuntu terminal and not termux.
  3. have an on / off button to not consume too much of the user's battery.
  4. an optimization in the text editor so you don't have to use an integrated keyboard on your cell phone or a virtual pc keyboard.
  5. keep the code-server basics, be able to use extensions and the basics.

after all this keep the app optimized and in sync with the code server versions. that's my idea to help android developers.

@bpmct
Copy link
Member

bpmct commented May 13, 2021

but I know a way to have a ubuntu terminal in termux

are you referring to this specifically? https://github.com/Neo-Oli/termux-ubuntu or another resource? So this essentially allows someone to install packages that would previously be limited to root?

an optimization in the text editor so you don't have to use an integrated keyboard on your cell phone or a virtual pc keyboard.

Can you clarify? Do you mean "make the on-screen keyboard functional for code-server without requiring an external one?"

keep the code-server basics, be able to use extensions and the basics.

Is there a reason why this couldn't be the full code-server app, maybe with some of the stuff from the sidebar simply "hidden"? (you can right-click and hide them by default)

@ThiagoSilm
Copy link
Author

yes I was referring to that, I think that a limited thing but that was still the vs code and functional will be accepted

@akr2002
Copy link
Contributor

akr2002 commented May 15, 2021

but I know a way to have a ubuntu terminal in termux

While it may solve some issues regarding the projects that require root privilege, it might still suffer from the same limitations faced by Termux (like inability to read /proc) since it basically runs proot on the newly installed rootfs (which is Ubuntu in your case)

htop on Termux:
htop-on-termux
htop on Alpine on Termux:
htop-on-alpine-on-termux

@aleleba
Copy link

aleleba commented May 16, 2021

I think some hybrid application alternative like Ionic capacitor can be used to achieve this. But I feel honest I don't think it would be an alternative or the concept of code-server. Since what it raises is to have the same work environment in any place, and as discussed above, it can be achieved by installing the PWA. Currently I use it to program in android too, but I move to any device and keep my configurations, repositories, etc. And I only access either on windows, mac, Linux or Android. I think it would lose its sense of being to run it locally by code-server, since what it tries to solve is to work in several environments in a homogeneous way. But I think one way to achieve it, if you need to develop, can be with: https://capacitorjs.com/

I hope everyone has a good day :D

@Merith-TK
Copy link
Contributor

Also look into termux-chroot, should come in the proot package,
it spawns a shell where the rootfs, /, is actually pointing to /data/data/com.termux/files/usr while keeping some directories the same as needed

@stale
Copy link

stale bot commented Feb 3, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Feb 3, 2022
@stale stale bot closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New user visible feature
Projects
None yet
Development

No branches or pull requests

6 participants