Sunday, May 6, 2012

How To Change Mouse Cursor In Ubuntu 10.04/11.04/12.04 When Compiz Is Enabled

This bug is not fixed from Ubuntu 9.10 then fixed in 10.10 and now is back in 11.04. Found it their in latest 12.04 LTS.

The problem is when you change cursor theme it doesn't change if you have compiz turned on, it changes but it is only visible in some applications i.e. firefox.

If compiz is off then cursor theming works fine.

This instructions will fix this bug:
  1. Download cursor pack.
  2. Extract it as root to /usr/share/icons
  3. Edit as root the index.theme file located in usr/share/icons/default
  4. Change the line Inherits= to the name of your new icon theme
[Icon Theme]
Inherites=DMZ-Black

Logout and login back in, cursor will be changed.


Saturday, April 28, 2012

What was there before all this creation

Sutra 129 of the 10th Mandala of Riga-Veda

In the beginning in the state of flood there was neither matter nor non-matter, neither being nor non-being. At that time there was neither the sky nor the space nor anything beyond . There was no life anywhere nor any source of pleasure. What was there ? And where ? What was the power ? At that time even the solemn water did not exist. There was neither death nor immortality, neither night nor any notion of the day. At that time only one, i.e. Brahma, imbued with energy in his nature was there and nothing else existed. Darkness was hidden inside darkness and the existence was unknown. With the exertion of its own tapas, heat-energy, out of nothing emerged Brahma without external cause or action. This caused the conception of creation and the sages realized the cause of matter in non-matter. Who knows the entire truth and who can speak about this creation ? What are the causative factors of this creation ? The gods have originated after the creation. Who knows the one from which this world has got created. It is not known how this existence has come up. He only knows the one who has unveiled it. Does he bear it or not ? It is not known whether the lord up above knows it or not.

Wednesday, January 4, 2012

Transparent individual window

To make individual window transparent on Ubuntu you will need to install transset or transset-df from repository. Note that you have to be running a compositing manager i.e. Compiz for this to work.

To make a window transparent:
$ transset-df -c
Now click on the desired window
This will make your window 75% transparent.
To reset back:
$ transset-df -c -t
Now click on the desired window
You can additionally get more options in the command by invoking -h for help.

Sunday, December 11, 2011

sTREAMrIDE Ortel Communications

Recently I am finding some serious advertisement business by Ortel Communications.

Issue is:
If you browse any http website you will find an advertisement pooping up just below the page. The advertisement is not being placed by the website owner, rather it is being added by Ortel or by any malicious program in their system. Following is the code found just below the <body> tag of any web page.

<div id="sTREAMrIDE" class="5"></div><script type="text/javascript" src="http://ui.streamride.net/ui.js"></script>

It is communicating with ui.streamride.net for loading the advertisement.

Following is the whois output:
Whois Server Version 2.0
Domain Name: STREAMRIDE.NET
Registrar: GODADDY.COM, INC.
Whois Server: whois.godaddy.com
Referral URL: http://registrar.godaddy.com
Name Server: NS11.DOMAINCONTROL.COM
Name Server: NS12.DOMAINCONTROL.COM
Status: ok
Updated Date: 25-jul-2011
Creation Date: 05-jul-2010
Expiration Date: 05-jul-2012

