Use Reddit In The Terminal With RTV (Reddit Terminal Viewer)

Reddit Terminal Viewer

RTV is a terminal user interface (TUI) for Reddit that allows logging in to your Reddit account, open media using external tools, and much more. The console application is built using Python and the curses library, and runs on Linux and Mac.

Use it so your boss can't tell what you're doing, because you do most of your work on the command line anyway, because it's fast and lightweight, or just because it's cool.

RTV (Reddit Terminal Viewer) features include:

  • Browse Reddit without logging in or by authenticating the application with your Reddit account (OAuth)
  • Easily navigate through the front page, jump to your favorite subreddits, open user pages, browse multi-reddits, search Reddit, etc.
  • After logging in you can compose new Reddit posts or comments, edit or delete comments and submissions, save submissions, view your subreddits and check if you have new messages
  • Open media in your preferred applications
  • Clipboard support for copying submission links to clipboard (requires xsel or xclip on Linux)
  • Supports themes (comes with Solarized Dark and Light, Papercolor, Molokai and Colorblind Dark themes, as well as a monochrome theme)

Reddit Terminal Viewer external media
RTV: comments section + opening a YouTube video with mpv

For commenting and creating new posts, Reddit Terminal Viewer uses your default command line editor, be it Nano, Vim, etc.

While the application is quite featureful, it's missing a couple of things. One important missing RTV feature is the ability to read and reply to comments. Right now it can only notify you that you have new messages, without displaying any information about this. Another missing feature is that it doesn't respect Reddit tags, so for example spoilers are visible.

A RTV demo is available on its project page.

Installing and configuring RTV (Reddit Terminal Viewer)


RTV might be available in your Linux distribution repositories so the first thing you should do is perform a search and see if you can install it from there.

RTV is in the Debian stretch, buster and sid repositories, as well as Ubuntu 18.04, 18.10 and 19.04 / Linux Mint 19 and 19.*. To install it you can use:

sudo apt install rtv

The console application is also available in Fedora 28, but not in Fedora 29 (I'm not sure why). You can install it using:

sudo dnf install rtv

On the RTV project page you'll find installation instructions for installing it on macOS, Arch Linux, and more, as well as PyPi installation instructions that should work with any Linux distribution.

After Reddit Terminal Viewer is installed, you'll probably want to change some of its settings. To do this, run the command below to create its user configuration file:

rtv --copy-config

You'll now find a file called rtv.cfg in ~/.config/rtv. Open this file with a text editor and change the settings to suit your needs. In this file you can set the default subreddit, enable RTV to open external links using programs defined in the mailcap config (see below), change the theme or keybindings, and more.

To be able to open images in videos using external tools, use this command to create the mailcap configuration file:

rtv --copy-mailcap

This creates a file called .mailcap (hidden file) in your home directory. By default, feh and mpv (so install them if they are not already installed, unless you want to change them) are used to open external media, but you can edit this ~/.mailcap file to change this.

Now run RTV:

rtv

Press u to login. Use j / k or / to move up and down. Press to open the selected submission comments, type / followed by subreddit you want to visit to jump to a subreddit, a / z to upvote or downvote. o opens the media in an external tool (if configured), and links in your default browser. You can see all the available keyboard shortcuts by pressing ?.

No comments: