Installing f.lux on Ubuntu 16.04

  1. sudo apt-get install git python-appindicator python-xdg python-pexpect python-gconf python-gtk2 python-glade2 -y
  2. cd /tmp
  3. git clone "https://github.com/xflux-gui/xflux-gui.git"
  4. cd xflux-gui
  5. sudo python ./setup.py install
  6. Type
    fluxgui

    in terminal to launch the application.

Advertisements

Managing VIM Plugins with Vundle

The vanilla VIM editor that comes pre-installed with Ubuntu is vim-tiny and not full vim. You can verify this by typing the following command in a terminal:


dpkg -l vim*

To install full fledged vim type:


sudo apt-get install vim

Vim is one of the most popular text editors in the *nix world. Its functionality can be extended by installing plugins and there are thousands of such plugins out there. Vundle is a plugin manager for vim much like pip is for Python. To install Vundle you will first need to install Git:

 

sudo apt-get install git

 

Clone Vundle:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Go to your home directory:

cd ~

And create the .vimrc file:

vim .vimrc

On top of the file put the following code:

set nocompatible " be iMproved, required
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
" Put your non-Plugin stuff after this line

To add more plugins add them below the line:

Plugin 'VundleVim/Vundle.vim'
but before:
call vundle#end() " required

For example if you want to install the plugin YouCompleteMe, your .vimrc will look like:

set nocompatible " be iMproved, required
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
" Put your non-Plugin stuff after this line

After adding the name of the plugin to the .vimrc file you have to open vim and in the command mode type:


:PluginInstall

Similarly, to update the plugins:


:PluginUpdate

To list all plugins:


:Plugins

To search for a specific plugin:


:PluginSearch! plugin_name

To see all installed plugins:


:PluginList

To remove a plugin, first delete its entry from the .vimrc file and then issue the following command:


:PluginClean

Further Help:

Installing PyDev and Eclipse in Ubuntu 15.04

Before installing PyDev and Eclipse in Ubuntu 15.04 make sure you have java installed. To check whether java is already installed in your system type:


java -version

If java is installed you will get an output similar to the following:


openjdk version "1.8.0_45-internal"
OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

If not then you will have to install java by typing:


sudo apt-get install openjdk-8-jdk

Then download the appropriate Eclipse Installer. After the downloading is completed, go to your Downloads directory and extract the tar.gz file just downloaded. Go inside the directory eclipse-installer, right click on the file eclipse-inst and click Run. The following window will appear:

Screenshot from 2016-04-19 12:39:17

Select one of the options and follow the on-screen instructions. Once the installation is finished, the last screen will provide you with an option to launch the application.

Once you are in Eclipse go to the menu Help –> Install New Software:

Screenshot from 2016-04-19 12:45:21

Click on Add:

Screenshot from 2016-04-19 13:14:51

In the Name filed type PyDev and in the Location filed type http://pydev.org/updates as shown below:

Screenshot from 2016-04-19 13:20:10

In the Work with field make sure to select PyDev site and check the item called PyDev in the list below:

Screenshot from 2016-04-19 13:23:52

Click on Next, confirm your selection and accept the license agreements before clicking on Finish. To verify the installation, start a new project and select PyDev Project:

Screenshot from 2016-04-19 13:30:56

Do a Quick Auto-Config for setting up the interpreter. Once the project is created, create a new file with .py extension. Write some Python code and click on Run.

Further Help:

Wikipedia Summarizer

I along with my student Irak Rigia designed a terminal based Wikipedia article summarizer for the technical exhibition (Inception) of our college’s annual techno-cultural fest KaalRav 2016 which was held during 4-6 March 2016. The script is written entirely in Python. I think I am falling in love with Python. You can check out the script at https://github.com/saprativa/wikipedia-summarizer. Feel free to download, use, modify and share the code. If you love it, please let us know.

Nokia E5: Unable to Create Mailbox [Solved]

If you are unable to set up your Gmail, Yahoo! Mail, Hotmail, Rediffmail, etc., etc. on your Nokia E5’s email setup application (also known as Nokia Messaging) then this is the right place for you. This took me a couple of days of frantic searches all over the Nokia discussion forums and Google. Finally, I figured out a foolproof workaround.

There’s a bug in Nokia’s preset configurations which doesn’t allow the mailboxes to be created. So we will fool Nokia and enter the settings manually (don’t worry, its real simple).

So here is what you should be doing:

  1. Enter e-mail setup.
  2. You will get some short description about Nokia’s privacy policies, don’t even bother to read those because we are not going to involve Nokia or its servers for setting up our mailboxes (remember I said “manually”).
  3. Press “Start“.
  4. Your E5 will now start preparing for setup and take you to a screen having all different preset configurations for Ovi Mail, Yahoo! Mail, Gmail, Hotmail, Rediffmail, etc., etc.
  5. Scroll down and you will find “Other“. This is what we are going to use.
  6. On selecting “Other“, you will be asked to enter your email address. The real fooling trick starts here. Let us suppose we want to setup Gmail and our email address is silchar@gmail.com. Instead of entering the actual email address we will enter silchar@abc.com. If we enter gmail.com after the @ sign then Nokia will use the preset configuration for Gmail and this will defeat our whole purpose of going manual.
  7. Now it will prompt you to enter your password. You can enter your correct password here.
  8. Nokia will now try to validate your email account. Fortunately it can’t because we entered some self-made-up domain (abc.com).
  9. Now you will get three options: Mail for Exchange, POP/IMAP and Lotus Notes Traveler.
  10. Select “POP/IMAP“.
  11. Before going to the next step on our Nokia E5, we will get hold of a browser and open our Gmail Account to set up POP/IMAP. For this we will have to go to the Forwarding and POP/IMAP tab under Mail Settings. Now enable POP/IMAP/both.
  12. I am a big fan of IMAP. So, I will be setting up IMAP access on my E5.
  13. On selecting “POP/IMAP” we will get to the screen where we have to enter all the settings manually. The first and second fields named E-mail address and User name will now contain the value silchar@abc.com. We need to correct both the field values and enter silchar@gmail.com (replace abc.com by gmail.com).
  14. We don’t have to edit the Password field as we had already entered the correct password in Step 7.
  15. Enter the following details in the rest of the fields: 

    Mailbox type: IMAP 4 

    Incoming mail server: imap.gmail.com 

    Incoming mail security: SSL/TLS 

    Incoming port number: 993 

    Outgoing mail server: smtp.gmail.com 

    Outgoing mail security: SSL/TLS 

    Outgoing port number: 465

  16. Click “Save“.
  17. Nokia will now successfully create the mailbox for you.

This method will work for other email services as well. You will just need to enter the correct settings in the respective fields.  Do leave comments if this works for you. Happy E-mailing 🙂