Tuesday, September 27, 2011

#Oracle Thank you for killing #mysql with opencore=propietary licence and pushing for alternatives

The LAMP king is dead and is  Open core = Closed source http://ur1.ca/0dahc , so is time for Mysql alternatives : Firebird


Monty's words
Oracle has now officially announced that MySQL is not a full free software project anymore and that they will go for an Open Core model.

This is inconsistent to the original MySQL business model. The main strength of MySQL has always been that all MySQL source code was freely available. It was thanks to this that MySQL got widely adopted and got to be used by tens of millions of users.

This was a fact that the MySQL board and Sun understood. Closing the MySQL server code base in any manner would be bad for long term business.
So what's so wrong with Open Core?

As a business model, especially to bootstrap a business, Open Core is not a bad idea. It gives you some leverage with your users to get part of your development paid for. This is however done at the cost of fewer users and a less adopted project. Many projects however abandon Open Core models when they grow as open source gives them more users and thus more value.

What is most important to understand about an Open Core project is that it has nothing to do with an open source project. If you are depending on a single closed source component then you have to regard the whole project as a closed source project as you lose all the benefits of open source:
  • You are depending on one vendor.
  • You can't do any bug fixes yourself and you can't contract anyone except the original vendor to get things fixed.
  • You can't examine and improve the product (not any part of if).
  • You can't use any open source or commercial extensions from anyone else. This is true also for any plugins that access any internal parts of the product (which is true for most MySQL plugins).
  • You are limited to the platforms that the original vendors makes available. (In MySQL's case you can't for example use the new commercial features on RedHat 6 as it's not a supported platform).
  • The builds you are using are not tested anymore by millions of users (more bugs).
  • The product is not checked by the open source community for security problems or back doors.
  • The new features will not be adopted by (and may even cause conflicts with) other open source projects.
  • You are subject to one vendor's price politics which they can change at their convenience.
What is interesting with the new commercial features is that parts of them where not developed by Oracle. The thread pool was originally developed by Ebay for MySQL 5.0 and contributed to MySQL to be include in MySQL 5.1. Only the new scheduler interface code was added to MySQL 5.1 while the thread pool itself was added (but accidentally with a slower implementation) into MySQL 6.0. Oracle never back ported the thread pool code to the MySQL 5.5 community version and now also the MySQL 6.0 tree is deleted.
The new pluggable authentication, which makes the new PAM authentication possible, was developed and contributed to Oracle by Sergei Golubchik at Monty Program Ab.


Alternatives and the good News 


These words are prophetic and the decline started to happen 


The decline will not be immediate, it will take some time, notably Apache distributions like XAMPP and WAMP will have to offer users alternatives to MySQL, as most developers use these packages, instead of installing products independently. All is not lost, the Open Source community has plenty of options. There are two well established alternatives to MySQL: PostgreSQL and Firebird. Both have large established communities, and support of major corporations. One of these will become the next MySQL


I put my vote on Firebird SQL : it is lighter and it is easier to maintain (drop in replacement for mysql in lamp installements)


Now, this could be a very good opportunity for all of the other open source database servers (and also some of paid ones!), particularly the most popular ones like Firebird and PostgreSQL. I’m particularly fond of Firebird (the InterBase offspring) and use it in many projects and did a lot of consulting to Delphi developers using it. Can this be ? MySQL with its huge popularity has certainly obscured it, so it could be a good time to act.

Thursday, September 22, 2011

fixing nginx 1.0.x and html5 video

Fixing nginx 1.0.x to make it serve video ogg correctly Open up the Nginx mime type configuration file, eg: /etc/nginx/mime.types Add these lines after the last video mime type
video/ogg                             ogm;
video/ogg                             ogv;
video/ogg                             ogg;
restart nginx
sudo /etc/init.d/nginx restart

Wednesday, September 21, 2011

The best definition for clould computing

Definition was given on slashdot
Unfortunately, the sort of seamless network-agnostic computing Plan 9 and its descendants enabled is now a commercial threat to all the other players in the mobile space. Half the point of the "cloud computing" trend is to lock people in to one provider's weakly interacting web service, and, by extension, into the controlled ecosystem of third-party services that do interoperate well with it. Plan 9 is too good at what it does to be successful.

All cloud providers want to hook you up to the system and then rip you off with computing time , bw or with overpriced NO uptime like amazon does with their constant service disruptions
No wonder they all want to move you to the cloud and milk you as much they can .
I have tested RDS on Amazon is is absolutley horridly slow compared with a fine tuned machine

Sunday, September 04, 2011

Rip Google pack time for librepack

Rip google pack i didn't quite loved you because you contained mostly propietary crap : adobe reader, antiviruses , antispyware , the pesky google desktop and firefox with google toolbar included (by the way i think toolbars should be forbidden in all browsers just to make the world a better place) but I always recommended google pack to people still stuck in the past and windows land (minus the real player that is contained in the pack !)
Why :it updates automatically the programms and contains antivirus / antispyware , maybe is time for a librepack that it will contain : vlc ,libreoffice , clamav, firefox, chromium using the same update method used by the google pack http://googlesystem.blogspot.com/2009/04/google-update-open-sourced.html I almost wish to create it myself but the devel setup is quite heavy

Friday, September 02, 2011

dist-upgrade in #ubuntu hardy on Amazon ec2

Today i have upgraded hardy machine with latest patches on an Amazon ec2 machine (related to httpd bug)

and it crashed on with this script update-rc.d if you watched with top
First download the libc6-xen
and install it with 
dpkg-i 
then remove the libc6 and ubuntu minimal 


dpkg -r libc6-i686 and then dpkg --configure -a


and restart your daemons 

Thursday, August 25, 2011

Imagine a gray 1984 like world without Linux

It would be a world wihout internet
without google
without twitter
without facebook
without spaceships
without Pixar and Dreamworks
without animated movies
without LOTR
without Harry Potter movies

without Wikipedia
without Android

without Debian

without Ubuntu


It all started with a small message 20 years ago and ended with World Domination




In an alternate universe borg won the war and all users are connected to exchange using only InternetExplorer 6.0 and all the fun is sending viruses and naked animated gifs with outlook and not Thunderbird



upgrading from ubuntu 9.04 to 9.10 (Jaunty to Karmic)

The upgrade
Please make sure you have the following sources.list (/etc/apt/sources.list remove all other entries you have there).

# Required
deb http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ jaunty-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ jaunty-security main restricted universe multiverse
Update the package list and upgrade all the installed packages
sudo apt-get update && sudo apt-get dist-upgrade
Perform the release upgrade.
sudo do-release-upgrade

you will get an error
do-release-upgrade 
Checking for a new ubuntu release
Failed Upgrade tool signature
Failed Upgrade tool
Done downloading            
extracting 'jaunty.tar.gz'
Failed to extract
Extracting the upgrade failed. There may be a problem with the network or with the server. 
you can inspect the metadata for releases and you need to replace with release old-releases prefix (fixed by me)

to look like this for karmik (supported with old repository url)
Dist: karmic
Name: Karmic Koala
Version: 9.10
Date: Thu, 29 Oct 2009 12:00:00 UTC
Supported: 1
Description: This is the 9.10 release
Release-File: http://archive.ubuntu.com/ubuntu/dists/karmic/Release
ReleaseNotes: http://changelogs.ubuntu.com/EOLReleaseAnnouncement
UpgradeTool: http://archive.ubuntu.com/ubuntu/dists/karmic-proposed/main/dist-upgrader-all/0.126.9/karmic.tar.gz
UpgradeToolSignature: http://archive.ubuntu.com/ubuntu/dists/karmic-proposed/main/dist-upgrader-all/0.126.9/karmic.tar.gz.gpg

wget https://raw.github.com/gist/1170565/22117e03db295388b507c59ea3f84a11bc4e9ff0/metarelease.rvg -O /etc/meta-release.rvg

Modified /etc/update-manager/meta-release so that it pointed to my local file rather than the incorrect URI on the ubuntu site - here is what it looked like after my change:

[METARELEASE]
URI = file:///etc/meta-release.rvg
URI_LTS = http://changelogs.ubuntu.com/meta-release-lts
URI_UNSTABLE_POSTFIX = -development
URI_PROPOSED_POSTFIX = -proposed

I then ran do-release-upgrade and everything worked like a charm

Next is to upgrade to 10.04 LTS , you can follow the generic instructions , no tricks needed

upgrading from ubuntu 8.10 to 9.04 (Intrepid to Jaunty)

The upgrade
Please make sure you have the following sources.list (/etc/apt/sources.list remove all other entries you have there).

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-security main restricted universe multiverse
Update the package list and upgrade all the installed packages
sudo apt-get update && sudo apt-get dist-upgrade
Perform the release upgrade.
sudo do-release-upgrade

you will get an error
do-release-upgrade 
Checking for a new ubuntu release
Failed Upgrade tool signature
Failed Upgrade tool
Done downloading            
extracting 'jaunty.tar.gz'
Failed to extract
Extracting the upgrade failed. There may be a problem with the network or with the server. 
you can inspect the metadata for releases and you need to replace with release old-releases prefix (fixed by me)

to look like this for jaunty
Dist: jaunty
Name: Jaunty Jackalope
Version: 9.04
Date: Thu, 23 Apr 2009 12:00:00 UTC
Supported: 1
Description: This is the 9.04 release
Release-File: http://old-releases.ubuntu.com/ubuntu/dists/jaunty/Release
ReleaseNotes: http://changelogs.ubuntu.com/EOLReleaseAnnouncement
UpgradeTool: http://old-releases.ubuntu.com/ubuntu/dists/jaunty-proposed/main/dist-upgrader-all/0.111.8/jaunty.tar.gz
UpgradeToolSignature: http://old-releases.ubuntu.com/ubuntu/dists/jaunty-proposed/main/dist-upgrader-all/0.111.8/jaunty.tar.gz.gpg

wget https://raw.github.com/gist/1170565/c6d5b3deece6f7451ec76419810d898eda0fadde/metarelease.rvg -O /etc/meta-release.rvg

Modified /etc/update-manager/meta-release so that it pointed to my local file rather than the incorrect URI on the ubuntu site - here is what it looked like after my change:

[METARELEASE]
URI = file:///etc/meta-release.rvg
URI_LTS = http://changelogs.ubuntu.com/meta-release-lts
URI_UNSTABLE_POSTFIX = -development
URI_PROPOSED_POSTFIX = -proposed

I then ran do-release-upgrade and everything worked like a charm

Sunday, August 21, 2011

Software Wars are updated now in git


I am a big fan of the Software Wars graphic map. 
Since it hasn’t been updated for years, MrTomLinux decided to recreate it from scratch in SVG 
and to share the files. [I have forked it in github https://github.com/mariuz/software_wars_map]
http://blog.mrtomlinux.org/index.php?pages/Software-Wars
You can open and edit the svg in Inkscape
http://www.inkscape.org



You can follow the changelog :
Google brought Motorola
Nokia failed in the smartphone market
Mono and all it's team is departing Novell under Miguel leadership


Thursday, August 18, 2011

optimizing kvm linux io/net performance

Start reading optimization tips from ibm and from main linux-kvm site
http://wiki.libvirt.org/page/Virtio

User kernel > 3.0.0 (for me dist upgrade from debian stable -> testing)

Start the vm with virtio for disk and cache=writeback
http://www.linux-kvm.org/page/Tuning_KVM
http://learnitwithme.com/?p=198
Mount ext3 with noatime and datawriteback

sudo tune2fs -l /dev/disk/by-label/ROOT | grep "mount options"
Default mount options:    journal_data_writeback
sudo tune2fs -o journal_data_writeback /dev/vda
and add it to the boot time

http://blog.smartlogicsolutions.com/2009/06/04/mount-options-to-improve-ext4-file-system-performance/


improve throughoutput using the deadline scheduler (you will have more bandwidth but latency will be worse for users and other apps)

echo deadline > /sys/block/vda/queue/scheduler

Monday, August 15, 2011

necessitas setup and test raycasting #QT demo on #android

I wanted to test the qt raycasting demo on my android and here are some steps and missteps that i have done in my research

I follow the sdk instructions from here

http://sourceforge.net/p/necessitas/wiki/How%20to%20install%20Necessitas%20SDK/

Download necessitas sdk for me is something like necessitas-0.2.1-online-sdk-installer-linux
chmod +x necessitas-0.2.1-online-sdk-installer-linux
./necessitas-0.2.1-online-sdk-installer-linux
I have enabled all options to be downloaded even the android ndk/sdk
my path is something like /home/mariuz/work/necessitas

Setup finished and downloaded all the files
next is to configure the qt creator
http://sourceforge.net/p/necessitas/wiki/Setup%20QtCreator/

The only changes that i needed to do is to add ant path in (is custom downloaded from apache.org and unziped in /opt)

Tools -+- Options -+- Android -+- Ant location : /opt/apache-ant-1.8.1/bin/ant



The other are left untouched
I have loaded the raycasting example
but i get an error and even if i downloaded the Ministro app from the google market (and QtCore is installed)
Starting remote process ...
Can't find eu.licentia.necessitas.industrius.example.raycasting process


Seems that :
The libraries downloaded by Ministro are different from the libraries in the Necessitas SDK (the dynamic linker in the emulator had problems that were fixed when I overwrote the Ministro libraries with the (stripped) libraries from the Necessitas SDK) – is this a known problem and will it be fixed?


So i have checked to deploy and copy the necessitas libs to the target when i run the app
but again it failed

Starting remote process ...
D/dalvikvm( 6883): Trying to load lib /data/data/eu.licentia.necessitas.industrius.example.raycasting/lib/libraycasting.so 0x45768998
I/dalvikvm( 6883): Unable to dlopen(/data/data/eu.licentia.necessitas.industrius.example.raycasting/lib/libraycasting.so): Cannot load library: link_image[1722]:  1125 could not load needed library 'libQtGui.so' for 'libraycasting.so' (load_library[1052]: Library 'libQtGui.so' not found)
I/Qt JAVA ( 6883): Can't load 'raycasting'
I/Qt JAVA ( 6883): java.lang.UnsatisfiedLinkError: Library raycasting not found
I/Qt JAVA ( 6883): 	at java.lang.Runtime.loadLibrary(Runtime.java:489)
I/Qt JAVA ( 6883): 	at java.lang.System.loadLibrary(System.java:557)
I/Qt JAVA ( 6883): 	at eu.licentia.necessitas.industrius.QtApplication.loadBundledLibraries(QtApplication.java:97)
I/Qt JAVA ( 6883): 	at eu.licentia.necessitas.industrius.QtActivity.startApplication(QtActivity.java:92)
I/Qt JAVA ( 6883): 	at eu.licentia.necessitas.industrius.QtActivity.access$000(QtActivity.java:62)
I/Qt JAVA ( 6883): 	at eu.licentia.necessitas.industrius.QtActivity$1$1.run(QtActivity.java:149)
I/Qt JAVA ( 6883): 	at android.app.Activity.runOnUiThread(Activity.java:3652)
I/Qt JAVA ( 6883): 	at eu.licentia.necessitas.industrius.QtActivity$1.libs(QtActivity.java:146)
I/Qt JAVA ( 6883): 	at eu.licentia.necessitas.industrius.QtActivity.startApp(QtActivity.java:221)
I/Qt JAVA ( 6883): 	at eu.licentia.necessitas.industrius.QtActivity.onCreate(QtActivity.java:297)
I/Qt JAVA ( 6883): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
I/Qt JAVA ( 6883): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2466)
I/Qt JAVA ( 6883): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519)
I/Qt JAVA ( 6883): 	at android.app.ActivityThread.access$2200(ActivityThread.java:123)
I/Qt JAVA ( 6883): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1870)
I/Qt JAVA ( 6883): 	at android.os.Handler.dispatchMessage(Handler.java:99)
I/Qt JAVA ( 6883): 	at android.os.Looper.loop(Looper.java:123)
I/Qt JAVA ( 6883): 	at android.app.ActivityThread.main(ActivityThread.java:4370)
I/Qt JAVA ( 6883): 	at java.lang.reflect.Method.invokeNative(Native Method)
I/Qt JAVA ( 6883): 	at java.lang.reflect.Method.invoke(Method.java:521)
I/Qt JAVA ( 6883): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
I/Qt JAVA ( 6883): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
I/Qt JAVA ( 6883): 	at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 6883): +++ not scanning '/system/lib/libwebcore.so' for 'startQtAndroidPlugin' (wrong CL)
D/dalvikvm( 6883): +++ not scanning '/system/lib/libmedia_jni.so' for 'startQtAndroidPlugin' (wrong CL)
D/dalvikvm( 6883): +++ not scanning '/system/lib/libexif.so' for 'startQtAndroidPlugin' (wrong CL)
D/dalvikvm( 6883): +++ not scanning '/system/lib/libtextrendering.so' for 'startQtAndroidPlugin' (wrong CL)
D/dalvikvm( 6883): +++ not scanning '/system/lib/libsrec_jni.so' for 'startQtAndroidPlugin' (wrong CL)
W/dalvikvm( 6883): No implementation found for native Leu/licentia/necessitas/industrius/QtApplication;.startQtAndroidPlugin ()V
D/AndroidRuntime( 6883): Shutting down VM
W/dalvikvm( 6883): threadid=3: thread exiting with uncaught exception (group=0x40026160)
E/AndroidRuntime( 6883): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 6883): java.lang.UnsatisfiedLinkError: startQtAndroidPlugin
E/AndroidRuntime( 6883): 	at eu.licentia.necessitas.industrius.QtApplication.startQtAndroidPlugin(Native Method)
E/AndroidRuntime( 6883): 	at eu.licentia.necessitas.industrius.QtApplication.startApplication(QtApplication.java:158)
E/AndroidRuntime( 6883): 	at eu.licentia.necessitas.industrius.QtActivity.startApplication(QtActivity.java:132)
E/AndroidRuntime( 6883): 	at eu.licentia.necessitas.industrius.QtActivity.access$000(QtActivity.java:62)
E/AndroidRuntime( 6883): 	at eu.licentia.necessitas.industrius.QtActivity$1$1.run(QtActivity.java:149)
E/AndroidRuntime( 6883): 	at android.app.Activity.runOnUiThread(Activity.java:3652)
E/AndroidRuntime( 6883): 	at eu.licentia.necessitas.industrius.QtActivity$1.libs(QtActivity.java:146)
E/AndroidRuntime( 6883): 	at eu.licentia.necessitas.industrius.QtActivity.startApp(QtActivity.java:221)
E/AndroidRuntime( 6883): 	at eu.licentia.necessitas.industrius.QtActivity.onCreate(QtActivity.java:297)
E/AndroidRuntime( 6883): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 6883): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2466)
E/AndroidRuntime( 6883): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519)
E/AndroidRuntime( 6883): 	at android.app.ActivityThread.access$2200(ActivityThread.java:123)
E/AndroidRuntime( 6883): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1870)
E/AndroidRuntime( 6883): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6883): 	at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 6883): 	at android.app.ActivityThread.main(ActivityThread.java:4370)
E/AndroidRuntime( 6883): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 6883): 	at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 6883): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 6883): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 6883): 	at dalvik.system.NativeStart.main(Native Method)
E/SemcCheckin( 6883): Get crash dump level : java.io.FileNotFoundException: /data/semc-checkin/crashdump
I/dalvikvm( 6883): threadid=7: reacting to signal 3
E/dalvikvm( 6883): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
I/Process ( 6883): Sending signal. PID: 6883 SIG: 9
'eu.licentia.necessitas.industrius.example.raycasting' died


