Ubuntu 14.04 - Install Android Tools (ADB, Fastboot & QtADB)

dropcap-ubuntu-android

A new updated version Ubuntu 16.04 LTS - Install Android Tools (ADB, Fastboot & QtADB) is now available. Please don't use this procedure anymore if you run latest Ubuntu Xenial 16.04 LTS

If you own an Android Smartphone, you will need sooner or later to use some specific Android tools like ADB or fastboot.

If you need these tools, two options are available under Ubuntu : either to install the whole Android SDK or to install some specific packages that bring only these tools.

Another very insteresting tool is QtADB. Based on ADB protocol, it allows under a graphical interface to have a complete access to your Android device filesystem, to manage your installed applications, to get some system informations, ...

As most of Android smartphone or tablet users are not needing the whole Android SDK, this article explains the simple steps needed to install Android specific tools like ADB, fastboot or QtADB on a Ubuntu computer.

It has been tested under Ubuntu Trusty 14.04 LTS and it has been used to flash and root a Google Nexus 7 under Lollipop and to root a OnePlus One running CM11s.

Read more: Ubuntu 14.04 - Install Android Tools (ADB, Fastboot & QtADB)

Ubuntu 12.04 - Declare MTP device for automount in one click (Nexus 4, Nexus 7, ...)

dropcap-ubuntu-android

android-mtp-protocolLatest Android devices, like Nexus 4, Nexus 7, Galaxy Nexus, ... are using 2 different USB connexion modes : PTP and MTP.

With PTP mode, the phone is seen as a digital camera. This is working Out Of The Box under Ubuntu 12.04 LTS. But, you can only access DCIM directory of your device.

With MTP mode, the phone is seen as a multimedia device where you can access the complete exported filesystem. But it doesn't work Out Of The Box under Ubuntu 12.04 LTS. It needs some setup and configuration to work.

This guide explains how to easily configure your Ubuntu computer to directly access your Android devices filesystem in MTP mode as soon as you plug it to a USB port.

It is based on a previous guide done for Nexus 7, but has been modified to become fully automatic, providing a script which is a one click solution to configure virtually any MTP device.

Thanks to this script, your Android devices will be properly declared to automatically mount when plugged & unmount when unplugged. You'll be able to handle multiple devices at the same time on your ubuntu computer.

This guide has been completly rewritten to use mtp-detect. It has been tested with a Google Nexus 4 and a Google Nexus 7, but it should work with any other MTP device (Android phone or tablet, MP4 player, ...). It has been done under Ubuntu 12.04 LTS Amd64 but it should work or be easily adapted on many Linux flavours.

Main script used in this article is available from Github mtp-automount project.

Read more: Ubuntu 12.04 - Declare MTP device for automount in one click (Nexus 4, Nexus 7,...)

Domoticz - Handle your exhaust speed according to humidity level

dropcap domoticz

Nowadays, a Mechanical Controlled Ventilation (VMC in French) is a de-facto equipment in a bathroom.

Most of these Controlled Ventilation can run in two different speeds : low speed and high speed. VMC runs low speed any time and can be switched to high speed with a manual switch.

Thanks to home automation, it is now possible to automatically manage your Controlled Ventilation speed according to humidity level in the room.

This article explains how to automatically manage a Controlled Ventilation speed according to humidity level in a bathroom with the help of :

  • a wireless humidity sensor
  • a wireless switch
  • a wireless gateway
  • Domoticz, a very nice Open Source Home Automation Software

This setup has been tested on a Debian 8 Jessie server with a RfxTrx433 gateway, an Oregon Scientific THGR 122 Temperature/Humidity sensor and a DiO 54755 switch. All RF devices are working on 433 MHz frequency. But any other similar setup and devices should work as long as they are compatible with Domotiz.

Read more: Domoticz - Handle your exhaust speed according to humidity level

Debian - Send your Server Notifications thru Telegram

dropcap debian telegram

