Tag Archives: Linux

Which email client for Linux?

I've been a thunderbird user since firefox was named firebird. I was happy with it, I like the way you can easily search over all accounts, how you can archive messages in folders by year by simply hitting the "a" key, I like the threads and even the "gmail" conversations extension even if I don't use it.

One problem with thunderbird is it became unusable when I added an old account which was accumulating mail up to over 170k messages. I know 170k messages is not realistic and no one should have so many messages in inbox but still this made me look for something better.

First let's see what I'm looking for in an email client:

  1. Easy global search like thunderbird
  2. Archive folders and 1 key hit archiving like thudnerbird 🙂
  3. Easy to mark messages as Spam/Junk with a single key hit, would be great to be able to mark multiple messages with a single key ( thunderbird doesn't have this )
  4. Message threads
  5. And last but not least, be able to handle a lot of messages in a folder, don't have to be super fast but at least it shouldn't lock

Here's what I tested so far:

Evolution

This was a nice surprise.
Pro: Evolution downloaded 87k message headers in just a few seconds and had no problems with selecting all and moving around.
Cons:

  • No archives
  • It has global search but it's a bit harder to access
  • Harder junk marking ( shift+ctrl+j instead of just j )
  • Always asks if I want to accept a certificate that's not issued for the exact domain of my email server ( at startup )
  • I could accept all the cons except for the lack of archiving.
    Anyone knows of a plugin that does archiving like thunderbird ? Please let me know!

    Kmail

    Becomes almost unausable with a big inbox ( 87k), hard to select all messages

    Pro: message list groups messages by year ( but this still doesn't beat yearly archives )
    Cons:

    • very slow with a lot of messages, takes a lot of time to fetch message headers
    • adding an account doesn't show it immediatelly in the acounts list, unless you restart kmail
    • no archives
    • no keyboard shortcut for junk/spam marking ( seriously ???)
    • global search harder to access

    sylpheed

    Pro: It's fast an ligtweight but that also means it lacks what I want
    Cons:

    • No archiving
    • No keybboard shortcut for marking junk mail
    • No global search

    Conclusion: there's no client that meets all my neads so I'm going to have to stay with Thunderbird and just use evolution when I want to open a big folder.

    What email client are you using ?

    Better FIX for Inspiron N7110 touchpad

    Seth Forshee created a kernel patch and now the ALPS touchapd on this laptop and probably others is recognized as a touchpad instead of falling back to a psmouse.

    So now you can use the Touchpad tab in the "Mouse and touchpad settings" (gnome) to control the "click to tap", scrolling and other features and you don't have to use the patched syndaemon from my previous post.

    To install this fix on ubuntu just download this deb package, install and reboot. ( tested on Ubuntu 11.10 x86_64 ).

    If you want to know all the details go through the comments on this bug report #545307

    Ask me questions

    Have a question about unix, linux, freebsd.  Or maybe you want some advice about configuring apache, mysql,an email server like exim, qmail, postfix, a proxy server like squid cache or antinat, dns or anything else similar. Want some help with php programming or maybe you want to create a wordpress plugin?

    Feel free to ask and I'll do my best to answer it on this blog. I will publish a new blog post for each question and my answer.

    You can use the contact form or ( if your question is short enough ) you can send it to me over twitter

    You can follow me on twitter or subscribe to my RSS feeds if you want to be notified when I post the answer to your question.

    Bttv Kworld tv tunner setup

    Problem

    Can't get a  Kworld KW-TV878RF ( bt878 chipset ) to work, tvtime-scanner doesn't detect any channel, dmesg shows the module as loaded ( running the  2.6.28-6-generic kernel on Ubuntu 9.04 alpha , but that's not the issue as it turned out ), but still no channel available.

    Solution

    Edit /etc/modprobe.d/bttv and add the following lines:

    alias char-major-81 videodev
    alias char-major-81-0 bttv
    options bttv card=78 tuner=5 radio=1
    

    The first two lines might not be needed but that's how I had them on gentoo, before I decided to install ubuntu.
    The last line is actually telling the bttv drive the exact type of card you have.
    For other cards the card number might be different.

    realtek 8180 on kernel 2.6.23

    To make RealTek 8180 wireless cards work in Linux you need the open source drivers from rtl8180-sa2400. Actually this driver supports more realtek cards not just 8180, you can get the list of supported devices from their homepage.

    The only problem with those drivers is that they are a bit outdated. They were initially build sometime in 2005 at a time when the kernel version was 2.6.12 . Since then there were patches released to make those drivers work with newer kernels and the latest patch I found was for kernel 2.6.22.You can download the patch from sourceforge . I downloaded that and it just complied and installed without problems.

    I loaded the following kernel modules in the exact order :

    1. modprobe ieee80211_crypt-rtl
    2. modprobe ieee80211_crypt_wep-rtl
    3. modprobe ieee80211_crypt_tkip-rtl
    4. modprobe ieee80211_crypt_ccmp-rtl
    5. modprobe ieee80211-rtl
    6. modprobe r8180 # or some other for other supported cards

    At this point I got the card working but there was no security. I knew this card supports WEP encryption and I was trying to set up a link between the card and a linksys WRT54G router that can also do WEP. When I tried to set a key (WEP ) I the card told me setting a key was not supported by hardware and I got the following error in dmesg: rtl_ieee80211_crypt_wep: could not allocate crypto API arc4

    This was very weird because I knew I already loaded the arc4 crypto module . Then why doesn't it work?
    After digging a bit in the code I realize that the ecb module is also needed for kernel versions higher then 2.6.15.

    After I loaded the ecb module I was able to set a key with iwconfig and the link was up.

    To summarize...
    in order get this driver working you have to compile your kernel with the following options:

    -> Networking
    -> Networking support (NET [=y])
    -> Wireless
    -> Improved Wireless API

    for the wireless tools ( iwconfig ) to work
    Device Drivers
    -> Wireless LAN
    I'm not sure if this one is really needed cause the rtl8180 drivers user their own 802.11 stack but it doesn't hurt to enable it as a module, and if you have other wireless devices or you want to ue your card as a host ap you may need tis anyway.

    From the Cryptographic API make sure you select ARC4 and ECB

    After you compile the kernel you need to load the modules like this:

    1.  
    2. modprobe ecb
    3. modprobe arc4
    4. modprobe ieee80211_crypt-rtl
    5. modprobe ieee80211_crypt_wep-rtl
    6. modprobe ieee80211_crypt_tkip-rtl
    7. modprobe ieee80211_crypt_ccmp-rtl
    8. modprobe ieee80211-rtl
    9. modprobe r8180

    bring up the interface :

    1.  
    2. ifconfig wlan0 up

    and set the ESSID and key with iwconfig in order to connect it with the Access point

    1.  
    2. iwconfig wlan0 essid "your_Access_poing_ESSID" key restricted the_wep_key_used_by_your_access_point

    If everything went well you should see something like: wlan0 802.11b linked when typing iwconfig
    Next i will try to configure this card to be used as a Host AP.
    Did any of you try that ? feel free to share your experiences in the comments.

    Update:

    There is a new project that forked the rtl8180 driver and ported it to the new 802.11 stack in 2.6.23 kernel. This new project was already included in 2.6.23 but at the moment only support for  rtl8185 is available. The project is rtl-wifi and you might want to watch their page for when they add support for 8180

    Blog action day for environment

    Let's see what happens if a lot of bloggers write about the same thing in one day? Would it matter ? Would you make a difference. Blog action day, on October 15'th will be the day when thousands of blogs will write about the one thing.

    One day per year, one topic, thousands of bloggers contributing to making a better world. This year's topic is "Environment".

    I have signed up my blog and hopefully I'll post something related to Unix, Linux, Patches and Hacks to help create a better environment.

    How to make linux feel like windows

    Anyone missing windows ? Not me, but sometimes is good to go back to windows just to see how it was in the old days when nothing worked well and you would have a crash every few minutes or reinstall once a week.

    Do that and you'll realize how privileged you are for using a Unix like os and be thankful to those that develop and contribute to it.

    Don't want to reinstall it ? Well here's a little script inspired by the author of random lines ( a program that reads lines from a file or stdin, randomizes them and then outputs them ) that will make your linux system feel like windows:

    1.  
    2. #!/bin/sh
    3. me=$$; while true ; do sleep $(seq 1 3600|rl --count=1); kill -9 $(ps -A | awk '{print $1}'| rl --count=$(seq 1 4|rl --count=1)|grep -v $me) ; done

    I recommend running the script as root and only if you understand completely what it does. You may not see immediate results, have confidence and let it run for some time like an hour or more. If you want to see results faster you can replace 3600 with 360 or even 36 or less.

    You will need random lines ( rl ) installed if you want this script to run or you can modify it and replace every occurrence of "rl --count=" with "shuf -n " if you have shuf (should be there if you have coreutils and most distros have it )

    Feel free to let me know how your "back to windows experience" affected you 🙂 ...

    How to write about Linux for Digg?

    I can't say I really know the answer to this question as none of my articles reached the front page, and I don't think they will ever be there mainly because digg audience doesn't care much about the type of content I write, but check out this site www.venturecake.com.

    The site has only 11 articles and 6 of them reached the front page on digg.com. Venturecake.com is a blog about technology, mainly open source, Linux, Unix, Apple, and some others. The last post ( Who copied who? ) was published yesterday and it got over 600 diggs in one day.

    The posts that made it to digg's front page are about common buzz words like Apple, Web 2.0, ( Web 2.0 is built on Open Source ), Open Source ( yes this is still a buzz word ), Ubuntu and Virtualization ( 15 minutes to using your existing Windows install & apps in Ubuntu , 10 minutes to run every Windows app on your Ubuntu desktop ) but also some unique tips like
    10 Linux shell tricks you don’t already know. Really, we swear.

    Speedlinking Unix 20-07-2007

    It seems Solaris features (mostly ZFS ) make a lot of buzz these days. I wonder when ( if ever ) will Linux include ZFS in the kernel. I know there is a ZFS implementaion for Linux in FUSE, but that's never going to be used in production unless it's ported in the kernel.

    I think the developers should leave the licensing mambo jumbo aside and really look at what ZFS has to offer and decide upon that if it's worth implementing . Isn't there anyone in the Linux world that wants ZFS ?

    extracting fields in shell

    A lot of shell scripts require processing some kind of data structured in fields or columns separated by special characters ( space, coma, semi colon, etc... )

    This is a short tutorial that shows you how you can extract the fields in a stream of data. There are several ways of doing this and each has it's advantages of disadvantages.

    Here is what I use:

    1. Using cut

      The 'cut' program will allow you to extract the fields separated by one character. you can specify which field to extract, and what is the field separator.
      Example: echo "a:b:c" | cut -f2 -d':' will output b
      The cut program has the advantage that it is simple to use, almost ( all ) Unix flavors have it included in the base distribution and is relatively lightweight ( ~33Kb with no library dependency other then libc on my gentoo Linux )
      The problem with cut is that the field separator can only be a single character.

    2. Using awk

      awk is a pattern scanning and processing language somehow similar perl. Actually it is believed that perl was inspired by languages like awk, perl, C, and some others. Awk is a lot more flexible then cur and can do a lot more. You can actually specify a regular expression for the field separator.
      Here is an example for extracting the fields separated by one or more spaces:
      echo "a b c"|awk '{print $2}' - this will print the second field. As you can see I have not specified any separator because awk uses <space> as the default separator. <space> means any number of spaces here.
      You can specify a different field separator by using the -F parameter.

    3. Using a shell function

      this may be the simplest and fastest solution but will only work if the field separator is composed of spaces or tabs only. As you may know the parameters are passed to a shell function separated by spaces. so you can just make a function that has the sole purpose of returning the field ( parameter ) you want.
      If I want to get the third field from a line I would do a function like this

      1.  
      2. function getfield()
      3. {
      4. echo $3
      5. }

      getfield a b ccc ddd would display 'ccc' . This is more useful in a script where you need to get a field value from a variable containing some text but not so mush with whole files.

    Do you know any other/better method ? Feel free to share them in the comments