Skip to content

Conversation

pbendersky
Copy link

This small fix makes browsermcp work properly on Linux, thus enabling it to work on DevContainers.

On macOS lsof -ti:9009 returns an empty string, so xargs interprets that as "no arguments", so no kill is run.

On Linux, however, lsof -ti:9009 returns no output, and xargs still tries to run kill -9, causing an error.

I fixed it with a one-liner that works on both platforms and always exits with 0, so the kill success even if no processes are running.

This enables browsermcp to be used on devcontainers by exposing port 9009, making it suitable to work no more dev environments.

@pbendersky pbendersky changed the title Fixed kill command to work properly on linux Fixed kill command to work properly on linux and devcontainers Jul 11, 2025
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

Successfully merging this pull request may close these issues.

1 participant