Web

Posting to Identi.ca From Ubuntu 8.04 Using Gwibber Client

Instructions are available on the Internet on how to download and install Gwibber microblogging client(twitter/identica/etc.) on a Debian-based operating system. The Gwibber page on Ubuntu Wiki, for example, has a really long/detailed procedure to install it; below I have documented the quick and dirty procedure that has worked for me to install Gwibber on Ubuntu Hardy Heron distribution(it should work on other Debian-based GNU/Linux distributions with little modifications).

Quickets and dirtiest way:

# sudo apt-get install bzr python-simplejson
# cd $HOME
# bzr branch lp:gwibber
# sh gwibber/run

Go to Accounts -> Create to add your microblogging/social networking account details.

Gwibber Webkit Branch:

Guys on Identi.ca have been recommending installing the webkit branch of Gwibber, so below is a bit longer procedure to get this version of Gwibber installed.

  1. Install the Gwibber pre-requisites. Run the following command in a shell:
    # sudo apt-get install bzr python-cairo-dev python-simplejson
  2. Checkout the webkit branch of Gwibber source code on your machine:
    # cd $HOME
    # sudo bzr branch lp:~segphault/gwibber/webkitui
  3. Change the directory and run the Gwibber client:
    # cd webkitgui
    # ./run

  4. If all goes well, install it:

    # sudo python setup.py install

Go to Accounts -> Create to add your microblogging/social networking account details.

Some Gwibber Tips:

  • You can run Gwibber any time by pressing ALT-2 key and entering “gwibber” as command.
  • If you want to create a desktop shorcut, right-click on the desktop, click on “Create Launcher…” and enter “gwibber” in the command field.
  • If you want to see Gwibber in the desktop panel/tray, select the “Tray Icon” option from View menu.

Screenshots:

Here are a couple of screenshots of Gwibber connected to the Identi.ca microblog.
Gwibber for GNU/Linux supports Digg, Twitter, Facebook, Jaiku, Pownce, Flickr and Identica microblog and social networking web applications.
Gwibber for GNU/Linux supports Digg, Twitter, Facebook, Jaiku, Pownce, Flickr and Identica microblog and social networking web applications.

Witty Twitter + Darrel’s Identi.ca patch = Witty Identi.ca Client

Witty Identi.ca Client?

Finally found some time to play with Darrel Miller’s Identi.ca patch for Witty Twitter client. Good news: it works.

Witty Twitter client patched for Identi.ca.

If you want to try it too, this is what I did:

  1. Checked out the source code of Witty Twitter client using TortoiseSVN subversion client on Windows Vista.
  2. Downloaded Darrel Miller’s Identi.ca patch for Witty.
  3. Applied the patch using TortoiseSVN(no patch/cygwin tools for Windows needed!).
    (I got errors related to ITweet.cs in the patch file, so I edited it manually; http://ur1.ca/0tx. Use my modified patch file if you get similar errors.)
  4. Built the patched Witty source code in Microsoft Visual C# Express Edition 2008(with no configuration changes).
  5. Ran Witty(from “Release” directory), entered Identi.ca login details(alas, you are out of luck if you use only OpenID based login), and there I have all my contacts’ Identi.ca messages :)
  6. I can upload the patched source code/built binary files somewhere if anybody wants to play with it without going through the patching/building business.

So this is fun.

Additional information:
What is Witty: “Witty is a free, open source Twitter client for Windows Vista and XP powered by the Windows Presentation Foundation (WPF). ”

What is WPF: “Windows Presentation Foundation (WPF) provides developers with a unified programming model for building rich Windows smart client user experiences that incorporate UI, media, and documents.”

What is Identi.ca: “Identi.ca is a micro-blogging service based on the Free Software Laconica tool.”

Setting Up Development Environment For Grails on GNU/Linux

In couple of my previous posts, I have explained how to install Grails and required packages to get a Grails development environment on the Windows platform. Continuing the Grails series, the current post explains how to set up a development environment for Grails web application framework on a GNU/Linux distribution. An alternative easier but less flexible method is noted to at the bottom of the post.

