Place Ghantoos

Howto: Install Debian Stretch (Testing) on a Lenovo X1 4th Generation via USB

I have had quite a bad experience trying to install my dearest Debian distro on my brand new Lenovo X1 (4th generation). After many failed attempts, and a couple of serious hesitations to switch to Linux Mint, it ended up being quite straight forward! So I thought I’d put it out here, and may be prevent someone from switching to Linux Mint (or other Debian derivative) out of anger or despair.

Important note: the following will describe how to install a Debian TESTING (not STABLE), currently Stretch (Jessie being the current stable).

Read the rest of this entry »

Continuous integration – Python comments spellchecks with pylint, pyenchant and tox

As part of our continuous integration efforts, we always think about code quality and sometimes forget about the comments. To improve readability, the least we could do is spellcheck the comments to make sure we are not introducing new words into this world. Here is how I added spellchecks as part of my Python tox test suite of lshell, using pylint and pyenchant.

To test this locally, I had to install pyenchant and pylint. On Debian:

sudo apt-get install python-enchant pylint

As some of my comments included words that were not in the default en_US dictionary (mostly variable names, app names, etc.), I first ran pylint asking it to store all unknown words in a separate file. This can be done by specifying the argument: –spelling-store-unknown-words=y.

pylint --disable=all --enable=spelling --spelling-dict=en_US \
       --ignore-comments=no --spelling-store-unknown-words=y \
       --spelling-private-dict-file=test/words \
       path/to/code path/to/other/code

Read the rest of this entry »

How to setup & run Oh-my-vagrant on Debian (with libvirt/KVM)

Last friday, James Shubin (purpleidea) came to the Montreal Red Hat office to talk about his project: Oh-my-vagrant.

In a nutshell, Oh-my-vagrant (also called OMV) is a Vagrant wrapper, that helps you easily manipulate your dev environments. By easily, I mean: it’s a couple of minutes (sometimes seconds) before you have your env up’n’running with your favorite updated OS (centos, debian, rhel, and more), your own code and scripts (from github or elsewhere), your preferences, etc. All kinds of awesome!

You can find lot’s of documentation on the project page:

This post is intended to help you easily setup oh-my-vagrant on your Debian box. This requires Debian Jessie minimum.

Read the rest of this entry »

lshell 0.9.17 is out!

After nearly two years of coding (and running), I have finally released a new version of lshell-0.9.17.

Many new features, bug fixes and news tests are included is this new release. Check it out!

=== v0.9.17 14/08/2015 ===
    * Added include_dir directive to include split configuration files from
      a directory.
    * Added possibility of using 'all' for sudo commands
    * Replaced os.system by subprocess (python)
    * Added support for sudo -u
    * Corrected shell variable expansion
    * Corrected bugs in aliases support
    * Fixed timer (idle session)
    * Added exit code support
    * Fixed wrong group reference for logging
    * Replaced Python os.system with subprocess

You can download lshell please refer to github release here.


No time for poetry, this is URGENT!!!



Photo credit: António Segurado under licence CC BY-NC 3.0

Not long ago, poets would visit the cafés to sing and recite poetry. There were no radios. Most of the people were illiterate. They were closer to nature; they had time. Today, many things have changed for the better. But we’ve lost track of time, let alone nature.

Here I am, in front of my computer. My headphones isolate me from my surrounding open space. I am in a Chopin mood today. The piano helps me relax and let go. I can visualize every bit of detail I need in order to process my tasks. The datasets are here. My brain is fully concentrated. I am diving in my work. I am getting shit done. I can’t, but love this moment. I feel in tune with myself, with my mind and with my job. Then…
Read the rest of this entry »

Specify your Google Maps Javascript API version!

I woke up this morning to find out that the Google maps widget that I used on my ads website was pop-ing out regardless of the block visibility set on the div.

How it is supposed to work: the block is hidden until the user clicks on a specific area that triggers an onClick() and pops-out the map.


The source of this div looks like the following:

<div class="input-group-btn">
    <button type="button" class="btn btn-default dropdown-toggle"><i class="icon-map-marker"></i></button>
    <ul class="dropdown-menu pull-right" style="display:block;visibility:hidden;z-index:999;">
            <div id="location_ed_location_map" class="ed_location_map" style="width:560px;height:270px;"></div>

Read the rest of this entry »

