是否有跨平台方式在没有工具栏的情况下打开默认浏览器并将其指向localhost,我的应用程序将在哪里提供http?
例如在C ++,python,golang或java?
答案 0 :(得分:0)
在OSX上,您可以下载chrome-cli:
brew install chrome-cli
chrome-cli open <url> (Open url in new tab)
chrome-cli open <url> -n (Open url in new window)
chrome-cli open <url> -i (Open url in new incognito window)
chrome-cli open <url> -t <id> (Open url in specific tab)
chrome-cli open <url> -w <id> (Open url in new tab in specific window)
在Linux上,您将需要xdg-open:
sudo apt-get install xdg-open
xdg-open open <url> (Open url in new tab)