Wednesday, December 28, 2011

My FSocial Network

Here is how my FNetwork looks like bellow The only observation I'm mostly strongly connected with coworkers , that means that i use the network for coworker notifications or maybe i'm workaholic :) I wish the visualisation was made with webgl

Tuesday, December 27, 2011

One way to run firebird pdo tests

Just to not forget how to run them i write here


TEST_PHP_EXECUTABLE=auto php -n ./run-tests.php ext/pdo_firebird
of course you can add username/password , db path
PDO_FIREBIRD_TEST_DSN='firebird:dbname=/var/lib/firebird/2.5/data/employee.fdb'
PDO_FIREBIRD_TEST_USER='SYSDBA' PDO_FIREBIRD_TEST_PASS='masterkey'
TEST_PHP_EXECUTABLE=auto php -n ./run-tests.php ext/pdo_firebird
Saw it via comment section from pdo firebird driver documentation

Saturday, December 10, 2011

php doc team docbook editor is pretty cool

We want something like this for firebird doc team :) Here is one shot with the documentation writing online, no need for other xml editors

Thursday, December 08, 2011

wodim saved my day and wrote the xubuntu 64 bit iso at last

I had problems with burning dvds both with xfburn and with brasero too

One of the errors  was
SCSI error on write(0,16): [3 73 03] Power calibration area error

Another problem was that burn completed the writing in xfburn but when reading and checking the md5 for the dvd

dd bs=1M if=/dev/sr0 of=/tmp/iso


[  349.397899] sr 0:0:1:0: [sr0]  Add. Sense: No seek complete
[  349.397906] sr 0:0:1:0: [sr0] CDB: Read(10): 28 00 00 05 49 df 00 00 01 00
[  349.397925] end_request: I/O error, dev sr0, sector 1386364
[  349.397933] Buffer I/O error on device sr0, logical block 346591
[  373.127873] sr 0:0:1:0: [sr0] Unhandled sense code
[  373.127880] sr 0:0:1:0: [sr0]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  373.127887] sr 0:0:1:0: [sr0]  Sense Key : Medium Error [current]
[  373.127896] Info fld=0x5299c
[  373.127899] sr 0:0:1:0: [sr0]  Add. Sense: No seek complete
[  373.127907] sr 0:0:1:0: [sr0] CDB: Read(10): 28 00 00 05 29 9c 00 00 20 00
[  373.127926] end_request: I/O error, dev sr0, sector 1353328
[  373.127933] Buffer I/O error on device sr0, logical block 338332
[  373.127939] Buffer I/O error on device sr0, logical block 338333
[  373.127954] Buffer I/O error on device sr0, logical block 338334
[  373.127957] Buffer I/O error on device sr0, logical block 338335
[  373.127961] Buffer I/O error on device sr0, logical block 338336
[  373.127964] Buffer I/O error on device sr0, logical block 338337
[  373.127967] Buffer I/O error on device sr0, logical block 338338
[  373.127970] Buffer I/O error on device sr0, logical block 338339
[  373.127974] Buffer I/O error on device sr0, logical block 338340
[  373.127977] Buffer I/O error on device sr0, logical block 338341
[  379.137046] sr 0:0:1:0: [sr0] Unhandled sense code
[  379.137053] sr 0:0:1:0: [sr0]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  379.137060] sr 0:0:1:0: [sr0]  Sense Key : Medium Error [current]
[  379.137069] Info fld=0x5299c



and it damaged every dvd i have throwed to it

Solution was to use the command line tools (saw it on a forum or in a bug tracker )



wodim -v dev=/dev/sr0 speed=4 xubuntu-11.10-desktop-amd64.iso
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 1 = CD-ROM
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : 'Optiarc '
Identification : 'DVD RW AD-7200A '
Revision       : '1.06'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x001B (DVD+R)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R) (current)
Profile: 0x001A (DVD+RW)
Profile: 0x0016 (DVD-R/DL layer jump recording)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x0012 (DVD-RAM)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
Drive buf size : 1310720 = 1280 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size      : 12582912 = 12288 KB
Track 01: data   693 MB      
Total size:      796 MB (78:52.88) = 354966 sectors
Lout start:      796 MB (78:54/66) = 354966 sectors
Current Secsize: 2048
HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.
Blocks total: 2295104 Blocks current: 2295104 Blocks remaining: 1940138
Speed set to 5540 KB/s
Starting to write CD/DVD at speed   4.0 in real unknown mode for single session.
Last chance to quit, starting real write in    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Starting new track at sector: 0
Track 01:    1 of  693 MB written (fifo  97%) [buf  62%]   0.5x.