Open management thoughts – Communicate early, communicate often

– updated on October 28th 2014 –


During the past year at eNovance I have had the chance to discover and experiment the joys of managing a multi-continent distributed team of engineers, France and Montreal for now and Asia in the near future. It is on purpose that I did not call the group an “engineering team”, but team of engineers; putting the emphasis on the group of individuals. As I have been managed (and still am) by my managers over the years, I have learned many things that I would like to do and others that I didn’t want to replicate when my time came to manage a team.

Little did I know that the challenge was far from being the easy task that I was expecting from my own management!

I was about  to write an article about the day-to-day rules that I try to live by, but I thought it was important to share one of my team’s major achievements: our weekly open meetings.

This article will explain the tools, steps and rules to follow in order to make these open meetings a reality. But first, let me give you some context…


Read the rest of this entry »

lshell 0.9.16 is out!

I have just released a new version of lshell 0.9.16.

Lots of new code, and code cleanup has been done in this version. Many bugs have been corrected, and some new features.

Here is the complete changelog:

=== v0.9.16   14/08/2013 ===
    * Added support to login script. Thank you Laurent Debacker for the patch.
    * Fixed auto-complete failing with "-"
    * Fixed bug where forbidden commands still execute if strict=1
    * Fixed auto-completion complete of forbidden paths 
    * Fixed wrong parsing &, | or ; characters
    * Added urandom function definition for python 2.3 compat
    * Corrected env variable expansion
    * Add support for cd command in aliases
    * Split lshellmodule in multiple files under the lshell directory
    * Fixed check_secure function to ignore quoted text 
    * Fixed multiple spaces escaping forbidden filtering
    * Fixed log file permissions 644 -> 600
    * Added possibility to override config file option via command-line
    * Enabled job control when executing command
    * Code cleanup

To download lshell please refer to github release here.

Ignace M

Cocktail of PXE, Debian, preseed, IPMI & puppet

A couple of days ago, I had to quickly setup around 60 machines with a standard GNU/Debian install.
The first shot was done using Razor. Razor is a very neat piece of software, developped by puppetlabs, that lets you setup an “intelligent” PXE installation by booting a mini-linux kernel and getting information from the physical machine using facter; giving you the possibility to install/configure the machines depending on their disk configuration/CPU model/RAM size/Model/Serial number/etc. Unfortunately, this project depends on the ipxe project which did not support, at the time of the install, all the network cards that were used (Broadcom and Intel). So I decided to go with an old school PXE/preseed installation coupled with DNS, IPMI and puppet configuration.

The whole idea was to:
1- boot and install the machine
2- reboot on the installed OS
3- use the IPMI ip address of the machine in order to set the hostname
4- launch puppet to setup the machine
Read the rest of this entry »

lshell is out!

Important note: lshell version 0.9.15 contains a serious bug that has been corrected in lshell- Please refrain from using previous versions.

I have just released a new version of lshell.

This release includes many new features and corrects many bugs and one major security bug.

Here is the complete changelog:

=== v0.9.15.1 15/03/2012 ===
    * Corrected security bug allowing user to get out of the restricted
    shell. Thank you bui from NBS System for reporting this grave issue!

=== v0.9.15 13/03/2012 ===
    * Set the hostname to the "short hostname" in the prompt.
    * Corrected traceback when "sudo" command was entered alone. Thank you
      Kiran Reddy for reporting this.
    * Added support for python2.3 as subprocess is not included by default.
    * Corrected the 'strict' behavior when entering a forbidden path.
    * Added short path promp support using the 'prompt_short' variable.
    * Corrected stacktrace when group did not exist.
    * Add support for empty prompt.
    * Fixed bugs when using $() and ``.
    * Corrected strict behavior to apply to forbidden path.
    * Added support for wildcard '*' when using 'cd'.
    * Added support for "cd -" to return to previous directory.
    * Updated security issue with non printable characters permitting user
      to get out of the limited shell.
    * Now lshell automatically reload its configuration if the configuration
      file is modified.
    * Added possibility to have no "intro" when user logs in. (by setting
      the intro configuration field to "")
    * Corrected multiple commands over ssh, and aliases interpretation.
    * Added possibility to use wildcards in path definitions.
    * Finally corrected the alias replacement loop.

To download lshell please refer to the wiki here.

Ignace M