Registrant:
Envisage Media
L 60/B Basement
Malviya Nagar
New Delhi, Delhi 110017
I
Registered through: GoDaddy.com, Inc. (http://www.godaddy.com)
Domain Name: STREAMRIDE.NET
Created on: 05-Jul-10
Expires on: 05-Jul-12
Last Updated on: 25-Jul-11

Administrative Contact:
verma, saurav envisagemedia.in@gmail.com
Envisage Media
L 60/B Basement
Malviya Nagar
New Delhi, Delhi 110017
India
+91.9958491323 Fax --

Technical Contact:
verma, saurav envisagemedia.in@gmail.com
Envisage Media
L 60/B Basement
Malviya Nagar
New Delhi, Delhi 110017
India
+91.9958491323 Fax --

Domain servers in listed order:
NS11.DOMAINCONTROL.COM
NS12.DOMAINCONTROL.COM

I have complained this to Ortal, let's see what they are doing for some time. Mean while to be safe from this cheater, I have a small personal solution, which you can follow too.


Solution:

Windows users:
Open file: "C:\windows\system32\drivers\etc\hosts"

Linux users:
Open file: /etc/hosts

Add the following code:
127.0.0.1        streamride.net ui.streamride.net

Save it. From now on, your browser will communicate with your local system and will never be able to find ui.streamride.net/ui.js

This is how I am protecting my self.


Thursday, November 3, 2011

Create Domain(s), Subdomain(s) as Virtual Host on Ubuntu

Step 1:
Open using gedit editor or as u like...
sudo gedit /etc/hosts


Step 2:
Add lines like below:

127.0.0.1         localhost
127.0.0.1         mydomain.dev www.mydomain.dev

Now save the file.


Step 3:
Open...

sudo gedit /etc/apache2/httpd.conf

Add the following peace of code:

NameVirtualHost *:80
<VirtualHost mydomain.dev:80>
     ServerName www.mydomain.dev
     ServerAlias mydomain.dev *.mydomain.dev
     DocumentRoot /home/my_user_dir/www
</VirtualHost>

Save the file and restart apache.
Test using your favorite web browser with your vertual domain link i.e. http://mydomain.dev
To restart apache use the following command sudo /etc/init.d/apache2 {start | stop | restart | status}
If you want the sites to be available and enabled to the world, look the following directories:

/etc/apache2/sites-available

This contains configuration files for sites which are available but not necessarily enabled.

/etc/apache2/sites-enabled

This directory contains site files which are enabled.

Example: www.mydomain.com (file inside /etc/apache2/sites-enabled/)
<VirtualHost *:80>
     ServerAdmin webmaster@mydomain.com
     ServerName  www.mydomain.com
     ServerAlias mydomain.com

     DocumentRoot /home/my_user_dir/www/www.mydomain.com
     <Directory />
          Options FollowSymLinks
          AllowOverride None
     </Directory>
     <Directory /home/my_user_dir/www/www.mydomain.com/>
          Options Indexes FollowSymLinks MultiViews
          AllowOverride None
          Order allow,deny
          allow from all
     </Directory>

     ScriptAlias /cgi-bin/ /home/my_user_dir/www/www.mydomain.com/cgi-bin/
     <Directory "/usr/lib/cgi-bin">
          AllowOverride None
          Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
          Order allow,deny
          Allow from all
     </Directory>

     ErrorLog /home/my_user_dir/www/www.mydomain.com/error.log

     # Possible values include: debug, info, notice, warn, error, crit,
     # alert, emerg.
     LogLevel warn

     CustomLog /home/my_user_dir/www/www.mydomain.com/access.log combined

     Alias /doc/ "/usr/share/doc/"
     <Directory "/usr/share/doc/">
          Options Indexes MultiViews FollowSymLinks
          AllowOverride None
          Order deny,allow
          Deny from all
          Allow from 127.0.0.0/255.0.0.0 ::1/128
     </Directory>

</VirtualHost>

You need to save the file and restart apache2, for the changes to be reflected.

Tuesday, October 18, 2011

Get TextMate Features And Styles In Gedit With GMate

GMate is a collection of plugins, themes/styles and other improvements to get TextMate like features in Gedit.

To install GMate in Ubuntu, use the following commands:

sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install gedit-gmate

This package will not replace Gedit! It will only add some themes and plugins you can enable/disable from the Gedit preferences.

For more info and other Linux distributions installation instructions, see https://github.com/gmate/gmate#readme


Tuesday, October 11, 2011

Uninitialized MySQL Constant Fix For Rails 3

If you’re doing local Rails development and are attempting to setup a database using MySQL (specifically, MySQL2) and you keep getting:

rake aborted!
uninitialized constant Mysql2

Here’s the fix to the problem:

From within the directory of your application, issue:

$ gem uninstall mysql2
$ gem install mysql2 

This will make sure that you’re running the most recent version of the gem.

Next, update your Gemfile. Comment out the default SQLite reference and add a line for MySQL:

#gem 'sqlite3'
#gem 'mysql2'

Save the file and finally, rake your database:

$ rake db:create

And that should take care of it.