Thursday, July 25, 2013

Enabling Bluetooth file receiving on Gnome 3.8

Well this applies to Fedora 19. With the default installation you will not be able to receive file from your Bluetooth device such as your smart phone. First of all you need to install the following libraries using your package manager.

gnome-user-share obexfs

Once the above libraries are installed, go into Settings -> Share and enable Bluetooth sharing and make sure you "Save Received Files to Download Folder". After this restart your PC.

Now you can pair your phone with the PC and send files to your PC.

Monday, February 4, 2013

Git branch in bash prompt in bold

If you are using git in your linux box, i'm sure that you wanted the current branch your working to be displayed some where in the bash shell so that you don't need to do a git branch. Well i learnt recently its possible to show the current working branch in your bash prompt. And i wanted it to be highlited in bold which was not the way it was by default. After doing some reading how to customize the bash prompt i was able to get it done.

First you need to have the bash auto completion package installed.

Then you need to add the following line to you .bachrc file to import the git prompt function.

source /usr/share/git-core/contrib/completion/

Then you need to customize the default prompt by adding the following line

export PS1='[\u@\h \W\[\e[1m\]$(declare -F __git_ps1 &>/dev/null && __git_ps1 " (%s)")\[\e[0m\]]\$ '

Now open a new terminal and navigate to a git repo. Your prompt will look like below.