As a system administrator, you must be receiving your important server notifications by emails. Email has been used since decades, but it is slowly replaced in everydays life by social networks. With social network clients, messages are usually displayed as thread and get instant notification on your smartphone.

So, why not receiving your main server notifications on one of your favorite social network client ?

Telegram is becoming a very popular social network as it is free and multi-platforms. It has also a unique feature : it's allowing the use of bots. Bots are very interesting as they can be seen as an application account associated to a real person's account. They are able to send or receive messages to/from either an individual account or a group.

So, instead of sending a mail, it could be very interesting for your Debian/Ubuntu server to be able to send you Telegram notification. You can for example create an administrator group and send all your server notifications to this group. Any administrator belonging to this Telegram group will get instant notification from the server.

This article explains how to setup a server environment to very easily send Telegram notifications from any of your server script or service. It also provides a script that allows you to send Telegram messages including text, photos, documents, logs, …

It has been tested on a Debian 8.5 server but it should work on any modern Linux distribution.

Read more: Debian - Send your Server Notifications thru Telegram

Debian 8 - Install & Monitor EATON UPS

dropcap debian eaton

Because of this sumer heat wave, I finally decided to install an Uninterrupted Power Supply for my debian server.

So I decided to buy a Eaton 3S550 UPS. This small UPS is designed like a big strip, it handles 550 VA and it provides a USB connection.

Thanks to Network UPS Tools, this UPS is very easy to manage when connected to a Debian server.

Installation procedure is quite simple, but it involves a certain number of steps that should be carefully followed.

So, this article explains a step-by-step installation procedure of a Eaton UPS connected to a Debian Jessie server. If followed carefully, you should get your UPS fully integrated to your server, with an automatic shutdown when your UPS battery is becoming too low during a power cut.

This procedure should be applicable to any Ubuntu or Debian-based server.

Read more: Debian 8 - Install & Monitor EATON UPS

Debian - Configure Sendmail to use your Gmail account

Debian

If you are running a Debian server, you must be running some automated processes like database dump, log cleaning, data backup, …

When processing these batch treatments, it can be very convenient to get some completion reports sent by email.

Under debian, you can send mails thru command line with the help of sendmail and exim4 as a mail transfert agent. But you previously need to configure them to use an official smtp server.

This article will explain how to configure your Debian Wheezy server to be able to send emails from command line by using the smtp server provided with your Gmail account.

Configuration is given for a Gmail account, but it can obviously be adapted to any other smtp provider.

This article has been tested on a freshly installed Amd64 Debian Wheezy.

Read more: Debian - Configure Sendmail to use your Gmail account

Ubuntu 16.04 - Rotate & Stabilize your video with MLT and Vid.stab

dropcap-ubuntu-stabilize

Nowadays, street video shooting is becoming a reality.  With any modern smartphone, point-and-shoot camera or even a GoPro camera, you can shoot any video anywhere.

These devices are affordable, light-weight, very compact and easy to use. Whatever happens around you, you are able to record it on the spot. But, on the other end, as these devices are compact and light, they are not very steady. Your recordings tend to be shaky !

Another problem you can encounter when shooting from a smartphone is that your video may be recorded upside-down or even rotated by 90°.

Till date, I did not find any very simple solution under Linux to simply stabilize (unshake) and/or rotate my day-to-day videos.

Hopefully, thanks to MLT framework, it is possible to use a command line tool melt and some specific plugins (vid.stab to stabilize and affine to rotate) to do the job.

This article explains how to easily post-process any group of video files straight from Nautilus file manager to rotate and stabilize them. The tool handles following actions :

  • read important metadata
  • rotate video if needed
  • stabilize video if needed
  • transcode it to h264 & aac

It has been designed and tested nder Ubuntu and Ubuntu Gnome Xenial 16.04 LTS. It should be applicable to many up-to-date Linux distro.

