Android Emulator Failed to load libGL.so

Android Emulator on my system failed to find libGL.so which was clearly available in both /usr/lib and /usr/lib64 provided by mesa-libGL.i686 and mesa-libGL.x86_64 respectively. Here is the exact problem I had.

After searching Google extensively, I failed to find something that worked for me. The two prominent answers that came back were as follows.

  • Link libGL.so.1 from /usr/lib to the tools‘ lib folder.

    ln -s /usr/lib/libGL.so.1 ~/android-sdk-linux_x86/tools/lib/libGL.so

Source

  • Another person suggested to install mesa-libGL.i686 which I already had installed.

    yum install mesa-libGL.i686

Source

Since they both failed. I tried to install various packages related to libGL and I found mesa-libGL-devel.x86_64.

So to solve Failed to load libGL.so you need to run following command.

127.0.01

While going through #dgplug’s July 16th log I ignored service sshd start and went ahead trying to ssh into testacc which is a test user account. No surprise I encountered an error as follows.

Lessons here is to try not to act smart by skipping instructions.

This reminds me I could replace 127.0.0.1 with localhost and also with my hostname. Previously, on my Arch Linux box I have always append my hostname in /etc/hostname file but since moving on to Fedora and lack of documentation I used systemd to set hostname like hostnamectl --set-hostname <hostname> and didn’t bother messing up with any config files.

This is a nice moment in space and time continuum to catch up on 127.0.0.1. According to Wikipedia, localhost literally means this computer. localhost is associated with IP address 127.0.0.1/8.

I wish there was enough time to go through man pages of all the command we use.

July 16th Log

How to Manage Multiple SSH keys on Fedora KDE?

Passwords are cumbersome to remember and annoying if you have to remember and present several of them several times per session. I started using SSH keys in order to remove the need of regularly entering password whenever I push updates to my github repository or make changes on my server.

This guide assumes that you are using Fedora's KDE flavor. If you are not then you better be. In order to be verbose I have following ssh packages installed on my system.

We will be using several pieces of technology and their short definition are as follows.

ssh – You probably know this but according to man pages it is an OpenSSH SSH client.

ssh-agent – It is the program that runs in background and manages your multiple keys.

ssh-add – This small utility basically unlocks your ssh keys and adds it to ssh-agent.

ksshaskpass – This KDE program will provide a password prompt, through pinentry-qt, in your KDE environment.

That out of the way, it is important that you make sure ssh-agent is auto-started and running on your system. If ssh-agent is running the following command will return a process ID.

echo $SSH_AGENT_PID

You also need to make sure that ksshaskpass is set to ask for passphrase of your ssh keys. The assumption is that it already is. You could run following command to make sure of that.

echo $SSH_ASKPASS

How to generate keys? There are a few strategies that you could employ to have a sane ~/.ssh folder. Mine is to just add the server name to the key file.

ssh-keygen will generate a key of type rsa and save it to file ~/.ssh/test_ssh_keys_# with your email id as a comment. You could have a long list of keys that can be easily identified as github_id_rsa.pub or bitbucket_id_rsa.pub, etc.

You could start using them right away by adding them to ssh-agent by following command.

ssh-add ~/.ssh/test_ssh_key_1

It will ask for your password and then any command you type in your terminal will be executed by your server without login password prompt.

We want to have access to our keys all the time during a session and in all terminal sessions. So we need a script to do that. A little note here is if your read SSH’s documentation $SSH_ASKPASS is only triggered if $SSH_ASKPASS is set and you are not in a terminal session. The easiest way to save your passwords in kwallet so that you are not asked them ever again is by running ssh-add command through KRunner as follows.

You will be asked to enter password for each key. Make sure to check remember password and all your password will be saved in your encrypted kwallet.

Now we need a script to automate aforementioned commands which you will save as ~/.kde/Autostart/ksshaskpass.

These commands will will be executed at the beginning of each session for which passwords are already saved in kwallet and /dev/null is used to suppress any warnings.

Also make sure to correct file permission of the auto-start script.

chmod 755 ~/.kde/Autostart/ksshaskpass

You log-out and log-in and you have access to all your keys without entering a single password.

You can easily check which keys are unlocked by and being maintained by ssh-agent by running following command.

ssh-add -l

Update:- It is a good idea to chmod ~/.ssh folder, key files, config, and authorized_keys on server.

#dgplug

I have officially decided to become a hipster and join #dgplug. My knowledge of computer science has serious gaps in both technical level and social level due to lack of formal training in computer science. I am hoping #dgplug could fill up that space.

I came to know about #dgplug through an ambitious post by Kushal Das on Planet Fedora. I actually came to know about several of these Indian open source communities through Planet Fedora and mailing list. I followed through and registered to the course.

The training started late June. We have come to learn a lot of stuff including how to communicate on IRC and mailing lists, basic Linux commands, vim text editor, file system hierarchy, reStructuredText, and personal lives of a few developers and past participants of #dgplug.

As far as communication, basic Linux commands, and file system hierarchy are concerned, I am already well versed in it. I also got to know how to use Git as a result of previous MOOC I took.

I have been a Markdown fan. Markdown is such a simple tool which makes commenting on internet a pleasurable experience. I knew about reStructuredText but Github, Reddit, and several websites that I use already use Markdown so it became a natural choice to me. As we looked into reStructuredText in #dgplug I came to realize it is pretty handy and probably more powerful than Markdown. I plan to seriously pursue it in future.

I am personally moved by beginning of developmental careers of several contributors who are participating as mentors. You have to read IRC logs to get the full juice. I think it is nice of the contributors to spend their free time teaching us.

One suggestion I could give #dgplug maybe is to post class notes in form of slides beforehand so that folks can work on them at their own pace and sort out their problems. It can take too much time to participate in the IRC sessions daily. Although from now on IRCs will be thrice a week.

In the end #dgplug makes me wish if there was a local lug I could go and participated personally.

Purpose of Blogging

I have been blogging for many years. It goes back to the time I wanted to write secretly on the web, yeah. As far back as I can remember my official blog started with writing film reviews. I wasn’t popular at all but I did it consistently and I enjoyed it.

I think about purpose of blogging over and over. My personal hero Matt Mullenweg’s blog has always been a source of inspiration. His blog has a linear flow where he posts anywhere from a line, a quote, or a full post. Sometimes I think that when someone visits my website I would want it to be a place to tell the visitor everything about me. I want a mix of static page and a blog of constant thought experiment. So far I have failed to materialize it.

One of the problems I have with blog that run page after page is that their is no way to tell what is important for visitors to know. To be realistic some posts are going to be purely bad and some are going to be nicely written and the flow of blog should not disrupt that. I think same problems are valid for new aggregating sites like Hacker’s News and Reddit. Unless you are a regular reader you will miss things. And on missing things I think google does the best job of finding relevant information better than any of us.

This little mental exercise makes me realize that I should create a website that is primarily a blog but a top or bottom or side panel could bring the visitors to the right information.