Archive for the ‘Uncategorized’ Category

GIMP on Mac OS X

Thursday, July 14th, 2011

On Mac OS X, you have to double-click the buttons in the Toolbox to make them activate. To fix this annoyance, run the following from command line and then restart X11:

defaults write org.x.X11 wm_click_through -bool true

Credit: http://www.kf6nvr.net/blog/archives/000936.html

VI Search and Replace

Tuesday, June 28th, 2011

This is the vi command to find each occurrence of ‘cat’ and replace with ‘dog’:

:%s/cat/dog/g

Maven Integration with Eclipse

Sunday, October 24th, 2010

Install m2eclipse. See instructions on http://maven.apache.org/eclipse-plugin.html.

By default, Eclipse uses the JRE as the default Java environment. When you try to create a new Maven project, you will get the following message:



The Maven Integration requires that Eclipse be running in a JDK, because a number of Maven core plugins are using jars from the JDK.


Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JREs are also using JDK installs.


My JDK is installed here:

C:\Program Files\Java\jdk1.6.0_22

To resolve this, first set the JDK as the default Java environment for eclipse. It is set under Window -> Preferences -> Java -> Installed JREs. Click on the thumbnail below for a screenshot.

Set JDK as default Java environment in Eclipse

Next, add the following to eclipse.ini:

-vm
C:\Progra~1\Java\jdk1.6.0_22\bin\javaw.exe

Some notes on the -vm option:

  • The path to the JDK must be on the line below the “-vm”.
  • The path to the JDK cannot have any spaces. Enclosing the the path in quotes will not work.
  • If there are spaces in the path to the JDK, then shorten using the tilde. For example “Program Files” needs to be shortened to “Progra~1″.
  • The “-vm” option must be placed before the “-vmargs” option.

Below are the contents of my eclipse.ini:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Progra~1\Java\jdk1.6.0_22\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

JAVA_HOME not defined

Tuesday, August 3rd, 2010

Was trying to install Java EE 6 SDK on Ubuntu 10.04 and got the error “JAVA_HOME not defined”. Defined JAVA_HOME by adding it to the path:

1. Install Java:
apt-get install sun-java6-jre
apt-get install sun-java6-jdk
2. sudo vi /etc/profile.d/jdk.sh
3. Add the following two lines:
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$JAVA_HOME/bin:$PATH
4. Save and exit
5. Logout and login.
6. Install Java EE 6 SDK:
sudo ./java_ee_sdk-6u1-unix.sh

Finished Posting Old Notes

Tuesday, April 13th, 2010

I’m finished posting all the notes from my old site.  The notes are really old.  Newest is from September 2007!

KDEinit could not launch ‘/usr/bin/autorun’

Tuesday, April 13th, 2010

When user logs in, a window pops up with:
KDEinit could not launch ‘/usr/bin/autorun’

This error occured after migrating an account from a CentOS machine to a Suse machine.

The solution is to remove:

~/.kde/Autostart/Autorun.desktop

Solution is from: http://www.euglug.org/pipermail/euglug/2004-November/001764.html

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

Reset MySQL Root Password

Tuesday, April 13th, 2010
  1. /etc/init.d/mysql stop
  2. Start MySQL: mysqld_safe –skip-grant_tables -u root &
  3. mysql -u root
  4. mysql> update mysql.user set Password=PASSWORD(‘newpassword’) where User=’root’;
  5. mysql> flush privileges;
  6. /etc/init.d/mysql stop
  7. /etc/init.d/mysql start