Droidspaces-OSS icon indicating copy to clipboard operation
Droidspaces-OSS copied to clipboard

[FEATURE]CLI应用无法自动转跳浏览器

Open qitry opened this issue 1 month ago • 1 comments

Is your feature request related to a problem? Please describe.

Droidspaces 内置 Terminal 无法唤起 Android 浏览器,导致依赖浏览器认证的 CLI 工具无法登录,典型如 gh auth login(GitHub CLI):它显示设备码后卡在“Press Enter to open github.com in your browser...”,流程无法继续。其他用 OAuth/设备码的 CLI 也一样受影响。

Describe the solution you'd like

让内置 Terminal 能把 URL 转发给 Android 系统浏览器。例如提供可用的 termux-open-url(或 xdg-open 包装器),或设置 BROWSER 环境变量指向一个 URL 打开器,使 gh 等工具能自动拉起浏览器完成认证。

Describe any alternatives you've considered

  1. 手动复制 URL 到外部浏览器打开并输入设备码——流程割裂。
  2. 设 GH_BROWSER=/bin/true 跳过打开浏览器——仍需手动操作,没解决根本问题。
  3. 在容器内装图形环境用浏览器——过重,不符合轻量定位。

Additional context

Termux 已有成熟方案:termux-open-url 将 URL 交给 Android 系统打开,xdg-open 也软链到它。Droidspaces 与 Termux 同为 Android 宿主环境,引入同样的 URL 转发能力即可直接解决 gh auth login 等工具的认证问题。

qitry avatar Oct 25 '26 12:10 qitry

No; this is not doable and is not feasible. Use another authentication method like SSH for GitHub.

ravindu644 avatar Oct 25 '26 12:10 ravindu644