Read more: Ubuntu 16.04 - Rotate & Stabilize your video with MLT and Vid.stab

Ubuntu 12.04 - Stabilize your camcorder video with MELT and Vid.stab

dropcap-ubuntu-stabilize

Since availability of Ubuntu Xenial 16.04, this procedure is obsolete and is not updated.
Please use Ubuntu 16.04 - Rotate & Stabilize your video with MLT and Vid.stab instead.

Nowadays, street video shooting is becoming a reality.
Who is not having a smartphone, a point-and-shoot camera with video capabilities or even a HD camcorder ?

These devices are affordable, light-weight, very compact and easy to use. Whatever happens around you, you are able to record it on the spot. But, on the other end, as these devices are compact and light, they are not very steady. Your recordings tend to be shaky !

Till date, there was no simple solutions under Linux to stabilize (unshake) videos. One of the first one I used was transcode with vid.stab plugin. This stabilization plugin is very efficient. But the transcode tool is giving lots of trouble as soon as you want to encode your resulting video to h264. In fact, the interface between transcode and ffmpeg is type of 'broken'.

Short time back, the MLT framework has integrated a port of vid.stab stabilization plugin. That is a very good news as MLT framework provides a command-line tool melt which interfaces very well with FFmpeg libraries for h264 encoding.

This article will explain how to easily post-process any video file to stabilize (unshake) it. It will use :

  • latest version of MELT, a command-line tool from MLT framework, which comes now with vid.stab stabilization filter
  • latest version of FFmpeg to re-encode the resulting video with h264 codec and aac audio

It will explain 2 different approaches :

  • stabilization thru command-line
  • stabilization directly from Nautilus, thru a Nautilus script
Read more: Ubuntu 12.04 - Stabilize your camcorder video with MELT and Vid.stab

Ubuntu 14.04 - Rotate & Stabilize your video with MLT and Vid.stab

dropcap-ubuntu-stabilize

Since availability of Ubuntu Xenial 16.04, this procedure is obsolete and is not updated.
Please use Ubuntu 16.04 - Rotate & Stabilize your video with MLT and Vid.stab instead.

Nowadays, street video shooting is becoming a reality.  With any modern smartphone, point-and-shoot camera or even a GoPro camera, you can shoot any video anywhere.

These devices are affordable, light-weight, very compact and easy to use. Whatever happens around you, you are able to record it on the spot. But, on the other end, as these devices are compact and light, they are not very steady. Your recordings tend to be shaky !

Another problem you can encounter when shooting from a smartphone is that your video may be recorded upside-down or even rotated by 90°.

Till date, I did not find any very simple solution under Linux to simply stabilize (unshake) and/or rotate my day-to-day videos.

Hopefully, thanks to MLT framework, it is possible to use a command line tool melt and some specific plugins (vid.stab to stabilize and affine to rotate) to do the job.

This article explains how to easily post-process any group of video files to :

  • read important metadata
  • rotate video if needed
  • stabilize video if needed
  • transcode it to h264 & aac

It also explains how to integate this tool straight from your desktop menu and from Nautilus. A simple right click on a video file will show a menu to post-process it !

Read more: Ubuntu 14.04 - Rotate & Stabilize your video with MLT and Vid.stab

Nautilus - Handle EXIF tags and geolocalisation data

dropcap image geotag

With smartphones or modern digital camera, all digital photos files are now generated with plenty of useful tags.

These tags can be of different type  : EXIF, IPTC or XMP. They can also include some GPS localisation data.

Actually, on a Ubuntu 16.04 workstation, there is no simple way to visualize all these tags  straight from Nautilus file manager when you manage your digital image folders.

This article explains how to extend Nautilus with some simple python extension to :

  • add some columns providing specific image informations (camera model, city, country, GPS data, ...)
  • provide a picture property tab with all picture tags (EXIF, IPTC, XMP, ...)
  • provide a picture property tab with GPS map and address

