techblog @ razal.de


get back | techblog | get rss

Wed, 11 Mar 2009

and now... something completely useless

i invented a new word... leetnuks.
you want proof? go ask google. or look here

google finds it only on my xing profile ;)

posted at: 11:24 | path: /misc
tags:

Wed, 11 Jun 2008

iphone development #1 - first steps

i really like my ipod touch, especially all these music apps out there. but in my opinion there's one thing missing though. a program that let's you control any application on your mac that understands midi through the iphone/touch.
luckily the hardest part for this is already done. there is a program for mac/win/linux called dsmidiwifi server which enables you to use your nintendo ds as midi controller. i never got it to run though because the server and ds communicate with broadcasts so you don't have to configure client and server ip addresses in the programm, but the server doesn't seem to get any of the packets broadcasted from the ds. but if you send the packets directly to the machine running the dsmidiwifi server it works. so all i have to do is to write an iphone program with a cool interface ;) that sends midi data via wifi to the dsmidiwifi server. should be easy, shouldn't it?

so the last two days i finally got the time to play around a bit with the iphone sdk. it's really a different experience using xcode and interface builder when you're coming from the delphi/windows side of development. like the consequent usage of the model-view-controller design pattern when developing gui applications with interface builder.
sure... implementing the mvc-pattern with delphi is possible but it's usually so much "easier" doing it the quick and dirty way, creating a form and just start coding (don't get me wrong. this is bad and shouldn't be done). and with the time constraints these days you just haven't got the time to do it the right way anyways.
with iphone/mac development you have no other choice than to use the mvc-pattern if you want to use interface builder to click'n'drag your gui together, which is a good thing. but it takes time to get your head around these concepts.

well so i printed out a few guides like the iPhone Application Tutorial and The Objective-C 2.0 Programming Language. the first guide is useful to get the grasps on the concepts needed to understand and develop iphone applications and the second one is a very good introduction (not for beginners though) to objective-c 2.0.

so after reading these guides and writing my first hello world iphone app i started with something small. a program that sends, after pressing a button, a noteon message with the note C4 and velocity 127 on midi channel 1 to the dsmidiwifi server. should be simple enough. should be... but isn't due to the fact that sending datagram packets via cfsocket api is not very well documented and not that easy to understand for a beginner in objective-c. and apparently only a few people do use cfsocket api directly because i found only bits and peaces of not very well documented source code on the internet. sure i could have used plain old native bsd sockets but it's harder to integrate them in your application run loop (and to admit... i have no clue how to use them either). but after much copy and pasting and try and error i got it to run. click the button and hear a C4.

so after getting the network part (crudely) to run i tried something different yesterday. plaster a view with slider controls, set the min/max values to 0 and 127, hook them up to a value change method and send the data as control change messages over midi channel 1 to dsmidiwifi. and behold... it works. it's still very buggy due to the fact that i open and close a socket for every value change (lazy me) instead of opening one globally, but that's left as an exercise for the programmer. i had one problem though. the program kept crashing when i tried to change the value of any slider. i found out that it's not a good idea to send a dealloc message to a NSString object instead of a release message. i guess i have to remember that.

the next thing to do is to tidy up the network code and encapsulate it in a nice class.

if i find a free screencasting program i even may show some of the progress i make.

posted at: 11:41 | path: /dev
tags: , , , ,

Thu, 31 Jan 2008

