Ubuntu Maverck upgrade
I upgraded my office desktop from Ubuntu Lucid to Maverick (10.10).
The experience was not very good. After the upgrade I got a very unresponsive desktop, which took around 2 minutes to load after log in. Firefox would not launch and overall the system was very slow.
This desktop has /home mounted (it’s an NFS from another system). So after some time trying to understand the cause of the problem, I decided to remove the nfs entries from /etc/fstab. Sure enough, the next login was much faster and the system was again fast and responsive.
I changed the fstab entry to a slightly different format. Here are the old and new versions:
#122.2.2.2.2:/home/usr /home nfs rw,sync 0 0
122.2.2.2.2:/home/usr /home nfs rw,noatime,nolock,vers=3 0 0
Thanks to Casey, at http://askubuntu.com/q/7695
Change locale to en_GB.ISO-8859-15 (Ubuntu Karmic)
So, the default character encoding for the English language is UTF-8. Not good when, say, you run a Java applet in the browser that has a different locale.
That happened to me recently. So here are the steps to change the locale and solve the issue:
locale-gen en_GB.ISO-8859-15
update-locale LANG=en_GB.ISO-8859-15
pico /var/lib/locales/supported.d/en
pico /var/lib/locales/supported.d/local
login again and select the new language
I’m not sure if the 2nd step is necessary, though.
When choosing the login language in GDM, you won’t be able to select the character encoding though (not sure why, as in previous versions you could). So for me that meant removing the en_GB.UTF-8 from both the local and en files in supported.d
Struts: solving “According to TLD or attribute directive in tag file, attribute value does not accept any expressions”
This error happens when you try something like:
<s:textfield value=”${someField}”/>
And it is caused because, starting from struts 2.1.x, JSP EL expressions are not allowed in in the tag’s attributes to avoid a security issue.
Use OGNL instead.
If you have a custom .tag file (where you’d use ${someField}), you can replace this with %{#attr.someField}.
Your s:textfield in the .tag file would then become:
<s:textfield value=”%{#attr.someField}”/>
Installing Ubuntu Karmic from USB pen on a Zotac Ion
So, today’s “future reminder” relates to installing Ubuntu Linux on my ZOTAC Ion motherboard using an USB pen drive.
Basically, I had issues with the Karmic version of the OS, which wouldn’t display anything but a black screen and a mouse cursor “loading” forever.
The solution was to change the advanced options (F6) and add the option “nomodeset” (without the quotes). I also removed the “quiet splash” because I like to see what is going on while the system is booting.
Thanks to http://maketecheasier.com/solving-ubuntu-karmic-black-screen-issue/2009/12/29
Create multi-mode maven projects in Eclipse
This is a good guide to create multi-mode maven projects in Eclipse:
http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
Also useful to refactor existing project to put several modules bellow a parent module that wasn’t created when it should.
Eclipse Galileo in Ubuntu Karmic – needs hack
Upgrade to Karmic, error 1:
Couldn’t find/replace strings. Replace button wouldn’t do anything.The fix?
Create an sh script with the contents:
export GDK_NATIVE_WINDOWS=true
/opt/eclipse/eclipse
(where /opt/eclipse/eclipse is the location of your eclipse application file).
And use that script as the startup program to boot eclipse.
Thanks to http://mou.me.uk/2009/10/31/fixing-eclipse-in-ubuntu-9-10-karmic-koala/
Trac – Fixing the SQLite DB
Thanks to http://www.otterbook.com/blog/2009/08/fixing-the-sqlite-db-for-a-trac-instance/ , I found out how to fix a Trac instance when I got the message
“DatabaseError: database disk image is malformed”
Here it is:
$ cd /path/to/trac-sqlite-db-directory # find the trac.db file
$ su www-data # switch to the owner of the db file
$ mv trac.db trac.db.damaged
$ sqlite3 trac.db.damaged .dump|sqlite3 trac.db
Blog objective
This blog was created mainly to be a repository of information on problem solving in my day-to-day work life. If it evolves to something else, so be it. If someone finds it useful, great!