after that everything went fine


dd bs=1M if=/dev/sr0 of=/tmp/iso
693+1 records in
693+1 records out
726990848 bytes (727 MB) copied, 139.896 s, 5.2 MB/s



Tuesday, November 29, 2011

Doom 3 Game of the day Hexen : Edge of Chaos HD Gameplay video

The mod is is based on doom3 and
to keep it short , watch the video and be scared


Friday, November 25, 2011

Replacing gnome3 with xfce/lxde on #fedora core 16

To replace and remove the ugly gnome 3 interface from fedora core 16 (it doesn't work if you don't have hw 3d acceleration if you are on a remote vnc session ) and to enable something more light and classy

you need to do the following easy steps

(it's better to do it in a console)


yum groupremove 'GNOME Desktop Environment'
yum groupinstall XFCE
yum groupinstall LXDE




create the file with a editor
/etc/sysconfig/desktop

DISPLAYMANAGER=/usr/sbin/lxdm
PREFERRED=/usr/bin/startlxde

and reboot


to enable vnc session for remote users
/bin/su username -c "/usr/bin/vncserver :1 -geometry 1440x900"



also it can be added in the rc.local so they will be enabled at server startup

/bin/su username2 -c "/usr/bin/vncserver :2 -geometry 1440x900"
/bin/su username3 -c "/usr/bin/vncserver :3 -geometry 1440x900"
....



Wednesday, November 23, 2011

Volumeicon +xfce-mixer part two : better volume applet in #lxde for !debian or #Lubuntu

Dedicated to Jancsi who just switched from unity to Lubuntu

As you might now from part one i use volumeicon for controlling my speakers when i listen to music
There is no easy graphical mixer in lubuntu but
There is the help of xfce4-mixer to the rescue



open console and type to in
sudo apt-get install xfce4-mixer
next install and compile volumeicon with the patch to use xfce4-mixer by default
it places an icon in status bar and when you right click you can choose mixer and it will show you the xfce4-mixer in all it's glory

git clone https://github.com/mariuz/volumeicon.git
cd volumeicon
sudo apt-get install libasound2-dev
./configure --prefix=/usr 
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
by default when you click on volume icon it mutes the sound card so in preferences i put Left Mouse Button Action to open the Slider And the Channel will be PCM



LightDM on Xubuntu 11.10 horror story

I have installed xubuntu 11.10 on one machine that was already with kubuntu installed on it
after reboot there was nologin only some flashes
I have disabled graphical boot , deleted quiet and all the pretty options in the grub menu (nomodeset added too)
no luck
removed kdm still no luck
I have launched lightdm manually with debug flag
lightdm -d and saw that it needs unity-greeter and there was no such thing as unity-greeter installed
so i have installed it  and changed to the classic gtk greeter
In /etc/lightdm/lightdm.conf i have changed
greeter-session=lightdm-gtk-greeter

Reboot and still in the logs i saw "lightdm main process  TERM signal"
and No greeter .
What is weird that lxdm started if launched from command line also
the start-xfce4 worked ok
what to do ?
i have added in rc.local
start lightdm and after reboot
the login was ok again






Tuesday, November 22, 2011

Installing qxl drivers on Windows7 guest (and others virtio drivers for ballooning memory, virtioserial, network and viostor)

Download qxl driver Windows qxl driver qxl-0.10-20112808.zip

extract it  then install it

cd x86
pnputil -i -a qxl.inf


from the downoad page also you need to install spice vd-agent Windows guest agent - vdagent-win32_20111124.zip



Last thing you need to do is install the virtual desktop agent for your windows 7 guest. To do this, copy the two executable files from the vdagent zip file 






Now go to the directory where these executables are located and type “vdservice install”. This will install and start the guest agent service as shown below.








You might need  virtio drivers 
The drivers include virtio drivers for ballooning memory, virtioserial, network and viostor ( block drivers ). These drivers are signed but not WHQL and there are no gui installers for them.


This is the installation method with virtio drivers :
Download the the host the iso.
Mount the iso in the windows guest machine from the the virt-manager details interface


and for each inf install it and then configure the machine to use the virtio


d:\
cd Windows7 
cd x86 
pnputil -i -a *.inf

Monday, November 21, 2011

Ie9 on kvm-linux

The steps/scripts for using ie9 test machine are quite easy to follow if you are using virtualbox
but what about kvm-linux ?


I followed the guide to make vhd to kvm raw This guides works but it creates a raw partition of 127G in size so is not so good :
qemu-img convert -f vpc -O raw Windows\ 7.vhd Windows7ie9.img

 so i used this command line instead:

 qemu-img convert -f vpc -O qcow2 Windows\ 7.vhd Windows7ie9.qcow

and image is now ~ 13G
Create new virtual machine importing the converted qcow2 image

Notice I had an issue with the tablet device so i have disabled it for vnc

You can add montly script in scheduler to rearm it on the windows guest
rearm.bat
slmgr –rearm
shutdown -r -t 0

Next i had some issues with vnc (mouse positioned weird and at the distance with the vnc cursor when connecting from remote)


and I have enabled the spice server instead of the vnc one in the virt-manager configuration for this host and then installed spice client on my machine

sudo apt-get install spice-client

run it with

spice-client
type host port and password if you have one set

To Exit the spice client Shift - F12






Monday, November 14, 2011

theÖutlet new free album by absurdcus

Absurducus launched his album on 11.11.11 and at 11.11 AM/PM you can add remove a few nanoseconds just for fun

Album is under Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0) and can be ripped and then after you listen you can donate to make him millionaire

