2011-04-22

Thunderbird and the Outlook Global Address book

As I mentioned in an earlier post, I have switched job and while I initially had to use the Outlook Web Access (OWA) in the version of 2010 to access my mailbox. At this point I want to be fair and say: Microsoft really improved the web client. You can work with it. I prefer that interface over several others (Hotmail/Live). The other option was to use the real Outlook over a terminal server session or using a virtual machine. I tried both (in version 2007 and 2010) too so I have used all variants. The result is: Outlook still completely sucks! I talked to other people who ever used something different than Outlook in their work (e.g. Thunderbird or Notes) and everybody confirms, that Outlook sucks. People often wonder why I have problems with Outlook when "the whole rest of the world" is fine with it. The reason is: Most people don't know anything else and they got used to suffer. But enough, I want to help out everybody who is in the lucky situation that IMAP protocol got activated in their Exchange branded workplace (in my case they activated it just for me :-) - this is cool). I tried several alternatives for directly accessing the Exchange server without success and I could not occupy the internal IT for hours to figure out, what goes wrong. Opening up the IMAP protocol was the simplest and straight-forward-option.

So I can use the loved Thunderbird again!

But opening up the IMAP is only half the way. You also need to get access to the address book. And here I ran against brick walls in the first step:
  1. Trying to open an LDAP address book pointing to the Exchange server failed in getting no connection (neither port 389 nor 3268 worked).
  2. I figured out the AD (Active Directory) server of the Windows world and used that. It connected immediately to port 389, however then had problems loading the contacts. As I know now, it is a matter of filtering to the correct entry set. However, after failing continously during my first attempts I tried
  3. exporting the global address list from within Outlook into ... well ... anything, I was about to even accept any CSV file, however styled. Completely failed in that too - you can export contacts but not the global address list. You can imagine how happy I was...
Fast forward to my final solution which now supports
  • directly using the global address book via LDAP directly from the server or
  • use a local copy (export+import which you need to do manually from time to time to be up-to-date).
