Some questions about `termux-x11` package
Hi. There are a few problems.
- Package
termux-x11is always outdated. Can you please disable it? - Native libraries in future versions of
termux-x11will use dependencies intermux-packages. But I can not use official repos for distributing it because a project is still in alpha stage and I can update it frequently, without official releases. I can not open issue about updating app every time I update my code. Can I usetermux-packages workflowsintermux-x11's repo for building up-to-date package? How should I set it up? For now I am generating .deb package with simple bash script but this way I can not build/link my code against libraries contained intermux-packages. - Can you please make
termux-apprequireREQUEST_INSTALL_PACKAGESpemission? It can be a way to distribute up-to-date .apk inside .deb file (with an ability to request installing from insidetermux-app).
Hello, thanks for your feedback!
termux-x11in thetermux-packagescan be disabled or removed easily if it is not used anymore. Don't worry about it.- You could setup a workflow to auto-update files in https://github.com/termux/termux-x11/tree/master/app/src/main/jni/prebuilt at
termux-x11repo. If I have some free time, I will try to work on this. You could also use workflow to auto-buildapkfile ordebfile toGithub Releaseif one tag is published to specific branch oftermux-x11repo. - Install apk from Termux is easy. Just use
termux-open starter.apk. But I don't think it is a good idea to bundlestarter.apkin.debfile as it will increase file size a lot. Maybe later we could use script to compare versions between local package and the latestGithub Release, and get the latest version ofstarter.apkfromGithub Release.
termux-x11in thetermux-packagescan be disabled or removed easily if it is not used anymore. Don't worry about it.
It is unused. termux-x11 package's starting sequence changed a very long time ago so the package does not work. And I am not sure if it will stay stable. Please, disable/remove the package.
files in
https://github.com/termux/termux-x11/tree/master/app/src/main/jni/prebuilt
They are bundled inside .apk, they are not a problem. But I am planning to write a small program which will synchronize clipboard (Termux/Proot <--> Android host), type Unicode characters (not defined as KeySyms in Android's keyboard layout, Android sends String without keycodes) and maybe do something more. It will use libX11 and should be built against termux-packages.
You could also use workflow to auto-build apk file or deb file to Github Release if one tag is published to specific branch of termux-x11 repo.
As I said before the project is still in alpha stage and I did not plan any releases. For now users should download binaries from the last successful artifact of Github Actions.
Install apk from Termux is easy. Just use
termux-open starter.apk.
Did not work for me. And starter.apk is not intended to be installed. It is a simple program that creates connection with termux-x11 apk installed on device and then transfers control over this connection to Xwayland
But I don't think it is a good idea to bundle .apk in .deb file as it will increase file size a lot.
I know. But it is the only way to keep application and companion package versions in sync.
Maybe later we could use script to compare versions between local package and the latest Github Release, and get the latest version of .apk from Github Release.
I think I can make something like apt repo inside code repository. Github workflow can ignore commits to specified pathes so it will not affect build actions after commiting code. This way we can get package updating (apt) and reminders about updates (versionCode comparing?).
I apologize for being a bore.
Did not work for me.
After granting permission from Android Settings -> Apps -> Termux -> Advanced -> Install unknown apps, run termux-open --view --content-type "application/vnd.android.package-archive" "/path/to/apk" to show the installation prompt. The allow-external-apps will also need to be set to true on Termux app >= 0.118.0 since termux content provider is used for sending apk to android package manager. If file exists on external shared storage /sdcard, then Termux should also be granted storage permission. If nothing happens or package manager crashes, then check system logs with logcat for errors. There is currently no termux api to request install permission and possibly dangerous too unless warning prompts shown first.
https://github.com/termux/termux-app/commit/93a5bf8d
https://github.com/termux/termux-app/commit/93a5bf8d
Wow. I thought I checked if it has permission. Thank you.
There is currently no termux api to request install permission and possibly dangerous too unless warning prompts shown first.
I think I can add reminder to grant this permission for termux.
I tried to open permission request dialog this way:
adb shell am start -a android.content.pm.action.REQUEST_PERMISSIONS -esa android.content.pm.extra.REQUEST_PERMISSIONS_NAMES android.permission.REQUEST_INSTALL_PACKAGES -n com.google.android.permissioncontroller/com.android.permissioncontroller.permission.ui.GrantPermissionsActivity
But failed.
08-05 00:23:40.270 27916 27916 E GrantPermissionsActivit: null callingPackageName. Please use "RequestPermission" to request permissions
But as far as I know both RequestPermission and Activity.requestPermissions() require startActivityForResult function which is unavailable without Context/Activity instance.
Looks like everything I can do is to show an advice how to grant REQUEST_INSTALL_PACKAGES permission to termux in the case it is not granted. I know the way to check permissions without real Context.
This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.