-
Notifications
You must be signed in to change notification settings - Fork 443
No xdg-open command, so host Browser cannot be started #177
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
Comments
#178 is my suggestion. Could you please confirm it? |
Hi @nmemoto, |
@samruddhikhandale Thanks for checking my pull request. The source code I used is below. The settings for devcontainer are below. {
"name": "try-cdktf",
"build": {
"dockerfile": "Dockerfile",
"cacheFrom": "ghcr.io/nmemoto/try-cdktf"
},
"customizations": {
"vscode": {
"extensions": [
"GitHub.vscode-pull-request-github",
"eamodio.gitlens"
]
}
},
"features": {
"ghcr.io/devcontainers/features/docker-from-docker:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/terraform:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "latest"
},
},
"remoteUser": "node",
"postCreateCommand": "npm install --global cdktf-cli@latest"
} Dockerfile
|
Thanks for the details. I agree that your proposal in #178 makes sense for your dev container configuration and will help solve the issue. I am thinking from another perspective where the config doesn't use an image which depends on the |
@samruddhikhandale Your suggestion seemed like a solution for my current situation. My concern was that many CLI tools provided by major cloud services, not just terraform, open the browser for its authentication. Many such CLI tools probably assume xdg-open. (For example, the standard Go package uses xdg-open at https://github.com/pkg/browser/blob/master/browser_linux.go#L9.) From that point of view, I still thought the xdg-utils installation process needed to be handled in a way that was not limited to Terraform's features and was a change that should go into common-utils. Recently, bamurtaugh pointed me to an issue of #67. What are your thoughts on this point? |
You have highlighted a very good point, I missed how widely used it could be.
I am not sure if I have understood your point completely, but if we add
In that case, they could use the |
@samruddhikhandale Would you approve changes to the pull request for #178 ? If so, I will let this pull request be re-opened. I would also like to apply this pull request at this time, assuming that the xdg-utils installation process is moved to the appropriate feature at the time common-utils is disassembled in the future. My concern is that xdg-utils is clearly an unnecessary package for the devcontainer use case with CI. xdg-utils installation process log
|
How are those tools installed? |
@eitsupi Thanks for caring about this issue.
That may be so. On the other hand, I believe there are lightweight CLI tools that are not so lightweight as to create devcontainer features. |
Also, the assumption that even major cloud service CLI tools will be created with devcontainer features seems a bit too idealistic. |
When starting a browser by executing cli on a terminal in devcontainer (VSCode Remote - Container), if the browser startup depends on xdg-open, it will fail because the xdg-open command does not exist.
For example, the following is obtained by executing cdktf init.
CLI tools that use the environment variable BROWSER, such as github-cli, are not affected, but there must be many CLI tools that use xdg-open.
I originally submitted the form below, but I thought it was a devcontainer issue, so I submitted it here.
hashicorp/terraform-cdk#2132
The text was updated successfully, but these errors were encountered: