Tag Archives: linux

Workspaces in Unity [Ubuntu]

Most Linux distros come with multiple workspaces built-in. Why do people need multiple workspaces? To organize your work of course! You may read a book and take notes in one workspace while browsing the web and chatting on another.

Unity has evolved from a nuisance to a really user-friendly and fun-to-use desktop environment. But, problem -> Unity uses a common launcher to all its workspaces: hence it displays the apps opened in all the workspaces. Where’s the organization here? There’s a bug filed in launchpad addressing this issue at length, but the developers doesn’t seem to find it a priority. If you think this is a concern, please answer ‘Yes’ to the question Does this bug affect you?

Linus Torvalds on Linux and Git

Typical programmer has had an interview with Linus on Linux and Git.

Git has taken over where Linux left off separating the geeks into know-nothings and know-it-alls. I didn’t really expect anyone to use it because it’s so hard to use, but that turns out to be its big appeal.

Of course the interview is imaginary, but it’s worth a read 🙂

SCID in Ubuntu [Chess]

About one and half years back, I wrote about installing SCID in Ubuntu. (SCID is a free chess database application). For those who abhor building from source, Duncan Rosales has left a comment on that post saying that SCID is now available in the Ubuntu Software Center. Good news indeed! Just install by going to the Software Center and searching for SCID, or simply by typing in the terminal:

sudo apt-get install scid

Evernote on Linux

Evernote doesn’t have an official client for Linux. It isn’t likely Linux will get any in the near future either. NixNote (formerly NeverNote) is the popular alternative available. But I just don’t like the interface and all.

I installed Ubuntu 12.04 yesterday and found out about this Everpad which seems to be pretty neat. Not a feature-full client, but it has Unity integration, so you can search notes from the Unity dash etc. There’s an icon in the gnome panel which gives you the latest notes, lets you create new notes and such. At the moment I’m using Everpad and have an Evernote Web tab opened in Chrome as well. Sadly, this seems to be focused on Ubuntu only (at least that’s my guess, not likely it’d run on other distros without major changes).

Find reviews, screenshots and installation instructions in WebUpd8 and Omg!Ubuntu.

Printing is not supported in this printer

This was posted in r/linux three days back. Turns out it’s actually been written by a human. And someone has spoiled the fun by sending a patch to gnome with the correct version of the error message: PostScript is not supported on this printer. That makes sense anyway.

Also discussed in the Comments section is the famous error message “Error: Success”. Apparently this mistake is common due to the fact that errors are communicated via a global errorno variable [source].

if (some_c_function() < 0) {

This can be fixed without much hassle though.

csh woes

One thing I hate about the C Shell is the lack of function support. You’re left with aliases but they don’t work out all the time.

The other I wanted to add the git branch you’re on to the csh (tcsh, in fact) prompt. I tried out adding the following to the .cshrc:

alias GIT_BRANCH_CMD "sh -c 'git branch --no-color 2> /dev/null' | sed -e '/^[^*]/d' -e 's/* (.*)/(1)/'"
alias cd 'chdir !*;set prompt=`whoami`@`hostname`": %~"`GIT_BRANCH_CMD`" > "'
cd ~

But it only works when you cd to the directory. Out of luck when you git checkout, etc. To my knowledge csh has no advantage over bash, so the lesson is to use bash whenever possible.

Elevating privileges temporarily with setuid permission (Unix)

You may have noticed that apart from the read (r), write (w) and executable (x) permissions in Unix, there’s an ‘s’ permission as well. This is called the setuid permission. If you have access to an setuid-enabled file, then you can execute that file with admin privileges even though you’re an unprivileged user. So, s means that the file is both executable and has root privileges.

Unix setuid permission

It’s possible to add enable setuid permission just as you do with any other permission.

chmod u+s filename

Be wary though, mistakenly assigned setuid can cause havoc if some stupid user takes advantage of the root privileges.

Tar archive mnemonic

I’ve always failed at remembering how to create and extract tar archives. But hey, why not create a mnemonic!?

Creating a tar.gz file:

Create Zip File

tar <em>czf</em> newarchive.tar.gz /path/to/file


eXtract Zip File

tar <em>xzf</em> somearchive.tar.gz

You can of course add the v option to turn on the verbose mode. eg: 

tar xzfv <em>somearchive.tar.gz</em>

Or add a -C option to explicitly mention where you’d like the archive to extract to, like this: 

tar xzf <em>somearchive.tar.gz</em> -C ~/ws