Installing debian on the 96boards poplar board

OK, I’ve received my 96Boards Poplar board. It comes with Android 5 pre-installed, and that’s not what I plan to use. I’d like to use Debian Linux instead to tinker a bit more with it.

The documentation is a bit hairy, and I was unable to directly install the Debian files on it so here are my notes to avoid other poplar beginners waste time.

  • Build Debian from sources as described in the documentation, steps 1..6
  • If you’re using Archlinux, then configure the TFTP server “tftp-hpa” and not “atftp” as this one has a limitation in the BLKSIZE and it simply serves truncated image files! And if you’ve disabled IPv6 on your Archlinux box, then add the -4 option to it’s options in the file /etc/conf.d/tftpd file

    TFTPD_ARGS=”–secure /srv/tftp/ -4″

  • Step 7 now becomes:

    cd ${TOP}/recovery
    sudo rm -rf /srv/tftp/recovery_files
    sudo cp -a recovery_files /srv/tftp
    sudo chown -R root:root /srv/tftp/recovery_files

  • The next steps about flashing the image won’t work. Or at least I was unable to make the board stop to the poplar# prompt as described there. Instead, use the USB stick method, but please use the prebuilt fastboot.bin and not the one you just built.Follow the Building recovery media instructions, only at “step 3: copy fastboot.bin” just copy the one downloaded from here
  • Now insert the stick in one of those 2 stacked USB ports, press the “usb_boot” switch and turn-on the board. Be vigilant to press a key when prompted in the `screen` terminal you’ve already started. If the board was already on, them press the “usb_boot” and while holding it depressed, press the “reset” button and keep the “usb_boot” depressed another second or two. Keep an eye on the screen terminal and press the key to interrupt the boot when prompted.
  • Now follow their instructions to flash Debian via TFTP and… have fun!

Make spamassassin learn spam messages right from mutt

If you’re using mutt and you also have your private e-mail server running spamassassin, then you’ll see some spam messages still getting through the pipeline, with scores just below the default 5.0. So here’s the cure: use sa-learn on the server in order to train spamassasin bayesian filter and help it increase score on real spam.

You already have:

  • offlineimap syncing your remote mailbox with a local folder from where mutt reads the messages.
  • Junk folder in your IMAP mailbox, and server-side SIEVE scripts automatically move spam messages into this folder.

The big picture:

  • Manually move the messages you want classified as spam into the Junk folder; offlineimap will automatically send them to the server upon next sync operation
  • Have a cron-job on the server call the sa-learn utility on the Junk folder

Detailed steps:

file .muttrc
————
macro index ,j “:set confirmappend=no delete=yes auto_tag=yes\n=Junk\n:set confirmappend=yes delete=ask-yes\n” “Send message to Junk folder”
————

Log-in to the mail server then:

file /root/learn-spam.sh
———–
#!/bin/bash
sa-learn –spam [path to dovecot Maildir]/.Junk/cur
———–

#chmod +x /root/learn-spam.sh
#crontab -e

crontab file
———–
# run each day at 01:00 AM the learn-spam.sh script
0 1 * * * /root/learn-spam.sh
————

Voilà ! Each time you’re on a spam message in mutt, just hit ,j and the next day you’ll get more messages automatically classified as spam in the Junk folder.

Bluetooth headset i3block

Recently I purchased a bluetooth headset as I really missed the ability to listen to my music in good conditions. They work quite well and I pretty happy with this wire-free system.

As an i3 window manager user I wanted an easy way to get it connected or disconnected, as I’m also pairing it with my phone. You might already know i3blocks and it’s ability to extend with custom blocks. These days I put together a bluetooth-headset i3block and I already submitted it to the main repository. Meanwhile, you can still get it from my personal clone. And BTW, if you happen to know a means of connecting/disconnecting bluetooth devices on ArchLinux without root access, please share!

Enjoy!

Goodbye Akademy 2015, See You Randa 2015

OK, Akademy 2015 ended last week. This is my second Akademy, though the first full one.

A Coruña is located on the Atlantic front and on my way there, I encountered rainy spots and the rain was a familiar one for me, after having lived several years in northern France (Paris and Pays de la Loire). But this time I actually found it quite enjoyable, knowing that I left behind a 39°-heated Lyon. So, yes, A Coruña is warmer than what we could encounter in other parts of Spain. I shared my car with Sandro Knauß, who came to Lyon from Germany by train, so the one full-day trip was quite nice, KDE hacking-oriented. But be assured, we were also able to talk lots of other topics.

The venue and the hosting in Rialta were just perfect. The local team did an awesome job when organizing the event. They had it all: welcome party – we arrived at the right moment for the Queimada – sponsored food during the week-end (thanks Blue Systems), essential goodies (they carried the VIM T-shirt), “social event” – that was really a party where I had an excellent time -, the day trip and all the schedules which weren’t difficult to follow. Rialta has free swimming pool and I actually managed to use it.

Akademy is about KDE technology but also about meeting like-minded people. Getting along together is really easy, language barrier took apart, and I actually really enjoyed just sitting there and hacking with others, then having a beer or discussing technical issues or ideas. I already miss these spontaneous late evening hacking moments.

Speaking about KDE technology, we are at a turning moment, with Plasma Mobile becoming available. KDE is now ready to take on the mobiles platforms and that’s pretty cool. I look forward to the moment when I’ll have a Linux smartphone running both KDE software and Android applications (with Shashlik, bien-sur). I’ll do my best to help and I already plan to support KSecrets Service on mobile.

KSecrets Service had it’s own BoF. The updated slides are here. I’m working right now in implementing it and that would bring us to Randa, where I intend to continue even further and hopefully I’ll even have a working version by that time.

Randa is a great location for hacking. In fact, no, not Randa, but the venue in Randa is quite perfect for that 🙂 They have that big room under the roof, upstairs, where I look forward to hack, between some BoF’s or swiss meals. Some people who couldn’t make it to Akademy will go to Randa, so I look forward to meeting them there. Oh, and if you can, please help them getting there by the means of a small donation.

Finally, but not less importantly, I’d like to thank KDE e.V. and the sponsors for organizing these events and for providing travel reimbursement.

KWallet needs a serious face-lift ; enter KSecret Service

Users are often confused by the current KWallet system behavior. When their computers start, they enter the KDE session password but just after logging-in, they are prompted yet another password, for something named KWallet. Sometimes, they even see several password prompts from KWallet, depending on their precise desktop configuration.

Some users find that annoying and they file bug reports or, even worse, simply uncheck the “Enable the KDE wallet subsystem” in an attempt to deactivate it as a whole and switch to using some other external tools. Well, these tools are OK, but the KDE experience is affected, as the applications are no longer able to correctly store and retrieve their secrets. And that raises the barrier to entry for some of our potential users, adding negative points against KDE.

The remaining users have now several devices and would like to have their passwords synchronized all over these devices. They won’t find this kind of function and they’ll start using some other external tools, providing cross-device synchronization. That’s another bad point for the KDE experience.

Finally, more advanced users would like to know where their wallet data is stored and they would like to be able to put their wallets in some places of their choice, perhaps in an owncloud synchronized directory.

Enter KSecret Service!

The KDE Wallet system has some design flaws (I’ll write more on that in the future, but right now my post risk to get too long) affecting the security and should be replaced ASAP. Back in 2008 and until or 2011 an initiative was taken by the former KDE Wallet maintainer Michael Leupold and Stef Walter from GNOME to create a Freedesktop.org interface aiming to replace it. It’s called “Secret Service” and the draft may be found here: http://standards.freedesktop.org/secret-service/

This interface is already implemented by GNOME keyring and AFAICT KDE should also implement this interface if it wanted to enhance users experience.

All these points will be addressed by a new system, aiming to replace KWallet. It’s name is already known – KSecret Service.

I’m in the process of (re)defining it’s architecture and I’ll post it, for feedback, on the KDE developer mailing list as soon as I’ll get something stable enough. I cannot tell more right now – the post is already long enough – but it’s an ambitious plan! And I’m sure you’ll like it!

Connecting mutt to corporate MS Exchange

Last year I finally had the opportunity to install and use Linux at my work. The background of this change is out of the scope of this posting, I can only tell you that I was waiting for it since the very beginning. So I’m a happy Fedora user since a little more than an year, at my work (at home I’m using Linux since 2003 I think – ArchLinux currently).

Working with Linux is quite interesting and productive if you one uses the right tools. That’s why I also configured http://i3wm.org/ and a whole bunch of text mode tools, mainly vim plugins (know YouCompleteMe?), but also the Ranger file manager. However, our company uses MS Exchange *without* the IMAP connector and that’s quite a problem, because it interfaces only with MS Outlook or Evolution. MS Outlook has to run under Windows, so I used a virtual machine for this, eating 1 GB of RAM. Evolution runs natively, but it also eats more than 1GB only to present me the mails or some reminders. That’s a serious problem when one uses other very memory-intensive tools like Eclipse, IntelliJ or Oracle SQL Developer, not to mention Maven or DB Solo. So I really needed a solution to reduce my working session’s footprint, to get the most out of my workstation’s 8 Gb of RAM. Some coworkers are using Citrix sessions for that, but that has the mail/workstation integration problem.

Enter davmail. This awesome little project solved a problem several of us have at work: interface an IMAP client with our corporate server. DavMail need a very minimalist configuration. It almost worked out of the box, not considering the need to enter the company’s OWA URL. Once started, I instantly got IMAP and CalDAV. It also provides iCal and CardDAV but I don’t use these so I don’t know how it works. So, I’m now using mutt to handle corporate mails, interface it with lbdb and our LDAP server. \o/

The calendar is handled with khal but I also use remind. This part needs some more work, as I still need to figure out how to create appointments on my machine, then get them synchronized to the corporate server.

Should I write a tutorial with the steps I done so far? Let me know and I’ll do it if you’re interested.

I was in Brno!

This year Akademy’s timing was just perfectly adjusted with my annual vacation timing. For personal reasons, I only could go vacationing in September. Brno is right on the way from Lyon to Romania, so I decided to take my car and make a stop there. My girl-friend was kind enough to accept spending some time alone in Brno, while I was attending the second day. I’d like to thank her really much for accepting this. Sure enough, I would have liked to attend the first day also, but I used that full day to drive from Lyon to Brno. And BTW, speaking about driving in Europe, I’m now writing this in Cluj-Napoca. So I have behind me highways from France, Germany, Czech Republic, Slovakia, Hungary and Romania. Sygic GPS navigation software allowed me a smooth ride along this long road, as it features offline maps. And where I had data connection, I used WAZE for it’s social features.

This second Akademy day was the moment for me to catch up a little with several KDE great people I know, and with whom I’d really like to spend some more time. The location in Brno is outstanding, and the event was perfectly setup. Second day presentations brought my attention to several things:
– The Jungle project,
– KDE & Android,
– Accessibility.

The Jungle project, brilliantly presented by Alex Fiestas, it’s quite impressive. It aims unifying several multimedia services like youtube and your local media library. The promise is great, as you’ll be able to start watching your favourite videos on your Android device, then continue it on your KDE Desktop, and forth. I’ll really keep an eye on this project and hope it’ll add support for Facebook and Google+ sharing in a future release.

KDE & Android was featured in two presentations. The first one was about the KDE Connect project. I already use this project and I’m already working on an MPRIS widget for the Android device. Hopefully I’ll get enough time to take into account the feedback I got from the review request I already submitted. I also plan to add some kind of KWallet or secrets support. Alex told me that it’ll be nice if we could send passwords from the KDE Desktop to the Android device. However, that’ll not answer to my personal need, as I’d like to have a real sync between my device and my wallet.