Starting remote process ...
Can't find eu.licentia.necessitas.industrius.example.raycasting process

Read the section with local libs
So i started clean with the smallest qt demos (simple editor with menu that comes with qt)

The secret to start it is to make sure for emulator that arm5 is choosen
also the run Project options should contain that necessitas libs should be delpoyed with the project at once

After that i did rebuild project and run
voila




After that i have tested the raycasting using the same staps as above arm5+ delploy local qt libs +use local qt libs
and it ran !



It started on sony xperia 8 but of course there is no buttons setup , and this should be the part two of the article :)

Starting remote process ...
D/dalvikvm( 8338): Trying to load lib /data/local/qt/lib/libQtCore.so 0x45910998
D/dalvikvm( 8338): Added shared lib /data/local/qt/lib/libQtCore.so 0x45910998
D/dalvikvm( 8338): No JNI_OnLoad found in /data/local/qt/lib/libQtCore.so 0x45910998
D/dalvikvm( 8338): Trying to load lib /data/local/qt/lib/libQtGui.so 0x45910998
D/dalvikvm( 8338): Added shared lib /data/local/qt/lib/libQtGui.so 0x45910998
D/dalvikvm( 8338): No JNI_OnLoad found in /data/local/qt/lib/libQtGui.so 0x45910998
D/dalvikvm( 8338): Trying to load lib /data/local/qt/plugins/platforms/android/libandroid-5.so 0x45910998
D/dalvikvm( 8338): Added shared lib /data/local/qt/plugins/platforms/android/libandroid-5.so 0x45910998
I/Qt      ( 8338): qt start
D/dalvikvm( 8338): Trying to load lib /data/data/eu.licentia.necessitas.industrius.example.raycasting/lib/libraycasting.so 0x45910998
D/dalvikvm( 8338): Added shared lib /data/data/eu.licentia.necessitas.industrius.example.raycasting/lib/libraycasting.so 0x45910998
I/Qt      ( 8338): qt start
D/Qt      ( 8338): startQtApp 
D/Qt      ( 8338): environmentString "HOME=/data/data/eu.licentia.necessitas.industrius.example.raycasting/files	TMPDIR=/data/data/eu.licentia.necessitas.industrius.example.raycasting/files	QT_IMPORT_PATH=/data/local/qt/imports	QT_PLUGIN_PATH=/data/local/qt/plugins" ("HOME=/data/data/eu.licentia.necessitas.industrius.example.raycasting/files", "TMPDIR=/data/data/eu.licentia.necessitas.industrius.example.raycasting/files", "QT_IMPORT_PATH=/data/local/qt/imports", "QT_PLUGIN_PATH=/data/local/qt/plugins") 
D/Qt      ( 8338): paramsString "QtApp	-platform	android" 
W/Qt      ( 8338): WARNING: QApplication was not created in the main() thread.
I/Qt JAVA ( 8338): surfaceChanged: 480,295
D/Qt      ( 8338): QAndroidPlatformIntegrationPlugin::create "android" 
D/Qt      ( 8338): QFbScreen::setPhysicalSize QSize(119, 79) 
D/Qt      ( 8338): QFbScreen::setGeometry QRect(0,0 480x295) 
D/Qt      ( 8338): QAndroidPlatformScreen::QAndroidPlatformScreen():QFbScreen() 
D/dalvikvm( 8338): GC freed 1092 objects / 78856 bytes in 481ms
D/Qt      ( 8338): createPlatformWindow false 
D/Qt      ( 8338): setFullScreen false 
D/Qt      ( 8338): keyDown 
D/Qt      ( 8338): keyUp 
D/Qt      ( 8338): keyDown 
I/Qt JAVA ( 8338): surfaceDestroyed 
W/IInputConnectionWrapper( 8338): showStatusIcon on inactive InputConnection

'eu.licentia.necessitas.industrius.example.raycasting' died

Starting remote process ...
D/dalvikvm( 8615): Trying to load lib /data/local/qt/lib/libQtCore.so 0x45768998
D/dalvikvm( 8615): Added shared lib /data/local/qt/lib/libQtCore.so 0x45768998
D/dalvikvm( 8615): No JNI_OnLoad found in /data/local/qt/lib/libQtCore.so 0x45768998
D/dalvikvm( 8615): Trying to load lib /data/local/qt/lib/libQtGui.so 0x45768998
D/dalvikvm( 8615): Added shared lib /data/local/qt/lib/libQtGui.so 0x45768998
D/dalvikvm( 8615): No JNI_OnLoad found in /data/local/qt/lib/libQtGui.so 0x45768998
D/dalvikvm( 8615): Trying to load lib /data/local/qt/plugins/platforms/android/libandroid-5.so 0x45768998
D/dalvikvm( 8615): Added shared lib /data/local/qt/plugins/platforms/android/libandroid-5.so 0x45768998
I/Qt      ( 8615): qt start
D/dalvikvm( 8615): Trying to load lib /data/data/eu.licentia.necessitas.industrius.example.raycasting/lib/libraycasting.so 0x45768998
D/dalvikvm( 8615): Added shared lib /data/data/eu.licentia.necessitas.industrius.example.raycasting/lib/libraycasting.so 0x45768998
I/Qt      ( 8615): qt start
D/Qt      ( 8615): startQtApp 
D/Qt      ( 8615): environmentString "HOME=/data/data/eu.licentia.necessitas.industrius.example.raycasting/files	TMPDIR=/data/data/eu.licentia.necessitas.industrius.example.raycasting/files	QT_IMPORT_PATH=/data/local/qt/imports	QT_PLUGIN_PATH=/data/local/qt/plugins" ("HOME=/data/data/eu.licentia.necessitas.industrius.example.raycasting/files", "TMPDIR=/data/data/eu.licentia.necessitas.industrius.example.raycasting/files", "QT_IMPORT_PATH=/data/local/qt/imports", "QT_PLUGIN_PATH=/data/local/qt/plugins") 
D/Qt      ( 8615): paramsString "QtApp	-platform	android" 
W/Qt      ( 8615): WARNING: QApplication was not created in the main() thread.
I/Qt JAVA ( 8615): surfaceChanged: 480,295
D/dalvikvm( 8615): GC freed 939 objects / 72968 bytes in 177ms
D/Qt      ( 8615): QAndroidPlatformIntegrationPlugin::create "android" 
D/Qt      ( 8615): QFbScreen::setPhysicalSize QSize(119, 79) 
D/Qt      ( 8615): QFbScreen::setGeometry QRect(0,0 480x295) 
D/Qt      ( 8615): QAndroidPlatformScreen::QAndroidPlatformScreen():QFbScreen() 
D/Qt      ( 8615): createPlatformWindow false 
D/Qt      ( 8615): setFullScreen false 
D/Qt      ( 8615): keyDown 
D/Qt      ( 8615): keyUp 
D/Qt      ( 8615): keyDown 


