Friday, June 1, 2007

My New Blog

Hi guys, I'm not blogging at this location any more ... you can check my new blog at:

http://www.roland-lopez.com/blog/

See you there!
Roland

Tuesday, March 20, 2007

Connecting PostgreSQL 8.1 & ColdFusion MX 7

So far ColdFusion does not have a default driver to connect to a PostgreSQL Database. However you can manually create a connection using a JDBC driver.

  1. Download the JDBC driver http://jdbc.postgresql.org/
    You need to know what is your JDK version so that you can select the proper driver. To check your JDK version open Terminal and type:

    java --version

    In my case I have "1.4.2", therefore I downloaded JDBC 3 for PostgreSQL 8.1
  2. Copy the driver (jar file) to your coldfusion location at:

    [cf root folder]/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/lib

    in my case this was:
    /opt/jrun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/lib

  3. Restart ColdFusion:
    cd into /opt/jrun4/bin/ and type:

    ./jrun -restart

    NOTE: for some reason when I execute this command it my system won't complete the restart process so I had to do a Stop and Start like ./jrun -stop and then ./jrun -start

  4. Now go to your ColdFusion admin add a new Data Source of type "Other"
  5. Enter your JDBC URL as: jdbc:postgresql://localhost/[your database name]
  6. Set Driver Class and Driver Name as: org.postgresql.Driver
  7. Enter the user name and password.
    Note: You can use your "postgres" user account. I have instead created a specific account for coldfusion, you can create users through pgAdmin.
  8. Submit. You should get an "ok" in the status.

Saturday, March 3, 2007

auto915Resolution - Ubuntu Resolution fix for Intel chipset 8x-945

If you have an Intel Chipset 8x - 945 series you will have some trouble setting your resolution in Ubuntu.
Theres is a tool, made by Steve Tomljenovic, called 915Resolution that will fix this problem. However you will have to run this tool every time you restart or logoff from Ubuntu because these changes are only temporary. To avoid this you need to create a startup script that will run before the X server starts. So I have written a small script that will automate this process for you that I called auto915resolution.

The script will automatically install 915resolution and will create the startup script for you.

Below is a sample run of the script that will serve as a guide on how to use it and will give you an idea of how it works.

  1. Download auto915Resolution
  2. Extract the file to your home folder (i.e. /home/[your user name]/
  3. Run terminal.
  4. Login as root (you must be logged in as root to create the startup script)
  5. Navigate to that folder. In my case my home folder is "rolando", replace it with your folder name.

    # cd /home/rolando/auto915Resolution/
  6. Run the script. (notice the dot before the forward slash)

    # ./auto915resolution.sh
  7. When you get the prompt to install 915resolution fix enter 'Y'. If you have 915resolution already installed you can choose not to install it.
  8. A list of all available resolutions ( Modes ) will be displayed followed by a prompt to enter the "Mode" you want to replace with you desired screen resolution. (You might have to maximize the terminal window to see the entire list)
    At the top of the list you will see your chipset info. In my case I have a 915GM.

    Example:
    Chipset: 915GM
    BIOS: TYPE 1
    Mode Table Offset: $C0000 + $269
    Mode Table Entries: 36

  9. Enter the "Mode" number you want to replace. You should replace your default resolution. In my case my default resolution was 1024x768 in mode 34.

    # 34
  10. A prompt to enter your desired resolution will be displayed. Enter your horizontal resolution followed by a space and then your vertical resolution. For example for a resolution of "1280x800" enter "1280 800".

    # 1280 800

  11. A prompt for your maximum color depth (in bits) will be displayed. Options are 8, 16, 24 and 32. Most monitors should be able to handle 24, so if you're not sure enter:

    # 24

  12. The resolution (Mode) list is refreshed and the Mode you chose should now be replaced with the new resolution and color depth.
    A prompt to create the startup script will be displayed. You should enter 'y' in here if you see that your changes were applied correctly in the list.
  13. If you entered 'y', then you should see this output:

    Creating startup script...
    The startup script has been created! Please restart for changes to take effect.

  14. Restart your computer.

Wednesday, February 28, 2007

Ubuntu Resolution Problem - Intel Chipset 8x - 9x

Installing Ubuntu is a straight forward process, in the other hand setting the resolution might become a "pain in the neck". For many users (NOT USERS W/ Intel Chipset 8x-9x; see below) changing the resolution of the screen should be as simple as going to terminal and typing the following commands:

Backup your xorg.conf file first

$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup


Reconfigure X

$ sudo dpkg-reconfigure xserver-xorg


Note:

Auto-detection of devices works best if Xorg is not running, so that before typing the above command you might want to stop X by typing:

$ sudo /etc/init.d/gdm stop

However this will take you to text-only mode (YOU WON'T HAVE YOUR BROWSER ANYMORE) so you might want to print this out or just type the commands before entering this command.

To start X again just after reconfiguring just type

$ sudo /etc/init.d/gdm start




If you have an Intel Chipstet 8x - 9x, the 915resolution fix will work for you, however you will have to run this every time you restart Ubuntu. I'm working on a script to automate the installation of 915resolution and fix your startup scripts so that you don't have to run 915... every time you restart. Will try to post it by tonight.

Tuesday, February 27, 2007

Ubuntu Ultimate Edition 1.2 & Beryl

After spending hours trying to setup Beryl on Ubuntu 6.06 (not supported by Beryl) I get an email from Rob Gonda about Ubuntu Ultimate Edition 1.2 which comes with a bunch of software including Beryl!

I didn't have much too lose so I reformatted the partition and installed Ubuntu from scratch. Installation took about 30-40 min. and was straight forward.

To load Beryl just went to terminal and typed this command:

$ beryl-manager


That easy!

Now if you want Beryl to auto start in Ubuntu (so that you don't have to type the previous command every time you restart) follow the steps listed at Beryl Wiki.