Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ch05 "display" not working on Ubuntu 20.04 LTS | Optional Solution #127

Open
MaximilianSoerenPollak opened this issue Jan 19, 2022 · 0 comments

Comments

@MaximilianSoerenPollak
Copy link

In Chapter 5 where the rush plot is created and subsequently displayed, on my ubuntu machine (20.04 LTS) this is causing an issue.
Line in question:

$ rush plot -x value -y count --geom col --height 2 fb.csv > fb.png
$ display fb.png

The Issue is that the command line tool "display" is not by default installed, and when installed via
sudo apt install imagemagick
it still needs an X window server to function, which I could not get running on my ubuntu machine.

I have however found a different command line tool, that does the job although a bit more rudimentary.

It's called "caca" and can be installed by doing this.
sudo apt-get install caca-utils
!Note, please do this in the terminal where the docker is active, and then restart the docker container, so it has access to it.

After you have done this, you can then go ahead and open any image with
cacaview /PATH/TO/image.jpg (make sure the terminal is big enough)

The other option you have is to display it in-line with the other command line tool: img2txt
img2txt fb.png

This will display the image inside the terminal without opening up an "in terminal window".

Original Image
Original Image

Img2txt
img2txt Render

I hope this helps somebody out who was stuck there like my, maybe in future revisions there can be a note that "display" does not work on Ubuntu (out of the box) and either how to fix that, or what else to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant