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

Asterisk - Voicemail with Speech Recognition using Google API

Asterisk

In a previous article I published a solution to convert Asterisk voicemail attachments from WAV to MP3 on the fly. This is done by catching the mails sent by Asterisk just before they are passed to sendmail.

I recently got the idea from Daniel Dainty to add Voice Recognition feature at the same time as mp3 encoding.

After testing different voice recognition engines, I realized that the Google Speech Recognition API is by far superior to any other solution available under Linux (Sphinx, ...).

This article will explain an approach to add voice recognition to Asterisk voicemail using the services of Google Speech Recognition API.

The principle is very simple. After doing the voicemail mp3 conversion, the script :

  1. does some pre-processing clean-up on the file,
  2. converts it to an acceptable format (flac),
  3. sends it to Google speech recognition engine,
  4. gets back the text version
  5. adds it at the end of the mail body.

This procedure has been done on a Debian Squeeze server. It should be fully compatible with an Ubuntu server. You will then just need to add sudo to the commands needing root privilege.

Read more: Asterisk - Voicemail with Speech Recognition using Google API

Asterisk - Setup voicemail to send email with mp3 attachment

Asterisk

This guide will explain how to configure Asterisk PBX to send voicemail as email with messages as mp3 attachement.

If, like me, you are using an Asterisk server, you may be using the voicemail by email functionnality. It allows your Asterisk PABX to send your by email all the messages received in your voicemail.

Just imagine :

  • someone is calling you on your landline
  • he is leaving a message on your answering machine
  • after few seconds, you are receiving a mail on your android or i-phone with the message as an attachment

You can call back immediatly or even forward the email for someone else to deal with that call !

One of the main drawback of that functionnality is that Asterisk can generate attachments using only the standard telephony codecs (wav49, gsm, wav). The wav format is widely recognised, but it is quite uncompressed. The wav49 or gsm formats are better in terms of compression, but sadly they are not recognised by all the devices able to deal with your emails.

So why not to use mp3 format for the voicemail attachments ?

This is what this guide is all about. It will explain how to catch the emails sent by Asterisk and convert the audio attachment from a wav file to a mp3 file.

Read more: Asterisk - Setup voicemail to send email with mp3 attachment

Ubuntu - Generate PDF file from any set of documents

dropcap pdf

Nowadays, PDF has become the de facto exchange file format for most documents. Whenever you need to send a document to someone using a smartphone, a Linux PC, a Windows PC or a Mac, by sending a PDF file, you'll be confident that your recipient will be able to open and read it.

Till date, under Linux, I haven't found a simple tool able to generate a PDF file in one click from a selection of miscellaneous documents like :

  • a serie of scanned pages
  • some office documents (doc, docx, odf, xls, …)
  • some text files
  • some photos (.jpg, .png, ...)

ubuntu pdf generate

This article explains how to setup a desktop environment under Linux which will allow you to convert any set of documents to a single multi-pages PDF document. All documents will be merged in alphabetical order according to their filename. Conversion will be accessible straight from the comfort of your Linux file manager (Nautilus, …).

Read more: Ubuntu - Generate PDF file from any set of documents

Ubuntu - Transcode your video to MKV / AAC the simple way

dropcap-ubuntu-stabilize

If you sometimes end up grabbing some video files from internet, you may have encountered some playback troubles :

  • Video container may not be playable on some devices (AVI, MOV, ...)
  • Some copyrighted audio codecs like DTS, AC3, E-AC3, ... may give play back problem on some of your devices
  • On multi-channels audio tracks, general audio level may vary widely between talks and action scenes (you end up changing volume level at every scene change)

So, to be able to play your video on any type of device and in any type of environment, an elegant option is to :

  • use MKV container as it is open source and recognized by almost all modern players
  • convert all audio tracks to AAC as it is playable on almost any modern devices
  • add some midnight mode audio channels side to the multi-tracks channels to allow smooth listening even without a home cinema system

This article explains how to setup a post-processing environment for your Linux desktop to be able to :

  • generate MKV video file from any video file
  • convert all audio tracks to AAC format (stereo and multi-channels)
  • add some associated Midnight Mode audio tracks (if selected)
  • add an embedded video cover (if present)

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

