Wednesday, July 25, 2007

Fix bug Opera on Ubuntu

If you should get this error:

Code:
/usr/lib/opera/9.0-20060616.6/opera: error while loading shared libraries: libqt-mt.so.3: cannot open shared object file: No such file or directory
you need to install the i386 libqt.

Code:
wget http://ubuntu.mirrors.tds.net/ubuntu/pool/main/q/qt-x11-free/libqt3-mt_3.3.6-1ubuntu3_i386.deb
Then,

Code:
sudo dpkg -x libqt3-mt_3.3.6-1ubuntu3_i386.deb .
Which will extract the guts into the current directory (.). Now copy the contents of ./usr/lib to /usr/lib32/.

Code:
sudo cp ./usr/lib/libqt* /usr/lib32/
Enjoy opera.

Wednesday, July 4, 2007

Fix bug Tomcat 5.5.23 - Netbeans JSF - Database Driver

Add driver into package.

- Right-click on project, choose Propertises/Build/Packaging/Add File, then browse the database driver, set Path in WAR is WEB-INF/lib

- Copy driver into JAVA_HOME/jre/lib/ext
- Restart Tomcat and run project

Tuesday, July 3, 2007

Set Default Template

This one’s for those using an alternative to Microsoft Office–OpenOffice.org.

Tired of changing the default page size from A4 to Letter everytime you create a new Writer document? Do you wish adding a page number on each page of your more-than-a-page document were not an additional task amidst the rush?

Do you wish to change the default Writer document template?

Easy.

  1. Create a new document. (File->New->Text Document or press Ctrl+N if you’re in the Writer mode or start OpenOffice.org Writer from your desktop’s program menu.)
  2. Change the way it looks on the screen and off the printer. The following may be your concern:
    • Page setup. Choose Format->Page from the menu. Change the page setup as you wish, e.g., size, margins.
    • Footer or header. If you want to paginate your document, that is, put page number on each page say at the bottom, choose Insert->Footer->Default. You are then brought to the footer area. Press Ctrl+R to put the cursor to the right margin. Then choose Insert->Fields->Page Number.
    • Default font. Let’s say you hate Times New Roman and want to boast of the beauty of Deja Vu. Fire up the Styles and Formatting box by pressing F11 (note that pressing F11 with the box already open closes it). Right-click on the paragraph style called Default and a menu pops up. Select Modify. With the Paragraph Style dialog box open, go to the Font tab. Then locate the font Deja Vu, click on it and then click on the OK command button.
  3. After finally deciding on the document setup, save it as your template by choosing from the menu File->Templates->Save. With the Templates box open, enter the name for your default document and then click on the OK command button.
  4. Choose File->Templates->Organize from the menu. With the Template Management dialog box open, locate your saved default document template by double-clicking on the My Templates item in the left side. Select the template. Then click on the Commands button at the right side, and click on the Set As Default Template item. And then close the dialog box.

You are now ready to create new documents using the template you customized yourself.

Monday, July 2, 2007

config java 6 ubuntu

$ chmod a+x jdk-6-linux-i586.bin
$ sudo ./jdk-6-linux-i586.bin

$ sudo mkdir /usr/lib/jvm
$ sudo mv jdk1.6.0 /usr/lib/jvm/
$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0/bin/java" 1

$ sudo update-alternatives --set java /usr/lib/jvm/jdk1.6.0/bin/java

$ sudo gedit /etc/profile

# Variáveis ambiente do JDK 6.0
JAVA_HOME=/usr/lib/jvm/jdk1.6.0
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
MANPATH=$MANPATH:$JAVA_HOME/man
export JAVA_HOME PATH CLASSPATH MANPATH

$ java -version
$ javac -version