InfuseAI / colab-xterm

Open a terminal in colab, including the free tier.
Apache License 2.0
351 stars 31 forks source link

Error when trying to display an image in the terminal #14

Open nnWhisperer opened 2 weeks ago

nnWhisperer commented 2 weeks ago

Hello, I want to view an image in xterm, for reasons below. To display an image inside a terminal, I tried several options and none of them worked. Do you have suggestions?

  1. using fim: ioctl VT_GETSTATE: Inappropriate ioctl for device (not a linux console?) open /dev/fb0: No such file or directory
  2. using feh: feh ERROR: Can't open X display. It is running, yeah?
  3. using w3m-img: black screen saying "Hit any key to quit w3m:".

Reason I want to use xterm to display an image is, that image is updated by another process, hence I want to display image by updating it periodically, like with using the "watch $cmd" command that runs a command periodically. But first, I need to manage to display an image in terminal. Thank you

popcornylu commented 2 weeks ago

Hi @nnWhisperer

  1. Put your image in the /content folder

    Example:

    curl -o img.png https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
  2. Find your image in the FILES in the sidebar and open it. image

nnWhisperer commented 2 weeks ago

It doesn't update dynamically; !curl -o img.png https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png !curl -o img.png https://www.pngall.com/wp-content/uploads/8/Sample-PNG-Image.png The displayed img.png image isn't updated.

popcornylu commented 1 week ago

Sorry, non-terminal functionality is not something that colab-xterm is designed to handle. You may need to look for other Colab plugins that can address this issue.