• Tip Jar

TTYtter, an Awesome Console Based Twitter Client

TTYtter is a great command line Twitter client. To get it up and running to its optimal capabilities can take a little work, especially if you would like to get pop up notifications on your desktop with libnotify. So, here is a guide that will show you how to get it all working. Even if you are normally a GUI only sort of person I would still like to suggest you give it a try. TTYtter is my favorite Twitter client. These instructions work on Ubuntu 9.10 Karmic and later and should work on other systems with minimal modification.
If you are a Vinux user, or if you have added the Vinux PPA, you can install TTYtter by opening terminal and typing:
sudo apt-get update
sudo apt-get install ttytter
To install TTYtter manually with readline support and get the curl package open terminal and type:
sudo apt-get install libterm-readline-gnu-perl curl
Arch Linux users also need the perl-term-readkey package:
pacman -S perl-term-readkey
If you use the readline package above you will need to set your PERL_RL variable. To do this open terminal and type:
gedit .bashrc
When the file opens add the following line to the end:
export PERL_RL=Gnu
Save the file and reload it by typing:
source .bashrc
In 1.1.6 and later, you can install a TTYtter specific readline called Term::ReadLine::TTYtter. To do this, go to CPan and download the package. Extract and install the package by opening terminal and typing:
tar xzvf Downloads/Term-ReadLine-TTYtter-1.2.tar.gz
cd TTYtterReadLine/
perl Makefile.PL
sudo make install
Note that the number in the .tar.gz file will change as newer versions are released.
Now, to download TTYtter:
sudo wget -O /usr/bin/ttytter http://www.floodgap.com/software/ttytter/ttytter.txt
sudo chmod 755 /usr/bin/ttytter
If you do not have system wide access save it to ~/bin/ttytter instead of /usr/bin/ttytter and use chmod 700 instead of 755. It may be necessary to create the ~/bin directory.
If you would like to get everything up and running as quickly as possible with extensions from several different authors, you can download the ttytter-extensions pack. Read this article for more infromation. If you install the extensions, you can visit the .ttytterrc generation page to create the .ttytterrc settings file in a few simple steps. When your .ttytterrc file has been placed you can then start the program by typing:
ttytter
in a terminal. For complete instructions on using TTYtter, commands, menu codes, etc please read the TTYtter home page.
If, however, you want to set everything up manually, read on. TTYtter is now installed but missing some of its coolness. If you were to launch it by typing:
ttytter
You would have to also include some arguments to get it going if you want to use things like readline. It’s much better to save this information in a ~/.ttytterrc file. So, here is the ultimate .ttytter file. If you do not plan to use the notifications with libnotify or libnotifyperl you can leave out the notification and exts lines. Copy and paste the following in to a file called .ttytterrc replace USER with the name of your home directory:
#TTYtter settings
#show replies in timeline
mentions=1
#Open images with Eye of Gnome
avatar=eog %U&
#Open URLs with Firefox
urlopen=firefox %U&
#let TTYtter decide how often to check for new tweets
pause=auto
#Use ANSI color
ansi=1
#Check version on start up
vcheck=1
#Number of retries to connect to Twitter
hold=15
#\r and \n create a new line
newline=1
#answer y or Y to post your tweet
verify=1
#use readline support. Change 1 to a list of followers in quotes for tab completion support
readline=1
#Enable word wrap
wrap=1
#Add the libnotifyperl extension
exts=/home/USER/libnotifyperl/libnotifyperl.pl
#Set notification service(s)
notifytype=libnotifyperl
#Set types of tweets for which you would like to receive notifications
notifies=dm,me,reply,search,default
#end TTYtter settings
The newest method of getting desktop notifications doesn’t require patching libnotify. You can still use that method if you would like, and the instructions are left for reference below this new method. The new way is to use an extension written by Colindean which does notifications using Gtk2::Notify. To get it:
sudo apt-get install git-core libgtk2-notify-perl
make sure you are in your home directory by typing:
cd
and then do:
git clone http://github.com/colindean/ttytter-libnotifyperl.git
The old way to enable notifications takes a little more work. The notify-send package is available from the repository, but for some reason a patch that
adds required functionality has not been added in to the distributed version. So, instead of using the standard package, we have to roll our own. If you are not sure if you already have it installed, in terminal type:
sudo apt-get remove libnotify-bin
To build the libnotify-bin package and apply the patch type the following in terminal:
cd
apt-get source libnotify-bin
sudo apt-get install gtk-doc-tools
sudo apt-get build-dep libnotify
then download this patch. You will probably need to right click the link and select "save link as". After the file has finished downloading:
cd libnotify-0.4.5/
The number in the directory name above may change as new versions are released. If you type libnotify and press tab it should complete the name, then press enter to get in to the directory. Then, apply the patch. My files save in ~/Downloads if your files download to another location you will need to alter the path in the next command to point to the downloaded file:
patch -p0 < ../Downloads/notify-send-support_body_from_file.patch
./autogen.sh
make
sudo make install
I had to restart before notifications worked as expected. Now TTYtter is installed and should work with its ultimate coolness factors enabled. Enjoy, but be warned, TTYtter will be your new favorite Twitter client after five minutes of use. For instructions check out http://www.floodgap.com/software/ttytter/.

Bookmark the permalink.

3 Comments

  1. Pingback: Shell-fm, a Command Line Last.fm Player | Thoughts of a Dragon

  2. good job on the TTYtter update/learned what one of the ttytterrc lines means today…thanks!

  3. Muchas gracias, me ha gustado mucho. Un beso!!

Comments are closed

  • Tip Jar