0

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 ?

6

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.