250 lines of Qt C++ code for Wolfenstein-esque of raycasting (labs.qt.nokia.com)


I saw this tweet about an old qt raycasting example running on nokia  
code is in graphics dojo
git clone git://gitorious.org/qt-labs/graphics-dojo.git
cd graphics-dojo/raycasting
qtcreator raycasting.pro
press run

You can inspect the code directly on gitorious 
I will try to see if it works on my android using necessitas

Sunday, August 07, 2011

Going back to #Debian testing is easy

I had some problems with latest cups in debian 1.4.8
so i have removed the cups from synaptic and wanted to switch back  to a more stable env

replace the unstable string with testing in

cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ testing main
deb-src http://ftp.us.debian.org/debian/ testing main

deb http://ftp.us.debian.org/debian/ testing non-free
deb-src http://ftp.us.debian.org/debian/ testing non-free

deb http://ftp.us.debian.org/debian/ testing contrib
deb-src http://ftp.us.debian.org/debian/ testing contrib

record all the packages that you have for posterity

sudo dpkg --get-selections > dpkglist.txt

remove some packages that offend your desktop eg some gnome3 ones or cups

then is time to restore the package list as it was before removal and update


sudo dpkg --set-selections < dpkglist.txt
sudo apt-get -y update
sudo apt-get dselect-upgrade
Now is time to reinstall cups
sudo apt-get install cups hplip

Sunday, July 31, 2011

openmelody cms install tips on #debian #ubuntu

unzip it in /var/www

i have the folder melody

edit the default root folder to accept cgi-bins executables by default
in /etc/apache2/sites-enabled/000-default
add this way the +ExecCGI to the Options

http://paste.ubuntu.com/652977/

uncomment

#AddHandler cgi-script .cgi

in /etc/apache2/mods-available/mime.conf

and then restart the apache server
sudo /etc/init.d/apache2 restart

install optional modules
apt-get install libcrypt-openssl-dsa-perl libcrypt-ssleay-perl
sudo apt-get install libcache-memcached-perl
sudo apt-get install libarchive-zip-perl
sudo apt-get install libxml-atom-perl
sudo apt-get install libproc-processtable-perl
sudo apt-get install libgd-gd2-perl

Wednesday, July 20, 2011

kwaak3 compiling for android 2.x

check out the source code

svn checkout http://kwaak3.googlecode.com/svn/trunk/ kwaak3

install sdl headers
sudo apt-get install libsdl-1.2-dev

cd kwaak3
cd ioquake
I have setup the android-ndk dir

like this in Makefile.local

ANDROID_NDK_DIR=/opt/android-ndk-r5b/
CC=/opt/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-gcc-4.4.0

with ndk-r5 i get
Issue 140: can't compile ioquake: gl.h:719: error: expected '=', ',', ';', 'asm' or 'attribute' before 'glScissor'

with ndk6 i get