How it is done:
  1. Get the Apache Directory Studio or another LDAP browser tool of your choice that supports an LDIF export. In the Apache Studio case, just extract the package and start it (yes, it's that simple, it's a Java application that runs on Linux and Windows). You need this to first test your LDAP access, if you are not sure about the correct criteria.
  2. Now you need to find out where the AD is hosted. In my case I promised not to ask boring questions to IT (they were already nice enough to open up the IMAP just for me), so I had to find out on my own. I simply checked in to the Terminal Server Session and wrote a little batch file (directly going to the console is forbidden in the terminal server session due to security policies) of the content:
    set
    pause

    and just double-clicked it to find the entry "LogonServer", "UserDNSDomain" and "UserDomain".
  3. Now start the Apache Directory Studio and create a new LDAP connection. The connection parameters would be something like:
    hostname=fulldnsmachinename

    (using the information from LogonServer and UserDNSDomain, so e.g. "myserver.mycompany.com").
    Port = 389

    (default LDAP port).
    Logon with UserDomain\yourUserName and your password.
    Click on "Fetch base DNs" to find out the base DN to use - or guess it, it usually is:
    dc=yourCompany,dc=internetsuffixlikecomnetorgetc

    so for example dc=microsoft,dc=com.
  4. Now you would find a lot of stuff browsing through the AD (assuming you have enough read permissions). To find the entries that are displayed in the Outlook address book, you need to filter the information. To do so, create a new search using the base DN above and the following search filter (click on "Filter Editor..." for better formatting):
     (&
    (showInAddressBook=*)
    (mail=*)
    (mailNickname=*)
    (|
      (objectClass=person)
      (objectClass=group)
      (objectClass=groupOfNames)
    )
    )

    Here is the filter again as one-liner - this is how to use it in your Thunderbird:

    (&(showInAddressBook=*)(mail=*)(mailNickname=*)(|(objectClass=person)(objectClass=group)(objectClass=groupOfNames)))

    In the Apache Directory Studio you can now set the option to "Follow referrals manually" or ignore them completely. Leaving it to automatic can produce errors - especially if AD not well configured (in my case loops are generated when automatically following all referrals). Search scope should be the complete subtree. Check the results by executing the search.
  5. Start Thunderbird and create a new IMAP account (if you didn't already) and create a new LDAP address book (Tools-Address book; File-New-LDAP Directory). Enter Hostname, Port, Base DN as in step 3 and in the "Advanced" tab choose subtree and enter the one-liner version of the filter as in step 4.
    Now you have the direct access version. You now could change settings in Thunderbird (Edit-Preferences-Composition-Addressing) or even configure it for a single account (under Composition and Addressing) to use the LDAP directory for autocompletion, but I found that to be annoying because of the slow Exchange server in my particular case (YMMV). Hence I did not do this but pressed F9 in a new mail to show the contacts sidebar. There I switched to the LDAP address book and can now search and choose addresses if they are not already among my collected addresses. This is BTW the same you get, using Outlook - only those addresses, you already used get auto-completed and the others you need to search manually. A second annoyance is that Thunderbird takes a longer time to really disappear from memory when the LDAP search was used during runtime. So I was not really satisfied with that solution.
  6. Just for performance and to have all autocompleted, I wanted to have a local copy of the address book. I found that the Apache Directory Studio offers an LDIF export feature, which is really the best you can get. Even phone numbers and other properties from the LDAP directory finds the way into the imported address book in Thunderbird. Just right-click the search (it's in the tree on the left-hand side) and choose "Export-LDIF" from the context menu within the Studio and in Thunderbird you go to "Tools-Address Books" and choose "Tools-Import..." - done.
Now you have both - full autocompelete and you can actively search the current LDAP at the server for the case new employees joined the train without the need to export-import all the time. However from time-to-time it makes sense to do a re-import just to have the current entries in the local cache. Fortunately the search is saved in the Apache Directory Studio for later reuse. Thanks to the Apache team for this great piece of software!

Oh, BTW: The local download of the LDAP directory did not work for me (it started but never finished - maybe because of the internal loops).

Hope this helps!

Related posts: Ignorance of the different, Popular Ubuntu Desktop myths, Apple worse than Microsoft, Outlook Calendar meetings, Maintaining multiple calendars.

2011-03-02

Popular Ubuntu desktop myths

Some opinions around Ubuntu on the desktop - or Linux in general seem to be never dying although they should be really outdated. A few are:
  1. Linux/Ubuntu is only for PC freaks.
    This is simply not true. Ubuntu/Linux is at least easy to use as Windows. For the normal user it is less painful for sure: You are faster up and running (because after installation also many apps are already there), you don't need to search your shitty licence code you probably already thrown away accidently a year ago, you don't get penty annoying questions when first starting your browser, you can install easily whatever language you need for whatever family member or friend who might visit you and you want to share the computer with, you can buy Ubuntu already installed on a USB stick that you can carry around and use it on whatever computer you go, you can easily use any file as a template and many, many more.
  2. Installation of applications is difficult (need to be compiled).
    There are distributions that compile everything from source, but even there you don't need to do it on your own. Anyway, most distributions don't require compiling things on your own (however, this is always an option you have, even if mostly not recommended). - Installation of software is usually simpler than on Windows: You start a program (menu entry) which contains a list of available applications, you can search, scroll through the list, just tick the checkbox in front of the application(s) you like to install and click "Apply". Download and installation done automatically then. For uninstall - guess what: Just uncheck and apply again. If you are funny, you can search the internet for a more up-to-date installation package or other application not in the repositories and install it by double-clicking it after download just as you do it on Windows. What is so difficult then? Even a trained monkey can do it. ;-)
  3. Everything must be done on the command line.
    Most things nowadays can be done through a graphical user interface also. One reason why much is done on the commandline: It is far easier in a forum or blog post to respond to a question with a few commands that just need to be pasted to a terminal window than it is to explain it with plenty of clicks and menu items (with the ribbons situation is even worse). For the person that receives the help it is also easier. And other than on Windows, everything you can do on the graphical environment you can also do on the commandline. That does not mean you have to do it that way.
  4. Linux looks old-fashioned on the desktop.
    Look yourself and decide: http://www.ubuntu.com/desktop/why-use-ubuntu, http://www.kde.org/screenshots/, http://www.xfce.org/about/screenshots, http://lxde.org/image/tid/1, http://www.linuxmint.com/screenshots.php, http://www.gnome3.org/, http://www.enlightenment.org, - All this can be used in Ubuntu - you can choose!
    Oh, you want Mac-style toolbar on the bottom - or Windows 7 like - look here for example: http://www.omgubuntu.co.uk/2010/04/you-choose-the-best-dock-for-ubuntu-poll/ - again: You choose, what you find efficient and cool!
    What is true, that some older applications are looking ugly because they use old interfaces (sometimes when searching in the repository and try new apps I happen to get such an old-style thingy), but the major part looks very nice.
  5. There are so many variants (of Ubuntu itself and even more if you look at other Linux distributions) so there will be never be a standard.
    The core for Linux is the same for all and the most differences are not in the system but just in the desktop environment or GUI presentation. But this is for your freedom and you can anyway start multiple applications using different GUI frameworks. Keep in mind that all people like to work differently. Everybody has his own preferred way of doing things. Hence should be you computer: It should support you by doing the work they way you like!
  6. Ubuntu is not compatible with Windows.
    This can't be said so generally. It is applications that are not compatible, file formats or protocols and you have to look at those separately. For example: Many widely used file formats (as JPG, PNG, TIFF, PDF, RTF, MP3, AVI and many more) can be handled without problems on Ubuntu. Even the DOC, XLS, PPT Formats can be handled quite good in the meantime. It is Microsoft that continously invents new formats and changes existing formats (see the latest DOCX which is different in MS Office 2007 and 2010, so that you need to save it in a compatible form from within 2010 if you want it to be displayed in the same manner with 2007 - .docx is not .docx!). Ubuntu better supports more open standards than Windows does (e.g. look at the MIME-Format - this is the format used to send e-mails over the internet - and look what you get from Outlook)!
  7. Ubuntu is developed only by students in their spare time.
    Canonical is the company behind Ubuntu, but Ubuntu is based on Debian (look in particular at http://www.debian.org/partners/ for example) and that all is Linux. And many big companies are contributing to Linux! So, if this ever was true, it is not any more since quite a while (see http://www.techrepublic.com/article/linux-standard-gains-big-name-backers/5365462 for example).
  8. Ubuntu is free and hence must be very buggy.
    Wherever software is developed, bugs are introduced. There are not more or less bugs in Ubuntu than on Windows - IMHO. Windows is used by more people and companies and hence there is a higher probability that bugs get found but for Ubuntu it is extremely easy to get involved, report bugs and get in touch with the developers and hence get the bugs fixed. So I think we are pretty at the same level here and there although I think, Ubuntu is more stable (of course ;-) ). And why it is free is because of the Open Source idea where people pay for work being done (new features, bugfixes,...) and not for ... (yes for what?). See "The Open Source idea" for details.
These are just the first examples that come to my mind.

Related posts: Document file format, The community, Going Linux, The Open Source idea, Why companies do not use Linux on the desktop, Distribution choice, Outlook Calendar Meetings, The individual desktop, Efficient desktop environment, A few Linux related videos.

Ignorance of the different

I haven't written since a while. The reason is: I changed job and it has been a stressy time for me.

Fortunately I found a company that accepted that I work on Ubuntu on my desktop. Of course there is Windows stuff to do - which I will do from a virtual machine or via remote desktop.

During my job search and at other occasions I wondered about the big ignorance (it is not always plain unawareness) of people working in the Windows and Microsoft environment. The vast majority of users, IT staff and managers still cannot accept, that the era of the Microsoft-only IT environment will be history in a few years.

Many young people are using Macs (even if it is just because they want to be different or cooler than others in a few cases) for example. I have customers where users are using Macs in the office on their productive workstation - yes, today (I am not talking about a single case only).

And BTW: I don't know a single real person who really tried Mac or Linux and then switched back to Windows. The contrary is true, most I know, didn't look back after two weeks on Ubuntu for example. I am not talking about forum entries of people who tell they switched back to Windows - I don't give much on them after I have seen sooo many forum posts that are so evidently fakes (or paid comments - yes, there are companies where you can pay for manipulating the public opinion through forums, blog comments etc).

Oh, and I have seen people selling Android phones and when I mentioned Linux, they never heard of it - hey it runs on the thingis, you sell!

There are a few things, that are really super-annoying and I start to get angry, when:
  • people assume, that everything other than Windows must be crap (without either looking). How can somebody have such opinion about something they never heard of yet?

  • I report a problem with a website or a service and people ask me what OS I am using (or worse: "What Windows-Version are you using?") and then tell me automatically it must be a problem with my machine or client - even if that has nothing to do with the OS that I am using.

  • when I ask people for help (e.g. just tell me the proxy, I have to use, when I want to use the internet), they see my machine and they immediately tell me - hell, what is this - I cannot support this. - Hey, it's maybe just a DNS or PROXY ip address I want to know - is this really so difficult? I don't ask them to configure my machine for me - I can do it myself.

  • people treat me like a fanatic or fundamentalist, just because I have pretty good reasons to not like Windows and prefer something else. I do accept that other people do not have enough problems with Windows to seriously consider a switch (if you take care you can keep even a Windows system quite stable and performant over a longer period of time - so with good people maintaining the Windows in a company, work can be quite painless with Windows either).

  • especially Windows developers, who think, they know all, and in reality never looked around what is used outside their small world. The vast majority of big sites does not use neither Windows nor MS SQL Server nor .net. Some of the Windows(-only) developers I know seem to be really brainwashed.
These are a few examples. Sometimes I get really tired of trying to legitimate the use of something different.

In reality it would be sufficient to be just accepted, but if I look more deeply into it: I am working to improve customers IT experience since I was about fourteen. And from the deep of my heart, I want to serve the best for the customer. From the current view, it simply does not make sense to write new applications that only runs on Windows if there is a chance to write it in a platform agnostic way. If the application is available for other platforms also then the vendor and customer can be independent from future trends. Even very Windows centric companies nowadays allow iPhones attaching to their networks for example.

So, honestly, I must recommend using Linux, Java or any other open technology and open standard over any proprietary one. - TIFF or PDF for example has not just been adopted by accident. Documented and open standards win in the long run, such as SMTP, IMAP, SSL, MIME and plenty others, that are well established.

Related posts: IT investment, The Open Source movement, Document file format, Data file format.

2010-12-16

Ubuntu 10.04 & docking station part 2

As you might already know, I am using my Ubuntu laptop also with a docking station and external monitor. When I am in the office I dock it in leaving it closed and use only the external monitor (that is by the way a behaviour I can see at several customers also - having no fixed machine any more and dock in the closed notebook).

I had an issue I already described earlier - see part 1: Ubuntu 10.04 with docking station.

Since then I had several issues of having TV1 noticed by accident even when doing nothing or same with my internal laptop screen (LVDS1) when I am working with the external monitor only. The annoying things are three when this happens:
  • I can accidently move the mouse out of the window taking a while to bring it back.
  • In my compiz I have defined that right-clicking on the border of the screen switches to the next desktop. That does not work any more as the border is not reached when I move the moust to the border of the visible screen.
  • Windows may be displayed on the invisible part of the screen so I have them in the task bar but don't see them on screen.

Now I am pretty sure that it is the screensaver that is the culprit here. Disabling the screensaver never brought the issue back again. Only drawback: When I leave the machine I manually have to lock the screen pressing CTRL+ALT+L.

Same thing of second monitor accidently recognized happened in about 75 % when starting TeamViewer (which is my favorite remote assistence tool). Today I finally filed a bug and guess what - problem already solved (thanks to Daniel Stiefelmaier at TeamViewer support)!
Dear Martin,

I found a possible solution to that. Please open a console and run
WINEDEBUG=xrandr teamviewer&
Then take a look at the log:
cat ~/.teamviewer/6/winelog
You should see some xrandr lines. Then run
/opt/teamviewer/teamviewer/6/bin/.regedit
Create the key HKEY_CURRENT_USER\Software\Wine\X11 Driver
there, create a String "UseXRandR" and set its value to "N".
Close the registry, and repeat the other commands:
WINEDEBUG=xrandr teamviewer&
cat ~/.teamviewer/6/winelog
Now, there should be no xrandr lines.
Yeah, that did it!

Related posts: Ubuntu 10.04 with docking station (part 1), Ubuntu 10.04 experiences, OpenOffice and LibreOffice starts slow.

2010-12-10

The community

In the last months I have been a participant in several communities, forums and the like. And I also have left some. I want to share some experiences:
  1. The community behind a software product (or any other thing) is a crucial factor for success of the product and motivation of the members.
  2. The spirit of the community is important. For the Ubuntu community (to give an example) there is the code of conduct to which most members admit to. It is the philosophy behind the group, a big picture that holds the people together.
  3. Nobody knows everything. With the contribution and help of each single community member the community gets smart.
  4. In good communities, members focus on the matter, not on blaming other persons or other products - their main target is to solve problems. Of course I like that. :-)
  5. In good communities it is easy to get involved and it is easy to be integrated (if you handle the members with respect).
  6. In good communities you are respected and your opinion is valued.
  7. There is a mass contribution effect in larger communities: While a company could hardly finance project teams with more than 30 or so members, in a big community there are many people adding value - even if it is a small contribution for each person, those contributions some up to enormous results.
