Skip to content

Add HEIF support to Ubuntu Linux 18.04 (thumbnails / gimp) - preview and open HEIC files from iPhone directly in Ubuntu

Since Apple moved from JPEG to HEIF as default format about two years ago, there has been a lot of progress.

There is a very straightforward way to add minimal HEIC/HEIF support to Ubuntu:
sudo add-apt-repository ppa:strukturag/libheif
sudo apt-get install heif-gdk-pixbuf heif-gimp-plugin heif-thumbnailer

That's it! You don't even need to logout or restart, the new functionality is available immediately.

More details here and here.

Accessing iPhone (iOS 10.2.1) pictures from Ubuntu

Recent changes introduced with iOS 10 prevent you from mounting an iPhone on a regular Ubuntu installation.

The PPA by Martin Salbaba used to fix the issue, but it hasn't been updated in a while, and now when I connect my iPhone (running iOS 10.2.1) the pictures are no longer accessible, although the documents are still there.

This solution worked for me (Ubuntu 16.04):

- install libimobiledevice6 + dependencies from this PPA: https://launchpad.net/~martin-salbaba/+archive/ubuntu/ppa+libimobiledevice (follow the instructions there)

- install newer libimobiledevice version according to the "recipe" by A.B. here: http://askubuntu.com/questions/598940/libimobiledevice-1-2-ios-8-support-for-ubuntu-14-04-trusty

- install ifuse according to the same method:
cd ~/src/
git clone https://github.com/libimobiledevice/ifuse.git
cd ifuse/
sudo apt-get install libfuse2 libfuse-dev
./autogen.sh
make
sudo checkinstall

You can now mount your iPhone like this:
mkdir ~/mnt
ifuse ~/mnt
I assume the same procedure would work for an iPad too.

Borderless pictures from Gimp (HP Photosmart Premium C309a full-bleed printing on Linux/CUPS)

I've recently acquired an HP Photosmart Premium C309a all-in-one device (CC335B). I planned to use the device mainly for its scanner with duplex-capable automatic document feeder (ADF), in order to archive our mail electronically (more on that later). But I was also happy to get a device which can replace man different ones: it is also a fax, and a nice printer for documents, pictures and even (special) CD/DVDs.

I already have a Canon Selphy CP740 dye sublimation photo printer, which I like very much but has two limitations: 1. it's limited to 10x15 format (4x6 in), and 2. it seems that it's impossible to get the printer to work correctly when attached to a PC as a usb printer. It works nicely in stand-alone mode (ie printing from a digital camera with PictBridge or directly from a CF card), but so far I've only managed to waste paper and ink when trying to print directly from the computer. (I've even installed a fresh Windows XP to try the software from Canon, it didn't work any better.) So the good quality of the HP as a photo printer was one more argument in its favour.

Here is how I was able to print borderless photos directly from The Gimp:

1. If you want no border at all, the image should obviously have the same aspect ratio as the paper you'll print on. If necessary, use "Image" -> "Canvas size" or the Crop tool to adjust it.

2. "File" -> "Page setup": select the correct printer and paper size

3. "File" -> "Print":

- in "Page setup", select "Photo Tray" as paper source
- in "Image Settings", check the box "Ignore Page Margins", then adjust Width/Height so that the picture fills the paper (if it doesn't, get back to step 1)
- in "Advanced", select "Photo" as Printout mode, and "1200 dpi, Photo, Full Bleed" under "Resolution, Quality, Ink Type, Media Type" ("Controlled by 'Printout Mode'" seems to do as well)

4. Click "Print"

TestDisk / PhotoRec: tool to recover lost files and partitions (Gentoo Linux)

Homepage: http://www.cgsecurity.org/

Description in portage: Multi-platform tool to check and undelete partition, supports reiserfs, ntfs, fat32, ext2/3 and many others. Also includes PhotoRec to recover pictures from digital camera memory.

Installation (Gentoo Linux amd64):

echo 'app-admin/testdisk ~amd64' >> /etc/portage/package.keywords
echo 'app-admin/testdisk jpeg ntfs' >> /etc/portage/package.use
emerge -av app-admin/testdisk

To use it, just run 'photorec' as root in a shell window. Despite the name, photorec will find and recover many files, not only pictures. You'll find the full list on the PhotoRec homepage.

I haven't tried TestDisk yet, but PhotoRec has been useful several times already.

Downloading pictures from my mobile phone

My phone stores the camera pictures in a dedicated folder with filenames like "Picture(1).jpg".
for I in `seq 20 30` ; do obexftp -b 00:11:22:33:44:55 -c 'Pictures/camera_semc/' -g "Picture($I).jpg" ; done