It has been designed and tested on an Ubuntu 14.04 LTS workstation, but it should be applicable to any Linux distribution, as long as the needed tools are available.

Read more: Ubuntu - Transcode your video to MKV / AAC the simple way

Ubuntu - Setup a BTSync Client running per User Session

dropcap-ubuntu-btsync

BitTorrent Sync is a new p2p tool which opens some fantastic possibilities. It may revolutionize the way you'll handle your private file sharing as it allows you to share & synchronize your files across multiple devices (PC, tablet, smartphone, ...) on the net in almost real time.

Some examples of the possibilities opened by BTSync are described in the article BTSync - How peer-to-peer may Simplify your Life.

As BTSync is a young project, you can get latest binary from the project site but you still don't get proper Ubuntu installation package handling BTSync daemon launched per user session. With this type of configuration, BTSync will be launched at login time with the current user's credentials.

This article explains how to install a BTSync daemon on a Ubuntu workstation with BTSync daemon being launched at session login using the user's credentials. It will allow your currently logged-in user to share files with a BTSync daemon running using current account. You'll get a synchronisation daemon equivalent to Dropbox.

It has been tested under Ubuntu 12.04 LTS 7 Amd64 but it should be applicable to any debian based distribution with little adaptation.

Read more: Ubuntu - Setup a BTSync Client running per User Session

Debian - Automate Monthly Connexion for Dyndns Free Accounts

dropcap-debian-dyndns

For so many years, http://www.dyndns.org/ has been providing free dynamic DNS accounts. For me, they have been the 'de facto' dynamic DNS provider. The proof : so many home routers, NAS, ... manufacturers are providing update clients for their DNS service.

But this wonderful time has come to an end. Dyn has simply removed any free offer from their catalog and thanks to their latest SLA, you are now supposed to connect to their web server at least once a month to keep your existing free dyndns account active. Even with an update client, your free account may be terminated if you do not connect periodically to their web site. This new policy is a deliberate free account killer.

If, like me, you've been relying for ages on their service for your personal web site, this new policy is a real pain in the neck. Who will think to connect once a month to a site to do ... nothing ? Hopefully (as usual in the computing world) there is a solution : instead of you in person, a small shell script can peridically to do the connection job for you. It will automatically connect to Dyn web site using your account.

So, this article explains how to create and setup a periodic script that will connect to Dyn login page. This connexion will be considered by Dyn as a user connexion. As a result, you'll be able to keep your free dyndns account active even without doing yourself the newly needed monthly connexion. This periodic script should allow you to save your free account from a killing SLA.

Read more: Debian - Automate Monthly Connexion for Dyndns Free Accounts

Debian - Setup your Server as a Permanent BTSync Peer

dropcap-debian-btsync

BitTorrent Sync is a new p2p tool which opens some fantastic possibilities. It may revolutionize the way you'll handle your private file sharing as it allows you to share & synchronize your files across multiple devices (PC, tablet, smartphone, ...) on the net in almost real time.

Some examples of the possibilities opened by BTSync are described in the article BTSync - How peer-to-peer may Simplify your Life .

Like with any p2p network, BTSync needs to get some accessible peers to start synchronisation.

So, to allow synchronisation to be done at any time, you can setup a permanent peer on a Debian server by installing BTSync on it. As your server is always connected, it will handle all your devices connexions whenever they need it.

This article explains how to install a BTSync client on a Debian server to make it a permanent BTSync network peer. Any device (PC, smartphone, tablet, ...) will then be able to synchronize any time. You've then created your self hosted Dropbox or Google Drive replacement.

It has been tested on a Debian 7 Amd64 server.

Read more: Debian - Setup your Server as a Permanent BTSync Peer

Debian 7 - ZFS pools lost after ZFSonLinux update

dropcap-debian-zfsonlinux

In a previous article, I explained how to Setup ZFS with RAIDZ pool on your Linux Server .

Even if I'm doing regular updates to my Debian Wheezy server, I hardly reboot it, once every blue moon.

With these regular updates, my ZFSonLinux packages have been updated from version 0.6.2 to 0.6.3, from 0.6.3 to 0.6.4, from 0.6.4 to 0.6.4.1 , ... but without a reboot after every update.

To my surprise, after next reboot following a ZFSonLinux update, both my ZFS pools had disappeared. All my important server data where lost !

While searching the web for an explanation, I read lots of articles giving some tips and tricks, but nothing was really convincing. And more than that, lots of stuff was looking quite dangerous, with a high risk of definitely breaking the ZFS pools. After lots of searches, I finally found the real explanation to this huge problem on zfsforlinux discussion group.

Even if the solution is very simple, it is to my point of view worth writing this article. In fact, I hope it will help you to go straight to the solution. This should avoid you lots of frightening time ...

Please note that this solution is valid for servers where the / partition is not a ZFS one. Your ZFS pools should not host the root filesystem. They should be mounted during the boot process.

Read more: Debian 7 - ZFS pools lost after ZFSonLinux update

Debian 7 - Setup ZFS with RAIDZ pool on your Linux Server

dropcap-debian-zfsonlinux

Few days after the release of Debian Wheezy, I decided to install a brand new HP N54L micro server to use it as a small company NAS cum Server and to use ZFS filesystem for the data storage. As I wanted to fully manage my system, I decided not to go for a NAS distribution, but to use a plain Debian install and to setup a ZFS filesystem.

ZFS is a filesystem originally developed by Sun for Solaris OS. It has been ported to Linux by the zfs on linux project.

Its most interesting functionnalities are :

  • convergence of filesystem and volume manager
  • software raidz (software raid5 equivalent)
  • online data compression
  • snapshots

This filesystem is so simple, efficient and advanced, that I'm sure it will become a Linux standard very, very soon. Other FS may become part of the past sooner than expected ...

This guide explains how to install and configure a ZFS RAIDZ pool, how to setup snapshots and how to handle its day to day maintenance. A pre-requisite is to run Debian Wheezy server with a separate system disk (ZFS won't be on the boot device).

It doesn't explain in detail all ZFS options and possibilities, but it explains all the steps to get a fully running zfs raidz pool that will give you the flexibility of a professional grade NAS at the cost of a geek tool box :-)

Read more: Debian 7 - Setup ZFS with RAIDZ pool on your Linux Server

Debian 7 - Install Android Tools (ADB, Fastboot, ... & QtADB)

dropcap-debian-android

If you own an Android Smartphone and you want to manage it from your computer, you will need sooner or later to use some specific Android tools like adb or fastboot.

Under Debian, two options are available :

  • Install the whole Android SDK which bring these tools among many other things
  • Install some specific android-tools packages that bring only these tools

For some basic needs, to install the whole Android SDK is not needed, the android-tools packages are more than enough.

But these packages are only available for sid, they are not in the wheezy repository. So we'll need to backport them.

This article explains the simple steps needed to install the main Android tools (ADB, Fastboot, ... & QtADB) on a Debian 7 Wheezy workstation.

For example, after these steps, you should be able to Root a Google Nexus S or to Root a Google Nexus 7.

Read more: Debian 7 - Install Android Tools (ADB, Fastboot,... & QtADB)

Ubuntu - Take Screen capture of your Android device even from Recovery

dropcap ubuntu android

With ADB, a lot of possibilities are open to administrate and tweak your Android device. A tool like QtADB is a good example of what can be done.

Some time back, I discovered that you can take some screenshots of your Android device thru ADB with a inbuilt utility called screencap. But it only works when you are running a normal android session, not when you are in recovery mode.

After some searches, I found that many devices, depending on their hardware, can provide some screen capture thru a frame buffer.

Both these approaches open some nice possibilities to take screenshot of your device while running any type of application (tutorials, games, …) or even running a recent version of recovery like TWRP where ADB is activated by default.

This article explains how to take a screenshot of an android device in ADB mode thru some simple console commands by using both screencap or frame buffer methods.

It also provides a GUI tool to take sreenshot of your android device with a single click from the comfort of your linux desktop.

It has been written and tested on Ubuntu 14.04 LTS, but it should be applicable to any modern Linux flavor. Frame buffer capture under TWRP recovery has been tested on Nexus S, Nexus 7 2012 and Nexus 5.

Read more: Ubuntu - Take Screen capture of your Android device even from Recovery

Page 2 of 5