The second KDE & Android topic was launched by Aleix Pol Gonzalez. It’s about an attempt to bring some KDE applications to the Android world. That’s an awesome project and I’ll take a closer look to this and keep you posted.

Finally, Frederik Gladhorn brought-up the accessibility topic and showed as the current progress of the accessibility features in Qt and so KDE. This is a very important topic, and I really hope people with disabilities would benefit this technology. I remember that around 10 years ago I’ve met someone who lost his view after an accident. He needed a braille display and at that time I understood the accessibility is really inaccessible (pun intended) to these people, mainly for material reasons. The price tag of accessible computers is really high and hopefully free desktops like KDE will help these people in their day to day activities.

So, KDE will bring us plenty of new and exciting features!

KWallet for Plasma 5 now automatically migrates KDE4 wallets!

Next time you’ll start your updated Plasma 5 session’s KDE Wallet system, it’ll eventually start migrating your wallets. The precondition is that you’re doing that on a system that also has KDE4 and that you previously used that installation’s KDE Wallet system. If your system doesn’t have a KDE4 wallet daemon, then nothing will happen.

Simply follow the instructions of the wizard that’ll popup. If you accept the migration option, then for each of your existing KDE4 wallet you’ll be :
– prompted with a new Plasma 5 wallet creation wizard – that’ll eventually be the moment to switch to GPG wallets 😉
– eventually prompted for the old wallet’s password, it the old daemon didn’t had it already opened by some other KDE4 program.
The migration assistant will preserve wallet names and wallet internal structure.

As usual, do not hesitate to file bug reports if you encounter any problem!

A final note about those who installed KDE4 in a prefix that’s not /usr. Please ‘ln -s [your kwalletd location] /usr/bin/kwalletd’ in order to let the migration agent correctly find and start the KDE4 daemon. Without that, it’ll not trigger the migration. (yes, that’s a quick hack, but it works).

Starting KF5 using the I3 window manager

Lately I started experimenting several tiling window managers, and I settled on I3 (see its Official site and the corresponding ArchLinux wiki page)

I now plan to return hacking KF5 and I’d like to use this tiling manager. In KDE4 I simply used the “Default Applications” control module from “System Settings” to choose i3, after adding the right i3.desktop file. However, with KF5 that will not be enough. For some reason kwin will still be loaded. (And BTW, the new kwin looks really great. I also like the new plasma desktop very much, but it won’t fit my workflow, as I prefer tiling WMs paradigm) Today I started searching a quick way to workaround that and here it is what I did.

Firstly, create the $KF5/share/ksmserver/windowmanagers/i3.desktop file with this contents:

[Desktop Entry]
Encoding=UTF-8
Name=i3
Comment=Highly configurable framework window manager
Type=Application
Exec=i3
TryExec=i3

Then edit the file ~/.config/ksmserverrc and modify the windowManager line from the [General] section:

[General]
# other lines ommited
windowManager=i3

Alternatively, you can use the “Default Applications” control module from KF5 System Settings to change the window manager to i3.

Finally, here is the little bit that made it. Modify the KF5 startup script to define the KDEWM environment variable. It should read like this:
export KDEWM=/usr/bin/i3

Here is how:
On my system, I’m using kdm. For it to start a KF5 session, I created /usr/share/config/kdm/sessions/kf5.desktop with this contents:

[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/home/kde5/start-kf5
TryExec=/home/kde5/start-kf5
DesktopNames=KF5
Name=KF5

As you can see, my KF5 is installed in /home/kde5 (others may have it in /opt/kf5). The start-up script, named ‘start-kde’ simply sets the righ environment variables, calls ssh-agent and gpg-agent, then calls startkde from KF5. I added the export KDEWM=/usr/bin/i3 line into this script.

Quit your current session, choose the KF5 session in KDM and enjoy I3 with KF5!

I’ll now return to tinkering it, as some adjustments still need to be done 🙂