This procedure has been tested under Ubuntu Gnome 16.04 LTS and Ubuntu 16.04 LTS running Gnome Classic, but it should be applicable to many other modern Gnome Shell based distributions.

Read more: Nautilus - Handle EXIF tags and geolocalisation data

Nautilus - Columns and Property page Provider for APK files

dropcap-gnome-apk

On Android devices, all programs are installed thru some APK packages. Like well-known deb packages, these packages have some specific descriptive data : package name, version number, version code, requested permissions, ...

If you are an APK developper or if you are handling a large collection of APK packages on a Linux computer, you'll find that Nautilus is providing some very poor informations about these files. It is not even displaying the icon properly !

A previous article explained how to Display official APK icon as Nautilus thumbnail.

This article explains how to use Nautilus python extension capabilities to :

  • add some columns providing specific APK informations (package name, version, ...)
  • add one tab to APK file properties to provide a lot of extra informations

This procedure has been tested under Ubuntu Gnome 16.04 LTS and Ubuntu 16.04 LTS running gnome, but it should be applicable to many other modern Gnome Shell based distributions.

Read more: Nautilus - Columns and Property page Provider for APK files

Ubuntu - Install Telegram client

dropcap ubuntu telegram

Telegram is a new messaging app with a focus on security and speed. It is very similar to WhatsApp, but as it is not own by a Facebook like company, your private data are fully encripted and should be secured.

It provides clients on many platforms : Android, Windows, Mac OS, Linux, ...

Unlike WhatsApp, you can install more than one client synchronised with your Telegram account.

Another very interesting functionnality of desktop Telegram client is to allow to transfer files with a simple drag-and-drop. You can then transfer to any friend some :

  • uncompressed photos
  • uncompressed videos
  • mp3 files
  • APK packages
  • ...

Latest versions of Telegram integrate very well with Linux desktop. It handles desktop launcher and desktop notifications !

So, this short article explains how to easily install Telgram client on any ubuntu desktop with auto-update feature enable.
Client will be fully integrated with your desktop providing launcher and notifications.

It has been tested on Lubuntu 14.04 LTS and Ubuntu Gnome 16.04 LTS and . But I should work on any other distro.

Read more: Ubuntu - Install Telegram client

Gnome Shell - Management of Extensions from console

dropcap-gnome-shell

Under Debian or Ubuntu, Gnome Shell default installation comes with very few extensions.

Hopefully, huge number of extensions are available from Gnome Shell Extensions store.

This store is a fantastic improvment, but you need to install all extensions one by one from the web site.
Till date, there is no official way to install them in console mode.

This is quite annoying if you are a sysadmin and you are handling quite a big amount of workstations, as most of your installation process must be scripted.

This article explains how to install & remove any Gnome Shell extension from https://extensions.gnome.org/ via a console command.

It has been tested under Ubuntu Trusty 14.04 / Gnome Shell 3.8 and Ubuntu Xenial 16.04 / Gnome Shell 3.18.
But it should work on any Ubuntu or Debian flavour and with latest Gnome Shell versions.

Read more: Gnome Shell - Management of Extensions from console

Gnome Shell - Command line Installation of Extensions from http://extensions.gnome.org

dropcap-gnome-shell

This article is obsolete and been completly rewritten.
It is available at Gnome Shell - Management of Extensions from console

Under Debian or Ubuntu, Gnome Shell comes with very few extensions provided by the default installation.

Some extensions are provided by some extra packages, but the main collection of extensions is available from Gnome Shell Extensions repository website.

But at the time of this article, you need to install them one by one from the extension pages of the site. There is no way to install them in console mode.

This is quite annoying if you are a sysadmin and you are handling quite a big amount of workstations. You then need to script all these installation and configuration procedures.

This article explains how to retrieve, install & enable Gnome Shell extensions from https://extensions.gnome.org/ via some console commands.

