Get the currently open tabs in Google Chrome via the command line












16















I'd like to write a shell script that automatically transfers all tabs from Chrome to Firefox (by getting the list of tabs from Chrome, and then opening them in Firefox with a script.) In Google Chrome, is it possible to obtain a list of open tabs via the command line?










share|improve this question



























    16















    I'd like to write a shell script that automatically transfers all tabs from Chrome to Firefox (by getting the list of tabs from Chrome, and then opening them in Firefox with a script.) In Google Chrome, is it possible to obtain a list of open tabs via the command line?










    share|improve this question

























      16












      16








      16


      3






      I'd like to write a shell script that automatically transfers all tabs from Chrome to Firefox (by getting the list of tabs from Chrome, and then opening them in Firefox with a script.) In Google Chrome, is it possible to obtain a list of open tabs via the command line?










      share|improve this question














      I'd like to write a shell script that automatically transfers all tabs from Chrome to Firefox (by getting the list of tabs from Chrome, and then opening them in Firefox with a script.) In Google Chrome, is it possible to obtain a list of open tabs via the command line?







      google-chrome






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 18 '12 at 0:15









      Anderson GreenAnderson Green

      2,61983667




      2,61983667






















          3 Answers
          3






          active

          oldest

          votes


















          6














          This question was not answered, solution above is for Chrome Dev Tools where the OP asked in CLI, so this is the solution I've found :



          strings ~/'.config/chromium/Default/Current Session' | 'grep' -E '^https?://'





          share|improve this answer



















          • 1





            Great find. Works like a charm. Thanks!

            – Plankalkül
            Jun 20 '18 at 11:57





















          2














          I finally found a duplicate question (it took a lot of searching to find it, though): https://stackoverflow.com/questions/4968271/chrome-on-linux-query-the-browser-to-see-what-tabs-are-open






          share|improve this answer

































            0














            You could also use the open-source utility chrome-cli. You can install with Homebrew:



            brew install chrome-cli



            Also, take note of one thing from the README:




            To execute javascript you must first allow it under View > Developer > Allow JavaScript from Apple Events.




            Here's what it looks like:



            $ chrome-cli list tabs
            [1889] Edit - Super User
            [1918] prasmussen/chrome-cli: Control Google Chrome from the command line
            [1905] Yotto Winter Mix 19 by Yotto
            $ chrome-cli list links
            [1889] https://superuser.com/posts/1407956/edit
            [1918] https://github.com/prasmussen/chrome-cli
            [1905] https://soundcloud.com/yotto/yotto-winter-mix-2019





            share|improve this answer

























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f489207%2fget-the-currently-open-tabs-in-google-chrome-via-the-command-line%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              6














              This question was not answered, solution above is for Chrome Dev Tools where the OP asked in CLI, so this is the solution I've found :



              strings ~/'.config/chromium/Default/Current Session' | 'grep' -E '^https?://'





              share|improve this answer



















              • 1





                Great find. Works like a charm. Thanks!

                – Plankalkül
                Jun 20 '18 at 11:57


















              6














              This question was not answered, solution above is for Chrome Dev Tools where the OP asked in CLI, so this is the solution I've found :



              strings ~/'.config/chromium/Default/Current Session' | 'grep' -E '^https?://'





              share|improve this answer



















              • 1





                Great find. Works like a charm. Thanks!

                – Plankalkül
                Jun 20 '18 at 11:57
















              6












              6








              6







              This question was not answered, solution above is for Chrome Dev Tools where the OP asked in CLI, so this is the solution I've found :



              strings ~/'.config/chromium/Default/Current Session' | 'grep' -E '^https?://'





              share|improve this answer













              This question was not answered, solution above is for Chrome Dev Tools where the OP asked in CLI, so this is the solution I've found :



              strings ~/'.config/chromium/Default/Current Session' | 'grep' -E '^https?://'






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Apr 4 '18 at 21:58









              MevatlaveKraspekMevatlaveKraspek

              16113




              16113








              • 1





                Great find. Works like a charm. Thanks!

                – Plankalkül
                Jun 20 '18 at 11:57
















              • 1





                Great find. Works like a charm. Thanks!

                – Plankalkül
                Jun 20 '18 at 11:57










              1




              1





              Great find. Works like a charm. Thanks!

              – Plankalkül
              Jun 20 '18 at 11:57







              Great find. Works like a charm. Thanks!

              – Plankalkül
              Jun 20 '18 at 11:57















              2














              I finally found a duplicate question (it took a lot of searching to find it, though): https://stackoverflow.com/questions/4968271/chrome-on-linux-query-the-browser-to-see-what-tabs-are-open






              share|improve this answer






























                2














                I finally found a duplicate question (it took a lot of searching to find it, though): https://stackoverflow.com/questions/4968271/chrome-on-linux-query-the-browser-to-see-what-tabs-are-open






                share|improve this answer




























                  2












                  2








                  2







                  I finally found a duplicate question (it took a lot of searching to find it, though): https://stackoverflow.com/questions/4968271/chrome-on-linux-query-the-browser-to-see-what-tabs-are-open






                  share|improve this answer















                  I finally found a duplicate question (it took a lot of searching to find it, though): https://stackoverflow.com/questions/4968271/chrome-on-linux-query-the-browser-to-see-what-tabs-are-open







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited May 23 '17 at 12:41









                  Community

                  1




                  1










                  answered Oct 18 '12 at 0:37









                  Anderson GreenAnderson Green

                  2,61983667




                  2,61983667























                      0














                      You could also use the open-source utility chrome-cli. You can install with Homebrew:



                      brew install chrome-cli



                      Also, take note of one thing from the README:




                      To execute javascript you must first allow it under View > Developer > Allow JavaScript from Apple Events.




                      Here's what it looks like:



                      $ chrome-cli list tabs
                      [1889] Edit - Super User
                      [1918] prasmussen/chrome-cli: Control Google Chrome from the command line
                      [1905] Yotto Winter Mix 19 by Yotto
                      $ chrome-cli list links
                      [1889] https://superuser.com/posts/1407956/edit
                      [1918] https://github.com/prasmussen/chrome-cli
                      [1905] https://soundcloud.com/yotto/yotto-winter-mix-2019





                      share|improve this answer






























                        0














                        You could also use the open-source utility chrome-cli. You can install with Homebrew:



                        brew install chrome-cli



                        Also, take note of one thing from the README:




                        To execute javascript you must first allow it under View > Developer > Allow JavaScript from Apple Events.




                        Here's what it looks like:



                        $ chrome-cli list tabs
                        [1889] Edit - Super User
                        [1918] prasmussen/chrome-cli: Control Google Chrome from the command line
                        [1905] Yotto Winter Mix 19 by Yotto
                        $ chrome-cli list links
                        [1889] https://superuser.com/posts/1407956/edit
                        [1918] https://github.com/prasmussen/chrome-cli
                        [1905] https://soundcloud.com/yotto/yotto-winter-mix-2019





                        share|improve this answer




























                          0












                          0








                          0







                          You could also use the open-source utility chrome-cli. You can install with Homebrew:



                          brew install chrome-cli



                          Also, take note of one thing from the README:




                          To execute javascript you must first allow it under View > Developer > Allow JavaScript from Apple Events.




                          Here's what it looks like:



                          $ chrome-cli list tabs
                          [1889] Edit - Super User
                          [1918] prasmussen/chrome-cli: Control Google Chrome from the command line
                          [1905] Yotto Winter Mix 19 by Yotto
                          $ chrome-cli list links
                          [1889] https://superuser.com/posts/1407956/edit
                          [1918] https://github.com/prasmussen/chrome-cli
                          [1905] https://soundcloud.com/yotto/yotto-winter-mix-2019





                          share|improve this answer















                          You could also use the open-source utility chrome-cli. You can install with Homebrew:



                          brew install chrome-cli



                          Also, take note of one thing from the README:




                          To execute javascript you must first allow it under View > Developer > Allow JavaScript from Apple Events.




                          Here's what it looks like:



                          $ chrome-cli list tabs
                          [1889] Edit - Super User
                          [1918] prasmussen/chrome-cli: Control Google Chrome from the command line
                          [1905] Yotto Winter Mix 19 by Yotto
                          $ chrome-cli list links
                          [1889] https://superuser.com/posts/1407956/edit
                          [1918] https://github.com/prasmussen/chrome-cli
                          [1905] https://soundcloud.com/yotto/yotto-winter-mix-2019






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Feb 20 at 22:50

























                          answered Feb 20 at 22:42









                          Eric HankoEric Hanko

                          112




                          112






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f489207%2fget-the-currently-open-tabs-in-google-chrome-via-the-command-line%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Probability when a professor distributes a quiz and homework assignment to a class of n students.

                              Aardman Animations

                              Are they similar matrix