Tweet automagically when you login command line.

This is simple hack to tweet whenever you open the command line. We are going to use twidge and fortune for this.
The very first thing we need to do is install twidge and fortune.
Step 1 : Install Twidge
sudo apt-get install twidge

Step 2: Configure Twidge
twidge setup
This command will tell you what to do next 🙂

Step 3 : Update twitter status using twidge
twidge update "your status"
Just to test everything is working fine.

Step 4. Now install fortune
sudo apt-get install fortune or sudo apt-get install fortune-mod

Step 5. Now the last step, let twidge and fortune work together.Put the below command in your ~/.bashrc file.
fortune -n 140 | twidge update
We used -n 140 to limit the fortune to 140 char because twitter doesn’t allow more than 140 char.

Now whenever you open your terminal, a tweet will be posted from your fortune file to your account, 🙂
Lots of configure are available in fortune and twidge to tweak your hack.You can even schedule your tweet to post on some specific time.

You can follow this twitter account to get the 140 char fortune probably once in a day 🙂


4 thoughts on “Tweet automagically when you login command line.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s