Thursday, February 11, 2010
I just found an existing iPhone app doing exactly what I had planned to do: PushMail. Kudos to its author Simon Patarin. I'll have to think of something else for my first app.
Working on my first iPhone app project.
Will have a back-end receiving E-mails from exim, putting them in a database.
Installed php plugin for parsing MIME e-mails:
sudo pear install Mail_Mime-1.6.0
sudo pear install Mail_MimeDecode
Hm, according to this:
I really want this:
Trying:
sudo pecl install mailparse
Ok, think it worked, added an entry in /etc/php5/conf.d for mailparse.
I have a work-in-progress version of mime mail parsing in /home/erl/bin/informMailPiper.php. Run with php -f , and send msg to stdinput.
Monday, January 18, 2010
Sunday, January 17, 2010
Continuing with insight3d...
...Seems like my opencv was built for i386 architecture (despite being on a 64 bit architecture).
Manually changed CMakeCache.txt to read:
CMAKE_OSX_ARCHITECTURES:STRING=x86_64
did make clean and make, we'll see how it goes (takes a long time to compile, IIRC).
Didn't work right away.
Deleted contents of build dir, and rebuilding, using instructions at http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port, but also changing architecture to x86_64.
Getting trouble with carbon, because it is not 64 bits. Trying to disable carbon.
Uncommented #undef HAVE_CARBON something in cvconfig.h
That didn't work.
Modified the CMakefile for highgui to use gtk+ highgui code also under APPLE.
rebuilding (in src/highgui/CMakeLists.txt). This time it actually built.
Argh. Now I get the following when building insight3d:
This mix of 64 bit and 32 bit libraries is really frustrating. I imagine some will be 32 bit, others 64 bit. What is the best strategy? Force everything to be 32 bits? 64 bits?Erland-Lewins-Mac-mini:src erl$ makear rc ../lib/libfeat.a imgfeatures.o utils.o sift.o kdtree.o minpq.o xform.oranlib ../lib/libfeat.agcc -O3 -I../include `pkg-config --cflags opencv` `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gsl` siftfeat.c -o ../bin/siftfeat -L../lib -lfeat `pkg-config --libs opencv` `pkg-config --libs gtk+-2.0` `pkg-config --libs gsl`ld: warning: in /sw/lib/libgtk-x11-2.0.dylib, file is not of required architectureld: warning: in /sw/lib/libgdk-x11-2.0.dylib, file is not of required architectureld: warning: in /sw/lib/libatk-1.0.dylib, file is not of required architectureld: warning: in /sw/lib/libgio-2.0.dylib, file is not of required architectureld: warning: in /sw/lib/libpangoft2-1.0.dylib, file is not of required architectureld: warning: in /sw/lib/libgdk_pixbuf-2.0.dylib, file is not of required architectureld: warning: in /sw/lib/libpangocairo-1.0.dylib, file is not of required architectureld: warning: in /sw/lib/libcairo.dylib, file is not of required architectureld: warning: in /sw/lib/libpango-1.0.dylib, file is not of required architectureld: warning: in /sw/lib/libfreetype.dylib, file is not of required architectureld: warning: in /sw/lib/libgobject-2.0.dylib, file is not of required architectureld: warning: in /sw/lib/libgmodule-2.0.dylib, file is not of required architectureld: warning: in /sw/lib/libglib-2.0.dylib, file is not of required architectureld: warning: in /sw/lib/libintl.dylib, file is not of required architectureld: warning: in /sw/lib/libgsl.dylib, file is not of required architectureld: warning: in /sw/lib/libgslcblas.dylib, file is not of required architectureUndefined symbols:"_gdk_screen_get_default", referenced from:_display_big_img in libfeat.a(utils.o)"_gdk_screen_get_height", referenced from:_display_big_img in libfeat.a(utils.o)"_gdk_init", referenced from:_display_big_img in libfeat.a(utils.o)"_gdk_screen_get_width", referenced from:_display_big_img in libfeat.a(utils.o)ld: symbol(s) not foundcollect2: ld returned 1 exit statusmake: *** [siftfeat] Error 1
The night ends in frustration.
Continuing trying to get insight3d to work.
History: Didn't work well under Ubuntu. Got it to run under Bootcamp Windows XP, but got some crash there too.
Plan: Will try to build on mac, which is my main machine.
Compiled opencv on the mac. Copied the opencv.pc (pkg-config file) manually to /sw/share/pkgconfig.
Compilation on insight3d started.
Stopped in:
g++ -O3 -c `pkg-config --cflags opencv libxml-2.0 sdl gtk+-2.0` -I./ann_1.1.1/include/ cv_extensions.cppcv_extensions.cpp: In function ‘void cvComputeRQDecomposition(CvMat*, CvMat*, CvMat*, CvMat*, CvMat*, CvMat*, CvPoint3D64f*)’:cv_extensions.cpp:18: error: ‘__BEGIN__’ was not declared in this scopecv_extensions.cpp:197: error: ‘__END__’ was not declared in this scopecv_extensions.cpp:22: error: label ‘exit’ used but not defined
#include in cv_extensions.cpp.
Changed __BEGIN__ to __CV_BEGIN__ and __END__ to __CV_END__
Lots of warnings about printf formats being wrong, ignoring those.
Next stopped on missing gsl lib.
Trying "sudo fink install gsl"
Added ,0 parameter last in call to cvSaveImage in sift/src/siftfeat.c
Getting errors like this:
Erland-Lewins-Mac-mini:sift erl$ makemake -C ./src siftfeatar rc ../lib/libfeat.a imgfeatures.o utils.o sift.o kdtree.o minpq.o xform.oranlib ../lib/libfeat.aranlib: warning for library: ../lib/libfeat.a the table of contents is empty (no object file members in the library define global symbols)gcc -O3 -I../include `pkg-config --cflags opencv` `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gsl` siftfeat.c -o ../bin/siftfeat -L../lib -lfeat `pkg-config --libs opencv` `pkg-config --libs gtk+-2.0` `pkg-config --libs gsl`ld: warning: in ../lib/libfeat.a, file is not of required architectureld: warning: in /usr/local/lib/libcxcore.dylib, file is not of required architectureld: warning: in /usr/local/lib/libcv.dylib, file is not of required architectureld: warning: in /usr/local/lib/libhighgui.dylib, file is not of required architecture
sift/src/imgfeatures.c: 298, change format for line number from %s to %d
sift/src/imgfeatures.c: 369, added -1, -1 to parameters to cvEigenVV
Now getting the "file is not of required architecture problems". Will continue to investigate later
Friday, January 15, 2010
Found insight3D, a cool program to make 3D models out of photos of objects from different angles.
Will try to compile for Ubuntu Linux 9.10, doesn't seem to be immediately available for MacOS X.
Downloaded OpenCV from:
http://dfn.dl.sourceforge.net/project/opencvlibrary/opencv-unix/2.0/OpenCV-2.0.0.tar.bz2
Did: apt-get install libgtk2.0-0
Did: sudo apt-get install libgtk2.0-dev
Did: sudo apt-get install gsl-bin
Did: sudo apt-get install libgsl0-dev
Trying to configure with:
./configure --prefix=/usr/local
Compiling insight3D with make.
Failed to run insight3d over X11 on my mac.
Will try to compile on my mac.
Managed to compile opencv with instructions here (after installing cmake with fink).
Managed to compile and run isight3D under Ubuntu on my laptop, but it crashes with an assertion on the example photos. Will try running it under Windows XP on bootcamp on the Mac.
Friday, November 06, 2009
Plan: make my server into a good file server for Macs with Time Machine support.
Found this page: Howto: Make Ubuntu a Perfect Mac File Server and Time Machine Volume
Did:
Did:
Added -ipaddr to the /etc/netatalk/afpd.conf to make sure the intranet IP address was chosen.
To open up the firewall, did:
Found this page: Howto: Make Ubuntu a Perfect Mac File Server and Time Machine Volume
Did:
sudo apt-get build-dep netatalksudo apt-get install cracklib2-dev fakeroot libssl-devsudo apt-get source netatalk
cd netatalk-2*sudo DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakerootsudo dpkg -i ~/netatalk_2*.deb
Hm, got errors at this point. Hope it won't be a problem.Did:
echo "netatalk hold" | sudo dpkg --set-selectionsFollowed the instructions modifying settings file. Left the printer service and old appletalk in, since it seems like the printer daemon was dependent on the old appletalk stuff.
Added -ipaddr to the /etc/netatalk/afpd.conf to make sure the intranet IP address was chosen.
To open up the firewall, did:
sudo ufw allow proto tcp from any to 172.16.1.21 port 548After a bit of 'fippling' by following the article's instructions for creating a disk image etc, it works!
sudo ufw allow proto udp from any to 172.16.1.21 port 5353
Labels:
afp,
apple,
file sharing,
mac,
mac os x,
printer,
time machine,
ubuntu server
Wednesday, November 04, 2009
Debugging why my squeezeboxserver (version 7.4 under Ubuntu 9.04) can't find my SliMP3 player.
The Squeezeboxserver perl stuff seems to be installed under /usr/share/perl/Slim.
I can see with tcpdump that the player is broadcasting, but the perl squeezeboxserver process doesn't seem to be listening.
Debugging the server with:
Didn't get anywhere. I suspect it may have to do with the two network interfaces on cumulus. Apparently UDP broadcasts only go out on one interface, which is arbitrary unless the server binds to a particular address. That's why I tried the playeraddr command above, which actually helped move the broadcast to the right interface, but that wasn't enough.
The key thing seems to be that although the server is listening to UDP on port 3483 (according to netstat -l), the process isn't receiving or selecting on that socket.
Reinstalling didn't help. Disabled most plugins.
Did a lot of debugging, and playing around with the firewall. After removing the -playeraddr argument to squeezeboxserver, it found the SliMP3. May have been a firewall issue with broadcast addresses?
Problems which have a combination of causes can be so hard to track down...
The Squeezeboxserver perl stuff seems to be installed under /usr/share/perl/Slim.
I can see with tcpdump that the player is broadcasting, but the perl squeezeboxserver process doesn't seem to be listening.
Debugging the server with:
perl -d -w /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --charset utf8 --playeraddr 172.16.1.21 --logfile debuglog --logging debugwhich invokes the perl debugger.
Didn't get anywhere. I suspect it may have to do with the two network interfaces on cumulus. Apparently UDP broadcasts only go out on one interface, which is arbitrary unless the server binds to a particular address. That's why I tried the playeraddr command above, which actually helped move the broadcast to the right interface, but that wasn't enough.
The key thing seems to be that although the server is listening to UDP on port 3483 (according to netstat -l), the process isn't receiving or selecting on that socket.
Reinstalling didn't help. Disabled most plugins.
Did a lot of debugging, and playing around with the firewall. After removing the -playeraddr argument to squeezeboxserver, it found the SliMP3. May have been a firewall issue with broadcast addresses?
Problems which have a combination of causes can be so hard to track down...
Saturday, October 31, 2009
Started looking at nagios on cumulus.
Created a host for cumulus in /etc/nagios3/conf.d/cumulus-host.cfg
Added user erl as having all access rights in /etc/nagios3/cgi.cfg
The nagios commands seem to be in /usr/lib/nagios/plugins
To check nagios configuration:
Created a host for cumulus in /etc/nagios3/conf.d/cumulus-host.cfg
Added user erl as having all access rights in /etc/nagios3/cgi.cfg
The nagios commands seem to be in /usr/lib/nagios/plugins
To check nagios configuration:
sudo nagios3 -v /etc/nagios3/nagios.cfg
Wednesday, October 28, 2009
Installed nagios (system watchdog) on cumulus with:
Need to setup https, auth against my user database, integrate into cloud.voxi.com
apt-get install nagios3There are instructions here: http://www.sucka.net/2009/07/nagios-ubuntu-9-04-part-1/
Need to setup https, auth against my user database, integrate into cloud.voxi.com
Tuesday, October 27, 2009
Turned off ufw logging on cumulus:
ufw logging offBecause too much junk was ending up in the logs about blocket packets.
Sunday, October 25, 2009
Worked on e-mail web interface at https://cloud.voxi.com.
Now looking at making exim get its info from mysql.
Needed to install an exim version with mysql driver:
This seems to be the way to test exim:
Had to reset replication for common database. Did this:
cumulus:
cirrus:
Now looking at making exim get its info from mysql.
Needed to install an exim version with mysql driver:
apt-get install exim4-daemon-heavyDid the above for cirrus as well.
This seems to be the way to test exim:
sudo exim4 -C /etc/exim4/exim4.conf.template-db -bv -dActually, the above didn't quite work, I think some other config file must also be included.
Had to reset replication for common database. Did this:
cumulus:
flush tables with read lock;cirrus:
mysqldump --all-databases --master-data --host=www.lewin.nu --port=3306 --ssl --ssl-ca=mysql-ca-cert.pem -p >dbdump.dbcumlus:
unlock tables;
cirrus:
mysql1 -pWrote a backup script for the common mysql database, script & backups in /var/backup/mysql, hourly crontab action installed.
Thursday, October 22, 2009
Trying to fix internal DNS for MÃ¥rten, and help Magnus set up his domain.
Added Magnus as user to the common and Magnus' SQL databases, requiring SSL for non-local accesses.
Set up interfaces on cirrus like so (in /etc/network/interfaces):
# The primary network interface
auto eth0 eth0:1
Created /etc/mydns-lan.conf. Updated both conf files to listen on different addresses.
Should set up cumulus to be a replication slave for cirrus database on port 3308.
Asked MÃ¥rten to forward ports 3306-3309 to cirrus.
Setting up my phpMyAdmin to access MÃ¥rten's master database.
Added Magnus as user to the common and Magnus' SQL databases, requiring SSL for non-local accesses.
Set up interfaces on cirrus like so (in /etc/network/interfaces):
# The primary network interface
auto eth0 eth0:1
iface eth0 inet staticAfter ifup eth0:1, I can ping the intranetaddress, but it does not show up in the routing table.
address 192.168.6.205
gateway 192.168.6.1
netmask 255.255.255.0
#iface eth0 inet dhcp
# Have a second IP address on eth0, to give the intraweb DNS a separate
# IP from the internet DNS server.
iface eth0:1 inet static
address 192.168.6.206
netmask 255.255.255.255
Created /etc/mydns-lan.conf. Updated both conf files to listen on different addresses.
Should set up cumulus to be a replication slave for cirrus database on port 3308.
Asked MÃ¥rten to forward ports 3306-3309 to cirrus.
Setting up my phpMyAdmin to access MÃ¥rten's master database.
Wednesday, October 21, 2009
Started working on an email system with the virtual addresses in a MySQL database.
Also, opened UDP ports 6112 and 30260 to be able to play Company of Heroes:
Also, opened UDP ports 6112 and 30260 to be able to play Company of Heroes:
root@cumulus:/etc/exim4/virtualhosts# ufw allow proto udp from any to any port 6112
Rule added
root@cumulus:/etc/exim4/virtualhosts# ufw allow proto udp from any to any port 30260
Rule added
Preparing to plug in cumulus as router.
Updating MyDNS internet tables to change most references to sol to cumulus etc, activated all zones.
Enabled IP Masquerading (NAT) by instructions on: https://help.ubuntu.com/9.04/serverguide/C/firewall.html
Needed to add PIDFILE stuff to mydns in order for the daemon to start two versions of itself.
The new server is now router, and I think it works.
Lunchtime!
Updating MyDNS internet tables to change most references to sol to cumulus etc, activated all zones.
Enabled IP Masquerading (NAT) by instructions on: https://help.ubuntu.com/9.04/serverguide/C/firewall.html
Needed to add PIDFILE stuff to mydns in order for the daemon to start two versions of itself.
The new server is now router, and I think it works.
Lunchtime!
Tuesday, October 20, 2009
Printer works now after some fippling.
I should fix access control.
I should fix access control.
Started looking at the print server.
Modified /etc/cups/cupsd.conf to listen on intranet address.
Interrupted for dinner.
Modified /etc/cups/cupsd.conf to listen on intranet address.
Interrupted for dinner.
Started looking at dhcpd.
did:
Added eth0 interface in /etc/default/dhcp3-server
Copied configuration file from sol to /etc/dhcpd.conf
still get error starting dhcpd.
Getting this error:
It starts now. I stopped the dhcpd on sol.
did:
sudo apt-get install dhcp3-servergot error:
Setting up dhcp3-server (3.1.1-5ubuntu8.1) ...I think the only problem is that I have not created configuration files yet for it.
Generating /etc/default/dhcp3-server...
* Reloading AppArmor profiles ... [ OK ]
* Starting DHCP server dhcpd3 * check syslog for diagnostics.
[fail]
invoke-rc.d: initscript dhcp3-server, action "start" failed.
Added eth0 interface in /etc/default/dhcp3-server
Copied configuration file from sol to /etc/dhcpd.conf
still get error starting dhcpd.
Getting this error:
Oct 20 18:09:24 cumulus dhcpd: No subnet declaration for eth0 (172.16.1.21).Which is strange, because /etc/dhcpd.conf has:
Oct 20 18:09:24 cumulus dhcpd: ** Ignoring requests on eth0. If this is not wh\
at
Oct 20 18:09:24 cumulus dhcpd: you want, please write a subnet declaration
Oct 20 18:09:24 cumulus dhcpd: in your dhcpd.conf file for the network segme\
nt
Oct 20 18:09:24 cumulus dhcpd: to which interface eth0 is attached. **
subnet 172.16.1.0 netmask 255.255.255.0Ok, figured it out, I had put the conf file in /etc/dhcpd.conf, but under Ubuntu it is supposed to be under /etc/dhcp3/dhcpd.conf
It starts now. I stopped the dhcpd on sol.
Subscribe to:
Posts (Atom)