Question

Enabling framebufferr without X

I’d like to view images and graphics in a shell/terminal/command line without X.

Because I’d like to set up a fully remote development environment, and Emacs’ Org-Mode uses PNG files to render LaTeX and of course to plot images, I’d like to be able to view simple PNG files in terminal mode.

Now, I can install a desktop, like Unity or a more lightweight one, and then use that to run GUI Emacs (or surf the internet for that matter). That works for rendering images. But it is more resource-heavy than I’d like.

I know this can be done with ImageMagick, Dvipng, or more probably fbi or fim, if I can get the framebuffer to work. Those tools work from the command line without an X window.

Is this possible? I’m working on an Ubuntu 14.04. Thanks!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

even xvfb would still require X so I would recommend going with a lightweight X.org based solution. This script can be used from the CLI or as a user-data script on the create page and will set up a super lightweight remotely accessible X.org desktop:

#!/bin/sh
export DEBIAN_FRONTEND=noninteractive;
apt-get update;
apt-get -y install blackbox xterm;
add-apt-repository -y ppa:x2go/stable;
apt-get update;
apt-get -y install x2goserver x2goserver-xsession;

(If you run this as a user-data script it may take 5+ minutes to complete after your droplet comes online, you can view it’s progress if you log in before it completes with tail -f /var/log/cloud-init-output.log (use Ctrl+c to stop tailing the file).

Once this script has finished running you can connect to it with the X2Go client. Select a “Custom Desktop” instead of one of the pre-defined options and enter “blackbox” as the command to run.

This will give you a window manager. Right-clicking the desktop will display a menu with one option being to start up xterm.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This comment has been deleted