Sunday, November 13, 2011

Correcting #ubuntu Unity mistake - move it at the bottom

I use Lubuntu or Xubuntu and i have read that the problem with the unity on the left side can be easily fixed
I think no one would complain if the bar would be at the bottom with a proper classic start menu (win7 style) isn't it ? and yes with the close buttons on the right please

ps : I have enough pixels or two monitors to put unity wherever i like and want , that is the cost of freedom

Saturday, November 12, 2011

My next phone will be with Debian / Ubuntu

This ubuntu phone art concept made me think that i really want a Linux phone based on Debian/Ubuntu
I don't want a Nokia zombie all i want a true open source phone (true in the heart and true in the ubuntu spirit)



Friday, November 11, 2011

#Ubuntu After the uTorrent page was virused i recommend QBittorrent to anyone

I'm pissed utorrent doesn't make a client for Linux until the endof the year (only next) but in a sense we Linux users don't really care , there are many torrent clients to choose from One that i love is qbittorrent. It works great on all platforms , it is written in QT framework and it looks and feels just like uTorrent minus the crappy bars and viruses Did i mentioned that is small and better in the sense that is simpler to use than kTorrent (starts in < 1s instead of minutes) And it does have a cool logo too

In ubuntu you can install this way

 sudo apt-get install qbittorrent

 or on windows/macosx from this page

Building kinterbasdb docs

sudo apt-get install python-sphinx

svn co https://firebird.svn.sourceforge.net/svnroot/firebird/kinterbasdb kinterbasdb

kinterbasdb/trunk/sphinx

make html
mkdir -p .build/html .build/doctrees
sphinx-build -b html -d .build/doctrees   . ../docs
Running Sphinx v1.0.7
loading pickled environment... not yet created
building [html]: targets for 11 source files that are out of date
updating environment: 11 added, 0 changed, 0 removed
reading sources... [100%] tutorial                                                                                                                                                           
/home/mariuz/work/kinterbasdb/trunk/sphinx/beyond-python-db-api.txt:75: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.

/home/mariuz/work/kinterbasdb/trunk/sphinx/beyond-python-db-api.txt:: WARNING: using old C markup; please migrate to new-style markup (e.g. c:function instead of cfunction), see http://sphinx.pocoo.org/domains.html
/home/mariuz/work/kinterbasdb/trunk/sphinx/changelog.txt:950: (WARNING/2) Block quote ends without a blank line; unexpected unindent.

/home/mariuz/work/kinterbasdb/trunk/sphinx/changelog.txt:1158: (WARNING/2) Definition list ends without a blank line; unexpected unindent.

/home/mariuz/work/kinterbasdb/trunk/sphinx/concurrency.txt:167: (WARNING/2) Block quote ends without a blank line; unexpected unindent.

/home/mariuz/work/kinterbasdb/trunk/sphinx/python-db-api-compliance.txt:32: WARNING: duplicate object description of kinterbasdb.Cursor, other instance in /home/mariuz/work/kinterbasdb/trunk/sphinx/beyond-python-db-api.txt, use :noindex: for one of them
/home/mariuz/work/kinterbasdb/trunk/sphinx/python-db-api-compliance.txt:107: WARNING: duplicate object description of kinterbasdb.Connection, other instance in /home/mariuz/work/kinterbasdb/trunk/sphinx/beyond-python-db-api.txt, use :noindex: for one of them
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] tutorial                                                                                                                                                            
writing additional files... genindex py-modindex search
copying static files... done
dumping search index... done
dumping object inventory... done
build succeeded, 7 warnings.

