Tuesday, August 12, 2014

Running Counter Strike Source on Linux (native version)

CAUTION: Try this only if you face any problem running the game(s).
Well, it's great news that companies are now releasing Linux version of many games including Valve. They've already made Portal, Half Life and Counter Strike: Source available on Linux. But running them is sometimes a bit tricky mainly when CPU architectures mismatch. I have a 64bit setup while the copy I was trying to run was 32 bit so some libraries were reported to be missing when what it actually meant was, the 32 bit versions were missing. A little bit of research goes a long way.
1. First execute this command in you Counter Strike: Source installation directory (cd into it)
LD_LIBRARY_PATH=bin ldd bin/vguimatsurface.so | grep found
This should tell you exactly which libraries are missing
2. To give you an idea about exactly what is going to happen with the next command, these are the libraries that are need to be installed
lib32-fontconfig lib32-gtk2 lib32-libxi lib32-nss lib32-libpng12 lib32-alsa-lib lib32-pango lib32-cairo lib32-sdl2
So, to install them, type these in your terminal
1. https://bbs.archlinux.org/viewtopic.php?id=169422
2. Torrent page on The Pirate Bay

Monday, July 21, 2014

Some useful Apache web server commands

These are mostly for reference, to find the ones I use the most
Enable module: a2enmod vhost_alias
Enable site: a2ensite vhosts_alias
List enabled modules: apache2ctl -M

Saturday, July 19, 2014

Installing the Atom editor in Linux (Ubuntu)

To install the Atom editor by Github, you do not have any compiled deb/binaries except you use some third party repositories, which I try to avoid all the time. So, while searching for a way to compile this thing and avoid the errors, I found some info on several links that actually helped make it possible.
The steps:
1. Install the necessary dependencies using
sudo apt-get install libgnome-keyring-dev python2.7 git git-core
2. (Optional) In order to ensure that npm is using python2 use this
npm config set python /usr/bin/python2 -g
3. Now get the source and go into it
git clone https://github.com/atom/atom
cd atom
4. Now build it using the command
NOTE: You might need to become root before doing these
You might face problems regarding 'grunt' and 'npm' which means you might not have the latest version of 'npm'. So to install that, first try the command
npm update npm -g
If that does not help then try this
npm update -g
And if none of it helps, use this.
curl https://www.npmjs.org/install.sh | sh
After installing the latest version run the build command again and then it should go smoothly from there 5. Now to make 'atom' a command accessible from /usr/local/bin/atom do this
sudo script/grunt install

1. http://blog.xero.nu/atom_editor_linux_install
2. http://stackoverflow.com/a/6237400/1928610

Wednesday, July 16, 2014

Android ADT Troubleshooting, fixing the libz.so.1 missing problem

There seems to be a common problem when launching the Android ADT bundle in Linux. It gives out a similar error like the following.
2012-06-06 18:44:40 - contactManager] /home/catia/android-sdks/platform-tools/aapt: 
error while loading shared libraries: libz.so.1: cannot open shared object file: 
No such file or directory
I too had this same problem in my Ubuntu 14.04 machine and as always after a simple query in Google, I found the solution through AskUbuntu. Here's what you have to do, run the following command. It installs a specific library that was previously fulfilled using the 'ia32-libs' package of Ubuntu.
sudo apt-get install lib32z1