Posts Tagged ‘ubuntu’

Upgrading Ubuntu 2.6.17-10 to 2.6.17.11 broke Wireless

Tuesday, April 13th, 2010

Upgrading Ubuntu 2.6.17-10 to 2.6.17.11 broke the wireless on my laptop. I use Prism 2.5 on
a Compaq Presario 2500. The following is the fix:

  1. sudo gedit /etc/modprobe.d/blacklist
  2. add the following lines:
    blacklist prism2
    blacklist prism2_pci
    blacklist hostap_pci
    blacklist hostap
  3. save and reboot

This fix is from http://www.ubuntuforums.org/showthread.php?t=358004&page=6 .

Python and Apache on Ubuntu (Edgy)

Tuesday, April 13th, 2010

See http://ubuntuforums.org/showthread.php?t=91101

  1. apt-get install libapache2-mod-python
  2. cd /etc/apache2/mods-enabled/
  3. sudo ln -s ../mods-available/mod_python.load mod_python.load
  4. sudo nano /etc/apache2/sites-available/default
  5. Add to the <Directory /> :
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
  6. sudo /etc/init.d/apache2 restart
  7. Test using the following python script:
    def index(req):
    return “Hello Python!”

Install phpMyAdmin on Ubuntu (Edgy)

Tuesday, April 13th, 2010
  1. apt-get install phpmyadmin
  2. Add to /etc/apache2/apache2.conf:

    Include /etc/phpmyadmin/apache.conf

  3. restart apache

Apache .htaccess on Ubuntu (Edgy)

Tuesday, April 13th, 2010
  1. Open /etc/apache2/sites-available/default
  2. Go to section: <Directory /var/www>
  3. Change AllowOverride None –> AllowOverride AuthConfig
  4. Save and close
  5. Create following directory: /usr/local/apache/passwd/passwords
  6. htpasswd -c -s /usr/local/apache/passwd/passwords <user>
  7. Create a .htaccess file inside your secret directory
  8. Put following in .htaccess:
    AuthType Basic
    AuthName “Restricted Files”
    AuthUserFile /usr/local/apache/passwd/passwords
    Require user <user>
  9. Restart Apache: /etc/init.d/apache2 restart

How to Clean-up Grub in Ubuntu

Tuesday, April 13th, 2010

Whenever, Ubuntu’s kernel gets updated, a new menu item is added to grub. To delete the old kernels:

  1. Remove the kernels using synaptic
  2. sudo update-grub

Can’t read CTR while initializing i8042

Tuesday, April 13th, 2010

I installed Ubuntu 6.10 Server. When booting up, I got the following error message:

Can’t read CTR while initializing i8042

This error is caused by a bug in Ubuntu and causes the keyboard and mouse to not work.
The solution is to turn off USB Emulation in the BIOS.

psycopg (Python module for PostgreSQL) on Ubuntu 6.10 (Edgy Eft)

Tuesday, April 13th, 2010

for psycopg 1, install python-psycopg
for psycopg 2, install python-psycopg2

Cannot use arrow keys in VI

Tuesday, April 13th, 2010

In Ubuntu (Edgy Eft) I could not use arrow keys while in Insert Mode in VI. The solution was to set nocp in .exrc:

1. nano ~/.exrc

2. type: set nocp

3. Save and Quit

4. Use VI

nocp turns off strict vi compatibility