Monday, December 08, 2008

Dancer IRCD Configuration Files

I've been checking out wiki that I've created in Ubuntu and it's link back, and it seems that a lot of people are still having problems in setting up Dancer-Services, or at least make it work with Dancer IRCD. So to make things simpler, I've attached the two configuration files I've used for the IRCD tutorial. I've tested it on a Hardy server and on my Intrepid box, both worked without any problems. Just take note that if you're going to overwrite the two files, make sure to set ircd.conf as readable by all and services.conf as owned by services.

Dancer Files
ircd.conf
services.conf

Friday, November 07, 2008

DBDesigner4 and MySQL5 on Ubuntu

This is a remake of my other article, but this focuses on efficiency rather than hand-holding. I've tested it on both Ubuntu (and also Xubuntu) Hardy Heron and Intrepid Ibex. I'm a little tired of waiting for MySQL Workbench, so I decided to give DBDesigner another shot.

What we'll use
I'll be using the RPM package since it'll make DBDesigner4 available to all users

What to Install
Install alien via aptitude (or apt-get, whichever you prefer)
sudo aptitude install alien

What to Download
DBDesigner4-0.5.4-0.i586.rpm
http://fabforce.net/downloadfile.php?iddownloadfile=9

kylixlibs3-borqt-3.0-2.tar.gz
http://prdownloads.sourceforge.net/kylixlibs/kylixlibs3-borqt-3.0-2.tar.gz?download

dbxmda.tar.gz
http://crlab.com/dbx/download.html

MySQL-shared-compat-4.1.9-0.i386.rpm
ftp://ftp.wesmo.com/pub/contributed/RPMS/MySQL-shared-compat-4.1.9-0.i386.rpm

How to Install
For convenience sake, save or move the four files to a temporary directory (e.g. ~/temp) then issue to following commands:

For DBDesigner4
  • sudo alien -i DBDesigner4-0.5.4-0.i586.rpm
For kylixlibs3-borqt-3.0-2.tar.gz
  • tar xzvf kylixlibs3-borqt-3.0-2.tar.gz
  • sudo cp kylixlibs3-borqt/libborqt-6.9.0-qt2.3.so /usr/lib/libborqt-6.9-qt2.3.so

For dbxmda.tar.gz
  • tar zxvf dbxmda.tar.gz
  • sudo cp DbxMda/libsqlmda.so.4.20 /usr/lib

For MySQL-shared-compat-4.1.9-0.i386.rpm
  • sudo alien -i MySQL-shared-compat-4.1.9-0.i386.rpm
*Note: no need to run sudo ldconfig after copying the libs since the last command will run it anyway.

What we Installed
DBDesigner4-0.5.4-0.i586.rpm: the DBDesigner4 application

kylixlibs3-borqt-3.0-2.tar.gz: the libborqt object file, this will prevent "libborqt-6.9-qt2.3.so: cannot open shared object file: No such file or directory" errors

dbdesigner03.png

dbxmda.tar.gz: the libsqlmy object file, this will prevent "Unable to Load libsqlmy.so" errors



MySQL-shared-compat-4.1.9-0.i386.rpm: some may encounter the "unable to load libmysqlclient.so" error. There's an incompatibility issue with libmysqlclient.so.15, so you'll need to download and install libmysqlclient.so.10.

What we need to Configure
Fonts
Access the fonts settings from Options > DBDesigner Options > Visual Options and set it to Helvetica sized 10

Menu
Here's the menu settings
Name: DBDesigner4
Icon: /opt/DBDesigner4/Gfx/Icon48.xpm
Command: /opt/DBDesigner4/DBDesigner4

Configuration File
Open ~/.DBDesigner4/DBConn_DefaultSettings.ini in a text editor and change the folowing:

GetDriverFunc=getSQLDriverMYSQL
LibraryNameLinux=libsqlmy.so
VendorLibLinux=libmysqlclient.so

to

GetDriverFunc=getSQLDriverMySQL
LibraryNameLinux=libsqlmda.so.4.20
VendorLibLinux=libmysqlclient.so.10

MySQL5 Settings
In order for DBDesigner4 to access your MySQL5 tables, you need to create another user and set its password to an old format DBDesigner4 understands. Login as root (or as a user that can grant privileges) then execute the commands listed below. Change the username, password, and dbname where appropriate:
  • GRANT ALL PRIVILEGES ON dbname.* TO username@'%'
  • SET PASSWORD FOR username@'%' = OLD_PASSWORD('password')
  • FLUSH PRIVILEGES
How to Reverse Engineer your Database
I believe this article is best suited for this section since it includes screenshots as well as walkthroughs.

Sources:
http://ubuntuforums.org/showthread.php?t=125911
http://www.visualcplusdotnet.com/dbdesignerdatabasetool.html

Sunday, September 21, 2008

Outdated mscomm32.ocx Error on Wine

I've been using MyPhoneExplorer to manage SMS, Contacts, and Calendar on my phone. Recently, I did a fresh install of Xubuntu Intrepid and discovered that MPE doesn't work. It gave me an error:

Run-time error '372':
Failed to load control 'MSComm' from MSCOMM32.OCX. Your version of MSCOMM32.OCX may be outdated. Make sure you are using the version of the control that was provided with your application.




This problem will occur only in Windows 95, 98, NT and 2000. You won't see it in Windows 98SE (Second Edition), Me, XP or Vista. The problem occurs because of a poor design decision that Microsoft made several years ago when they changed from the 16-bit to then-new 32-bit operating system. They've corrected the problem in the newest versions of Windows, but if you are running one of these older operating systems, you may possibly see the error. - AICS Research, Inc.

To fix this, you have to download a newer version of MSComm32.ocx and replace the one that you have installed on ~/.wine/drive_c/windows/system32

Rename the old MSCOMM32.OCX to MSCOMM32.OCX.bak just in case you need it in the future.

Download the files at:
http://www.dataq.com/support/downloads/mscomm32dotocx.zip

or at:
http://www.orbitfiles.com/download/id3289503534.html

Make sure the filename's all Uppercase (MSCOMM32.OCX) - you are, afterall, using Wine on Linux.

So there it is, I got my MPE and I hope you get to run your apps as well.

Wednesday, May 07, 2008

flv to 3gp

Here's how to convert your flv files to 3gp so you can play them on your symbian phones.

ffmpeg -i file.flv -s 176x144 -vcodec h263 -r 28 -b 96k -ab 64 -acodec aac -ac 1 -ar 44100 file.3gp

And here's a batch converter bash script based on mypapit's FLV to 3gp batch converter script, I only changed the ffmpeg part since the output on the script's a wee bit choppy on video and very much crappy on audio playback.

