Java plugin (Firefox) on MEPIS

I found this link useful. It helped me to get Java running in Firefox. The instructions are a bit outdated, so I thought to repost.

First we need Java installed:

apt-get install sun-java6-plugin

We go to the Firefox “plugins” folder, and rename for the existing (not working!) plugin with a .bak extension, and then create a symlink to the (hopefully working!) plugin:

cd /usr/lib/firefox/plugins
mv libjavaplugin.so libjavaplugin.so.bak
ln -s /usr/lib/jvm/java-6-sun-1.6.0.12/jre/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin.so

You’ll need to restart Firefox for the changes to take effect. Hope this helps!

Advertisements

OCI_COMMIT_ON_SUCCESS

I received the following error in my CodeIgniter web application today:

Notice: Use of undefined constant OCI_COMMIT_ON_SUCCESS – assumed ‘OCI_COMMIT_ON_SUCCESS’ in …

today. It turns out that, in MEPIS at least, you need the packages bc, libaio, even if you’ve compiled support for oci8. I re-added the packages, restarted Apache and it worked, once again.

MEPIS 8 and Fujitsu Lifebook S7110

I previously wrote that MEPIS worked (sound, wired networking, wireless networking) out of the box for my IBM R52. FYI, the wireless card is the Intel PRO/Wireless 2200BG. I’d also previously detailed instructions on Debian “Etch”. What I didn’t state was that I would encounter issues where wlassistant would report that it was unable to get an IP address (via DHCP) whilst attempting to connect to a standard WEP router. However if I left wlassistant switched on for awhile, it would (mysteriously) work later on. I got fedup, and mostly used a wired connection thereafter.

I’m pleased to note that there are no such issues for my Fujitsu Lifebook S7110, which uses the Intel PRO/Wireless 3945ABG:

lspci -nn | grep 3945
05:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection [8086:4222] (rev 02)

When I booted up via the LiveCD, I feared the worst, as it was unable to connect to the (same) router. But go ahead and install nonetheless. On the first boot after install, I configured the network, to no avail. I rebooted however, and it worked fine. I’m still not sure what’s going on here, but it’s certainly a pleasant surprise.

For a time I feared that my laptop would reach it’s end of useful life before I found a distro as excellent as MEPIS, but that’s all in the past now.

:)

Oracle and PHP5 in Debian-like systems

This post helped me install Oracle XE on my developer machine successfully! It worked for my Debian Lenny system previously, and I’ve personally verified it to work with MEPIS 8.0, Ubuntu 9.04 and Linux Mint 7, Linux Mint 8 and Xubuntu 10.04.

1. Oracle Express Edition (XE)

This step is optional if you already have an Oracle server to use, but in my experience, it’s far better to have one setup locally.

Add the following repository to your apt sources:

deb http://oss.oracle.com/debian unstable main non-free

Install Oracle XE:

wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install oracle-xe-universal

It’s a pretty big download (~260 MB). The installation, like most in Debian systems, is a breeze. When the installer completes there is one extra step:

sudo /etc/init.d/oracle-xe configure

You’ll be asked to create a system/sys (administrative user) password, and whether or not to start Oracle on boot.

2. Oracle Instant Client

You can skip this step if Step 1 was completed. The Instant Client is required if Oracle XE is unavailable.

Downloaded the RPMs from here. You’ll need the basic, devel packages for Linux. Once the download is complete, use alien to convert .rpm into .deb. I also converted it to deb using alien (which you may not have, but can install using ‘sudo apt-get install alien’, and then installed:

# If you have alien, skip the following line
sudo apt-get install alien

# Converting and installing RPMs
sudo alien oracle*.rpm
sudo dpkg -i oracle*.deb

3. oci8 Static Object (SO)

This step is required for Oracle/PHP to play nice.

# If php-pear, php5-dev are installed, skip the following line
sudo apt-get install php-pear php5-dev

# Compling the oci8 static object (SO)
sudo pecl install oci8

At some point during this process, you’ll be prompted to input $ORACLE_HOME. If you used Step 1, input “/usr/lib/oracle/xe/app/oracle/product/10.2.0/server”. If you used Step 2, input “instantclient,/usr/lib/oracle/11.2/client/lib”. The compilation takes awhile.

4. Loading oci8.so

Save a new file as /etc/php5/conf.d/oci8.ini. Add the text “extension=oci8.so”, so that it becomes available everywhere.

5. Restart Apache

sudo /etc/init.d/apache2 restart

Embedding Flash in HTML, versus iframe

I recently received a request to develop a CakePHP website. The interface consists of a container 800 by 250 pixels width, with practically no chrome (company name, copyright info) whatsoever. It’s shows calendar entries for a given period, and users can click to view entry details (in a Thickbox). I thought the design was rather simplistic, and gave it no further thought. The project was completed in about 2 days, and I spent an additional 1.5 days making some minor changes.

Today I realized that simple design was because it was intended to replace a Flash-based calendar on the client’s homepage. I did a test with iframe, but it doesn’t work well, because the Thickbox (with entry details) is contained within the iframe.

Note to self: Clarify intended deployment method before giving price information. No hard feelings of course, since they might not understand that embedding Flash is not the same as iframe. Now it’s likely I’ll need to spend more time doing it right; i.e. template-ize their HTML, and then put in the (micro) website that I completed earlier.

SimplyMEPIS 8.0

My slow laptop is now running on SimplyMEPIS 8.0. Surprisingly, it doesn’t feel that slow anymore. Maybe it was an OS issue, but I digress.

The install process was a breeze. I used mepis-network to setup wireless access, gparted to partition the hard disk into two partitions of 8GB (root) and 2GB (swap) each, and then it installed by itself. Later, it setup grub for me so that if I wanted to boot into Windows, it would comply. But I won’t of course. When I boot into MEPIS for the first time, I wanted to setup wireless again, since the install was a Live CD. But I didn’t even need to perform that step! The network settings that I added during the Live CD boot had been saved! Voila!

IMO networking, particularly wireless networking has to improve significantly, even Lenny. I wish it would just work, rather than having to jump through hoops, and even then, not work particularly well.

Up till now, I cannot connect to my home wireless router. Before Lenny was released, there was a tool called “wlassistant” that worked occasionally. But now it’s gone, and all of the other tools (kwifi-radar, wireless-tools) do not work. And it’s not a router issue, because my other Windows laptops connect easily.

I’ll try to set this up as a development machine; if things go well I just might switch my (primary) laptop to MEPIS.

Oracle SQL Developer is ****

As the title says, this is a rant.

Here’s the background. I’d been assigned an (old) IBM laptop running Windows XP at work. Except I like to use my own (newer) laptop to write code. So the only reason I even boot up the laptop is to use Visio, or maybe SQL Developer.

Usually I justĀ krdc into the database server, and run SQL Plus off it. Oh, except today, I wanted to get the length of the column names, which is not available (why?!?) in SQL Plus. Or maybe there is something else other than “desc tableName” that I don’t know about, but I digress.

I booted up the aforementioned, crusty old laptop — What specs? see below — and waited. And waited.

cpu-z

My goodness. I heard from a fellow developer that they’re gonna phase out SQL Plus (why?!?) in the next version of Oracle, but, judging by the (not sweet) performance of SQL Developer, this is not a good idea.

Of course, it’s an old laptop (2004), and I’m obviously comparing apples to oragnes, but seriously I’d take SQL Plus anytime.