Friday, March 27, 2015

Linux: search history by up/down arrow keys

In shell, if you want to access the last used commands you can use the up and down arrow keys.
But, if you want to search through the history you have to use the 'Page Up' and 'Page Down' keys. I find it very annoying to use two different set of keys which almost does the same purpose.

How to fix it ? Go to ~/.bashrc and stick these two lines...

bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'

Now you can go through the history sequentially using the up and down arrow keys and
if you type in a letter and press up/down arrow you will search the history for the commands starting with that letter you typed in. Have fun!

Thursday, March 26, 2015

Study # 8

Here is the link to the original photograph. Like how the light is playing around on this simple toy.
Spend 3 hours on this guy. Done in Mypaint 1.1.1-alpha on centos 7.

I recently compiled the latest version of mypaint from git on centos 7.
It is fantastic. Got some amazing new features.
Will explain the compilation process and the new feature in the next post.

Monday, March 23, 2015

back to studies # 7

Its been long i did any studies.
As usual, used mypaint, no color picking and grid. Try to get as much as i can visually. Spend roughly 2 hours.

Wednesday, March 4, 2015

Copy current working directory in shell using hotkey.

In Linux we constantly deal with file paths and moving stuff around in shell. One thing that I've always wished is to have a shortcut key for copying the current working directory. Traditionally I will be doing this...

> pwd
> returns/the/current/working/dir

Leave keyboard, double click the path to copy it using mouse then back to keyboard and move to another tab and paste it with ctrl+shift+v and resume with the work.

Because I do this all the time and will also be helpful for fellow artists at work I wrote a small shell script and stick it in my bash.

bind '"\eOR":"echo -n $(pwd) | xclip -selection clipboard \n"'

With this, I just press F3 and it copies the current working directory to clipboard and I move to the next tab and past it with out moving my hand from the keyboard. Yeah!!


For centos you need to install xclip. Run Sudo yum install xclip

Copy the bind line above to your ~/.bashrc. My shortcut key is currently configured to function key F3. You can configure yours by replacing the OR with the escape code for the respective key combination you want.

Hope its of some help.

Tuesday, February 24, 2015

setting up wifi on raspberry pi

Its fun to work on Linux but it would also be a frustrating experience if you make some wrong choices. Last time when am on Linux mint, I wanted to set-up wifi on my desktop. So, blindly went to a local store and got  netgear wna 2100 with out doing much research on the net about the driver compatibility and I paid the price. I had literally spent a week trying out different approaches to get it recognized, but in vain. I tried the last option of using the windows drivers for linux using ndiswrapper but couldn't.

So, this time I did a lot of search on the forums and found that  edimax EW-7811Un wifi dongle has the maximum support for rpi and Linux in general. The setup is straight forward... if you have updated your Linux recently you don't need to download or compile anything. Check this page for quick setup guide.

Here is the pi with WiFi dongle on my desk... :)

Ok, once you have configured wifi you need to know the ip to ssh into it.
On centos you can install a small nifty tool called nmap.

$  sudo yum install nmap.

then run

$  npm -sP

This will return a list of all the devices on the network.
Now you can test out a few of the ips by trying to ssh pi@ipaddress and find out the ip of pi. 

If you don't want to do the witch hunt every time you connect pi to the network you can setup a static ip and use that every time. Check this tutorial on how to set it up. Its pretty simple and straight forward.

Using the same process I have set up multiple networks for both the ones at office and home and just plug it into the power source and ssh from my pc.

Friday, February 13, 2015

Mari Sublime

Sublime is my choice of IDE. Its a breeze to work with sublime. I have written a sublime plugin to easy out code execution for mari.

Get Sublime:

Though sublime is commercial you can grab an unlimited trial version from here.
It just requests you to buy license one in a while but not at the level to irritate you. The installation is straight forward.

Download Mari - Sublime:

You can download mari Sublime over here... mari-sublime

Install Mari-Sublime:

Extract the archive.
In sublime go to preferences > Browse packages.
Place the extracted folder in the sublime packages folder.

Enable command port in Mari:

To execute the scripts inside mari you need to enable the command port.
You can use this script to toggle command port. not ( )

If you enable command port you will see a plug icon in the bottom right corner.


Select a code snippet and press ctrl + m. Only the selected code will be executed in mari. To execute the whole file deselect everything and simply press ctrl + m.

Happy coding !

Thursday, February 12, 2015

Hyderabad Blender User Group Meetup

I recently conducted the blender user group meet up in Hyderabad. This is the first of the sessions to happen in Hyderabad.

Hyderabad has a good blender user strength. I have lot of friends who are dedicated blender users and there are couple of friends who went ahead and made blender the main tool for their studio.

It's always difficult to conduct the first session. You don't know the kind of people who comes and their level of expertise. Roughly 25 people turned up out of the 60 registered. Most of them are new to blender and cg as well. l took this session as a chance to explain people what blender is and what kind of stuff it can do, its strengths and the feature set it got.

Sravan nunna explained how he made the intro video for the meetup.

I started teaching blender at our studio and he picked it up pretty quickly, in a matter of few days not only he did the complete animation in blender but also modeling, shading, lighting and layout. I helped him a bit with the modeling and shading bit i was truly amazed at the pace he picked up blender for a guy who is doing just animation that too in proprietary software like Maya and voodoo.

He really liked blender and was really impressed by the animation toolset it has got. I would say, its a huge thing to come from an animator who is used to voodoo which is said to be an animation production beast.

And he did an amazing logo for the group.

From the people I met over there I see most of them are interested in gaming and want to have a hands on experience of doing things instead of lectures.

Yeah, why would any one wants to go to a lecture session when they can log into YouTube and watch hours of video tutorials. So for the next meet up we are planning for a practical session on modeling a game character in blender.

Wednesday, February 11, 2015

Mari Tools: send to mari

This is a small tool which will help you to send the selected images in you file explorer to the current opened projects in mari. Its the right click > "open with" tool which all the softwares have and is missing for mari.

Download the zip file and follow the steps for installing.

1. Install the
Place the script in your Scripts directory, which will be in the same path as your mari logs directory. Make sure the file is executable.

1. Install

Copy the file to the Same Scripts director mentioned above. Restart mari. You can toggle command port through "Python > Toggle command port".
If the command port is enabled you will see a plug icon in the bottom left area.

3. Modify Right click menu:
Finally we are going to modifying the right click menu of the file explorer.

In Linux the file manager of choice is Konqueror. You can use the similar approach in other browser like dolphin. In kde you have to create a .desktop file. I won't go into explaining the whole procedure. You can refer the tutorial here...

In the .desktop file modify the last line Exec= with the path to the file and copy the .desktop file to '/usr/share/services/ServiceMenus/'. The path might not be exactly the same as it depends up on your Linux distribution.  

Now.... reopen konqueror.
Select a bunch of images and right click and choose Send to Mari. The selected images will be added to the image manager in current mari session.

Gotchas... make sure you have a project open before sending the image and command port is enabled in mari.