lost your linux root password ?

Lost your root password ?

Under Fedora, at boot time, press e, select the kernel and add 1 (run level), which will let you enter into a shell session, where you can edit the /etc/passwd file to reset the password.

Posted in Linux | Tagged | Leave a comment

vim: multiple buffers

In order to work with several view ports of the same file in the same Vim window, type:

You may also open another file in the same window. To do so issue the command::

To switch between buffers, use ctrl+w

To open a vertical buffer use :vsp filename.

Posted in Linux | Tagged | Leave a comment

vim: create function to remove white spaces

In the .vimrc file, add the following lines ( here ^M is a special character for the return carriage created using CTRL+V):

those functions call then be called within vim typing:

some Explanation of the function removeWhiteSpace().

  1. first line replaces a line that starts and ends with white spaces
  2. second line replaces a single white space that is alone on a line.
  3. third line replaces the end of a line that finishes with trailing spaces
  4. same as 3 but for the single white space case
Posted in Linux | Tagged | Leave a comment

yumex-dnf is locked

Under Fedora 23, starting yumex-dnf, I got a message that yumex-dnf was locked. I could not find any lock file in /var/cache/dnf and therefore was stuck. Finally, running

did kill the faulty process and could start yumex-dnf again…

Posted in Linux | Tagged | 7 Comments

conda and bioconda channel

Anaconda ( https://www.continuum.io/downloads ) provides a Python distribution with more than 400 of the most popular Python packages for science, math, engineering, and data analysis. Anaconda installs an executable called conda that will be your entry point.

Anaconda solves two problems.

First it is a virtual environment similar to virtualenv, which is used in the Python community. The advantage I found with compared to a tool such as virtualenv is that you can easily have any Python environment on your system (e.g. 2.6, 3.4 and so on) without the need to have to install the specific Python version yourself (see other posts on this subjet , , .

Second, installation of packages (e.g. numpy) to be found on the conda website will be fast and smooth since packages are pre-compiled: no compilation errors (in principle) and no time spent waiting for the compilation to be finished. This is very valuable since it also means that your software can be installed by anybody who will use anaconda (and therefore the same pre-compiled libraries as yours).

conda can download more than 400 packages but there are much more out there ! First, you can still use pip to install any package to be found on website.
Besides, conda provides a mechanism that ease the creation of parallel channels. One of them dedicated to biology is called bioconda. The bioconda channel can be added to your environment by typing

You can then install a tool such as bwa (sequence alignment) as follows:

Again the great advantages here will be that bwa will be installed in a second (time to download the package) and the executable ready to be used !

I mentionned the fact that you can use different version of Python. How does that work ? You need to create an environment. A default one is provided once Anaconda is installed but you can create as many as you want by naming them and setting the version of Python to be used. For instance, let us create an environment with python3.5:

You can then activate it as follows:

You can check that you have indeed the correct python version by starting a python shell and check the version

For more information, visit those two sites:


Posted in biology, Python | Tagged , , | 1 Comment

pypi upload failed (401)

On a new computer after a fresh installation, I tried to upload a new version of an existing package on the pypi repository. Of course, I have already a username/password and uploaded packages in the past. However, in the source directory, when typing

I got the following error message:

I just forgot to create a special file named .pypirc in the HOME directory with this content:

Posted in Python | Tagged | Leave a comment

Installing Fedora 23 in dual-boot and post-installation

I’ve just installed Fedora 23 from scratch in dualboot (with an existing windows partition). The installation is better and better and you do not need to create the partition under windows. Just downloaded the iso file from fedora website and burnt it on a DVD. Then reboot.

The installation was done on a DELL latitude E6540. To boot on the DVD, press F12 key while you still see the DELL logo. There, you should see an option to boot from the DVD first instead of the hard drive.

Then Fedora installation should now guide you intuitively. The only tricky part will be that you should create a partition, shrinking the existing partition to be able to install Fedora.

I won’t enter into more details and I encourage you to visit the fedora website would you have any question.

Here below are some of the post-installation similarly to what I did in another post related to F19 Fedora19.

One main difference is that the yum tool has an alternative named dnf.

First, update the packages:

Firefox related

Firefox has also many addons. I use the following ones:


Other useful tools

Gnome specific

The minimize/maximize windows can be added to windows. First, start gnome-tweak-tool.

Then, go to Windows. You should see a button to activate the min/max buttons.

Some packages for development

Posted in Linux | Tagged | Leave a comment

python: certificate verified failed

I was just trying to download a file on github (raw) using wget package (or curl) under Python2.7.11 and Windows 7. I got a certificate error as follows:

As an example, here is the code with a Python shell

This is not an issue with the tool wget since I got the same message in a windows shell with curl.

After quite a lot of time on stackoverflow and other resources, I finally found a solution on a github page (https://github.com/servo/servo/issues/5917). his may work for other systems so here is the solution that worked for me:

Posted in Python | Tagged , | 6 Comments

Installing a perl module under linux

Sometimes you need to use perl… and quickly you need to install a missing dependencies.
you can do it manually but it can be cumbersome. Here is another way using cpanminus tools:

And then install (in a shell) the missing file. e.g.:

Posted in Computer Science | Tagged | Leave a comment

Starting with docker and creating an image with ipython

On my fedora box, I followed the instructions from the official web page: https://docs.docker.com/installation/fedora/

Once the new shell appears (bash), you can type for instance:

Note that sudo does not work here (I presume that by default you have root permission).

You can now exit your docker container (exit)

Note that to start your fedora container it takes a fraction of a second ! Note also the size (250Mb) . To check that type:

Posted in Computer Science, Linux, Uncategorized | Tagged | Leave a comment