It also provides a script that does all the installation steps in one go. With this script, you'll be able to fully automate the installation of your favorite Gnome Shell extensions from https://extensions.gnome.org/.

It has been tested under Ubuntu Precise 12.04 & Gnome Shell 3.4, but it should work on any Ubuntu or Debian flavour and with latest Gnome Shell versions.

Read more: Gnome Shell - Command line Installation of Extensions from http://extensions.gnome.org

Ubuntu 16.04 - Installation on HP Stream 13

dropcap hpstream13

HP Stream 13 is very light, compact and affordable laptop. Its overall design is also quite good.

Technically speaking, it holds an Intel Celeron N2840 Dual-core CPU, 2 Gb of RAM, a 32 Gb eMMC and a 13' display with Intel HD Graphics.

So, it is a perfect laptop to run Ubuntu instead of the preinstalled Windows.

This short article explains how to install Ubuntu 16.04 LTS 64bits on a HP Stream 13 and how to tweak it to have a very smooth Ubuntu experience on this laptop.

Read more: Ubuntu 16.04 - Installation on HP Stream 13

Munin - SNMP plugin to display HP Color Laser printer Toner levels

dropcap-munin

Munin allows simple supervision of any SNMP enabled device.

As HP Color Laser Printers are SNMP enabled, it becomes possible to follow all printer internal levels thru Munin.

This article provides a plugin implementation that allows you to follow all 4 toner levels (black, cyan, magenta & yellow) on any HP Color Laser printer.

With the help of this plugin you'll be able to display you printer toner level in almost real time. As a pre-requisite, you need a fuly operational instance of Munin supervision.

This has been tested on a HP Color LaserJet CM1312nfi MFP with Munin running on a Debian server.

Read more: Munin - SNMP plugin to display HP Color Laser printer Toner levels

Linux - How to Cancel a Zenity Progress Dialog the right way

dropcap linux

When you write shell scripts to run some long processing actions, Zenity and its --progress option might be a nice way to trace and follow the execution of your sequenced actions.

By default, Zenity offer a Cancel button to interrupt the process.

ubuntu zenity progress

Normal behavior of Zenity when you hit the Cancel button is to kill the progress dialog process & the function before the pipe. But it doesn't kill any child process of this function running in the background.

You can use the --auto-kill option to kill all the processes, but then you will kill your main script process and all its children. That means that it will kill your entire script, including any action after the zenity dialog.

This article explains how to write a bash script with Zenity progress dialog that will properly handle the Cancel action of a Zenity progress dialog where :

  • any action run by the function piped with zenity will be killed
  • you'll get back to your main script to run next steps

The procedure has been written and tested under Ubuntu 14.04 LTS, but it should be applicable to any modern Linux system as it uses only basic system tools.

Read more: Linux - How to Cancel a Zenity Progress Dialog the right way

Nautilus - Thumbnailer for Ms Office documents

dropcap-gnome-msoffice

When you use Gnome Shell under Ubuntu or Debian, all Ms Office files are displayed thru some generic icons in Nautilus.

With the help of LibreOffice unoconv conversion tool, it is possible to use the first page of a document as a Nautilus thumbnail.

To make it even more visual, the thumbnail can be outdrawn by the document type official icon. You will then get a display much more visual.

This article explains all the steps needed to configure Nautilus to display thumbnails of Ms Office documents including document type icon and first page content, providing a simple and efficient Ms Office documents preview. It is using LibreOffice conversion tools and some very basic tools.

This procedure has been tested under Ubuntu Gnome 14.04 LTS with Libre Office 4.2 & 5.0. It should be applicable to many Gnome based distributions. It has also been tested under Lubuntu 14.04 LTS with PCManFM.

Read more: Nautilus - Thumbnailer for Ms Office documents

Debian - Downscale Webcam in realtime for Internet Access

dropcap webcam internet

As part of a complete domotic project, I had to setup some security cams. These cams are connected thru ethernet or wifi to a domoticz server. They are HD cams, able to serve 1280×720 high quality JPG pictures.

