Sunday, March 16, 2025

Two Linux Twitter Clients: Twidge and Tircd

Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Most Twitter and other micro-blogging clients use the same interface as
Twitter.com, but two new free software clients make Twitter easy to use
from the command-line or an IRC client.

Twidge lets you
send and receive Twitter or Identi.ca updates from the command-line.
Although micro-blogging from the command-line may not appeal to you, the
command-line makes it easy to fiddle with Twitter, and Twidge works well
in shell scripts. For example, you can automate sending updates or
filter out unwanted updates from your friends.

Debian and Ubuntu Jaunty users can install the “twidge” package. Other
users should download the static executable from Twidge’s download page,
run bunzip2 on the file, copy it to /usr/local/bin/twidge, and make it
executable with the following command: chmod +x /usr/local/bin/twidge.
You also need to install your distribution’s cURL package.

At the command-line, setup Twidge by typing the following command:
twidge setup. Tell it your username and password. You only need to
run this command once.

Print a list of your friends’ 20 most recent Twitter updates by typing
the following command: twidge lsrecent. Each update starts with your
friend’s username and ends with their update; for example:

 Hello, World.

You don’t need to keep track of which updates you’ve already read —
Twidge can do that for you. Add the argument “-us” to the lsrecent
command to only show Unseen messages and to Save the I.D. of the last
seen message. For example, run the following command twice; the second
time Twidge only prints new messages: twidge lsrecent -su

To make sure you see all the replies and Direct Messages (DM) addressed to
you, also run the lsreplies and lsdm commands. You can make this easier
by setting a Bash alias:

alias show_updates="twidge lsrecent -us && twidge lsreplies -us && twidge lsdm -us"

By default, Twidge formats your friends’ updates so that they’re easy to
read, but it can also format them so that command-line programs can read
them. The alternative format shows extra details, so Twidge calls it the
“Long format” and uses the -l switch. Long format contains several
columns, described in the Twidge manual, separated by tabs; for example:

1355622395  hardaHello, World.Thu Mar 12 17:42:07 +0000 2009  

You can send updates to your friends using the update command in two
ways. You can type your update on the command line, but you must pass
your update as a single argument and escape shell meta-characters. This
means you must surround your update with quotes and place a backslash
before other quotes or exclamation marks — which quickly becomes
annoying. You’ll find it simpler to to type, twidge update, press
return, type your message, and press return again. Either way, Twidge
prints an error and won’t send your update if you type more than 140
characters.

Follow a new friend using the follow command plus your friend’s
username. To stop following someone, use the unfollow command. For
example, you can follow Twidge’s updates by typing the following
command: twidge follow unixtwidge.

Tircd lets you pretend you’re in an
IRC chatroom with your Twitter friends. It takes more setup than Twidge,
but gives you a more familiar interface in return. It supports friend
subsets and Twitter searches, which Twidge doesn’t, but it doesn’t
support Identi.ca, which Twidge does.

Tircd uses Perl and several Perl modules. Install Perl from your
distribution and any of the following modules your distribution has
packages for: POE, POE::Filter::IRCD, and Net::Twitter. Then run the
following command after removing from it the names of any packages you
installed: cpan -i POE POE::Filter::IRCD Net::Twitter. Download the
Tircd package from the Tircd Homepage,
run tar xzf on it, copy the tircd.pl file to /usr/local/bin/tircd, and
make it executable with the following command: chmod +x
/usr/local/bin/tircd
.

Copy the tircd.cfg file to /etc/tircd.cfg. If you already run an IRC
server on your computer’s port 6667, change the port setting in the
file. You probably don’t need to change any other settings. Start
Tircd by typing, tircd /etc/tircd.cfg.

Connect to Tircd using your IRC client and send your Twitter username
and password. Different IRC clients use different connection commands.
The Tircd manual suggests the command below which works in my IRC
client:

/server localhost 6667 

Warning: if you don’t install Tircd on the same computer as your IRC
client, and you connect to it over the Internet, you will send your
Twitter password unencrypted over the Internet where other computers may
intercept it. At the very least, you should use a different password for
Twitter than you use for your more secure accounts.

After you connect to Tircd, join the #twitter chatroom (channel) by
typing, /join #twitter. The IRC channel topic, usually displayed near
the top of your IRC client, shows the last update you sent to Twitter.
Twidge adds each of your Twitter friends to the chatroom.

Send an update by sending a regular message in the #twitter channel.
Your friends’ updates and replies to your messages appear as regular
messages in #twitter. Direct messages come in as IRC private messages
and you can send a direct message by sending an IRC private message.
Tircd does a great job of making Twitter transparent to IRC users.

Follow a new friend using the IRC /invite command. For example, you can
follow Tircd’s updates using the following command: /invite tircd. Stop
following someone using the /kick command. You can also follow or
unfollow users using Twitter’s website, but the changes you make on the
website won’t appear in your #twitter channel right away.

One of Tircd’s advanced features lets you create a channel and add only
a few of your friends. To create a channel, /join it; to add friends,
/invite them. For example: /join #clients, /invite tircd, /invite
unixtwidge
. Tircd sends updates for the friends you invite to both #twitter
and to the channels you create.

Tircd’s other advanced feature lets you create an IRC channel out of a
Twitter search. Create a channel and set its topic to the search term.
For example, to see all the twitter messages that mention LinuxPlanet,
use the following two commands: /join #LinuxPlanet, /topic LinuxPlanet

Twitter and Linux

If you won’t miss your friends’ graphical avatars and you don’t mind
learning a few new commands, Twidge and Tircd let you use Twitter in
ways very different from the typical Twitter client.

Subscribe to Data Insider

Learn the latest news and best practices about data science, big data analytics, artificial intelligence, data security, and more.

Similar articles

Get the Free Newsletter!

Subscribe to Data Insider for top news, trends & analysis

Latest Articles