User Tools

Site Tools


software:cli:ranger

Installation

Main program

You need to install ranger through your package manager or via the source

Dependencies

You can install the following software:

  • python-chardet: in case of encoding detection problems
  • sudo: to use the “run as root”-feature
  • libcaca: for ASCII-art image previews
  • highlight: for syntax highlighting of code
  • atool: for previews of archives
  • w3m: for previews of images and html pages
  • lynx: for previews of html pages
  • elinks: for previews of html pages
  • poppler: for pdf previews
  • transmission-cli: for viewing bittorrent information
  • mediainfo: for viewing information about media files
  • perl-image-exiftool: for viewing information about media files

Configuration

First run

ranger --copy-config=all

Output

creating: /home/warnaud/.config/ranger/rifle.conf
creating: /home/warnaud/.config/ranger/commands.py
creating: /home/warnaud/.config/ranger/commands_full.py
creating: /home/warnaud/.config/ranger/rc.conf
creating: /home/warnaud/.config/ranger/scope.sh

> Please note that configuration files may change as ranger evolves.
  It's completely up to you to keep them up to date.

> To stop ranger from loading both the default and your custom rc.conf,
  please set the environment variable RANGER_LOAD_DEFAULT_RC to FALSE. 

We just copied the default configuration files to our home

First Setup

Image display

You can display images in the terminal! just add/modify in ~/.config/ranger/rc.conf:

# Use one of the supported image preview protocols
set preview_images true

By default it is set with w3m:

set preview_images_method w3m

:!: If the images doesn't show up correctly (as for me) please set:

# Draw borders around columns?
set draw_borders true

VCS display

# Be aware of version control systems and display information.
set vcs_aware true

:!: Works with git/mercurial/bzr :!:
http://lists.nongnu.org/archive/html/ranger-users/2013-03/msg00007.html for a complete explanation

CheatSheet

Key combination for Ranger:

References

software/cli/ranger.txt · Last modified: 2021/12/29 21:09 by warnaud