There are two communities that I am proud to be in - the Ubuntu community and the Java community. I do not only participate in forum posts etc - I am also attending local events. Those events are usually very interesting from the technical point of view and also from the way community members deal with each other.

Don't forget, that no product and no system can be successful without the people behind it! - It's all about the people!

Related posts: The Open Source idea, The Open Source movement, Paying for free and Open Source, User lock down, Going Linux, The future of Java, Popular Ubuntu desktop myths.

2010-11-14

The future of Java

The last months (after Oracle has completed the merger with Sun) were full of insecurity and discussions within the Java developer communities about the future of Java. Many have blogged about their fears. I personally followed the discussions but I felt, the best thing is to wait. People are so fast with their interpretations and guesses how others will behave.

In parallel there were discussions about Apple stopping support for Java on the Mac etc etc.

Even although Oracle already told they are strongly commited to Java, NetBeans and other famous Sun products, discussions were going on.

Finally a few further commitments have come to public:

IBM joins OpenJDK
http://blogs.sun.com/mr/entry/ibm_to_join_openjdk

Oracle and Apple Announce OpenJDK Project for Mac OS X
http://www.apple.com/pr/library/2010/11/12openjdk.html

This means, that big players decided to go the Java and Open Source path. And it is important to unite the forces. Working together is far better than fighting each other.

