Clean way to launch the web browser from shell script?

前端 未结 6 1626
独厮守ぢ
独厮守ぢ 2020-12-04 07:58

In a bash script, I need to launch the user web browser. There seems to be many ways of doing this:

  • $BROWSER
  • xdg-open
  • <
6条回答
  •  猫巷女王i
    2020-12-04 08:17

    You could use the following:

    x-www-browser
    

    It won't run the user's but rather the system's default X browser.

    See: this thread.

提交回复
热议问题