March 2008 Archives
31-03-2008 12:31
Firefox mailto
I think this may be a new config options, but I remember this being painful to get mailto links in web pages working in Firefox, but now its so simple.
- Open
about:config
in firefox - Right click and go
New -> String
- Paste in
network.protocol-handler.app.mailto
- Paste in the value as your email lcient, for kmail put in
/usr/bin/kmailservice
and it will use the KDE set defaul email cleint setting set in the KDE Default Applications settings. - done!
13-03-2008 11:06
mail for (domain) loops back to myself
If you get this in your mail logs and the email gets bounce, ths issue is quite simply, but eluded me to start with. Also I found odd how it suddenly started happening when my postfix server had been running fine for years without this. Odd
SOLUTION: add this domain to mydestinations. I thought it was, but noticed it was a sub-domain (local name of mail server on my LAN, a subdomain of dward.us). So added it in full, restarted postfix and voila! Fixed. Mail to root now goes through fine.
10-03-2008 15:05
Cross compile and sleep()
So I wanted to write a little app that was console based and used a sleep function to delay some printing out of lines. I got it working on Linux easy enough by using the usleep() function. This counts in microseconds, so 2000000 = 2 seconds. You can use the sleep() that uses seconds by including the unistd.h library.?
Now to compile a c++ app on Windows that has a sleep like function was a little trick using GNU tools. I finally found out that you need to use the Win32 API call of Sleep() thats found in the windows.h library. MS Sleep function. To compile in Cygwin you would use:
g++.exe -mno-cygwin <source> -o <outputname>
And then to compile on a Linux native system:
i586-mingw32msvc-c++ <source> -o <outputname>
Now there must be a way to use the sleep function thats in the dos.h libraries under Windows as you can include that library when compile under Cygwin or Linux. But either way, I have found a way to get it done and use the Win32 API call function of Sleep() found in the windows.h library by simply including that.
This thread was interesting and important in me workign this out. http://www.dreamincode.net/forums/showtopic16391.htm