Category Archives: Uncategorized

Learning Emacs

Introduction

In this tutorial, I am going to talk about setting up emacs so that it will be easier for new users to get to their programming or editing tasks without much barrier.

Basics

If you don’t know emacs’s basic keys (at least the movement and editing keys), you need to keep a note of some of the most frequently used ones. You can copy the commands using some websites containing the basics (e.g http://mally.stanford.edu/~sr/computing/emacs.html) or use the list from “Movement” section below.

Continue reading

Leave a comment

Filed under Uncategorized

Toggle keyboard keys in Linux using terminal commands

Introduction

It is easier to use GUI tools to setup keyboard shortcuts, but sometimes you need to map certain keys for typical purpose (e.g swapping caps and esc when using vim). In this tutorial I will try to list different linux tools and scripts that you can use to do these tasks (you might have to install them from your distribution’s repository).

Continue reading

2 Comments

Filed under Uncategorized

Few vim tricks

1. Ctags

Ctags lets you tag your current code and header files. It supports many languages. With tagging, when you are writing code, you can quickly traverse to the declarations and definitions of functions and variables. Once you install ctags in your distribution issue following command to tag source code (after you know where the source code for the library or program you want to tag exists).

Continue reading

Leave a comment

Filed under Uncategorized

X86 disassembly

Introduction

In this tutorial I will list some techniques to understand a basic Linux program. I will use a simple assembly program that uses nasm syntax. Common program format in Linux uses GNU assembler syntax. Therefore, this tutorial does not cover understanding that syntax (which I might do in future). Lets get started.

Continue reading

Leave a comment

Filed under Uncategorized

Fix cracking PCM sound in pulseaudio

Introduction

Most of the times volume in Linux is crisp and soothing. However there are times when you change the volume it collectively increases the PCM volume level and which in some cases can result in cracking sound. The problem is that after the PCM volume goes up it does not come down when lowering the volume level. In this tutorial I will discuss about a small fix that will help you set only one volume slider when increasing or decreasing system volume. In my case both Master and PCM can change the volume level of output sound. Therefore I would like to change only one of them while keeping another fixed.

Continue reading

Leave a comment

Filed under Uncategorized

Minimal Linux setup for kernel development

Introduction

This example can be used to setup a minimal Linux installation for any task. In this tutorial however I am going to use kernel development as an example. Since the process I have used in the past have been from sporadic sources, I wanted to consolidate the information for my own need. This tutorial is the result of that effort. So that next time if I feel like doing something kernel related, I don’t have to start over again.

install

We are going to setup a minimal ubuntu installation (no GUI) for kernel development. Install ubuntu minimal from this link. For this tutorial I will use Ubuntu 12.04 LTS version in virtualbox with 17 GB space. Make sure the architecture (32-bit, 64-bit) matches that supported by virtualbox. In virtualbox select at least 2 cpu and half of system RAM (keep everything under the green line). Since we are going to install necessary package later on, you don’t have to install any special packages during the installation. Skip the package installation step and complete the installation.

Continue reading

Leave a comment

Filed under Uncategorized

Introduction to i3

i3 is a tilling window manager. It is dynamic, fast, and an addictive environment. I have been using it for last 6 months. Once the initial hiccup is dealt with it becomes natural to you and the way you do computing. In this tutorial I will try to explain the basics and help you getting started with i3.

Installation
Since you will eventually be picking up the software you like to use with i3, I am not going to give you a comprehensive list. However, I recommend you install packages like i3-wm, i3lock, i3status, dmenu, rxvt-unicode/urxvt, scrot, xdotool, xclip and feh. I am sure finding these tools in your distribution’s software repository should not be a problem. When you start, i3 will suggest you to copy the config file to your home directory. It will also suggest default mode key. Select Super/Win key as the default modifier. If you have already selected Alt as the mod key, you can change it in ~/.i3/config to Mod4. There are many GUI applications that use Alt as key combination for different operations. Therefore, I suggest you choose Mod4 (Super/Win).

Initial screenshot

Continue reading

2 Comments

Filed under Uncategorized

Install SteamOS in virtualbox

Introduction

In this tutorial, I will talk about installing steamos in virtualbox. The reason, I wanted to do this was to play around and see how they have put together a debian distribution. One thing, I noticed from my installation was, despite valve’s suggestion in their FAQ, I would not recommend executing ~/post_logon.sh after installation, because it removed dkms and necessary drivers, that were necessary to boot the OS. I guess, this step was the step to make steamos boot directly into big picture mode. In our case, you will have to select SteamOS from login manager and login into user account named steam to login to the big picture mode. If you want to run above script anyway, at least make a copy of the vdi file, after you have updated the steam client. File size is no more than 4G, if you have selected dynamically expanding disk in virtualbox. Also, as suggested by some posts, there was no need for me to remove nvidia binaries after installation.

bigpicture

Continue reading

5 Comments

Filed under Uncategorized

ubuntu 13.10 32-bit packages

 Continue reading 

Leave a comment

Filed under Uncategorized

Enable and use open source radeon drivers in a muxless hybrid graphics (Intel/AMD) setup

Introduction

It should be no news to people who have been closely following the open source driver development. This tutorial might be useful to those users who have been unaware of how to enable dynamic gpu switching at runtime. Thanks to reddit user JackDostoevsky, who wrote the steps necessary to set it up. This tutorial is just the re-iteration of that post. Read this post, if you want to follow the discussion. I have taken more conservative approach in this tutorial, therefore if you want to check git versions, follow above discussion. In case of ubuntu, I am using 13.04 (linux 3.8) with xorg-edgers ppa. In a game under wine, this setup was garbage. While in arch, I got better FPS than while using intel graphics card. Though the performance of native games were largely improved. Therefore, in this case, newer versions of driver and kernel are always better.

Continue reading

9 Comments

Filed under Uncategorized