RTV (Reddit Terminal Viewer) – A simple terminal viewer for Reddit
Hi folks I am here with another interesting topic called RTV (Reddit Terminal Viewer) – A Simple Terminal Viewer For Reddit. It’s built in python using the curses library.
When it come to CLI utility, I’m very much interested to dig more on that since I prefer CLI (Command Line Interface) most of the time instead of GUI. Not only me, many of NIX guys are there in the same mentality.
RTV stands for Reddit Terminal Viewer which provides an interface to view and interact with reddit from your terminal. It’s compatible with most terminal emulators on Linux and OS X.
Reddit is a social news aggregation, web content rating, and discussion website. Most of the nix website has their own page in reddit, registered users are allowed to submit text posts or direct links, also they can vote submissions up or down. Most up votes page appear on the front page or the top of a category.
How to install RTV in Linux
RTV package is there in Debian based distributions & Fedora official repository, also it available in AUR repository for Arch based distributions. However, others can easily install since it was there in Python repository.
Since distributions official repository offers bit older version, so I prefer to go with pip based installation.
pip is a python module bundled with setuptools, it’s one of the recommended tool for installing Python packages in Linux.
$ sudo apt install python-pip
RHEL/CentOS, use YUM Command to install pip.
$ sudo yum install python-pip python-devel
Fedora, use DNF Command to install pip.
$ sudo dnf install python-pip
Arch Linux, use Pacman Command to install pip.
$ sudo pacman -S python-pip
openSUSE, use Zypper Command to install pip.
$ sudo pacman -S python-pip
Finally, Run the following pip command to install RTV.
$ sudo pip install rtv
How to use RTV
Control Keys : Note down the control keys which is playing major roles in CLI for any applications.
UP & DOWN ArrowTo move top to bottom submissions
Right ArrowTo view the selected submission
Left ArrowTo retrun back
Space BarTo expand/collapse comments
UTo login your account
?To open the help screen
/To open the navigation prompt, where you can type specific things
By default there is no config file for rtv. To generate a new rtv config file run the following command, which place Configuration files to
$ rtv --copy-config
By default it won’t popup any MIME media types like links or image/jpeg or video/mp4, this can be achieved by generating a mailcap file. Also it’s required some additional configuration. Open the mailcap template and follow the instructions listed inside.
Run the following command to generate a new mailcap config file, which placed Configuration files to
$ rtv --copy-mailcap
Once you’ve modified your mailcap file, run the following command to enable it. Now, I am able to play videos from rtv.
$ rtv --enable-media
To open any particular page on start, add
-s option followed by the page url. In our case, we are going to open our page url.
$ rtv -s /domain/2daygeek.com
To Login reddit press
u button and follow the instruction, it will ask you to allow cookie for CLI. Once you accept cookie then you will be redirected to login page. Enter login details and hit login button.