Build finished. The HTML pages are in .build/html.

Saturday, November 05, 2011

fixing !Debian sid dpkg: warning: 'ldconfig' not found in PATH or not executable.

If you have this bug with sid when you do sudo apt-get dist-upgrade
dpkg: warning: 'ldconfig' not found in PATH or not executable.
The simple solution is to modify in /etc/sudoers
Defaults   env_reset
Defaults   secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 

constantly usable #debian testing installer

If you search for usable testing iso you can find a debian Official CD/DVD images of the testing distribution (regenerated weekly) you only need the first cd from the list , burn CD1 iso it and start (boot from it)

Sunday, October 16, 2011

making sound in tux guitar #ubuntu and #debian

I had no sound on my tuxguitar when playing gp3 files so i had to install timidity and java sound plugin (they are not installed by default ) sudo apt-get install timidity tuxguitar-jsa and then select in Tools ->Settings -> Sound Midi Port -> Timidity
Now i can go back to [Eric Clapton] Cocaine

Monday, October 03, 2011

Php Image Slow SMP Magick on #Ubuntu / #Debian

There is a known bug with Image Magick : it can be very slow when used with openmp enabled (by default in debian/ubuntu) on multicore systems (almost on all servers these days) It is eating a lot of cpu (50-100% for each core) instead of idling at 1-2% (for simple image manipulations) It was strange for me that one single core server was faster than a quad core in the same specs with the rest of the config (os ubuntu 10.04 lts, kernel latest, ioscheduler : deadline) Eliminating the problems on what could slow down the server (php version , image magick version , kernel version ) the only thing left was cpu Solution is very simple configure imagemagick without openmp
apt-get buil-dep imagemagick
apt-get source imagemagick
cd imagemagick-6.5.7.8/
sudo vi debian/rules
add ~ line 39 --disable-openmp (dont' forget to add \ to the privious line)
it should look like
       --x-libraries=/usr/lib/X11 \
        --disable-openmp
Rebuild the package and reinstall
dpkg-buildpackage -b
sudo apt-get remove --purge libmagickcore2
cd ..
dpkg -i libmagickcore2* libmagickwand2*
apt-get install php5-imagick
/etc/init.d/apache2 restart

Sunday, October 02, 2011

Where the rock stars go when they go down ? they go to country hell

My biggest wtf moments were when i saw that Robert Plant is singing and dancing country music I wondered for months and years how that could that happen ? how he can go so low After so many great performances in rock concerts . While listening to many Blues Bands i observed that many songs were ripped by Led Zepelin and others so in the end Led Zeppelin is one of the best Cover Bands of them all This why the main lead singer can go so low , he can play anything even country music (no sacrifice or spells were involved in the process)

Friday, September 30, 2011

MSI MS7528 (G31M3 motherboard) bios update Linux horror story

I had this error on dmes log output BIOS bug: CPU MTRRs don't cover all of memory, losing 768MB of RAM Solution is to upgrade the bios fro v1.1 to v 1.3 1.After i have searched the motherboard on msi site i didn't knew where is the generic motherboard (without F/L) and it seems that according to the forum All I can see are the -F and -L(S) models. It's almost as if the plain G31M3 does not exist. and if you like to know why doesn't my board have the -F printed on it:"-F" is ommited. G31M3-F or G31M3 means the same board
2. Flashrom from linux doesn't work yet with this board
3. Next instal windows (yes you read that is right) and use the useless Windows tool Live update 5 that doesn't work at all (it doesn't find the drivers, it doesn't find the bios update)
4. I need to put another tool that it will install DOS ! and then put the zip with the bios on an usb stick
5. I had to run fix it to redo the drive geometry also i had to format the usb stick
6. Required Boot from ubuntu live cd and remove windows (optionally format usb stick as ubuntu live cd)
check the bios and dmesg log
dmesg
[    0.000000] DMI: MICRO-STAR INTERNATIONAL CO.,LTD MS-7528/G31M3-F(MS-7528), BIOS V1.3 06/19/2009
...

[    0.000000] total RAM covered: 4096M

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]