Weird characters in g++ compile errors â

If the locale of your environment isn’t compatible with the terminal you are using, g++ will spit out weird characters.  To check your current locale in Linux, use the command “locale” from the command prompt.  en_US.UTF-8 encoding was giving me the weird characters in a 32-bit CentOS distro running on a vmware machine.


Enter the commands:  “export LC_ALL=C”   and  “export LANG=C”

After changing the locales, the characters in my g++ error messages disappeared but only for my current terminal session.  To change it permanently, I had to change the default locale setting.

Change the default locale in CentOS:

edit the file: /etc/sysconfig/i18n

edit the first line to be: LANG=”C”

All other terminal sessions should use the POSIX/C locale as the default now.


Linux Startup Program

In order to have a program or script run at startup, place it in:


Make sure the permissions are set to enable executions or it won’t run. 🙂

JBoss HTTPS randomly wanted keystore

Our JBoss server at work decided one day that it would quit.  Upon restarting it, it wanted a keystore for the ssl connection.  Never before did we have the keystore in place.  The solution was to create a keystore to make it happy.

Here is the example Chapter 8 command to do this:

keytool -genkey -keystore chap8.keystore -storepass rmi+ssl -keypass rmi+ssl -keyalg RSA -alias chapter8 -validity 3650 -dname “cn=chapter8 example,ou=admin book,dc=jboss,dc=org”

.so vs .a library files

.so library files are dynamic library files and .a library files are static library files. If you want to pack a library inside your exe, you will need to use the static ‘.a’ files. In netbeans you can add them by going to your project’s properties. Go to linker, and select ‘Add library’ and select your .a file. (Ex: libpcap.a) Now when you build, Netbeans will pack the library into your exe and the header includes for the library will also be found. (Ex: #include <pcap.h> ) This is very nice when you don’t want your users to have to install a library to use your program. The downside is that your exe will be a bigger depending on the library’s size.

Firefox 3 Navigation Buttons Disabled in Ubuntu 9

I was having the issue of firefox not enabling the back, forward, stop, or refresh buttons no matter what.  I had navigated and had valid history, but they refused to show.  Apparently firefox uses sqlite for its history or something.

The problem was the file: ~/.mozilla/firefox/blahblah.default/places.sqlite-journal only had root access.  Changing this file with a chmod 777 fixed the problem.  Now I can properly use firefox in Ubuntu again.