How to integrate vcprompt with bash shell to show git information in Ubuntu

If you are using git in Linux then you might have hit command ‘git status’ to find out in which branch are we currently on, whether there are any changed contents or any uncommitted changes. Wouldn’t be nice if we can get those git information easily so that we need not hit that command frequently. ‘vcprompt’ is the solution here. You can easily integrate vcprompt in bash prompt so that we can see git information from the prompt itself. Lets discuss some steps to integrate vcprompt in bash. I am using Ubuntu 12.10 here. It should also work in other similar Linux variations.

vcprompt is a script to show version control information in the command prompt. This script is written by djl. vcprompt is heavily inspired by Greg Ward’s original implementation in C.


Requirements: Python 2.4 or later

You can check Python version from following command.

If curl is not installed in your systemm then you have to install curl first.

How to do?

Download vcprompt script and make it executable.

Now we have to setup bash to use vcprompt.For this you we need to modify .bashrc file

Copy the following code and paste it in the end of the file.

Save the file and close the editor. Enter following command.

Hmm…now you get nice looking prompt. If you are in the git working folder then you will see current branch and other git informations.

Dont forget to check README file of vcprompt for more customization options.

How to add Xampp Control panel GUI in Ubuntu 12.10 (Linux)

When you install Xampp in Linux, there is no control panel GUI for starting or stopping the Server and other components in default installation. But you can create easily. This short tutorial is for those who want to add Xampp control panel GUI in Ubuntu 12.10.

How to do?

First you need ‘python-glade2’ for this to work

Now open Terminal and create a new file named ‘Xampp.desktop’

You will get text editor. Now copy following code and paste it there.

If you have installed Xampp for Linux in other than ‘/opt’ folder then change the ‘Exec’ and ‘Icon’ value accordingly.

Change the file permissions so that it can execute.

There is nice and beautiful Xampp icon in your Desktop. If you double-click that icon XAMPP Control panel will open.

7 Best Free Linux Twitter Clients

Many Linux Twitter clients are available for you to make twitting easy and fun. Some clients are native Linux apps whereas some are based on Adobe AIR. This is the list of few best Linux twitter clients you may or may not know. Only native apps are included in the list. They are listed in random order.

  1. Hotot
    Hotot is a lightweight and flexible microblogging client. Its main feature is extension support. Extensions are add-ons that provide additional functionality to Hotot. Images and videos can previewed in this application. Severals Picture share services, like img.ly, twipic, instagr.am, picplz.com are supported. In the video term, Youtube video service are supported. Theming feature of Hotot make it beautiful and pleasant. Other important features of Hotot are Threaded conversation, View Geo Informations, Kismet Firewall, Notification System, Multi-Columns View, Real-time Update.
  2. Pino
    Pino is a free, easy and fast X11 client for Twitter and Identi.ca. Pino uses GTK2 and perfectly integrates into Gnome and XFCE desktops. The goal of the project is to have a tiny, fast and beautiful Twitter client for Linux. Main features includes Timeline, Mentions, Create new tweets and reply to users from your timeline, Custom interval for updating data, Simple and intuitive interface, Main toolbar offers fast access to all of the key functions, Multiple accounts, URL shortening, Notifications, Spell checking, Tray icon, Shows retweets in timeline.
  3. Gwibber
    Gwibber is an open source microblogging client for Linux. It brings the most popular social networking web services to your desktop and gives you the ability to control how you communicate. Main features of Gwibber are Support for many different social networks, combined stream of all your messages, Automatically URL shortening, Built-in search tool and support for saved searches, Optional support for spell-checking, HTML themes to customize Gwibber’s look and feel, Multicolumn user interface for viewing multiple streams.
  4. Mitter
    Mitter is a light weight python twitter client for linux which can also be also used from the console. Mitter comes equiped with a simple, two-tab interface: messages and replies are quickly accessible. Sure, the configuration is basic, and the Gnome-ish interface isn’t anything you haven’t seen before. But Mitter stands out because it can be used from the command line, which is awesome.
  5. Qwit
    Qwit is based on KDE’s QT4 and it is quite feature filled. It supports multiple accounts, and you’ll always see various tabs on the left allowing you to check out your feed, your messages and more. You’ll also notice a “more” button, very useful if you want to keep reading Tweet. The interface can be customized, and the program even includes URL shortener integration. Important features are clickable links in messages, public, replies, custom user timelines and search, caching messages between sessions, replies, retweets and direct messages support, twitpic support.
  6. Twitux
    Twitux is a free and open source Twitter client for GNOME (Linux). Twitux displays your personal messages, your network of friends and public messages. In addition, Twitux also allows you to send new messages and reply to friends. This software is simple, clean, and attractive. Built on the GTK libraries for Gnome, the user interface is sensible and easy to understand. It can display Direct messages, Replies, Friends timeline, Public timeline.
  7. Choqok
    Choqok is a free/open source micro-blogging client for K Desktop Environment. The name comes from an ancient Persian word, means Sparrow. It supports Twitter.com, Identi.ca and opendesktop.org services. Other important features of Choqok are supporting friends, @reply, favorite and public time-lines, support for send and receive direct messages, official repeat/reTweet functions, supporting multiple accounts simultaneously, supporting search APIs for Twitter and StatusNet services, support for Twitter lists, KWallet integration.

How to restore Grub boot loader after installing Windows

If you run a dual-boot system with Linux and Windows, this case generally occurs. Window crashes and you have to reinstall Windows but it wipes out the MBR. Now you don’t see the linux bootloader anymore, so
you can’t boot into Ubuntu or whatever flavor of linux you prefer. I am using Ubuntu so I am here talking about Ubuntu.
So, this will help you to restore grub and get boot loader menu of Linux.
First boot your machine with Live Ubuntu CD. This can be the live installer cd or the older live session Ubuntu cds.
When you get to the desktop open a terminal and enter.

This will get you a “grub>” prompt (i.e. the grub shell). At grub> enter these commands

this will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use
it in the next line (you are still at grub>. when you enter the next 3
commands)

Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1) Next enter the command to install grub to the mbr

Finally exit the grub shell

That is it. Grub will be installed to the mbr.
When you reboot, you will have the grub menu at startup.
Cheers.