To setup Grails development environment on your GNU/Linux box, you first need to install Java SDK and Groovy packages.

  1. Install Sun Java SDK 6 according to the instructions for your GNU/Linux distribution.

    1. For example, in Ubuntu you can install it like this:
      • Make sure that the multiverse respository is enabled. Go to System -> Adminstration -> Synaptic Package Manager.
      • In Synaptic Package Manager, go to Settings -> Repositories.
      • Enable the multiverse repository if not already enabled.
        Enable multiverse and universe repositories in Ubuntu GNU/Linux to see all installable packages.
      • Click the Close button. Click Reload button on the toolbar to reload the package list.
      • In Synaptic Package Manager, search for the “jdk” package(use Edit -> Search or Search button on the toolbar).
        Search for Sun JDK 6 package in Synaptic Package Manager in Ubuntu GNU/Linux.
        Scroll down the result list until you find Sun JDK 6 package, then right-click on it and select “Mark for installation.”
        Mark Sun JDK 6 package in Synaptic Package Manager for installation.
        Click the Apply button on the toolbar to install the Sun JDK package.

      You can also install it from the command line in one simple step:

      # sudo aptitude install sun-java6-jdk

      You can similarly use ‘emerge’ command in Gentoo, ‘yum’ command in Fedora GNU/Linux distributions. You can also simply download the compressed Sun JDK 6 binary archive for GNU/Linux, uncompress it in the home directory and set its bin directory in the PATH environment variables. For more information, read Sun’s JDK 6 installation notes for GNU/Linux(Yes, it’s ugly).

    2. To confirm that Java is installed and available in the system path, run the following commands:
      tabrez@tabrez-ubuntu-vm:~$ java -version ; javac -version
      java version “1.6.0_06″
      javac 1.6.0_06
    3. Create a new system environment variable in your profile file (e.g. $HOME/.profile or /etc/.profile or /etc/environment – whatever you prefer the most) called JAVA_HOME and set it to your Java SDK installation directory path.

      export JAVA_HOME=/usr/lib/jvm/java-6-sun/

      Run the source command to apply the profile changes to the environment immediately without needing a session or OS restart.

      # source $HOME/.profile
      # echo $JAVA_HOME
      /usr/lib/jvm/java-6-sun/
  2. Download and configure Groovy package.

    Download the stable version of Groovy package.
    Download the compressed archive package of Groovy from its download page to your home directory and uncompress it.

    #cd $HOME
    # wget http://dist.groovy.codehaus.org/distributions/groovy-binary-1.5.6.zip
    # unzip groovy-binary-1.0.2.zip
    # mv groovy-binary-1.0.2 grails

    (Remember to download the latest stable version available on the Groovy download page.)

    Create GROOVY_HOME environment variable in your profile file(just like you created the JAVA_HOME variable) and set it to the directory where you have uncompressed the Groovy package. Add Groovy’s bin directory to the PATH environment variable

    export GROOVY_HOME=/home/tabrez/groovy/
    export PATH=$PATH:$GROOVY_HOME/bin

    Check the version of Groovy.

    # groovy -v
    Groovy Version: 1.5.6 JVM: 10.0-b22
  3. Download and configure Grails package.

    Download the stable version of Grails package.
    Download the compressed archive package of Grails from its download page to your home directory and uncompress it.

    #cd ~
    # wget http://dist.codehaus.org/grails/grails-bin-1.0.3.zip
    # unzip grails-bin-1.0.3.zip
    # mv grails-bin-1.0.3 grails

    (Remember to download the latest stable version available on the Grails download page. You can also download the compressed tar version(.tar.gz) if you don’t have the unzip command installed on your distribution.)

    Create GRAILS_HOME environment variable and set it to the directory where you have uncompressed the Grails package(just like you created the JAVA_HOME variable). Add Grails’s bin directory to the PATH environment variable.

    export GRAILS_HOME=/home/tabrez/grails/
    export PATH=$PATH:$GROOVY_HOME/bin:$GRAILS_HOME/bin

    Make the grails command executable and check the version of Grails.

    # cd $HOME
    # chmod +x grails/bin/grails
    # grails -v
    Welcome to Grails 1.0.2 – http://grails.org/
  4. Testing the Grails Development Environment on GNU/Linux.

    Now go to the post that explains how to create a Grails “Hello, World” web application to test if your Grails development environment is properly setup. It is for the Windows platform but I think that you should be able to adapt it to other platforms too. If you get into any problems, check if all the environment variables are properly set.
    Make sure that you have setup the JAVA_HOME, GROOVY_HOME, GRAILS_HOME environment variables correctly to get working Grails development environment.
    You can also post the error messages that you are getting somewhere on the Internet and provide the link to it in the comment section below.

  5. Next: Alternative easy way to set up Grails development environment using package managers

    There is also an easy way to setup Grails development environment using the package managers of different GNU/Linux distributions. Like installing Groovy and Grails packages in Ubuntu using the apt-get command. This easy model has certain limitations though like support only for old versions of Java, Groovy and/or Grails. I will discuss more about it in the next post. Done.

Free Software Community Catching Up to Social Networking Trend

The Free software community has never lagged too behind in any technological development field leaving it completely to the closed platform and service providers to rule the market. The first good GPL software that I came across many months ago targeting the social networking domain was Elgg. I liked it, yes, but more importantly, it confirmed the fact that, it may happen late, but the open source community will sure catch up with the new technology domains eventually if they show the potential to become popular and useful.

Another Free software product that I came across today was Laconi.ca and it powers the microblogging service called Identi.ca.

Identi.ca is a microblogging service. Users post short (140 character) notices which are broadcast to their friends and fans using the Web, RSS, or instant messages.

So Identi.ca is a microblogging service like Twitter, Jaiku and Plurk. Yes, yet another micro blogging service you may say. But is there anything new? From Identi.ca’s FAQ:

