Friday, February 15, 2008

Volkerding says KDE4 better than MacOS


Patrick Volkerding (Slackware Project Lead) gives glowing thumbs up to KDE4 and slates it for inclusion into Slackware 14. Slackware is currently at version 12 and releases once a year. At this rate, KDE4 will be in Slackware in 2009. Among other things, Patrick says the following.

The look of the new [KDE] desktop is stunning, and the use of SVG and hardware acceleration gives (IMHO) even something like MacOS a run for its money in terms of appearance and user-friendliness. We look forward with great anticipation to merging KDE4 when it is mature enough (and it's getting there fast), and then watching it just get better and better.
The full quote can be found in Slackware ChangeLog.

Thursday, January 10, 2008

Reason to switch to Linux #11


Windows taskbar clock cannot display seconds since Windows 95.
Why? Because when installed on a 4 Mb machine, Windows 95 was too slow to display seconds. This and other lame excuses are blogged at MSDN. There is a whole shareware industry around Windows to fix this problem. If you want to measure time, use online javascript stop watch or US atomic clock at time.gov

Tuesday, December 11, 2007

Java sighting on a cup of milk


Looking at this cup of soy milk in Taipei, I thought at first that somebody stole Java logo. Then, looking closer, I realized it's a genuine ad for Java training. Something you won't see on a milk container in the US...

Friday, November 2, 2007

Form based login from a shell script

The following code uses only shell scripting and curl to log in to a website protected by a form based authentication and download contents of page "about.jspx". We pay special attention to returning reasonable error messages. These snippets were tested with Tomcat 5.5.

  1. Get user name, password, and the application's URL from the command line,
    eval set -- $(getopt "u:p:b:" "$@")
    while [ "$1" != "--" ]
    do
    case "$1" in
    -u) shift; WEB_UID="$1"; shift; ;;
    -p) shift; WEB_PWD="$1"; shift; ;;
    -b) shift; BASE_URL="${1%\/}"; shift; ;;
    esac
    done
  2. Store URLs in variables,
    typeset aboutUrl="$BASE_URL/about.jspx"
    typeset securityAction="$BASE_URL/j_security_check"
    typeset logoffUrl="$BASE_URL/logoff.jsp"
  3. Access the URL and look for session cookie JSESSIONID,
    headers="$(curl -s -S -f -L -D - -o /dev/null --url "$aboutUrl" 2>&1)" \
    || error "Error accessing $aboutUrl: $headers"
    if [[ "$headers" =~ 'Set-Cookie: JSESSIONID=([^;]*)' ]]
    then
    sid="${BASH_REMATCH[1]}"
    fi
  4. If JSESSIONID cookie is set, submit user name and password to the login form. On success, the application will redirect us to the original URL. Variable "about" will store the page source or the error message.
    about="$(curl -s -S -L -f -b "JSESSIONID=$sid" -o - \
    -d "
    j_username=$WEB_UID" \
    -d "
    j_password=$WEB_PWD" \
    --url "
    $securityAction" 2>&1)" \
    || error "Error submitting credentials to $securityAction: $about"
  5. Parse the page for some useful information (looking for <sysdate date="20071102">)
    if [[ "$about" =~ 'sysdate date=\"([^\"]*)\"' ]]
    then
    date="${BASH_REMATCH[1]}"
    fi
  6. Finally, hit the logoff URL so that the application may clean up.
    curl -s -f -b "JSESSIONID=$sid" --url "$logoffUrl" -o /dev/null
For more information, see cURL and libcurl

Tuesday, September 25, 2007

Sun NetBeans day

September 11th was a Sun NetBeans day in Boston. Here's what I learned:

  • NetBeans keeps improving. NetBeans 6 consolidates six independent Java parsers of version 5 into one. Syntax highlighting and refactoring can now use more semantic information; it is now faster and more powerful and accurate.
  • Profiler is now improved and built-in into NetBeans. It can be enabled or disabled at runtime using profiling points. More info at Netbeans profiler pages.
  • The most active site about NetBeans is NetBeans Wiki.
  • New England has an active Java User Group, which organizes nice talks. See NEJUG.org
  • A lot of introductory presentation about Java technology inluding RIA and REST is posted by one of the speakers at JavaPassion.com. The speaker himself was speaking way too fast with a Korean accent, but his presentations must be filled with information.

Friday, September 21, 2007

Upgraded to Slackware 12

Updated my Thinkpad T40 from Slackware 11 to Slackware 12. The 2 hour upgrade went without a hitch. I was pleasantly surprised to find out that Paul compiled KDE KMail with S/MIME support. Great, I don't need to roll my own packages any more.

Friday, May 4, 2007

Fixed S/MIME interoperability between KDE KMail and Mozilla Thunderbird

Nelson Bolyard fixed interoperability problem between Thunderbird and KMail (or rather gpgsm). There was a bug in how gpgsm encoded cipher preferences, which Thunderbird could not understand and was falling back to RC2/40 cipher. In gpgsm, RC2/40 was not implemented for patently political
reasons
. Thunderbird crypto library was made more lenient in what it accepted. So, now, TB would correctly responds to KMail using 3DES instead of RC/40. More details are in Bugzilla and Usenet.

Still causing minor problems are the following bugs. Vote for or fix them!