make[2]: Entering directory `/home/mariuz/work/kwaak3/ioquake3'
CC code/client/cl_cgame.c
gcc: error trying to exec 'cc1': execvp: No such file or directory
Assembler messages:
Fatal error: invalid -march= option: `armv5te'
make[2]: *** [build/release-linux-arm/client/cl_cgame.o] Error 1
make[2]: Leaving directory `/home/mariuz/work/kwaak3/ioquake3'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/mariuz/work/kwaak3/ioquake3'
make: *** [release] Error 2

Monday, June 27, 2011

Volumeicon : better volume applet in #lxde for !debian or #Lubuntu

I really like lxde and i have installed on all computers that i have (minus the android phone but soon enough i will install on that too :))
but there is one annoying bug or feature the volume applet at least at home
is controlling only the front speakers and no mixer to choose what to be controlled or any preferences , only if you modify the source.

There is the help of alsa mixer to the rescue
open console and type
alsamixer
but there is a better way volumeicon
it places an icon in status bar and when you right click you can choose mixer and it will show you the alsamixer in all it's glory
pretty cool that cli always saves you and is more trusted than the GUI
git clone https://github.com/icebreaker/volumeicon.git
cd volumeicon
./configure --prefix=/usr --enable-notify
sudo make install

I have two soundcars so i have added in the config
cat /proc/asound/cards
0 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfeaec000 irq 44
 1 [default        ]: USB-Audio - Microsoft LifeChat LX-3000 
                      Microsoft LifeChat LX-3000  at usb-0000:00:1d.2-1, full speed

vi ~/.config/volumeicon/volumeicon
[Alsa]
card=hw:1
Start volumeicon or add it to the startup session
volumeicon &
if you are on pure LXDE/Debian
editor ~/.config/lxsession/LXDE/autostart
#add to the file
@volumeicon
If you are on Lubuntu
editor ~/.config/lxsession/Lubuntu/autostart
#add to the file
@volumeicon

Thursday, June 23, 2011

Using Jaybird Firebird JDBC driver with Ubuntu/Debian - cli way

I have used eclipse to create  simple console projects before and there it's easy to add references to the jaybird-full-*.jar , This time i wanted to compile from the shell.

Download jaybird from firebird jdbc download page
unzip it somewhere in your home
I usually put in a dir named  jdbc_client

cd ~/jdbc_client
compile it
javac -cp jaybird-full-2.1.6.jar examples/DriverExample.java
run it
java -cp jaybird-full-2.1.6.jar:examples DriverExample
It will trow you
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jaybird21 in java.library.path


Simple fix is to use the pure type4 java jdbc driver and this is done by using the magic "localhost/3050:" in the connection string



After that it starts ok
java -cp jaybird-full-2.1.6.jar:examples DriverExample
Firebird JCA-JDBC driver version 2.0 registered with driver manager.
Connection established.
Auto-commit is disabled.
Transactions are supported.
PHONE_LIST is a view.
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544558. Operation violates CHECK constraint INTEG_30 on view or table EMPLOYEE
At trigger 'CHECK_4'
 at org.firebirdsql.jdbc.AbstractStatement.executeUpdate(AbstractStatement.java:273)
 at DriverExample.main(DriverExample.java:296)
at org.firebirdsql.gds.GDSException: Operation violates CHECK constraint INTEG_30 on view or table EMPLOYEE
At trigger 'CHECK_4'
 at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(AbstractJavaGDSImpl.java:2169)
 at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJavaGDSImpl.java:2119)
 at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscDsqlExecute2(AbstractJavaGDSImpl.java:1185)
 at org.firebirdsql.gds.impl.GDSHelper.executeStatement(GDSHelper.java:226)
 at org.firebirdsql.jdbc.AbstractStatement.internalExecute(AbstractStatement.java:1102)
 at org.firebirdsql.jdbc.AbstractStatement.executeUpdate(AbstractStatement.java:269)
 at DriverExample.main(DriverExample.java:296)
Unable to increase everyone's salary.
GDS Exception. 335544558. Operation violates CHECK constraint INTEG_30 on view or table EMPLOYEE
At trigger 'CHECK_4'
Error Code: 335544558
SQL State: HY000
The query executed has 1 result columns.
Here are the columns:
FULL_NAME of type VARCHAR
Here are the employee's whose salary < $50,000
Bennet, Ann
Reeves, Roger
Stansbury, Willie
Nordstrom, Carol
O'Brien, Sue Anne
Brown, Kelly
Page, Mary
Parker, Bill
Yanowski, Michael
Green, T.J.
Montgomery, John
Guckenheimer, Mark
Closing database resources and rolling back any changes we made to the database.

Now we try the Jni way (aka using the not so pure driver)
chmod +x libjaybird21.so
Seems to be compiled for 32 bit (i'm on 64 but i have already the lib32 libs)
ldd ./libjaybird21.so 
 linux-gate.so.1 =>  (0xf770d000)
 libdl.so.2 => /lib32/libdl.so.2 (0xf76c7000)
 libc.so.6 => /lib32/libc.so.6 (0xf756d000)
 libstdc++.so.5 => /usr/lib32/libstdc++.so.5 (0xf74b3000)
 /lib/ld-linux.so.2 (0xf770e000)
 libm.so.6 => /lib32/libm.so.6 (0xf748d000)
 libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7470000)
To run using the compiled interface you need to add the -Djava.library.path when you run the program also change the connection string by adding the native keyword ":native:localhost/3050:"
java -Djava.library.path=. -cp jaybird-full-2.1.6.jar:examples DriverExample
For me it didn't worked because i have a 64bit machine so i need a jaybird source recompilation
libjaybird21.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

Tuesday, June 21, 2011

Mono Firebird Example updated for Mono 2.6/2.10.x release (#ubuntu / #debian)

Mono Firebird Example updated for Mono 2.6 release

First I hope you have Firebird 2.5 already installed with examples :)

Second Install Monodevelop and Mono
In my case was something like this on ubuntu
sudo apt-get install  mono-gmcs mono-gac mono-utils monodevelop monodoc-browser monodevelop-nunit monodevelop-versioncontrol  monodoc-gtk2.0-manual 

Also on Debian you can use mono 2.10.x by using experimental repository (after you add it in /etc/apt/sources.list)

sudo apt-get -t experimental install  mono-gmcs mono-gac mono-utils monodevelop monodoc-browser monodevelop-nunit monodevelop-versioncontrol  monodoc-gtk2.0-manual 

You must download the .Net Provider 2.6.5 for mono binary version NETProvider-2.6.5-MONO_LINUX.7z
Extract it somewhere in the project dir where you want to build it

Create an new C# Console Project
Then add the Firebird .net assembly to the test project
References-> Edit References -> .Net Assembly
browse to the FirebirdSql.Data.FirebirdClient.dll that you downloaded before (and extracted)
then click Add button



Fill the Main.cs this way and Build Solution (Also add System.Data references)



Then click run after the solution is build and the result should be like this

Sunday, May 29, 2011

Webkit based WebBrowser written in #Mono (C#) + #Firebird Step 2

I have used the funny browser as base for my project

In short i have added in this step main menu (just for example , today browsers don't use a main menu anymore look at google chrome)

For adding the menu items i have found this tutorial
Also the code is hosted in github at this address
https://github.com/mariuz/monobrowser/

ps: it's not a good idea to jump to mono 2.10 yet from debian experimental
I had to remove and reinstall mono 2.6.x and perl just to make it work again

Mono 2.10.x with support for IronPython landed in Debian experimental

I was excited to install a stable IronPython on my Debian sid box , fortunately there is the option to have the Mono 2.10 packages from experimental that contains also support for IronPython

Webkit based WebBrowser written in #Mono (C#) + #Firebird Step 1

I will start with this simple example


Install monodevelop and the mono.webkit (aka webkit-sharp)

sudo apt-get install gtk-sharp2 libwebkit1.1-cil monodevelop

start monodevelop new gtk c# project (copy paste the code from above to match your app main class and namespace my are: coolbrowser,monobrowser)

But i didn't found in the list of installed assemblies
so i use my rusty admin skills and install from git and from webkit-sharp source

git clone https://github.com/mono/webkit-sharp.git

it didn't found the webkit dev libs and the mcs so

sudo apt-get install libwebkit-cil-dev libwebkit-dev
sudo ln -s /usr/bin/gmcs /usr/bin/mcs

./autogen.sh --prefix=/usr
sudo make install

add webkit references to the project


here is the code


I have added the default size to be 800x600

Friday, May 20, 2011

Remote host debugging on android x86

There is a pretty cool way to debug android applications on an android x86 host
when you don't have usb connection between your workstation and the the device (in my case the netbook)

Here is described how can be done
And here is my screenshot with my Eclipse session debugging one remote app (you can even put breakpoints and is quite fast at deploying the app)


Here is the remote breakpoint example



What is next class ? nacl native apps for x86 at last
and maybe qt debugging on the device

Thursday, May 19, 2011

Why should you avoid eucalyptus and mysql too - Open scamware


But Eucalyptus has its own burden to carry. Eucalyptus might be open-source, but it uses something called an open-core model. Translated: There's a free community edition of Eucalyptus for everybody, but more advanced features beyond the basic stuff only go to paying customers.
This is exactly the model Mickos employed at MySQL, and it upset people then too.

http://www.theregister.co.uk/2011/05/19/marten_mickos_a_year_on/page2.html

WebGL around the net

The 3body rendering is looking better and better Thanks for the update now i can run webgl on open source drivers :) both in chromium and google-chrome

Also the google-chrome –ignore-gpu-blacklist really rocks
chromium-browser –ignore-gpu-blacklist
I use nouveau and radeon open source drivers and they are really capable of rendering simple levels from quake3 in webgl

So i keep webgl enabled on all opensource drivers … even on intel ones

What to add in the next update ? Hellknight demo works again

http://blog.tojicode.com/2011/04/hellknight-demo-works-again.html


WebGL Starter Package

http://blog.tojicode.com/2011/04/webgl-starter-package.html


Quake3 , Doom3 demos updated to use requestAnimationFrame

http://blog.tojicode.com/2011/04/requestanimationframe.html



Advanced WebGL – Part 1 & 2 & 3

http://codeflow.org/entries/2011/apr/11/advanced-webgl-part-1/

http://codeflow.org/entries/2011/apr/13/advanced-webgl-part-2-sky-rendering/

http://codeflow.org/entries/2011/apr/18/advanced-webgl-part-3-irradiance-environment-map/


WebGL Capabilities Analyzed

http://codeflow.org/entries/2011/apr/16/webgl-capabilities-analyzed/


ps:For me the above demos didn’t worked on radeon open source driver

lshw -C video

description: VGA compatible controller

product: RV710 [Radeon HD 4350]

The revenge of the RISC - Arm Killing the Wintel Legacy

You know Microsoft learned the hard way a little lesson of history
They had nt ported on diverse cpus : Alpha , Mips , and x86(32 bits) after that
they went full duopoly with Intel (do you remember the Wintel motto) and killed Alpha (the cpu and the port) , Mips support
Mips in a way is too close to arm architecture
in fact i wonder why it didn't displaced Arm ?

Otellini compared Android's current state with Microsoft in the past, which ran on platforms such as DEC's Alpha, IBM's PowerPC, ARM, and MIPS "before settling predominantly on Intel's x86 architecture,"

(I guess Intel really hopes to be the dominant marchitecture for the Androids)



So they went in bed with Intel and thought Duopoly would last forever
but it didn't went that well because there is a new monopoly Arm + Android Linux and Windows doesn't have anything to do on it
yes they will try and fail again with Window8 , why fail ? because all the backward compatible features are lost that means all the windows software (written for 32 bit x86 ) it belongs to ... wine or linux emulators (something like qemu).
On Windows + ARM all your beloved spyware will not work.

"Microsoft's move to put Windows on ARM processors will result in a fragmented set of four environments, none of which will run legacy PC Windows apps, said Intel executive"

That is the best way to shoot yourself in the foot Epic way

http://www.theregister.co.uk/2011/05/18/james_on_arm_and_windows/

The lesson , keep your os and applications ported to multiple cpus don't lock yourself to only one vendor like Microsoft , A good example is how linux did it and like Debian is doing with it's ports

creating firebird/flamerobin incomplete project for qtcreator

One way is to generate using the script from haiku create_project_files.pl

This simple script traverses the firebird/flamerobin sources and creates (incomplete) *.pro files in order to make the project sources available within the qt-creator IDE. Additionally, it will add those files to svn:ignore of their parent directory

run it in the firebird/flamerobin source directory
cd firebird_trunk
or
cd flamerobin

perl ../create_project_files.pl .

it will create haiku.pro , name can be changed later
qtcreator haiku.pro
and you can write c++ code with a cool ide with very good svn integration

For flameobin i have added the wx include files so the wx headers can be parsed by the ide

INCLUDEPATH += /usr/lib/wx/include/gtk2-unicode-release-2.8
INCLUDEPATH += /usr/include/wx-2.8

It would be nice to have a bakefile2qmake
or at least an Makefile importer in qtcreator
then if debugging will work from within the ide i will call it complete c++ ide for firebird, flamerobin :)

Sunday, May 15, 2011

firebird benchmark test suite from svn trunk

svn co https://firebird.svn.sourceforge.net/svnroot/firebird/qa/trunk/benchmark firebird_benchmark

create empty db with flamerobin
in
/tmp/firebird_benchmark.fdb

or use this python script
cat create_test.py 
import kinterbasdb

con = kinterbasdb.create_database(
    "create database '/tmp/firebird_benchmark.fdb' user 'sysdba' password 'masterkey'"
  )
The run the test suite

cd firebird_benchmark
python iibench.py --db_password=masterke --max_rows=500000 \
--rows_per_report=10000 \
--setup --max_table_rows=20000 --with_max_table_rows --db_name=/tmp/firebird_benchmark.fdb

Tip: url rewrite in docuwiki

if you want nice urls in dokuwiki http://example.com/dokuwiki/ (no .php ending in urls) then in conf/dokuwiki.php
you need to enable nice rewriting for .htaccess and useslash

$conf['userewrite']  = 1;                //this makes nice URLs: 0: off 1: .htaccess 2: internal
$conf['useslash']    = 1;  

also in .htaccess uncomment the related lines about rewrite rules
## Uncomment these rules if you want to have nice URLs using
## $conf['userewrite'] = 1 - not needed for rewrite mode 2
RewriteEngine on
#
## Not all installations will require the following line.  If you do, 
## change "/dokuwiki" to the path to your dokuwiki directory relative
## to your document root.
RewriteBase /dokuwiki

#
RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L]
RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1  [QSA,L]
RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2  [QSA,L]
RewriteRule ^$                        doku.php  [L]
RewriteCond %{REQUEST_FILENAME}       !-f
RewriteCond %{REQUEST_FILENAME}       !-d
RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
RewriteRule ^index.php$               doku.php


Wednesday, May 11, 2011

using apitrace to trace opengl api in !debian / !ubuntu

More about api trace here https://github.com/apitrace/apitrace
git clone https://github.com/apitrace/apitrace.git
cd apitrace
leafpad README &

It needs cmake, qt , qjson:
apt-get install cmake libqjson-dev libqt4-dev

cmake -H. -Bbuild
make -C build
LD_PRELOAD=build/glxtrace.so glxgears
build/tracedump glxgears | less -R


The logs are pretty detailed :)

you can use the nice build/qapitrace that does have opengl.org help links for the functions traced






0 glXChooseVisual(dpy = 0x1749010, screen = 0, attribList = {GLX_RGBA, GLX_RED_SIZE, GLX_USE_GL, GLX_GREEN_SIZE, GLX_USE_GL, GLX_BLUE_SIZE, GLX_USE_GL, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, GLX_
USE_GL, 0}) = &{visual = 0x1754b40, visualid = 297, screen = 0, depth = 24, c_class = 4, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}
1 glXCreateContext(dpy = 0x1749010, vis = &{visual = 0x1754b40, visualid = 297, screen = 0, depth = 24, c_class = 4, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size =
 256, bits_per_rgb = 8}, shareList = NULL, direct = True) = 0x17b2b00
2 glXMakeCurrent(dpy = 0x1749010, drawable = 41943042, ctx = 0x17b2b00) = True
3 glXQueryExtensionsString(dpy = 0x1749010, screen = 0) = "GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context GLX_EXT_visual_info GLX_EXT_visual_rating GLX_MESA_copy_sub_buf
fer GLX_MESA_swap_control GLX_OML_swap_method GLX_OML_sync_control GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGI_video_sync GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_pbuffer G
LX_SGIX_visual_select_group GLX_EXT_texture_from_pixmap GLX_INTEL_swap_event "
4 glXQueryExtensionsString(dpy = 0x1749010, screen = 0) = "GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context GLX_EXT_visual_info GLX_EXT_visual_rating GLX_MESA_copy_sub_buf
fer GLX_MESA_swap_control GLX_OML_swap_method GLX_OML_sync_control GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGI_video_sync GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_pbuffer G
LX_SGIX_visual_select_group GLX_EXT_texture_from_pixmap GLX_INTEL_swap_event "
5 glXGetProcAddressARB(procName = "glXGetSwapIntervalMESA") = 0x7f4c952c53e0
6 glLightfv(light = GL_LIGHT0, pname = GL_POSITION, params = {5, 5, 10, 0})
7 glEnable(cap = GL_CULL_FACE)
8 glEnable(cap = GL_LIGHTING)
9 glEnable(cap = GL_LIGHT0)
10 glEnable(cap = GL_DEPTH_TEST)
11 glGenLists(range = 1) = 1
12 glNewList(list = 1, mode = GL_COMPILE)
13 glMaterialfv(face = GL_FRONT, pname = GL_AMBIENT_AND_DIFFUSE, params = {0.8, 0.1, 0, 1})
14 glShadeModel(mode = GL_FLAT)
15 glNormal3f(nx = 0, ny = 0, nz = 1)
16 glBegin(mode = GL_QUAD_STRIP)
17 glVertex3f(x = 1, y = 0, z = 0.5)
18 glVertex3f(x = 3.65, y = 0, z = 0.5)
19 glVertex3f(x = 1, y = 0, z = 0.5)
20 glVertex3f(x = 3.54915, y = 0.852076, z = 0.5)
21 glVertex3f(x = 0.951057, y = 0.309017, z = 0.5)
22 glVertex3f(x = 3.47136, y = 1.12791, z = 0.5)


Thursday, May 05, 2011

Android x86 and grub2 - peace at last


I found a way to add android to the grub2 menu from debian on my eeepc laptop and on my debian/ubuntu workstations
Thanks for this page http://www.ceh-photo.de/blog/?p=357 I have downloaded the latest nightly for
eeepc http://android-x86.moonman.dk/
downloaded and created a usb disk
http://android-x86.moonman.dk/files/eeepc/eeepc-20110505_usb.img
dd if=eeepc-20110505_usb.img of=/dev/sdb
or if you use generic
dd if=eeepc-20110505_usb.img of=/dev/sdb
booted installed (without the grub installation option)
added android to the grub2 menu (debian sid, it should work on natty
too) and all worked without issues after that 




for me the system dir was /android-2011-02-xx and the
androidboot_hardware=eeepc
or if you run a genric pc
androidboot_hardware=generic_x86
please verify your dirs and mount your android partition to check the
dir name before running update-grub
mount /dev/sdb4 /mnt
ls /mnt/
android-2011-02-20  lost+found
Here is the full custom grub

And don't forget to update the grub2 config
update-grub



ps: now i should create a fake sdcard so applications can be installed

Wednesday, May 04, 2011

opengl context in lazarus ubuntu debian

Lazarus includes a TOpenGLControl - a LCL control with an OpenGL context. The lazarus package LazOpenGLContext can be found in /usr/local/share/lazarus/components/opengl/lazopenglcontext.lpk. An example can be found in /usr/local/share/lazarus/components/opengl/examples/testopenglcontext1.lpr
From the menu install the context package
Package -> open package and browse to
lazopenglcontext.lpk
in /usr/local/share/lazarus/components/opengl/
press install and then lazarus will be restarted after finish and you will have a
copy the example project from
/usr/local/share/lazarus/components/opengl/example
into a local dir
mkdir lazarus_opengl
cd lazarus_opengl
cp -rp /usr/local/share/lazarus/components/opengl/example .
open the project
openglcontext1.lpr and press run from the menu

you will have a nice spinning cube :)
what is next continue with nehe tutorials , lazarus ones
There are full complete headers up to opengl 4.1
So the sky is the limit

Wednesday, April 27, 2011

android-x86 nightly builds are back

I started to build my own images but nightly builds for android x86 are back
http://android-x86.moonman.dk/

Downloaded the gingerbread version dd it on the usb stick

sudo dd if=eeepc-20110427_usb.img of=/dev/sdb
sync

and rebooted the eeepc with the new image
wow how fast it is !

ps: got this issue (android skipping incompatible /usr/lib/libz.a when searching for -lz) when building gingerbread on debian 64 but was easy solvable :
sudo apt-get install ia32-libs g++-multilib gcc-multilib lib32z1-dev lib32ncurses5-dev

Tuesday, April 19, 2011

Cirrus acceleration on kvm/qemu

Copy paste the driver
https://lkml.org/lkml/2011/4/18/366

clone kernel from git
git clone https://github.com/mirrors/linux-2.6.git
patch -p1 < cirrus.patch
make menuconfig
choose and enable  under drivers>graphics >dri (xorg) > cirrus
make -j2
cd drivers/gpu/drm/cirrus
insmod cirrus.ko
[694023.819195] cirrus: disagrees about version of symbol module_layout

After i compiled the linux rc and install it seems that is booted into the qemu/kvm machine


[ 3.316695] cirrus 0000:00:02.0: setting latency timer to 64
[ 3.350323] Console: switching to colour frame buffer device 160x64
[ 3.364548] fb0: cirrusdrmfb frame buffer device
[ 3.364551] drm: registered panic notifier
[ 3.364823] [drm] Initialized cirrus 1.0.0 20110418 for
0000:00:02.0 on minor 0

lsmod | grep kms
drm_kms_helper 27159 1 cirrus
drm 163075 2 cirrus,drm_kms_helper
i2c_core 23909 3 drm_kms_helper,i2c_piix4,drm

Sunday, April 17, 2011

add haiku in grub2 also make bootable stick after build

I have made the bootable stick this way after my generic image finished
cd haiku/generated
dd if=haiku.image of=/dev/sdb
sync

add the next entry in grub2

sudo gedit /etc/grub.d/40_custom

for me the partition prepared is /dev/sda3

menuentry "Haiku" {
    set root=(hd0,3)
    chainloader +1
}

then update the grub config
sudo update-grub

Recovering grub with debian live usb stick

unetbootin didn't worked with creating the bootable android 2.2 so i in the process i have made debian unbootable
If you read the manual there is a live cd image (also there is the usb stick version )

I have downloaded the lxde version for i386
then written the image directly to the stick

cat debian-live-6.0.1-i386-lxde-desktop.img > /dev/sdb
sync

reboot

next is grub reinstall

Update: i have found that there is a debian Live EEEpc version , i will try that instead

dd if=eeepc-live-1.1~rc1-hybrid.iso of=/dev/sdb
sync

Update2:
Debian eepc works better so now i have chrooted and reinstalled grub this way

$sudo su 
# mount /dev/sda1 /mnt
# mount --bind /dev /mnt/dev
# mount --bind /proc /mnt/proc

Now chroot into the enviroment we made :

# chroot /mnt

Now install/recover Grub2 via :

#grub-install /dev/sda

Saturday, April 16, 2011

booting Android from a Cheap mp3/mp4 player on my eeepc

my usb stick is not booting anymore , i guess is time to buy another so i had a cheap mp3/mp4 player with z80 cpu ?!!

lsusb: ID 10d6:1101 Actions Semiconductor Co., Ltd D-Wave 2GB MP4 Player / AK1025 MP3/MP4 Player

i formated the /dev/sdb as ext4 just to be sure
then used the usual android usb instructions

zcat android-x86-1.6-r2_usb.img.gz | dd of=/dev/sdb

Android booted quite niceley on eeepc with wireless and all
next is to build the 2.2 / 2.3 image and burn it on the player's partition
I wanted to test the quake on it but it said that sdcard is not present
so i have to mount somehow the sdcard(the debian parition) and
install from there (put the data there)

Wednesday, April 13, 2011

Building haikuos adding devel packages like gcc + git

you can ad your custom build config the devel packages in cases you want to compile inside the image

create the file

build/jam/UserBuildConfig

the devel packages (jam seems to be very sensitive to space and ";" at the end )

AddOptionalHaikuImagePackages Development ;
AddOptionalHaikuImagePackages Git ;
AddOptionalHaikuImagePackages DevelopmentBase ;
AddOptionalHaikuImagePackages DevelopmentMin ;

a good idea if you build the anyboot image is to increase the image size from 100 default to 400
HAIKU_IMAGE_SIZE        = 400 ;

then you can build the image with the simple

jam -q
Next is howto figure it out how to make it install on /dev/sda from the jam file (auto install on partition) it said it installed but it couldn't boot yet

Monday, April 11, 2011

Securing Firebird 2.5 SuperClassic in Debian / Ubuntu

apt-get install firebird2.5-superclassic
dpkg-reconfigure firebird2.5-superclassic
Choose a good password
vi /etc/firebird/2.5/firebird.conf

add only the localhost to the Remote Bind Address (we listen only on it and nothing else)

RemoteBindAddress = 127.0.0.1
DatabaseAccess = Restrict /var/lib/firebird/2.5/data/

restart super classic
sudo service firebird2.5-superclassic restart

check if it listens on localhost ip only
netstat -tap | grep gds
tcp        0      0 localhost:gds_db        *:*                     LISTEN      2129/fb_smp_server

There are more ideas : running apache + php in a chroot , adding apparmor rules
maybe we need a chroot feature in firebird in the future

Thursday, April 07, 2011

Ubuntu servers in Romania

Here http://maps.ubuntu.com/map/

is the list of ubuntu installed servers in Romania , You can zoom in on specific area eg: Targu Mures

Wednesday, April 06, 2011

#Microsoft Lifechat LX-3000 headphones +sound card on !ubuntu natty

The device specs are here
I have plugged and it was recognized in sound preferences but no sound output (there was nothing to select there after i disabled the main soundcard) so sudo Restart
and all was ok (on another coleague machine it worked out of the box without the need of restart for sound output)

So yes they can write on the box Optimized for Ubuntu/Debian/Gnu Linux , even the Sound volume buttons work ok (+/-)

Microsoft Hardware Looks cool on Linux only

Tuesday, April 05, 2011

Nouveau part three : libtxc-dxtn on #debian

I found a way to fix nouveau libtxc_dxtn.so loading errors with the following repository

wget http://debian-multimedia.gnali.org/pool/main/libt/libtxc-dxtn/libtxc-dxtn0_1.0.0-0.0_amd64.deb
wget http://debian-multimedia.gnali.org/pool/main/libt/libtxc-dxtn/libtxc-dxtn-dev_1.0.0-0.0_amd64.deb
sudo dpkg -i libtxc-dxtn0_1.0.0-0.0_amd64.deb
sudo dpkg -i libtxc-dxtn-dev_1.0.0-0.0_amd64.deb
nouveau from git was to unstable so i loaded the one from debian (glxgears was black today so i went a few steps back)

sudo apt-get install libgl1-mesa-dri-experimental
or
sudo apt-get install libgl1-mesa-dri-experimental -t experimental

Monday, April 04, 2011

Installing Haiku-os on a partition from within Qemu

I build my own haiku images so this is a easy way to install and test on my machine

add new partition with fdisk /dev/sda
change the type to bfs
start qemu
sudo qemu -cdrom haiku-cd.iso -hda /dev/sda4 -m 1024

start installer , format the partition and then do the real install on that raw partition

stop the qemu when it finishes ctrl-c

start the new installed machine
sudo qemu  -hda /dev/sda4 -m 1024

later you can add it in grub menu to start it from there directly

Sunday, April 03, 2011

Opengl this is what i call well defined api

Dowoload the redbook 1.1 samples , unzip them
install the various mesa headers (you will figure out it's easy)

and then it compiles without errors and works out of the box !
gcc aaindex.c -lglut -lGL -lGLU
./a.out
ps:this is code from 1997

Monday, March 28, 2011

Building haikuos on ubuntu or debian

I'm following this guide on ubuntu natty and debian sid

checkout haiku source code
checkot build tools and install jam
svn checkout http://svn.haiku-os.org/haiku/buildtools/trunk haiku/buildtools
cd haiku/buildtools/jam 
make 
sudo ./jam0 install 
checkout haiku
svn checkout http://svn.haiku-os.org/haiku/haiku/trunk haiku/haiku
i'm interested only in gcc4 builds
so this is the 32 bit version
./configure --build-cross-tools-gcc4 x86 ../buildtools/
jam haiku-image
qemu generated/haiku.image
and if you like the 64bit version

./configure  --build-cross-tools-gcc4 x86-64 ../buildtools/
jam haiku-image
qemu generated/haiku.image

Thursday, March 24, 2011

unity3d on lubuntu 11.04

the install of the full gnome is needed and gdm will replace lxdm

sudo apt-get install unity
sudo apt-get install ubuntu-desktop

and voila it works with the open source radeon driver (gallium3d enabled)

Saturday, March 19, 2011

Android x86 on radeon videocards

I had some issues with starting the android 2.2 on my workstation and after asking on the android-x86 group i found they way adding nomodeset to the grub entry (presstab and add nomodeset to the grub entry)

No screenshots this time :) but is really fast , I showed to one coleague how fast is google maps rendering, There is one type of free appstore and the ssh shell works pretty well
I had to change the keyboard from chineese to english
Next is to test the 3d rendering if it works with the opensource radeon driver (test it with quake 1/2/3)
I love the browser's keyboard integration (pretty good at going trough the links in a speedy way )
I need that in  Chromium/Arora too
ps: i always have the links browser habbit of pressing Alt - Left Arrow and i'm always throwed in the
first console
I think with Android 3.x can be used as netbook/desktop on almost anything
And now i know where unity/gnome3 is going is the android connection NoX fast rendering
Dumb desktop with no backward compatible with win95/xp feeling but with semimodern Apple bad interface rippof : big icons with opengl rendering enabled view (to have the animated backgrounds crap)
What is next to test :Chrome OS

Saturday, March 05, 2011

Fixes to fbexport compilation on linux systems debian/ubuntu

It's easy to compile firebird export utility just download the version from sourceforge

cd fbexport-1.90
after that modify fbcopy/TableDependency.cpp
and add
#include <stdio.h>
to the include section otherwise you will get the error error: ‘printf’ was not declared in this scope
make should complete the job (of course you need the firebird headers , check if you have them installed with dpkg -L firebird2.5-dev)


 make
g++ -c -O1 -DIBPP_LINUX -DIBPP_GCC -Iibpp -o fbcopy/args.o fbcopy/args.cpp
g++ -c -O1 -DIBPP_LINUX -DIBPP_GCC -Iibpp -o fbcopy/fbcopy.o fbcopy/fbcopy.cpp
g++ -c -O1 -DIBPP_LINUX -DIBPP_GCC -Iibpp -o fbcopy/TableDependency.o fbcopy/TableDependency.cpp
g++ -c -O1 -DIBPP_LINUX -DIBPP_GCC -Iibpp -o fbcopy/main.o fbcopy/main.cpp
g++ -c -O1 -DIBPP_LINUX -DIBPP_GCC -Iibpp -o ibpp/all_in_one.o ibpp/all_in_one.cpp
g++ -pthread -lfbclient ibpp/all_in_one.o fbcopy/args.o fbcopy/fbcopy.o fbcopy/TableDependency.o fbcopy/main.o  -oexe/fbcopy
g++ -c -O1 -DIBPP_LINUX -DIBPP_GCC -Iibpp -o fbexport/ParseArgs.o fbexport/ParseArgs.cpp
g++ -c -O1 -DIBPP_LINUX -DIBPP_GCC -Iibpp -o fbexport/FBExport.o fbexport/FBExport.cpp
g++ -c -O1 -DIBPP_LINUX -DIBPP_GCC -Iibpp -o fbexport/cli-main.o fbexport/cli-main.cpp
g++ -pthread -lfbclient ibpp/all_in_one.o fbexport/ParseArgs.o fbexport/FBExport.o fbexport/cli-main.o -oexe/fbexport



and the binary is in exe dir


exe/fbexport
--------------------------------
FBExport v1.80 by Milan Babuskov (mbabuskov), using IBPP 2.5.3.0
Tool for importing/exporting data with Firebird and InterBase databases.
Usage: fbexport -[S|Sc|Si|Sh|I|If|X|L] Options

 -S  Select = output to file  (S - binary, Si - INSERTs, Sc - CSV, Sh - HTML)
 -I  Insert = input from file
 -If Insert by Full SQL = input from file, by parameterized SQL
 -X  eXecute SQL statement, use with -F to execute sql scripts
 -L  List connected users

Options are:                           -H Host          [LOCALHOST]
 -D Database                           -U Username      [SYSDBA]
 -F Filename (use - for stdout)        -O Role
 -P Password                           -T Trim chars    [off]
 -A "Charset"                          -J "Date format" [D.M.Y]
 -Q "SQL Query statement"              -K "Time format" [H:M:S]
 -C # = Checkpoint at # rows [1000]    -M Commit at each checkpoint [off]
 -E # = Ignore up to # errors [0] Set to -1 to ignore all
 -R Rollback transaction if any errors occur while importing [off]
 -V Table = Verbatim copy of table (use -Q to set where clause if desired)
 -B Separator [,] = Field separator for CSV export. Allows special value: TAB
Command-line options are not case-sensitive (except the TAB setting)


Update
I have added a few more fixes in this fork on the github (related to linking errors) and included the compiling fixes from above 


TIP : building firebird 2.5 from source remove /tmp/firebird folder

before doing make install is better to remove the /tmp/firebird if is owned by root

with 2.5.0 i had this error
 ConfigStorage: Cannot initialize the shared memory region
        operating system directive open failed
        Permission denied 



So i have checked out the 2.5.1 from svn/bzr
bzr branch lp:firebird/2.5
cd 2.5
./autogen.sh --prefix=/opt/firebird2.5.x --enable-superserver --with-system-editline
make
stop firebird
rm -rf /tmp/firebird
make install

now firebird runs happily on CentOS release 5.5

bristol tip on !ubuntu !debian use jackd

start jackd with alsa parameter
jackd -d alsa

then start bristol
startBristol -jack -vox

connect the imputs and the outputs from Jack Audio connection Kit

out_left -> playback_1
out_right -> playback_2


ps : now  i can remove monobristol from my system and clean all dependencies :)

Tuesday, March 01, 2011

qmake love.pro not war , use qtquick use android , show middle finger to #Microsoft

Qt quick is released and is funny that the demo is the old WW hippie bus


That means only one thing , freedom from the Mokia regime :Qt lives on in MeeGo, Ubuntu, WebOS, and now Android


Nobody wants silver crapware , I want java script , v8 , css3 , webgl not a crippled evironment like ie9=new ie6 is




Warwick Thumb Singlecut + Ashdown Mag - quick groove