Ubuntu - Repair corrupted or broken PDF

dropcap-ubuntu

If you are a day-to-day Linux user, you may have faced some web sites using some broken PDF generation software, where PDF files they generate can't be properly displayed with open-source viewers like Evince.

Latest site where I've faced this problem was Easyjet. I was supposed to print my e-ticket, but all important data were totally unreadable. Here is what Evince was displaying :

ubuntu-pdf-broken

While googling to find a reader able to handle these broken PDF files, I realised that this problem is quite common and that tools like gs (Ghostscript) or mutool (MuPDF) may be able to repair these files.

This article explains how to prepare your Linux desktop to be able to repair corrupted PDF files (like Easyjet e-tickets). It also explains how to integrate this tool as a custom action available from your favorite file manager (Nautilus & PcManFM) with a simple right click on the PDF file.

It has been tested on Ubuntu 16.04 LTS and Ubuntu Gnome 16.04 LTS. But, it should be applicable to any distribution using a Nautilus or PCmanFM.

Read more: Ubuntu - Repair corrupted or broken PDF

Ubuntu - Imposition or how to print a book from your documents

Ubuntu

ubuntu-imposition-bookIn daily office life, who has not thought while printing a document :

It's a waste to print that document on A4 pages.
It would have been so handy to get it in a small A5 booklet.

Imposition is the clue !

Imposition is the process of arranging pages on printer's sheet, in order to obtain faster printing, simplified binding and reduced paper waste.

This guide will explain how to achieve that simple process of converting a plain document in portrait mode into a small A5 booklet printed on recto-verso A4 pages.

As an input, it takes a an LibreOffice, Ms-Office or PDF document and generates a PDF document ready for printing.

By default you will generate a document ready for printing on A4 pages, but some other formats like A3, A5, Letter, ... are also available (thanks to Robin idea).

It has been tested on Ubuntu 12.04 LTS, Ubuntu Gnome and Lubuntu 14.04 LTS, but it should work on any Linux flavor as long as you get pdfinfo, pdfbook and unoconv utilities.

Read more: Ubuntu - Imposition or how to print a book from your documents

Ubuntu 16.04 LTS - Browse FlashAir card thru Wifi in Nautilus

dropcap flashair

Toshiba FlashAir is a very versatile Wifi enabled SD card. It includes a wifi acces point and an embedded HTTP server to serve the SD card content to any browser. Toshiba provides some Flashair clients for Android and Windows, but as usual, Linux has been forgotten. So I decided to write a Linux client that allows to browse Flashair card content straight from Nautilus file manager.

This article explains how to setup a Linux workstation to be able to browse a Toshiba FlashAir SD card directly from Nautilus file manager.

We'll setup a specific directory on your computer which will become an online/offline mirror of your SD card. When you connect for the first time, most of the files will be only thumbnails not to overload the wifi connexion. But you'll be able to download any image or video with a simple right click from Nautilus. Once you disconnect your Flashair card, all downloaded files remain on your computer. You'll be able to connect anytime to your FlashAir card to update its content.

This has been setup and tested on an Ubuntu Gnome 16.04 LTS, but it should be applicable to any modern Linux distribution.

Read more: Ubuntu 16.04 LTS - Browse FlashAir card thru Wifi in Nautilus

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

dropcap-ubuntu-android

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 Xenial 16.04 LTS and it has been used to flash and root a Google Nexus 5 & OnePlusX under LineageOS, a OnePlus 3 under OxygenOS and few other old devices. It should be applicable with any modern Linux distro.

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

Ubuntu 16.04 - Correct GoPro USB access bug

dropcap ubuntu gopro

Under Ubuntu 16.04 Xenial, a nasty bug stops you to mount latest GoPro action cams. 

I discovered this problem while connecting a GoPro Hero Session 4 to my laptop via the USB cable. In Nautilus, the device was showing, but it was showing some weird directories :

  • DCIM_00000001_00000001
  • DCIM_00000001

Both directories were empty.

After some internet search, I realised that this problem seems to occur with few recent models of GoPro action cams.

This short article explains how to solve this problem and to properly mount latest GoPro action cams via USB under Ubuntu 16.04 Xerial. 

It has been tested with an original GoPro Hero and a GoPro Hero Session 4 connected on a Ubuntu Gnome 16.04.1 LTS Amd64 laptop.

Read more: Ubuntu 16.04 - Correct GoPro USB access bug

Ubuntu - Monitors Position Lost in Dual Display Setup

Ubuntu

If you are using a dual monitor display under Ubuntu Trusty 14.04 LTS or Ubuntu Xenial 16.04 LTS, you may have noticed that both screen position can be set without any glitch thru the system parameters, but that this configuration is lost after every reboot.

In fact, if your screen positions are not the default proposed one (laptop screen at the left and second monitor at the right), it will be reset to the default one after every reboot. And, this occurs even if your monitor.xml configuration file is fully configured.

This article explains how to circumvent this Ubuntu misbehavior. It allows you to set your dual monitor positions and to make it survive after every reboot.

It has been tested under Ubuntu Gnome 14.04 LTS and Ubuntu 16.04 LTS but it should be applicable under other Ubuntu flavours.

Read more: Ubuntu - Monitors Position Lost in Dual Display Setup

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

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

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

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

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

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

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

Ubuntu - How to browse your Windows Mobile phone

Ubuntu

Smartphone and Pocket PC under Windows Mobile are becoming more and more popular. Since WM5, these phone are using a new RDNIS protocol to synchronise with computers. This is good news for Linux users, as this protocol is much more simple and robust than the previous one. As a result, the synchronisation between a Linux PC and one of these phones is more simple to setup.

This article will explain how to install and configure SynCE to setup a synchronisation between a WM Phone and a Ubuntu workstation to be able to browse the mobile phone filesystem. You will then be able to get some infos about your phone and, more interesting, to browse your phone filesystem thru Nautilus

It won't explain how to synchronise your contacts or calendar with Evolution or Thunderbird. This can be acheived with some additionnal steps, but as I'm not needing it, I haven't tried.

This setup has been done on a Ubuntu Jaunty 9.04 workstation, but it should work on any later version.

Read more: Ubuntu - How to browse your Windows Mobile phone

Page 1 of 3