Our main goal is to provide a fair and transparent service that preserves users’ autonomy. In particular, all the software used for Identi.ca is Free Software, and all the data is available under the Creative Commons Attribution 3.0 license, making it Open Data.

The software also implements the OpenMicroBlogging protocol, meaning that you can have friends on other microblogging services that can receive your notices.

This is huge. The support for OpenID based login itself had impressed me in no time. Then the whole service runs powered by Free software. It uses the OpenMicroBlogging protocol which means that the other similar services can easily interact with it and the users don’t have to create different accounts with different services leading to isolated communities. (And we have to recourse to poor integration alternatives like Ping.FM and HelloTxt.com).

The service is in its infancy still, so use it only if you want to get a feel of it or submit bug and feature requests to help improve the product. Look at the roadmap to and tell me if you are impressed or not. To host it on your own server/domain, you can download laconi.ca source code from its darcs repository(a tar ball is also available). To see an example of laconi.ca being hosted on a private server, go to Foozik.

[ I was not able to login to Foozik.com using my OpenID account though. I wonder if it was intentionally disabled or if there was a glitch in the service. Russell Beattie, the guy who installed Laconi.ca on Foozik.com, also explains why the current architecture of laconica/identi.ca is not scalable. (Also reproves Twitter.com) ]

Another open source social networking software written using Ruby on Rails framework is RailsSpace, which was originally created as part of the book RailsSpace: Building a Social Networking Website with Ruby on Rails. [ Sidenote: Excellent write-up on how to upgrade Rails applications to Rails 2.1 version: A Rails 2.1 case study: upgrading the Insoshi social networking platform ]

Elgg is another open source social networking web application software that is closer to Facebook in functionality than Twitter. You are supposed to download it and install it on your server. Lot of educational institutes are reportedly using this software.

Mugshot is RedHat’s hosted social networking service. I don’t know how easy it is to get its source code and install it on a private server.

Didn’t satisfy your palate yet? Check the list of 10 open source social networking[1] software on Mashable.com. So see you at Identi.ca, let’s turn the heat on!

[1] term used in the broadest sense of its meaning

Creating “Hello World” Web Application Using the Grails Framework

  1. I have covered the installation procedure of Grails framework in my previous posts:
    Setting Up Development Environment For Grails on Windows Vista/XP and GNU/Linux.

    Just to make sure, check out again if the following environment variables are set properly on your operating system.

    On Windows:
    Set Grails environment variables in Windows
    Set Java HOME environment variable in Windows
    Set Groovy HOME environment variable in Windows
    Set Grails HOME environment variable in Windows
    Set Grails PATH environment variables in Windows

    PATH should be set to something like(you can also check with ‘echo %PATH%’ on the command prompt):
    c:\ruby\bin;C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin;C:\Program Files (x86)\Subversion\bin;%JAVA_HOME%\bin;%GROOVY_HOME%\bin;%GRAILS_HOME%\bin

    On GNU/Linux:

    # echo $JAVA_HOME :: $GROOVY_HOME :: $GRAILS_HOME
    /usr/lib/jvm/java-6-sun :: /home/tabrez/groovy :: /home/tabrez/grails
    # echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/tabrez/groovy/bin:/home/tabrez/grails/bin
  2. Now you are all set to create Grails applications from the command line using your favourite text editor. IDE integration support for Groovy and Grails is not that great at this moment, I will write more about it in the next post. Let me just walk you through the creation of a sample Grails application from the command line.

    Open the command prompt and run the following commands:

    # grails create-app hello
    [lot of text]
    Created Grails Application at C:\Users\tabrez\grails_apps/hello
    # cd hello && dir
    .classpath
    .project
    application.properties
    build.xml
    grails-app
    hello.launch
    hello.tmproj
    lib
    scripts
    src
    test
    web-app
    # grails create-controller hello
    [lot of text]
    Created ControllerTests for Hello
  3. Open hello/grails-app/controllers/HelloController.groovy using your favourite programming editor/IDE(e.g. SciTE, Emacs, Vim) and change its content to look like this:
    Hello World program in Grails and Groovy
  4. Run the web application and view it in the web browser.
    # grails run-app
    [lot of text]
    Server running. Browse to http://localhost:8080/hello
    2008-06-15 15:55:51.363:/hello:INFO: GSP servlet initialized

    Now our application is running at the specified url. To invoke the controller that we had written earlier(Step 3), open the following url in a web browser:

    http://localhost:8080/hello/hello/hello

    And you should see the following output.
    Grails Hello World program output in Web Browser
    (If you are confused about the url: the first hello is the name of the application, the second hello is the name of the controller and the third hello is the name of the action to be invoked. In non-hello-world applications, these three will be different from each other!)

That’s it. You have created and executed your first Grails web application. Next up is IDE integration.

Resources:
For more information, refer to the following resources:
1. Grails QuickStart Guide
2. Grails Tutorials and Screencasts
3. The Definitive Guide to Grails (Amazon)

Go to Top