i have added in the
grub/menu.lst
title Ubuntu karmic (development branch), kernel 2.6.31-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
quiet
and rebooted
then from ubuntu
sudo grub-install /dev/sda1
and i'm back to ubuntu for the moment
Monday, November 30, 2009
Thursday, November 26, 2009
Using #Fedora #Linux day three (#Ubuntu maniac perspective)
Here is an alternate fedora kde installer review
http://distrowatch.com/weekly.php?issue=20091123#feature
konqueror drives me crazy when i click an link in psi
infinite loop startup
sudo killall -9 kfmclient
so i had to change default browser to arora in the system settings
I don't have any printer configured
sudo /etc/init.d/cups stop
sudo chkconfig cups off
No iscsi sorry
sudo chkconfig iscsid off
no Yellow pages
sudo yum remove ypbind
sudo chkconfig lvm2-monitor off
sudo chkconfig openct off
I don't use nfs
sudo chkconfig rpcbind off
sudo chkconfig rpcidmapd off
sudo chkconfig netfs off
sudo chkconfig nfslock off
sudo chkconfig pcscd off
sudo chkconfig rpcgssd off
i don't update my cpu microcode too often
sudo chkconfig microcode_ctl off
I found that i have installed smolt with interesting stats about hardware used in Fedora
http://smolt.fedoraproject.org/
I didn't knew what portreserve is so i disabled it
http://fedoraproject.org/wiki/Features/Portreserve
sudo chkconfig portreserve off
live cd install leftovers http://forums.fedoraforum.org/showthread.php?t=207366
sudo chkconfig livesys off
sudo chkconfig livesys-late off
wtf sendmail by default !? maybe in next fedora it should be proposed postfix by default
also all the above daemons disabled by default (rpc/nfs related ones)
sudo yum install postfix
sudo yum remove sendmail
remove pulse audio see why skype related http://akdwivedi.wordpress.com/2009/05/09/skype-on-64bit-fedora-10/
sudo rpm -e kde-settings-pulseaudio-4.3-12.noarch
sudo yum remove pulseaudio
sudo yum remove pulseaudio-utils
sudo killall -9 pulseaudio
Here is how to add mp3 support in amarok
sudo yum install xine-lib-extras-freeworld
oh crap i can't remove konqueror in in the kde-base
http://forums.fedoraforum.org/showthread.php?t=227165
and i miss abrowser or iceweaseal packages (unbranded firefox)
I found that qmake is qmake-qt4
what i miss from ubuntu is command line not found suggestions (when you miss package bash can suggest you what to install)
http://distrowatch.com/weekly.php?issue=20091123#feature
konqueror drives me crazy when i click an link in psi
infinite loop startup
sudo killall -9 kfmclient
so i had to change default browser to arora in the system settings
I don't have any printer configured
sudo /etc/init.d/cups stop
sudo chkconfig cups off
No iscsi sorry
sudo chkconfig iscsid off
no Yellow pages
sudo yum remove ypbind
sudo chkconfig lvm2-monitor off
sudo chkconfig openct off
I don't use nfs
sudo chkconfig rpcbind off
sudo chkconfig rpcidmapd off
sudo chkconfig netfs off
sudo chkconfig nfslock off
sudo chkconfig pcscd off
sudo chkconfig rpcgssd off
i don't update my cpu microcode too often
sudo chkconfig microcode_ctl off
I found that i have installed smolt with interesting stats about hardware used in Fedora
http://smolt.fedoraproject.org/
I didn't knew what portreserve is so i disabled it
http://fedoraproject.org/wiki/Features/Portreserve
sudo chkconfig portreserve off
live cd install leftovers http://forums.fedoraforum.org/showthread.php?t=207366
sudo chkconfig livesys off
sudo chkconfig livesys-late off
wtf sendmail by default !? maybe in next fedora it should be proposed postfix by default
also all the above daemons disabled by default (rpc/nfs related ones)
sudo yum install postfix
sudo yum remove sendmail
remove pulse audio see why skype related http://akdwivedi.wordpress.com/2009/05/09/skype-on-64bit-fedora-10/
sudo rpm -e kde-settings-pulseaudio-4.3-12.noarch
sudo yum remove pulseaudio
sudo yum remove pulseaudio-utils
sudo killall -9 pulseaudio
Here is how to add mp3 support in amarok
sudo yum install xine-lib-extras-freeworld
oh crap i can't remove konqueror in in the kde-base
http://forums.fedoraforum.org/showthread.php?t=227165
and i miss abrowser or iceweaseal packages (unbranded firefox)
I found that qmake is qmake-qt4
what i miss from ubuntu is command line not found suggestions (when you miss package bash can suggest you what to install)
Wednesday, November 25, 2009
Using #Fedora #Linux day two (Ubuntu maniac perspective)
Installing skype for 64 bits fedora is harder than on #ubuntu
sudo yum install qt-x11-4.5.3-9.fc12.i686
sudo yum install qt-4.5.3-9.fc12.i686
sudo yum install libXScrnSaver-1.2.0-1.fc12.i686
download skype rpm for fc10+ (32bit version
)
http://www.skype.com/go/getskype-linux-beta-fc10
sudo rpm -Uvh skype-2.1.0.47-fc10.i586.rpm
configure it to Not use the pulse audio
arora browser is 0.10.1 with qt 4.5.3 , it's crashing if i use gmail.com and then close the tab
known bug , that i have reported to arora (seems to be fixed in qt 4.6 and arora from ubuntu karmic)
qtcreator is called qt-creator and is at version 1.3 in fedora !
next is to find where is qmake
sudo yum install qt-x11-4.5.3-9.fc12.i686
sudo yum install qt-4.5.3-9.fc12.i686
sudo yum install libXScrnSaver-1.2.0-1.fc12.i686
download skype rpm for fc10+ (32bit version
)
http://www.skype.com/go/getskype-linux-beta-fc10
sudo rpm -Uvh skype-2.1.0.47-fc10.i586.rpm
configure it to Not use the pulse audio
arora browser is 0.10.1 with qt 4.5.3 , it's crashing if i use gmail.com and then close the tab
known bug , that i have reported to arora (seems to be fixed in qt 4.6 and arora from ubuntu karmic)
qtcreator is called qt-creator and is at version 1.3 in fedora !
next is to find where is qmake
Monday, November 23, 2009
Screenshots in #php using #qt #python or #c++
I used the example from this article
and installed the needed libs on the server
sudo apt-get install libqt4-core libqt4-webkit python-qt4 xvfb
wget http://github.com/AdamN/python-webkit2png/raw/master/webkit2png.py
python webkit2png.py -x -o cnn.png --debug http://www.cnn.com
chmod +x webkit2png.py
from php
passthru("/home/mariuz/webkit2png.py -x -o /tmp/google.png --debug --scale 100 100 http://www.google.com")
i want to load a page with flash content , shameless plug reea.net
webkit2png.py –scale 200 200 -x -o reea.png –debug http://reea.net
but seems i have an flash error and the image is quite empty
Adobe Flash Player: gtk_clipboard_get(GDK_SELECTION_PRIMARY); failed. Trying to call gtk_init(0,0);
Xlib: extension “RANDR” missing on display “:99.0″.
also got the same error with gnash
I have investigated the c++ websnap examples from qt labs now hosted in git
http://labs.trolltech.com/blogs/2008/11/03/thumbnail-preview-of-web-page/
Another example in c++ is on this page and have made it compile on qt 4.5.3
and added
view->page()->settings()->setAttribute(QWebSettings::PluginsEnabled,true);
and installed the needed libs on the server
sudo apt-get install libqt4-core libqt4-webkit python-qt4 xvfb
wget http://github.com/AdamN/python-webkit2png/raw/master/webkit2png.py
python webkit2png.py -x -o cnn.png --debug http://www.cnn.com
chmod +x webkit2png.py
from php
passthru("/home/mariuz/webkit2png.py -x -o /tmp/google.png --debug --scale 100 100 http://www.google.com")
i want to load a page with flash content , shameless plug reea.net
webkit2png.py –scale 200 200 -x -o reea.png –debug http://reea.net
but seems i have an flash error and the image is quite empty
Adobe Flash Player: gtk_clipboard_get(GDK_SELECTION_PRIMARY); failed. Trying to call gtk_init(0,0);
Xlib: extension “RANDR” missing on display “:99.0″.
also got the same error with gnash
I have investigated the c++ websnap examples from qt labs now hosted in git
http://labs.trolltech.com/blogs/2008/11/03/thumbnail-preview-of-web-page/
Another example in c++ is on this page and have made it compile on qt 4.5.3
and added
view->page()->settings()->setAttribute(QWebSettings::PluginsEnabled,true);
Using #Fedora #Linux day one (Ubuntu maniac perspective)
I liked some things on fedora 12 and i wanted to test it and and use it for a week or two (on distrowatch i saw this idea of rotating linux distributions once in a while)
I downloaded kde spin http://spins.fedoraproject.org/kde/ and installed on secondary partition the installer was a little harder to gasp than the default ubuntu one (from what i remember) Maybe the partition editor should need a little care for example fiber channel is weird to apear in the menu at advaced partitions options, I was expecting something else .
Another thing i didn't liked it is why on earth i need root user and after that i need to create my user anyway ?, Do it once and make it do sudo I was expecting to be in the sudo group and admin by default like is in ubuntu
What was nice about installer is it finished whithout to many questions and after reboot i configured the user . Maybe it should be the same for ubuntu installer : Less questions for installer and then copy the files from cd/dvd
First thing i disabled is of course selinux (security insanity should be an option and feature not enabled by default)
What was nice that disk image was transfered to the the partition so no extra package install time like in debian .
Another bonus for updates is that is using xz by default and only what is changed is updated
(primary partition is ubuntu)
First i installed adobe flashplayer 10 (64 bit version)
http://labs.adobe.com/downloads/flashplayer10_64bit.html
wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
tar -zxvf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
mv libflashplayer.so /usr/lib64/mozilla/plugins/
by default there are some rules in firewall so i flush them
$ sudo iptables -L -n
[sudo] password for mariuz:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
$ sudo iptables -F
$ sudo iptables -L -n
added myself in sudoers list
su
vi /etc/sudoers
mariuz ALL=(ALL) ALL
installed fireofox arora psi and pidgin
I have created mariuz user
deleted /home/mariuz and
i use my home from ubuntu partition
added in /etc/fstab
UUID=190eba34-a00b-4245-9112-c92e73893085 /ubuntu ext4 defaults 0 1
ln -s /ubuntu/home/mariuz /home
if you want to find the block id
blkid /dev/sda1
/dev/sda1: UUID="190eba34-a00b-4245-9112-c92e73893085" TYPE="ext4"
enable rpm fusion for mp3 and other stuff
http://rpmfusion.org/RPM%20Fusion
ToDo: test and install nvidia driver
http://www.reddit.com/r/linux/comments/a68wl/how_to_fight_nouveau_the_wonderful_new_nvidia/
http://www.mjmwired.net/resources/mjm-fedora-nvidia.html#f12
I downloaded kde spin http://spins.fedoraproject.org/kde/ and installed on secondary partition the installer was a little harder to gasp than the default ubuntu one (from what i remember) Maybe the partition editor should need a little care for example fiber channel is weird to apear in the menu at advaced partitions options, I was expecting something else .
Another thing i didn't liked it is why on earth i need root user and after that i need to create my user anyway ?, Do it once and make it do sudo I was expecting to be in the sudo group and admin by default like is in ubuntu
What was nice about installer is it finished whithout to many questions and after reboot i configured the user . Maybe it should be the same for ubuntu installer : Less questions for installer and then copy the files from cd/dvd
First thing i disabled is of course selinux (security insanity should be an option and feature not enabled by default)
What was nice that disk image was transfered to the the partition so no extra package install time like in debian .
Another bonus for updates is that is using xz by default and only what is changed is updated
(primary partition is ubuntu)
First i installed adobe flashplayer 10 (64 bit version)
http://labs.adobe.com/downloads/flashplayer10_64bit.html
wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
tar -zxvf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
mv libflashplayer.so /usr/lib64/mozilla/plugins/
by default there are some rules in firewall so i flush them
$ sudo iptables -L -n
[sudo] password for mariuz:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
$ sudo iptables -F
$ sudo iptables -L -n
added myself in sudoers list
su
vi /etc/sudoers
mariuz ALL=(ALL) ALL
installed fireofox arora psi and pidgin
I have created mariuz user
deleted /home/mariuz and
i use my home from ubuntu partition
added in /etc/fstab
UUID=190eba34-a00b-4245-9112-c92e73893085 /ubuntu ext4 defaults 0 1
ln -s /ubuntu/home/mariuz /home
if you want to find the block id
blkid /dev/sda1
/dev/sda1: UUID="190eba34-a00b-4245-9112-c92e73893085" TYPE="ext4"
enable rpm fusion for mp3 and other stuff
http://rpmfusion.org/RPM%20Fusion
ToDo: test and install nvidia driver
http://www.reddit.com/r/linux/comments/a68wl/how_to_fight_nouveau_the_wonderful_new_nvidia/
http://www.mjmwired.net/resources/mjm-fedora-nvidia.html#f12
Monday, November 16, 2009
#Firebird available in major #linux distros : #Mandriva , #Debian, #Ubuntu, #Fedora ,#Gentoo,#OpenSuse
Finaly OpenSuse 11.2 is out. It is the first time that Firebird is in official OpenSuse repositories.
After Mandriva (2010.0 is very nice), Debian, Ubuntu, Fedora (and RHEL/Centos Fedora project repositories),Gentoo : we have now OpenSuse
All major free distro have now latest Firebird stable version (2.1.3) available in their official repositories.
Here is the list of where firebird 2.1.3 is included or can be installed
After Mandriva (2010.0 is very nice), Debian, Ubuntu, Fedora (and RHEL/Centos Fedora project repositories),Gentoo : we have now OpenSuse
All major free distro have now latest Firebird stable version (2.1.3) available in their official repositories.
Here is the list of where firebird 2.1.3 is included or can be installed
-
Debian [Done] by Damyan Ivanov
Ubuntu [Done] in the next LTS release Lucid Lynx
-
Fedora [Done] by Philippe Makowski
-
Gentoo [Done] http://www.gentoo-portage.com/dev-db/firebird
-
Mandriva [Done] by Philippe Makowski
OpenSuse [Done] by Philippe Makowski
-
Red Hat Enterprise Linux [Done] by Philippe Makowski
-
Centos [Done] by Philippe Makowski
-
Pardus [Done] Check the pisi repository
#hp #laser printer 400x after upgrading to #ubuntu #karmic
Seems that printer didn't worked after upgrade to karmic
so i had to run the hp-setup
and delete the old configuration , seems that all went ok after that (test page and aasdasdasd odt document)
Before that i had lots of errors
Returning IPP client-error-document-format-not-supported for Send-Document (ipp://localhost:631/printers/LaserJet-4000) from localhost
but the application/octet-stream was decommented in
/etc/cups/mime.types
and
/etc/cups/mime.convs
so i had to run the hp-setup
and delete the old configuration , seems that all went ok after that (test page and aasdasdasd odt document)
Before that i had lots of errors
Returning IPP client-error-document-format-not-supported for Send-Document (ipp://localhost:631/printers/LaserJet-4000) from localhost
but the application/octet-stream was decommented in
/etc/cups/mime.types
and
/etc/cups/mime.convs
Friday, November 13, 2009
#Firefox 0.1 aka #Phoenix on #Ubuntu #Karmik #Koala
This is how to install it and see how free web/firefox was 7 years ago
You can test then all the releaseses until ffx 3.5.5 and more
gmail works but is not supported by that old foxie
Download phoenix 0.1
Download gtk1.2 and libstdc++ needed for it from debian stable
get the foxkeh
wget http://ftp.mozilla.org/pub/phoenix/releases/0.1/phoenix-0.1-i686-pc-linux-gnu.tar.gz
tar -zxvf phoenix-0.1-i686-pc-linux-gnu.tar.gz
cd phoenix
./phoenix
welcome to web 2.0 (i think it was called slashdot at that time)
You can test then all the releaseses until ffx 3.5.5 and more
gmail works but is not supported by that old foxie
Download phoenix 0.1
Download gtk1.2 and libstdc++ needed for it from debian stable
wget http://ftp.us.debian.org/debian/pool/main/g/gtk+1.2/libgtk1.2_1.2.10-18.1_i386.debwget http://ftp.us.debian.org/debian/pool/main/g/glib1.2/libglib1.2_1.2.10-17_i386.debwget http://ftp.us.debian.org/debian/pool/main/g/gtk+1.2/libgtk1.2-common_1.2.10-18.1_all.debwget http://ftp.us.debian.org/debian/pool/main/g/glib1.2/libglib1.2ldbl_1.2.10-19_i386.debwget http://ftp.us.debian.org/debian/pool/main/g/gcc-2.95/libstdc++2.10-glibc2.2_2.95.4-27_i386.debsudo dpkg -i *.deb
get the foxkeh
wget http://ftp.mozilla.org/pub/phoenix/releases/0.1/phoenix-0.1-i686-pc-linux-gnu.tar.gz
tar -zxvf phoenix-0.1-i686-pc-linux-gnu.tar.gz
cd phoenix
./phoenix
welcome to web 2.0 (i think it was called slashdot at that time)
Tuesday, November 10, 2009
#qt 4.6 #beta with #arora #browser compiled for it uploaded for #ubuntu #karmic
I have reuploaded the qt 4.6 beta 1 this time i have added libqt4-
phonon-dev - it was missing by mistake so it will not remove all the kde packages this time :)
also arora 0.10.1 was recompiled with new qt 4.6 features
https://edge.launchpad.net/~mapopa/+archive/qt4.6
phonon-dev - it was missing by mistake so it will not remove all the kde packages this time :)
also arora 0.10.1 was recompiled with new qt 4.6 features
https://edge.launchpad.net/~mapopa/+archive/qt4.6
Wednesday, November 04, 2009
Debugging #Firebird and #Drupal #php #pdo driver
I started by installing latest php : 5.3.1 rc3 and then with the help of ddd
I can step and put breakpoints in the driver source
cd /opt/build/php-5.3.1RC3
sudo ddd /usr/sbin/apache2
Load the drupal install and follow this guide
also I have started to use the debug_backtrace to figure the error without text that i have (empty exception text)
print_r(debug_backtrace());
I can step and put breakpoints in the driver source
cd /opt/build/php-5.3.1RC3
sudo ddd /usr/sbin/apache2
Load the drupal install and follow this guide
also I have started to use the debug_backtrace to figure the error without text that i have (empty exception text)
print_r(debug_backtrace());
Thursday, October 29, 2009
I have joined to #Alioth #Firebird #Debian project
Seems that i need alioth account http://wiki.debian.org/Alioth to modify the firebird packages , in fact i will modify just the Git repository , maybe i will help with manual pages for firebird 2.5 and with packaging bugs
Tuesday, October 20, 2009
git insufficient permission for adding an object to repository database ./objects
this is a shared group repository
so i had to enter the repository dir and make sure group can write into it
ssh to server
cd repository.git
sudo chmod -R g+ws *
sudo chgrp -R mygroup *
git repo-config core.sharedRepository true
and the try to push origin master again
so i had to enter the repository dir and make sure group can write into it
ssh to server
cd repository.git
sudo chmod -R g+ws *
sudo chgrp -R mygroup *
git repo-config core.sharedRepository true
and the try to push origin master again
Sunday, October 18, 2009
#etckeeper is using #bzr by default in !ubuntu #karmic
sudo apt-get install etckeeper
grep VCS /etc/etckeeper/etckeeper.conf
VCS="bzr"
to see the changes in a graphical way
sudo apt-get install bzr-gtk
cd /etc
olive-gtk &
wait a few seconds/minutes ....
grep VCS /etc/etckeeper/etckeeper.conf
VCS="bzr"
to see the changes in a graphical way
sudo apt-get install bzr-gtk
cd /etc
olive-gtk &
wait a few seconds/minutes ....
Thursday, October 15, 2009
#qt 4.6 beta ppa for #ubuntu #karmic , soon I will upload #arora soon
Use it at your own risk https://edge.launchpad.net/~mapopa/+archive/qt4.6
I used the qt preview tp1 and sometimes it crashed so needed the new beta ,
I tested it on my kde desktop + I will upload arora recompiled with 4.6 version soon
The arora from karmic should work ok with 4.6 too but maybe a
recompile is needed
before you upgrade is better to save your list of pachages
dpkg --get-selections > installed-software.log
then you can reinstall qt/kde packages from console if you have problems with (revert to qt 4.5.3 if you want)
with
sudo dpkg --set-selections < installed-software.log
sudo dselect
and press I to install all the packages saved
On my sistem i had before qt tp1 packages and in deb name i had "tp1" > "beta1" if you think as a
package manager so i had to remove all qt packages and kde too and
reinstall them
sudo apt-get purge libqtcore4
Then i did the steps from above
I used the qt preview tp1 and sometimes it crashed so needed the new beta ,
I tested it on my kde desktop + I will upload arora recompiled with 4.6 version soon
The arora from karmic should work ok with 4.6 too but maybe a
recompile is needed
before you upgrade is better to save your list of pachages
dpkg --get-selections > installed-software.log
then you can reinstall qt/kde packages from console if you have problems with (revert to qt 4.5.3 if you want)
with
sudo dpkg --set-selections < installed-software.log
sudo dselect
and press I to install all the packages saved
On my sistem i had before qt tp1 packages and in deb name i had "tp1" > "beta1" if you think as a
package manager so i had to remove all qt packages and kde too and
reinstall them
sudo apt-get purge libqtcore4
Then i did the steps from above
Tuesday, October 06, 2009
#nginx and #wsgi on #ubuntu howto
I wanted to install mod_wsgi for nginx on ubuntu here are some basic steps for compiling it
wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz
cd nginx-0.7.62/
./configure --add-module=../mod_wsgi/ --with-debug
make
sudo make install
wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz
tar -zxvf nginx-0.7.62.tar.gz
hg clone http://hg.mperillo.ath.cx/nginx/mod_wsgi/
wget http://lophus.org/~fred/mod_wsgi_patch.diff
see why you need that patch
cd mod_wsgi/
patch -p1 < ../mod_wsgi_patch.diff
cd ..
cd nginx-0.7.62/
./configure --add-module=../mod_wsgi/ --with-debug
make
sudo make install
How can i use linux low level/posix api with #qt ?
well i was searching the google about the above question and i remembered that you can use c api in c++ like any other function
you can see these posix linux threads examples that can be compiled with c++ like this $ g++ -lpthread pthread1.c
Next step was to create a simple example with qt creator
something like get_pid.c example from advanced linux programming book
so after an empty gui project is created do small modification like this and run it
it should give you no errors and it should print in the console the pid
you can see these posix linux threads examples that can be compiled with c++ like this $ g++ -lpthread pthread1.c
Next step was to create a simple example with qt creator
something like get_pid.c example from advanced linux programming book
so after an empty gui project is created do small modification like this and run it
it should give you no errors and it should print in the console the pid
Starting /home/mariuz/work/qtgetpid/qtgetpid/qtgetpid...
/proc/self reports process id 7977
getpid() reports process id 7977
Sunday, October 04, 2009
playing with powertop on my netbook
I know that this via netbook does have issues with powermanagement and i want to digg deeper
to get some sort of power/instructions trace
so i have installed powertop
sudo apt-get install powertop
what is interesting C3 state (sleep) is buggy on this cpu (cache incoherent)
and i see that is really used , it should be disabled by bios but i know that bios is buggy too.
Powertop suggested this
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
so i have added it in /etc/rc.local
before the exit 0
to get some sort of power/instructions trace
so i have installed powertop
sudo apt-get install powertop
what is interesting C3 state (sleep) is buggy on this cpu (cache incoherent)
and i see that is really used , it should be disabled by bios but i know that bios is buggy too.
Powertop suggested this
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
so i have added it in /etc/rc.local
before the exit 0
Wednesday, September 30, 2009
Weird vncviewer in vncviewer with shared desktop option in #ubuntu
I wanted to share my desktop over the ssh connection , I will do ssh -X from another machine
and start the vncviewer , and here is how it looks when you start vncviewer on the localhost
and start the vncviewer , and here is how it looks when you start vncviewer on the localhost
Friday, September 25, 2009
Building #Firebird 2.5.x extension for #Php 5.x.x on #Windows
Follow the advice on howto compile php on windows with visual studio express (yucks)
http://wiki.php.net/internals/windows/stepbystepbuild
I will not copy paste all the steps here , a short document makes them easy to follow
1.Install Cisual Studio C++ 20xx
http://www.microsoft.com/express/Downloads/#2008-Visual-CPP
2. get and install windows sdk 6.1
3. get a php 5.x snapshot or any stable version 5.x (do not extract yet!)
Next is is to download a zip file with firebird 2.5.x final from sourceforge
in my case http://sourceforge.net/projects/firebird/files/firebird-win32/2.5.2-Release/Firebird-2.5.2.26540-0_Win32_pdb.zip/download
Next is to unzip the files from bin,include,lib
into C:\php-sdk\php53dev\vc9\x86\deps
enable firebird extension from the build console (By default thread safe version is build )
configure --disable-all --enable-cli --with-interbase
nmake
cd Release_TS
php -m
should show you that interbase/firebird extension is there
If you want to create the shared dll for the firebird extension you need to provide
--with-interbase=shared to the configure script
otherwise it will be included in the big php executable
Another note is if you do use IIS with fastcgi then you must disable threading support (Non Thread Safe ) in the configure part you must add --disable-zts
Update:
The work to compile full firebird 2.5.x server with visual c++ 20xx and $sudo make the php core developers happy is DONE (the firebird extension it will be included by default in official php 5.x zip file for windows)
http://wiki.php.net/internals/windows/stepbystepbuild
I will not copy paste all the steps here , a short document makes them easy to follow
1.Install Cisual Studio C++ 20xx
http://www.microsoft.com/express/Downloads/#2008-Visual-CPP
2. get and install windows sdk 6.1
3. get a php 5.x snapshot or any stable version 5.x (do not extract yet!)
Next is is to download a zip file with firebird 2.5.x final from sourceforge
in my case http://sourceforge.net/projects/firebird/files/firebird-win32/2.5.2-Release/Firebird-2.5.2.26540-0_Win32_pdb.zip/download
Next is to unzip the files from bin,include,lib
into C:\php-sdk\php53dev\vc9\x86\deps
enable firebird extension from the build console (By default thread safe version is build )
configure --disable-all --enable-cli --with-interbase
nmake
cd Release_TS
php -m
should show you that interbase/firebird extension is there
If you want to create the shared dll for the firebird extension you need to provide
--with-interbase=shared to the configure script
otherwise it will be included in the big php executable
Another note is if you do use IIS with fastcgi then you must disable threading support (Non Thread Safe ) in the configure part you must add --disable-zts
Update:
The work to compile full firebird 2.5.x server with visual c++ 20xx and $sudo make the php core developers happy is DONE (the firebird extension it will be included by default in official php 5.x zip file for windows)
Wednesday, September 16, 2009
Compiling #mysql #workbench 5.1.x on #ubuntu #debian #Linux
At this time 5.1.19 is available on download link
wget http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-gpl-5.1.19-src.tar.gz/from/http://mysql.mirrors.pair.com/ -O mysql-workbench-gpl-5.1.19-src.tar.gz
tar -zxvf mysql-workbench-oss-5.1.19.tar.gz
cd mysql-workbench-oss-5.1.19/
sudo apt-get install libzip-dev libsigc++-2.0-dev libglade2-dev libgtkmm-2.4-dev
libgnome2-dev uuid-dev lua5.1 liblua5.1-0-dev libpcre3-dev
./autogen.sh
make -j2
sudo make install
wget http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-gpl-5.1.19-src.tar.gz/from/http://mysql.mirrors.pair.com/ -O mysql-workbench-gpl-5.1.19-src.tar.gz
tar -zxvf mysql-workbench-oss-5.1.19.tar.gz
cd mysql-workbench-oss-5.1.19/
sudo apt-get install libzip-dev libsigc++-2.0-dev libglade2-dev libgtkmm-2.4-dev
libgnome2-dev uuid-dev lua5.1 liblua5.1-0-dev libpcre3-dev
./autogen.sh
make -j2
sudo make install
Subscribe to:
Posts (Atom)









