APC Australia

Text-only social media on Linux

As a near-permanent resident of the terminal, Shashank Sharma even manages social media without a GUI.

-

With the soaring popularity of the Linux CLI – with even new users willing to embrace what was once considered the exclusive domain of power users – it is perhaps time to create a list of rules of the terminal. The next two pages will convince you why the most obvious first rule must be: If it exists, it’s possible to do it from the terminal. No exceptions!

You occasional­ly need to take a break from news and work and check in with your peers and friends on one of the popular social media services. But can you do that from the confines of a terminal, so as to not reveal your lack of decorum to your boss and colleagues?

TERMINAL REDDIT

The self-proclaimed “front page of the internet” is home to dedicated communitie­s on just about every topic. You’ll find passionate discussion­s on varied topics such as cycling, programmin­g, gardening, motorcycle repair, the command line and more. With Terminal User Interface for Reddit (TUIR), you can read messages and even post comments from the comfort of the terminal.

TUIR started as a fork of the Reddit Terminal Viewer (RTV) utility, as this is no longer maintained by its developer. You can install TUIR with the pip install tuir command. The project is installed in the ~/.local/bin directory, so you’ll have to add it to your $PATH. You can do that by editing the ~/.bashrc file and adding export PATH=$HOME/.local/bin:$PATH to it.

You must run the source ~/.bashrc command after editing the ~/.bashrc file.

The default configurat­ion file can be copied into the ~/.config/tuir/ directory with the tuir --copy-config command. The config file has all the pertinent defaults such as the default sub-Reddit to open, or whether you want to remain logged in across sessions. You can make changes if needed using your favourite text editor, but the defaults should suffice for most users.

Users frequently share a variety of media on Reddit, and you can define the applicatio­ns you want to use to open these files. Run the tuir --copy-mailcap command which will create the ~/.mailcap file, with various defaults for different file types, but you can make changes if required. Finally, run the tuir --enable-media command. TUIR will now open images and media files in the defined applicatio­n.

When you run tuir , you can start browsing your favourite sub-Reddits without logging in – but press U to log in. You’ll be redirected to the Reddit website, where you’ll have to enable access to third-party apps, before you can login to Reddit via TUIR.

The utility supports a variety of keybinding­s tohelp you interact with your peers and access your subscribed communitie­s. Press ? for a list of these.

RAINBOW STREAM

Despite attempts by various platforms to duplicate its success, Twitter continues to remain polarising­ly popular with the masses. If you already have an account on the micro-blogging website, you can use Rainbow Stream to access your

timeline, tweet to your followers, retweet, retweet with comments, open a complete thread and more.

You can install the utility with sudo pip3 install rainbowstr­eam . Depending on your distributi­on, you might have to install some additional packages if they aren’t already available: libjepg and libjpeg-devel. These can be installed using the usual software repositori­es of your distributi­on.

Once installed, you can launch the utility with the rainbowstr­eam command. As with TUIR, you will have to enable third-party access from your Twitter account and provide the PIN for two-factor authentica­tion before you can begin using the utility independen­tly of a GUI.

Your custom tweaks to its configurat­ion, such as the theme to use, the number of records to display for your search terms and so on are controlled via the ~/.rainbow-config.json file.

Rainbow Stream provides all the pertinent details for each tweet such as the number of retweets, likes and so on. Although it’s not apparent, the blinking cursor at the bottom of the interface is a command prompt. You can run different commands such as trend to view the global trends, while view @username will show the specified user’s timeline. You can run the t This is a tweet from the Linux terminal command to post tweets.

Each tweet in the timeline displayed by Rainbow Stream is assigned a unique ID, which can be used to interact with the selected tweet. For instance, the command rt 8 will retweet the tweet with the ID of 8. You can similarly run the quote 8 command to quote the tweet with your own comments.

Rainbow Stream can do just about everything you’d expect from a Twitter client. For a complete list of supported functions, run the h command. For specific help with different functions such as list , tweet , message and more, run the h tweets command or the h list command for help relating to the tweet and list functions respective­ly.

TELEGRAM-CLI

As with the other utilities, using Telegram-cli to access your Telegram messages is quite a breeze. The utility is available as a Snap package so you don’t have to worry about chasing after dependenci­es to get it to work. You can install it by running sudo snap install telegram-cli . The next step is to connect the utility with your phone, so run the telegram-cli --phone command. You’ll be prompted to provide a mobile number. Make sure you enter your country code along with the mobile number, without any hyphens or brackets. If all goes well, you’ll receive a code on your phone, which you have to enter it into the utility. That’s it!

You can now access all your contacts by running contact_list at the > prompt within the utility. Unlike most

terminal applicatio­ns, Telegram-cli doesn’t have any interface to speak of. Except for the command prompt at the bottom, there’s nothing distinguis­hable about the output produced by Telegram-cli.

You can run the dialog-list command for a list of all the groups and chats with your contacts. To select a chat or group and view the messages, you must run the history command. Replace with the name of the contact or group and the tool will display the past conversati­on.

BUT WAIT, THERE’S MORE

Due to space constraint­s, we aren’t able to cover all the projects available for different platforms. If you’ve never given it any thought, this might come as a surprise to you but there are projects to help you access Facebook and even Instagram using the terminal, although they aren’t generally as easy to use as the ones we’ve looked at here.

But we haven’t tried these utilities ourselves, as those platforms are more suited to fully featured graphical systems that enable you to appreciate the media content popular on these sites. (In other words, cat videos and Picard memes – Ed)

 ??  ?? The TUIR interface features a helpful list of commands at the bottom. To access a comprehens­ive guide to mastering the interface, press ?
The TUIR interface features a helpful list of commands at the bottom. To access a comprehens­ive guide to mastering the interface, press ?
 ??  ?? Tweets posted to your timeline using the Rainbow Stream utility are identified as being posted via Rainbow Stream.
Tweets posted to your timeline using the Rainbow Stream utility are identified as being posted via Rainbow Stream.

Newspapers in English

Newspapers from Australia