Skip to content
Jason Charney edited this page Mar 3, 2016 · 5 revisions

🚧 This is a New Page! So it's under construction. I've got so much stuff I want to try out with this.

Ranger is a console file manager with vi key bindings. It provides a minimalistic and nice curses interface with a view on the directory hierarchy. It ships with rifle, a file launcher that is good at automatically finding out which program to use for what file type.

Prerequirements

Obviously, Python and Ncurses are required. To really get the most out of this, you should get urxvt.

You'll also want to install these packages

w3m w3m-img xsel atool toilet toilet-fonts libcaca0 libcaca-dev caca-utils less mediainfo jhead ffmpegthumbnailer highlight poppler-utils

Installation

The binary version that comes with Raspbian is 1.6.1-1. The current stable is 1.7.2.

$ cd ~/Software
$ git clone https://github.com/hut/ranger
$ cd ranger
$ sudo make install

Usage

Ranger is pretty easy to use. Scroll up or down to view the contents of an item. Folders will show what's inside them. Source and text files will show the first few lines of what they have. And images will use w3mimgdisplay included with w3m to draw images directly in urxvt.

Enabling Image Preview

Yes! You read that right! Image Previews. But urxvt, xterm, and st can do this. I just like urxvt more than those others.

  1. Get one of those terminals I just mentioned.

  2. Install w3m with the image drawing feature. Since Raspbian is a fork of Debian, install w3m-img too. All that should have been installed back in the prerequirements section.

  3. In ~/.config/ranger/rc.conf add set preview_images true. If it is set to false or if preview_images is misspelled, the images will be rendered in ASCII-form using the img2txt (part of caca-utils'). So you'll probablly want to have tolietandlibcaca0` installed.

  4. Install the config files in ~/.config/ranger/.

```
ranger --copy-config=all
```
  1. Restart ranger and navigate to an image. Actually you don't need to restart you just need to run it as usually. Simply typing ranger
> :warning: **Warning!** Things will get messy, espeically if `rifle` shows the full size image instead of a preview.  Which this next step should fix.

See Also

Related Links

Setup

  1. [Assemble the Hardware](Assemble the Hardware)
  2. [Install the Software](Install the Software)
  3. 🆙 [Setup your Raspberry Pi](Setup your Raspberry Pi)
  4. [Download the Missing Parts](Download the Missing Parts)

Typical Utilities

  • [Downloading and extracting with curl and tar](curl and tar)
  • [Browsing with ls and cat](ls and cat)
  • [Searching with grep and find](grep and find)
  • [Filtering with sed and awk](sed and awk)
  • [Piping with less, pv, and tee](less, pv, and tee)
  • Monitor your system with htop
  • Multiplex with tmux

Clone this wiki locally