>From f1c20a40e0896cdd559219865daef9f3105accfb Mon Sep 17 00:00:00 2001 From: niku Date: Tue, 25 Jun 2013 00:13:26 +0530 Subject: [PATCH 2/2] test edit: add xpixels and ypixels by hand when TERM is `linux'. --- ranger/ext/img_display.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py index 50d8824..c7891fc 100644 --- a/ranger/ext/img_display.py +++ b/ranger/ext/img_display.py @@ -32,7 +32,10 @@ def _get_font_dimensions(): fd_stdout = sys.stdout.fileno() x = fcntl.ioctl(fd_stdout, termios.TIOCGWINSZ, s) rows, cols, xpixels, ypixels = struct.unpack("HHHH", x) - + if (os.environ['TERM']=='linux'): + xpixels = 1366 + ypixels = 768 +# above three lines added by niku. return (xpixels // cols), (ypixels // rows) -- 1.7.10.4