#!/bin/bash
echo "fakap mp3-to-flv converter http://blog.fakap.net/mp3toflv/"
echo "Copyright (c) mypapit 2007"
echo ""
if (($# ==0))
then
    echo "Usage: flvto3gp [flv files] ..."
    exit
fi

while (($# !=0 ))
do
        ffmpeg -i $1 -s 176x144 -vcodec h263 -r 28 -b 96k -ab 64 -acodec aac -ac 1 -ar 44100 $1.3gp
    shift
done
echo "Finished fakaping with flv-to-3gp converter"
echo "\"fakap all those nonsense!\""
echo ""

Make sure that you have ffmpeg and restricted codecs installed.

Blogged with the Flock Browser

Sunday, January 20, 2008

Installing DBDesigner4 on Kubuntu Gutsy

DBDesigner4 is a visual database design system that integrates database design, modeling, creating, and maintenance into a single seamless environment.

DBDesigner4 is, in fact, comparable to products such as Oracle's Designer, IBM's Rational Rose, Computer Associate's ERwin, and theKompany's DataArchitect.
- http://www.fabforce.net/dbdesigner4/

DBDesigner4 an Open Source Software optimized for MySQL databases and is the next best thing to MySQL Workbench - which is based on DBDesigner4. Until MySQL release a Workbench for Linux, I guess we all have to settle for DBDesigner.

What to Download
The first thing you should decide on is what installer to download from http://fabforce.net/downloads.php. There's a Tarball, an RPM, and an EXE file for Windows.

The EXE installs and works great on WINE (if you have it installed). I haven't encountered any problem with this install - yet, not even performance issues. You should use this if you don't want to go through the hassle of troubleshooting DBDesigner. Just click on the installer to launch it on WINE. No need to launch it from the command-line.

But being a Linux aficionado, I preferred a tarball or rpm install though. The tarball's fine, just issue tar zxvf DBDesigner4.0.5.4.tar.gz to extract the files.

The RPM install is preferred if you want DBDesigner4 available to all users on your system. However, you'll need alien on Gutsy. This tutorial would go through installing DBDesigner4-0.5.4-0.i586.rpm.

Installing Alien
Issue the command: sudo aptitude install alien

dbdesigner01.png

Download DBDesigner4-0.5.4-0.i586.rpm
Download the RPM file here: http://fabforce.net/downloadfile.php?iddownloadfile=9

Install DBDesigner4-0.5.4-0.i586.rpm
Issue the command: sudo alien -i DBDesigner4-0.5.4-0.i586.rpm

dbdesigner02.png

libborqt-6.9-qt2.3.so: cannot open shared object file: No such file or directory
DBDesigner4 is installed on /opt/DBDesigner4, however, we wouldn't be able to launch it since it'll give you the libborqt error.

dbdesigner03.png

To fix this error, we need to download and copy libborqt-6.9-qt2.3.so to /usr/lib. Download the file at http://prdownloads.sourceforge.net/kylixlibs/kylixlibs3-borqt-3.0-2.tar.gz?download

Extract it by issuing this command: tar xzvf kylixlibs3-borqt-3.0-2.tar.gz

dbdesigner04.png

Then copy the dependency to /usr/lib: sudo cp kylixlibs3-borqt/libborqt-6.9.0-qt2.3.so /usr/lib/libborqt-6.9-qt2.3.so

dbdesigner05.png

Now launch DBDesigner:



Fonts
The font is sucky, so you may need to change it to Helvetica-10 to make DBDesigner4 look more appealing.
Options > DBDesigner Options > Visual Options

dbdesigner07.png

Menu Entry
Create a Menu Entry using this values:
Name: DBDesigner4
Icon: /opt/DBDesigner4/Gfx/Icon48.xpm
Command: /opt/DBDesigner4/DBDesigner4

dbdesigner08.png

Unable to Load libsqlmy.so
When connecting to the database, you'll get this error:

dbdesigner09.png

To fix this, you need to go to http://crlab.com/dbx/download.html and download dbExpress driver for MySQL, Linux version 4.20

Then to extract the file, type: tar zxvf dbxmda.tar.gz



Then copy libsqlmda.so.4.20 to /usr/lib: sudo cp DbxMda/libsqlmda.so.4.20 /usr/lib
and run: sudo ldconfig



Then relaunch DBDesigner4.

Libmysqlclient.so Error
Some may encounter the unable to load libmysqlclient.so error. There's an incompatibility issue with libmysqlclient.so.15, so you'll need to download and install libmysqlclient.so.10.

Download the file at ftp://ftp.wesmo.com/pub/contributed/RPMS/MySQL-shared-compat-4.1.9-0.i386.rpm

Then install it: sudo alien -i MySQL-shared-compat-4.1.9-0.i386.rpm



Making changes globally
Open ~/.DBDesigner4/DBConn_DefaultSettings.ini in Kate and change the folowing:

GetDriverFunc=getSQLDriverMYSQL
LibraryNameLinux=libsqlmy.so

VendorLibLinux=libmysqlclient.so


to

GetDriverFunc=getSQLDriverMySQL
LibraryNameLinux=libsqlmda.so.4.20
VendorLibLinux=libmysqlclient.so.10




And there you go. Hope everything works for you. I know this is temporary, since we're only waiting for MySQL Workbench for Linux... right?

Blogged with Flock