When I decided to switch away from my Windows-only-development, one major reason was: There are many other operating systems gaining market share, like several flavors of Linux (Ubuntu, Mint, Redhat, Debian etc) and Apple - and I can't say for sure which ones will be there in the long run, but I want to provide security to my customers, that they can benefit from the software for a long time. - Java was a good choice in the past and now we can again be sure that it still is a good choice. The idea of Java - "write once, run everywhere" - has saved me from a lot of work in the past (compiling for different architectures not required, no building of different styled setup procedures etc). There are people mentioning that the write once, run anywhere phrase is not quite true, because not available for really all operating systems and often there have to be exceptions made for dealing with different operating systems. - Well, this is partly true, when it comes particular features, that might be even not available on all operating systems. Fortunately for such cases Java can be coupled with C(++). For availability: Java is available on more operating systems than most other languages (see http://www.java.com/en/download/manual.jsp).

BTW: C(++) is also a language, that is around and will be around for a long time and I hear nobody complaining that it is developing too slow for example. And I really prefer thinking carefully before putting new features into the language. There must be many things considered. It is important to do no harm to the language.

Oh, there is finally also an official podcast from Oracle for Java developers:
http://blogs.sun.com/javaspotlight/
Of course this is biased and the Javaposse (http://javaposse.com/) is still the first address when it comes to Java podcasts.

We have exact plans for the next versions of Java:
http://blogs.oracle.com/javaone/2010/09/plan_b_wins.html
http://openjdk.java.net/projects/jdk7/features/

And we get exactly what we need next for NetBeans (the first-class Java IDE):
http://netbeans.dzone.com/nb-generate-simpler-rest

Related posts: The dawn after sunset, The programming language, Popular Java myths, Java applications on the desktop, The community.

2010-11-04

Self-Healing Linux

Until yesterday I only occassionally read about it, but yesterday I experienced my Ubuntu workstation self-healing from freeze.

I did not take care about how many applications were running and as doing a lot of things in parallel that all take quite a while (downloads in background, file copy operations and installations within virtual machines) I completely forgot about how many virtual machines were started. I was about to start another one when everything started to get really slow. I have 4 GB memory and a small swap partition (because during normal work I hardly get the memory of my Ubuntu full).

The memory at this time really got filled up completely and everything got veeery slow. I wasn't either able to switch windows. I was able to switch to the text console which also was very slow.

I wanted to login and kill a few tasks when I got messages broadcasted to my text console saying that the memory was exhausted. Shortly afterwards I got messages that the system identified Firefox and Thunderbird doing nothing and they were closed (maybe because just consuming memory at this moment). And finally it told that the last VirtualBox machine was consuming a lot of system resources and - was killed.

Flup, flup, everything was fine again. - And hadn't either time to do it manually. And it was doing exactly what I would have done manually - killing the last started virtual machine and closing the applications that were doing nothing (downloads were already finished).

That is simply awesome!