How to reload Google Chrome tab from terminal?

2020-05-20 09:27发布

Is there a way to reload a Google Chrome tab in Ubuntu using just the terminal. I don't want to just open a new window, but to actually refresh a tab!

Extra question: Is this possible in other browsers as well such as Opera, Safari, Firefox.

8条回答
小情绪 Triste *
2楼-- · 2020-05-20 10:12

If some of these aren't working out for you, I was looking for a similar thing for vivaldi, and managed to do it combining some things here and others in another post

xdotool windowactivate $(xdotool search --class vivaldi | tail -1) key ctrl+r windowactivate $(xdotool getactivewindow)

you can add other key - keyvalue combinations after the first one

查看更多
Emotional °昔
3楼-- · 2020-05-20 10:12

chrome-remote-reload requires remote debugging enabled, but works both on Linux and Windows.

  1. Download executable: https://github.com/Benoth/chrome-remote-reload/releases or build it from sources.
  2. Run Chrome(/Chromium/Iron... or possibly even Opera or Edge, but the last one uses --devtools-server-port instead) with --remote-debugging-port=9222 parameter to enable remote debugging (just remember to close all instances of browser beforehand).
  3. Run downloaded executable.
查看更多
登录 后发表回答