Archive for the ‘ubuntu’ Category

Upgrade from Ubuntu 14.04 to 16.04

On my laptop I upgraded my Ubuntu to 16.04 but after the restart I didn’t get the graphical interface. The booting stopped and I found myself in a maintenance shell. I also got messages about some hard disk errors.

Well, I also have Windows 8.1 on this laptop and the Windows didn’t do a complete shutdown. Windows 8 does some tricky shutdown to boost the booting process, so it does some kind of half-hibernation. When I used Ubuntu 14.04, I got a message that one partition couldn’t be mounted, “press S to skip”. And I upgraded to 16.04 like this. And this unmountable partition caused this trouble.

So the solution was the following: start Windows 8.1, disable that shitty “fast startup” (see this post for more info), and restart Ubuntu. This time Ubuntu 16.04 booted normally.

Update (20160526)
I upgraded two more machines, there were no real problems. Libreoffice didn’t want to start on one of them, it dropped a “General I/O” error. Here is the cure:

$ sudo apt-get remove --purge libreoffice*
$ sudo apt install libreoffice

It’s a good idea to use “apt” instead of “apt-get”. It does the same thing but in addition you get a nice progress bar.

MongoDB stopped too. Here is how to start it with systemctl:

$ sudo systemctl enable mongodb
$ sudo systemctl start mongodb
# verification:
$ systemctl status mongodb
$ mongo

how to install Neovim under Ubuntu

Under Manjaro I installed neovim with yaourt. It installed version 0.1.4 and it works fine. For Ubuntu, the home page of Neovim suggests a PPA but it installed for me the version 0.1.5-dev, which is a development version.

How to install a specific version under Ubuntu (namely 0.1.4 in this case)?

Visit and find the tagged version 0.1.4. Download the zip, uncompress it, and enter the project folder.

Install the dependencies:

$ sudo apt-get install libtool autoconf automake cmake libncurses5-dev g++

Build and install the project:

$ make cmake
$ make test
$ sudo make install

It’s a good idea to install the “neovim” Python package too:

$ sudo pip2 install neovim
$ sudo pip3 install neovim

Tips taken from here.

Categories: ubuntu, vim Tags: , , ,

how to configure a Digital Ocean (or Linode, etc.) Ubuntu box

March 21, 2016 Leave a comment

I wrote a doc about it on GitHub: . Following this guide I can set up a virtual private server (VPS) in 30-40 minutes.

upgrade tmux to the latest version

March 17, 2016 Leave a comment

What I love in Manjaro is that it contains the latest software versions. For instance, I installed tmux and on Manjaro it’s version 2.1.

On Ubuntu 14.04 it’s still version 1.8 in the reposotories…

How to upgrade tmux 1.8 to 2.1 on Ubuntu?

Install these packages:

$ sudo apt-get install exuberant-ctags cmake libevent-dev libncurses5-dev

Then download the source of tmux from the official home page. Then build and install:

$ ./configure && make
$ sudo make install

This tip is from here.

Categories: bash, ubuntu Tags: , ,

execute a command during boot as root

During the boot process you want to execute a command as root. For instance, I needed a symbolic link in /run, but /run is a virtual file system and its content is lost when you switch the machine off.

Edit the file /etc/rc.local . Example:

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

# this link is required by a project of mine
ln -s /media /run/media

exit 0

This tip is from here.

Categories: ubuntu Tags: ,

Getting started with the Rust programming language

December 24, 2014 Leave a comment

I heard a lot of good things about Mozilla’s Rust prog. language, so I decided to give it a try. A very nice starting point is The Rust Guide.


$ curl -s | sudo sh

I modified this script a little bit:



cd $DEST
rm -f $DEST/
wget -O $DEST/
sudo sh $DEST/

But it does the same thing. If you install Rust via this script, it has two advantages: (1) it installs the latest version of Rust, and (2) it also installs Cargo, the package manager and build system of Rust.

Print the version number: “rustc -V“.

Hello World

fn main() {
    println!("Hello, World!");

Compile it with “rustc“.

Under Ubuntu I had no problems, but under Manjaro got the following error: “rustc: error while loading shared libraries: cannot open shared object file: No such file or directory“.

Solution #1
Add the following line to your ~/.bashrc:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

Solution #2
Create the file /etc/ with the following content:


Then execute the command “ldconfig” as root.

More info
Check out The Rust Guide.

Categories: manjaro, programming language, ubuntu Tags:

extracting conky settings from Parted Magic

December 19, 2014 Leave a comment

Two days ago I heard about Parted Magic, which is a live Linux CD offering a complete hard disk management solution. As I was checking out the screenshots, I noticed that it has a beautiful conky setting:

“I need that” was my first reaction :) So I grabbed a copy of Parted Magic, launched it in VirtualBox, and extracted the conky configuration. You can download it from here. My launcher script is here. Simply add the launcher to the list of startup applications.

Tip: if you want to play with conky, do it with Conky Manager. Here is how to install it.


Get every new post delivered to your Inbox.

Join 88 other followers