How can I run glances over ssh?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I installed glances on my remote server, and now I'm trying to connect to it from my local machine and run it, like this :



ssh user@host glances


which gives me the following error :



Traceback (most recent call last):

File "/usr/bin/glances", line 9, in <module>
load_entry_point('Glances==1.7.3', 'console_scripts', 'glances')()

File "/usr/lib/python2.7/dist-packages/glances/glances.py", line 4644, in main
use_bold=use_bold)

File "/usr/lib/python2.7/dist-packages/glances/glances.py", line 1937, in __init__
self.screen = curses.initscr()

File "/usr/lib/python2.7/curses/__init__.py", line 33, in initscr
fd=_sys.__stdout__.fileno())

_curses.error: setupterm: could not find terminal


What am I missing ?







share|improve this question


























    up vote
    0
    down vote

    favorite












    I installed glances on my remote server, and now I'm trying to connect to it from my local machine and run it, like this :



    ssh user@host glances


    which gives me the following error :



    Traceback (most recent call last):

    File "/usr/bin/glances", line 9, in <module>
    load_entry_point('Glances==1.7.3', 'console_scripts', 'glances')()

    File "/usr/lib/python2.7/dist-packages/glances/glances.py", line 4644, in main
    use_bold=use_bold)

    File "/usr/lib/python2.7/dist-packages/glances/glances.py", line 1937, in __init__
    self.screen = curses.initscr()

    File "/usr/lib/python2.7/curses/__init__.py", line 33, in initscr
    fd=_sys.__stdout__.fileno())

    _curses.error: setupterm: could not find terminal


    What am I missing ?







    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I installed glances on my remote server, and now I'm trying to connect to it from my local machine and run it, like this :



      ssh user@host glances


      which gives me the following error :



      Traceback (most recent call last):

      File "/usr/bin/glances", line 9, in <module>
      load_entry_point('Glances==1.7.3', 'console_scripts', 'glances')()

      File "/usr/lib/python2.7/dist-packages/glances/glances.py", line 4644, in main
      use_bold=use_bold)

      File "/usr/lib/python2.7/dist-packages/glances/glances.py", line 1937, in __init__
      self.screen = curses.initscr()

      File "/usr/lib/python2.7/curses/__init__.py", line 33, in initscr
      fd=_sys.__stdout__.fileno())

      _curses.error: setupterm: could not find terminal


      What am I missing ?







      share|improve this question














      I installed glances on my remote server, and now I'm trying to connect to it from my local machine and run it, like this :



      ssh user@host glances


      which gives me the following error :



      Traceback (most recent call last):

      File "/usr/bin/glances", line 9, in <module>
      load_entry_point('Glances==1.7.3', 'console_scripts', 'glances')()

      File "/usr/lib/python2.7/dist-packages/glances/glances.py", line 4644, in main
      use_bold=use_bold)

      File "/usr/lib/python2.7/dist-packages/glances/glances.py", line 1937, in __init__
      self.screen = curses.initscr()

      File "/usr/lib/python2.7/curses/__init__.py", line 33, in initscr
      fd=_sys.__stdout__.fileno())

      _curses.error: setupterm: could not find terminal


      What am I missing ?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 28 '17 at 16:11









      Jeff Schaller

      32.1k849109




      32.1k849109










      asked Nov 28 '17 at 16:02









      mike23

      1083




      1083




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          6
          down vote



          accepted










          Since you've given a single command for ssh to run remotely, ssh did not allocate a pseudo-terminal for glances to use. Simply add the -t option to ssh to force it:



          ssh -t user@host glances


          Reference:



          ssh man page




          When the user's identity has been accepted by the server, the server either executes the given command in a non-interactive session




          ...




          If an interactive session is requested ssh by default will only request a pseudo-terminal (pty) for interactive sessions when the client has one. The flags -T and -t can be used to override this behaviour.







          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407528%2fhow-can-i-run-glances-over-ssh%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            6
            down vote



            accepted










            Since you've given a single command for ssh to run remotely, ssh did not allocate a pseudo-terminal for glances to use. Simply add the -t option to ssh to force it:



            ssh -t user@host glances


            Reference:



            ssh man page




            When the user's identity has been accepted by the server, the server either executes the given command in a non-interactive session




            ...




            If an interactive session is requested ssh by default will only request a pseudo-terminal (pty) for interactive sessions when the client has one. The flags -T and -t can be used to override this behaviour.







            share|improve this answer


























              up vote
              6
              down vote



              accepted










              Since you've given a single command for ssh to run remotely, ssh did not allocate a pseudo-terminal for glances to use. Simply add the -t option to ssh to force it:



              ssh -t user@host glances


              Reference:



              ssh man page




              When the user's identity has been accepted by the server, the server either executes the given command in a non-interactive session




              ...




              If an interactive session is requested ssh by default will only request a pseudo-terminal (pty) for interactive sessions when the client has one. The flags -T and -t can be used to override this behaviour.







              share|improve this answer
























                up vote
                6
                down vote



                accepted







                up vote
                6
                down vote



                accepted






                Since you've given a single command for ssh to run remotely, ssh did not allocate a pseudo-terminal for glances to use. Simply add the -t option to ssh to force it:



                ssh -t user@host glances


                Reference:



                ssh man page




                When the user's identity has been accepted by the server, the server either executes the given command in a non-interactive session




                ...




                If an interactive session is requested ssh by default will only request a pseudo-terminal (pty) for interactive sessions when the client has one. The flags -T and -t can be used to override this behaviour.







                share|improve this answer














                Since you've given a single command for ssh to run remotely, ssh did not allocate a pseudo-terminal for glances to use. Simply add the -t option to ssh to force it:



                ssh -t user@host glances


                Reference:



                ssh man page




                When the user's identity has been accepted by the server, the server either executes the given command in a non-interactive session




                ...




                If an interactive session is requested ssh by default will only request a pseudo-terminal (pty) for interactive sessions when the client has one. The flags -T and -t can be used to override this behaviour.








                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 28 '17 at 16:25

























                answered Nov 28 '17 at 16:11









                Jeff Schaller

                32.1k849109




                32.1k849109



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407528%2fhow-can-i-run-glances-over-ssh%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?