Adding Google Calendar to desktop (Ubuntu 14.04.3)

conky
What an idea Sirji!

Linux is meant to make you productive. And keeping track of your calendar might be the best way to do that.

This short blog post will summarise the procedure that I applied while adding Google Calendar screen to my desktop. Surprisingly, its very easy to do so.

 

Step 1: Get conky!

Install conky using your distro’s repos. In Ubuntu, this can be done by:

sudo apt-get install conky conky-all

 

Step 2: Install the calendar backend.

We need to use a python utility known as gcalcli, and its dependencies.

sudo apt-get install python-pip python-dateutil python-gflags
pip install –upgrade gcalcli googleapipythonclient vobject parsedatetime

 

Step 3: Authenticate gcalcli

You need to allow gcalcli to pull your calendar automatically. For this, you can run the command:

gcalcli list

This will open in a web browser. Grant gcalcli all the privileges it seeks.

 

Step 4: Add the output configuration file

We need the output of gcalcli in conky-friendly format. Copy this file as in your .config folder.

 

Step 5: Edit conky settings

Now, we just need to setup our conky window and let it know which commands to run. Here’s my config file. Just add it to your Home (~/) folder.

You can edit it as per your requirement using the documentation.

 

Step 6: Add conky to startup programs.

You don’t want to start it up manually each time you login, do you?

Just add conky in the startup applications. (Alt key -> Startup applications)

 

That’s it! Logout and login to see your new desktop 🙂

Known Issues:

The calendar window is superimposed over active windows

For this, I suggest adding this line to the ~/.config/autostart/conky.desktop file

X-GNOME-Autostart-Delay=10

 

Edits and suggestions are welcome.

 

Advertisements

Getting started with Raspbian – First touches

Disclaimer : All the knowledge here has been scoured from the internet.

So I got myself a Raspberry Pi 2 this month. But due to some display connectivity issues (lack of HDMI monitor, USB keyboard,etc) on my part, I was unable to use it.

Finally now though, I have got it up and running. But there are a few customizations (and fixes) that I had to do before it became usable for me.

1. The terminal hotkey 

My number one problem was that there was no terminal hotkey (that launched in the same x session). I sorely missed that, needing to click on the taskbar icon and then shifting onto the keyboard to type the update and install commands.

Adding the shortcut is no biggie. Do the following:

    sudo leafpad ~/.config/openbox/lxde-pi-rc.xml

Find the tag and paste this line just before it:
        lxterminal

and restart.

2. The youtube play icon
 
So there is a glitch in epiphany because of which the play icon of youtube doesn’t really go away.
5 seconds since the video started
So I just installed midori and now that’s my default browser.
 
sudo apt-get install midori
 
 
3. Headphones audio not working
 
This required configuring from the rasp-config utility.
 
sudo raspi-config 
Goto Advanced Options -> Audio -> Force 3.5 mm.
 
 
I’ll keep adding as and when I find something worth sharing.

Add linux like shortcuts to Windows Run

After using Linux for a while, it’s difficult to transition back to windows. One big reason is the absence of command line shortcuts for all programs.

While Linux (Ubuntu in my case) adds a path to all new applications installed from the terminal via sudo apt-get install, Windows doesn’t do it for every program.

You have two options-

1. Add the path of that program manually to the PATH variable of your Environment Variables settings.
Goto Computer->Properties->Advanced System Settings->Advanced->Environment Variables->Path for your Username. You can edit that to add the directory where your program is installed.

2. You can create a shortcut for that program and copy that in any existing folder with a path in the Windows Environment Variables (for e.g. System32).

I found the second one to be easier, since copy+paste is much easier for me.

Github down? Fixed.

Past few days, my internet was sort of down (ping was 2600ms!!!). Today, while it got fixed, I found out that I couldn’t access Github.
A simple fix did the trick. What I did was just changed my DNS servers to Google’s DNS servers, and everything was back to normal again.

Steps (on linux)-

1. Open a terminal & type –

sudo gedit /etc/resolvconf/resolv.conf.d/head  

I use gedit. You can replace it with the editor of your choice. For example, a nano user may write –
sudo nano /etc/resolvconf/resolv.conf.d/head

2. put your nameserver list in –

nameserver 8.8.8.8
nameserver 8.8.4.4

3. Then run-

resolvconf -u

4. Try github.com and confirm if it works.

There is a similar setup in Windows.

1. Just goto Network Places

2. Change Adapter Settings (left sidebar)

3. select your Internet network and right click and select Properties

4. select IPv4 and click Properties

5. Change the fields for DNS server #1 and #2 to “8.8.8.8” and “8.8.4.4” respectively.

I am not sure if it is region related or ISP (MTNL in my case), but changing your DNS to Google’s is anyway a good option.

Make an ISO backup of your Linux distro

Me and Linux have had an on & off relationship for quite a while. Like all penniless people, my broadband bandwidth is small, and thus, updating the distro becomes a pain.

Luckily, I found this –

https://github.com/Distroshare/distroshare-ubuntu-imager

What’s that?

Simply put, its a bash script to copy your current Linux installation into an iso. While that may sound boring, believe me, it’s a godsend. Just run the script after you are satisfied with your current Ubuntu installation (that includes all recent updates, third party apps and settings).

Why?

– No more updates after each new fresh install. Update your distro and save it as an iso and save the time later on.

– Have a ready .iso backup. That’s useful if you wish to make a bootable pen drive or install in a virtual machine.

Steps-

1. Download the ‘.sh’ and ‘.config’ files.

2. Mark the .sh as executable (Properties->Permissions->Execute check)

3. Run the .sh script in root (sudo).

Congratulations! You just saved yourself a shit-ton of configuration and after-installation hassles in the future.