qmail error - 451 unable to exec qq (#4.3.0)

this is more a note to myself but if you're running qmail with qmail-scanner and get this error
451 unable to exec qq (#4.3.0)
then you need to check if your perl has the suid flag.
i had this problem after updating perl and it took me a while to figure it out again.

posted at: 13:30 | path: /qmail
tags: ,

Mon, 28 Jan 2008

sgd - active directory integration

this is another little reminder for myself so that i'll not waste another 4 hours trying to find out what's going on.
i needed to use active directory authentication with sgd so i could login with ad users and access certain windows servers.

first thing you need to do is to write a little krb5.conf file for sgd so that kerberos authentication will work with your active directory. it needs to be located someplace like that:
/opt/tarantella/bin/jdk.i3li_1.5.0_10/jre/lib/security/
just create a krb5.conf file and add something like this:
[libdefaults]
default_realm = AD.MYDOMAIN.COM
default_checksum = rsa-md5
default_tkt_enctypes = des-cbc-md5 des-cbc-crc
default_tgs_enctypes = des-cbc-md5 des-cbc-crc
permitted_enctypes = des-cbc-md5 des-cbc-crc

[realms]
AD.MYDOMAIN.COM = {
  kdc = ad.mydomain.com
  }

[domain_realm]
  ad.mydomain.com = AD.MYDOMAIN.COM
after this you need to restart sgd.

then you need to create a user in your active directory that is allowed to search the ad. lets call him "sgd".

then open the array manager and select "secure global desktop login". check "search ldap and use closest ens match", "search ldap and use ldap profile" and "active directory login authority". then insert into the fields ldap server - url: "ad://ad.mydomain.com", username: "sgd@ad.mydomain.com", password: "your password for sgd user", base domain and default domain: "ad.mydomain.com". then hit "apply".

now you should be able to login with any user from the active directory.

if you encounter an error like this "pre-authentication information was invalid" then check if your ad and sgd servers have the same time and if not then synchronize them. if this error still remains then try to reset the password of your sgd user. windows sometimes screws something up with kerberos when you delete and recreate a user (this happened to me).

posted at: 15:28 | path: /misc
tags: ,

Thu, 11 Oct 2007

sgd - self-signing certificate for testing purpose

this is a little reminder for myself. i needed a signed root certificate for sgd to test secure connections via ssl. luckily sgd brings with it all you need to get a signed certificate.
just follow these two steps:
# /opt/tarantella/bin/tarantella security certrequest --country DE --state BY --orgname "Some Firm Ltd."
# /opt/tarantella/bin/tarantella security selfsign
now you're done and can enjoy secure sgding.

posted at: 13:49 | path: /misc
tags:

Mon, 20 Aug 2007

mac os x and pkgsrc - good and bad news

i recently found out, that pkgsrc is now usable on non case-sensitive partitions. this is good news because now many more people can enjoy pkgsrc on their macs. so people... throw away your fink and darwinports and use pkgsrc instead. ;)
the bad news for me is that if had known this i wouldn't have installed osx on my "new" powerbook on a case-sensitive filesystem in the first place. would have spared me much annoyance.

posted at: 16:34 | path: /mac
tags: , ,

Tue, 10 Jul 2007

thunderbird and spotlight

a friend of mine told me that thunderbird 2 supposedly supports os x spotlight feature. so i did a google search and found a few instructions here (german) on how to get it up and running.

first: you need to get the spotlight importer from this bugreport (download attachment from comment #109) and put it in ~/Library/Spotlight/ or /Library/Spotlight/ (create if necessary).

second: in thunderbird preferences go to config editor (tab advanced) and set mail.spotlight.enable to true. thunderbird needs to be restarted after this. then it begins to index all mails (this will take a while), which effectively means that it generates a .mozeml file for spotlight for each mail in your mailbox. this is because thunderbird saves it's mails internally as mbox files which are unsuitable for spotlight.

third: check with /usr/bin/mdimport -L if the thunderbird importer was found and reindex your spotlight database with sudo /usr/bin/mdutil -E /. (i don't know if a reboot is necessary)

[update]
there was one little drawback with the importer as noted here. messages showed in category Documents rather then Mail messages. but with help from the spotlight-dev mailing list i found a solution.
you need to edit Info.plist located in Thunderbird.mdimporter (ctrl-click -> Show Package Contents). you can use any editor you like but the safest bet is to use the Property List Editor (i killed my Info.plist with TextEdit!).
  <key>UTTypeConformsTo</key>
  <array>
    <string>public.data</string>
    <string>public.content</string>
    <string>public.email-message</string> <-- add this line
  </array>
i don't know how to convince spotlight to reload its plugins so reboot please. reindex your spotlight now.

to check if everything went alright locate a .mozeml file (usually under ~/Library/Thunderbird/Profiles/...) and call mdls with it. you are good to go if anything like this shows up.
kMDItemContentType             = "com.mozilla.thunderbird.mozeml"
kMDItemContentTypeTree         = (
    "com.mozilla.thunderbird.mozeml", 
    "public.data", 
    "public.item", 
    "public.content", 
    "public.email-message", 
    "public.message"
)
screenshot

[update 2]
KAMiKAZOW has build a new version (universal binary) of Thunderbird.mdimporter incorporating the Info.plist change and attached it to the bugreport. so no more Info.plist editing.

[update 3]
from the amount of 19k mails 10k have been converted. 9k to go. took a day so far...

posted at: 16:05 | path: /mac
tags: , ,

Wed, 30 May 2007

discard double bounces in qmail

i got a lot double bounces lately... and frankly... i'm quite annoyed by them. but i found a way to get rid of them without the need to recompile qmail to incorporate the doublebounce-trim patch.
# echo discard >/var/qmail/control/doublebounceto
# echo # >~alias/.qmail-discard
qmail needs to be restarted after this.

posted at: 11:03 | path: /qmail
tags:

Thu, 24 May 2007

plan 9: first problems

i successfully installed plan 9... again. well this time i went to #plan9 on freenode and asked. got this answer:
10:36 < Ibn_> i have a question.
10:36 < Ibn_> i installed plan9 in a virtual pc on my mac
10:37 < Ibn_> but after i boot and use user glenda i get
10:37 < Ibn_> init: starting /bin/rc
10:37 < Ibn_> rc: null list in concatenation
10:37 < Ibn_> init: rc exit status: rc 23: error
10:37 < Ibn_> init: starting /bin/rc
10:37 < fgb> yes, known issue
10:37 < fgb> pay attention:
10:37 < fgb> % echo crap > /dev/sysname
10:37 < fgb> % . /rc/bin/termrc
10:38 < fgb> then add a line to your /lib/ndb/local like this:
10:38 < fgb> sys=mymachine ether=$macaddrs
10:39 < fgb> you can find what $macaddr with cat /net/ether0/addr
10:39 < fgb> there
10:40 < fgb> any other question?
10:41 < Ibn_> not for now
10:42 < fgb> good
10:45 < Ibn_> ok. worked fine! thanks a lot
10:46 < fgb> np
problem solved and now a nice plan 9 gui shows itself.

posted at: 10:54 | path: /plan9
tags:

Wed, 23 May 2007

first steps into plan 9

my first few steps into plan 9 have been a disaster. i just killed the whole plan9 fossil partition by mistake. it took the whole night to install it in virtual pc on my g4 500mhz powerbook ti. and why? because i'm not versed in using the ed editor who is the only thing there is to edit the plan9.ini to change graphic settings so rio would run. but instead of getting it right... i killed the whole file with ed and ended up with an unbootable installation. i tried to use the live cd... but i couldn't even get the fossil partition on the harddisk to mount. and then i formated it by mistake. well done.

well... i guess i have to try it again. but first... here a few links for the next time.
installation instructions
installation troubleshooting
in search of plan9.ini <- was exactly my problem
setting the right monitor size <- never even got to that part
unix to plan 9 command translation <- very very very usefull!
der editor ed (german) <- next time i will be prepared!

posted at: 15:52 | path: /plan9
tags: