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 12.04 - Install D-Link DWA-131 rev. B1 wifi adapter

dropcap-ubuntu-wifi

D-Link DWA-131 USB key is a low price 2.4 GHz 802.11b/g/n wifi adapter.

Latest hardware revision DLink DWA-131 rev. B1 is not compatible with drivers of previous revisions.

As a result, this new hardware revision is not recognised Out Of The Box under Ubuntu Precise 12.04.

This article explains how to setup Ubuntu 12.04 to recognise DLink DWA-131 rev. B1.

It has been tested under Ubuntu Precise 12.04 i386 and Amd64 but involves installation of a 3.8 kernel update.

Read more: Ubuntu 12.04 - Install D-Link DWA-131 rev. B1 wifi adapter

Ubuntu 12.04 - Setup wifi key based on Ralink RT2572T

dropcap-ubuntu-wifi

Few days back, I was needing a wifi 54G key. Having an old OvisLink Wifi 54G 802.11b/g USB key, I tried to use it under Ubuntu Precise 12.04.

This key is using a Ralink RT2572T which is recognised out-of-the-box by Ubuntu 12.04. But it doesn't work as expected.

Wifi connection takes place, but sometimes the card doesn't get DHCP address and most of the time data stream stops for few seconds, and then restart.

Also, under encrypted networks, the data can't succeed to get thru. In fact, these troubles come from 2 functionnalities :

  • power management, which needs to be disabled
  • hardware encryption, which also needs to be disabled

This article explains how to setup these 2 tweaks to get a fully working Ralink RT2572T wifi adapter under Ubuntu Precise 12.04.

It has been tested successfully on Ubuntu 12.04 i386 version with original 3.2.0-23 and latest 3.8.10 kernels.

Read more: Ubuntu 12.04 - Setup wifi key based on Ralink RT2572T

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 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,...)

Ubuntu 12.04 - Post-Installation Script for codecs, multimedia, ...

Ubuntu

When you run a standard Ubuntu desktop installation, you most of the time need to add some additional tools, compression format handlers, multimedia codecs, multimedia tools and latest software updates.

If like me you end-up installing Ubuntu systems quite often, you may have to repeat all these post-installation steps on and on ... Here comes this page, which is more of a reminder than of a technical article.

You'll find below the post-installation script that I use for almost all the Ubuntu installation I'm handling. It adds some very generic extensions that are useful (or not) for most of the people.

Just take it as it is : my knot in a handkerchief and a base that you can use and adapt for your own purpose. Idea of this page has come from a friend ... thanks Alain  :-)

This post-installation script is based on a standard Ubuntu 12.04 LTS installation as in general I always prefer to install a LTS. It is using some PPA, but these PPA are known to be quite stable. In a way, I've considered that the benefit provided by these PPA is worth the unstability risk it involves.

Please note that before running this post-installation script, you are supposed to have finalised your language localisation.

Read more: Ubuntu 12.04 - Post-Installation Script for codecs, multimedia,...

Debian - Setup Scan-to-folder server for HP AIO scanner

Debian

HP Multi-Function Network Printers support is very good under Linux thanks to HP Linux Imaging and Printing (HPLIP).

But one important functionality is still missing : Scan-to-folder. You can not make your scanned documents easily available from a public network share.

This article explains how to setup a Debian server daemon to become a Scan-to-folder server for HP Multi-Function Network Printer/Scanner.

If this destination folder is shared ... you will have a direct access to your scanned documents from any PC.

debian-scan-to-folder-server

This Scan-to-folder service has been tested on a Debian Squeeze server and with a HP CM1312nfi All-In-One printer/scanner.

It should be compatible with many Linux flavours and with many modern HP multi-function network printers.

Read more: Debian - Setup Scan-to-folder server for HP AIO scanner

Ubuntu Amd64 - Convert HTML web pages to PDF with Firefox

Ubuntu

ubuntu-firefox-web2pdfFirefox provides a very nice add-on Print pages to Pdf to convert Web pages straight to PDF files.

This add-on is quite special as it is not using any online service for the conversion job.

It is using wkhtmltopdf library which convert html to pdf using the webkit rendering engine.

This Firefox add-on works Out Of The Box under any Ubuntu i386 distribution.

It was broken under Ubuntu Amd64 for version 0.1.8.5, but has been corrected on version 0.1.9.0.

This article explains how to solve this issue and to get a fully working one click solution to convert any HTML web page to a PDF document on a Ubuntu 64 computer.

It has been tested under Ubuntu Amd64 12.04 LTS, with Firefox 20 and Print pages to Pdf 0.1.9.0.

Read more: Ubuntu Amd64 - Convert HTML web pages to PDF with Firefox

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

dropcap-ubuntu-android

A new updated version Ubuntu 14.04 - Install Android Tools (ADB, Fastboot, ... & QtADB) is now available.
Please don't use this procedure anymore if you run Ubuntu Trusty 14.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 now available under Ubuntu :

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

This article explains the simple steps needed to install Android tools, including latest Android SDK on Ubuntu Precise 12.04 LTS.

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

Ubuntu - HP Laserjet Multifunction Scan-to-Folder

Ubuntu

hp-cm1312-mfpHP Multi-Function Network Printers support is very good under Linux thanks to HP Linux Imaging and Printing (HPLIP).

But one important functionality is still missing : Scan-to-folder.

In fact, under Linux, you can scan documents easily, but you need to do it thru a graphical interface like XSane or Simple Scan.

Natively, there is no possibility to control the scanning in a scan-to-folder way.

This article will analyse the HP interfaces available and will explain how to setup a shell script to do :

  • a one-click scan interface, that will immediately scan current document straight in a default folder
  • a scan server, that will wait for you to press the Start Scan button from the scanner to scan current document in a default folder

This script will allow you to setup default document folder & format (jpg, png, pdf, ...). It will handle documents from the scanner Glass Window and from Auto Document Feed tray.

It has been tested on an HP MFP 1312, but it should be compatible with many modern HP multi-function network printer.

Read more: Ubuntu - HP Laserjet Multifunction Scan-to-Folder

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

Page 5 of 9