I mostly do anything with computers headless. Yes I have a borrowed laptop running win7 but apart from IM, browsing, word processing & the odd vnc window most of the windows on the laptop are ssh sessions to various computers around the apartment and the world so i’m always on the lookout for programs & utilities that let me perform my tasks remotely over ssh. Twitter had always been a problem as I really didn’t like any twitter client at all other than via a web browser and the ones that it was possible to run over ssh (even just using links2) are particularly poor at least IMHO. However, I recently stumbled across rainbowstream and decided to give it a go and on the whole I am really happy with it. It can’t do a few things that i’d like to be able to do like add photos to the tweets (although it might be possible and I just haven’t found out how to do it yet due to lack of RTFM’ing) but I can do almost everything else including view pictures in tweets through raimbowstreams use of Pillow to do something like shellpic
although sometimes it does require a lot of squinting and imagination
rainbowstream is pretty easy to install as it’s pipable although you will need to install libsqlite3-dev library and if you are really going to use it headless and don’t have a vncserver on the computer your are going to run rainbowstream on or an X server on the computer you are going to ssh from then you’ll also want to install links2 on the computer that will run rainbowstream so that you can auth rainbowstream with twitter so you can see the pin number that twitter will send you.
Once you’ve installed all the requirements and pip’ed rainbowstream
sudo apt-get install libsqlite3-dev sudo pip install rainbowstream
and waited a while for all the bits and bobs that rainbowstream uses are downloaded, built & installed. Go make a cup of tea and when the water has finished boiled & the tea has steeped rainbowstream should be installed.
The first time you run rainbowstream
it will quickly popup a message saying
[email protected] ~ $ rainbow Hi there! We're gonna get you all set up to use Rainbow Stream. In the web browser window that opens please choose to Allow access. Copy the PIN number that appears on the next page and paste or type it here:
and will then popup a webpage in links2 (or if you are in a GUI session your default graphical browser)
write down the pin number and if you are using links2 press q to quit links2 or if you are in a GUI session give focus to the term window you started rainbowstream in and enter the pin number. Once you’ve done that rainbowstream will save your oauth info in the file ~/.rainbow_oauth and continue on to the client proper. (while the file .rainbow_oauth exists rainbowstream will remained auth’ed with twitter and you’ll not have to enter the pin again.
you can now press h to get help or wait for the next tweet in your stream to appear or if you are too inpatient type home 7 to see the last 7 tweets or home 4 to see the last 4 or …
this current session will not display images on the terminal so if you want to view images in rainbowstream quit this session (press q) and restart it by typing
and then tweet to your hearts content.
There is one word of warning I should give though. the help says to change the theme you type theme <theme name> and that to get a list of themes you can use type theme however if you type theme on it’s own to get a list of themes don’t quit without choosing a theme and typing theme <themename> as if you do then the next time you run rainbow it’ll error with a db error and you’ll need to uninstall and reinstall or delete ~/rainbow.db before it’ll work again correctly without erroring.