As they are used for motion detection purpose, it's important to keep the picture quality as high as possible for investigation purpose. But on the other side, as they should be available from anywhere on a supervision console, they should also be available thru internet with a resolution compatible with internet limited bandwidth.

Solution to this problem is to allow :

  • full resolution picture while served on the LAN
  • real time picture transcoding if served thru Internet

This article explains how to setup an Apache web server to handle realtime transcoding of some declared security cams images so that their dimension and quality level are adjusted to internet transmission. As a result, your security system will get high quality images on your LAN and optimized size and quality if served thru Internet.

Read more: Debian - Downscale Webcam in realtime for Internet Access

Ubuntu - Installation on Acer Aspire One Cloudbook 431

dropcap ao1 431 ubuntu

This year, Santa Claus has brought an Acer Aspire One Cloudbook 431 in the family.
This laptop is a nice, light, very compact and affordable laptop.

With Intel Celeron N3050 Dual-core, 2 Gb of RAM, 64 Gb eMMC and a 14' display, it is a perfect laptop to run Ubuntu instead of the pre-installed Windows 10. Thanks to the hardware provided, latest Ubuntu 15.10 64bits works Out Of the Box (touchpad, sound, wifi, webcam, …).

But when you try to install Ubuntu, you'll notice that installation process with an Ubuntu Live USB key is giving trouble :

  • In Legacy mode, it just hangs at some stage
  • In UEFI mode, it installs just fine, but the laptop indicates No media found during boot process

This article explains how to replace Windows 10 with Ubuntu 15.10 64bits on an Acer Aspire One Cloudbook 431 in UEFI mode.

Read more: Ubuntu - Installation on Acer Aspire One Cloudbook 431

Ubuntu - Install Firefox and Thunderbird extensions from command line

dropcap-mozilla-addon

If you are in charge of a park of Linux workstations, you may need to automate some installation procedures thru scripting.

Under Linux, most of the software installation procedures can be scripted very easily.

But when we are dealing with Firefox or Thunderbird, installation of extensions thru command line is not that easy. It is possible, but quite poorly documented.

This article explains how to install or remove Firefox and Thunderbird extensions through command line. Installations are possible in user or global mode. It also provides a script in charge of doing all the needed job.

This add-on installation script has been tested on Ubuntu 14.04 Amd64 LTS with Firefox 42 and Thunderbird 38.

It should work for any modern Linux distro.

Read more: Ubuntu - Install Firefox and Thunderbird extensions from command line

Ubuntu - Download TV replay and Videos from Firefox with YouTube-DL GUI

dropcap-youtube-dl

Since TV replay sites have started coming out like mushrooms after a spring rain, it has always been a big challenge to be able to download their videos for offline viewing. The two major problems are that all the site are not using the same streaming protocol and that they change their site quite often. We also face this problem for YouTube video, as YouTube is slightly changing its site and protocol on regular basis.

Hopefully, youtube-dl project is there to help us. This project is very active and it can handle video stream downloading from most of the major video or TV replay sites. The project site provides an exhaustive list of supported sites (for example YouTube, DailyMotion and french Arte+7 & Pluzz are well supported).

The major drawback of this fantastic tool is also its strength : it is a command line tool. So it isn't very user friendly, as every time yo need to download a video, you have to open a terminal, cut & paste your browser URL, type the command line, wait for the download to finish and close the terminal.

It would be so confortable to be able to do a simple right click from any video or TV replay page, to select the video format you want to download and to follow the YouTube-DL download process in a progress dialog box.

This is exactly what this article helps you to achieve. It provides instructions to install all needed packages, to create a YouTube-DL GUI and to integrate it within Firefox. You'll then have the power and flexibility of youtube-dl fully integrated in Firefox browser.

Read more: Ubuntu - Download TV replay and Videos from Firefox with YouTube-DL GUI

Page 1 of 5