Category Archives: Linux

Remove standard bookmarks in Nautilus

Yet another note to self on how to fix things in Ubuntu after a fresh install, found at askubuntu, this time to remove the standard bookmarks in the Nautilus file browser. I use a different setup of folders, and don’t really need these unused bookmarks. I wish it could have been easier to just right-click and delete to remove them (like for your own bookmarks), but it turns out to be a bit more tricky.

The default bookmarks are actually built from ~/.config/user-dirs.dirs, and this file is rebuilt on login from /etc/xdg/user-dirs.defaults. So it is necessary to modify both of the files, which may most easily be done with:

nano ~/.config/user-dirs.dirs

sudo nano /etc/xdg/user-dirs.defaults

In the nano editor you should comment out the ones that you don’t want.

And after a login the bookmarks are gone.

Move windows between screens on Ubuntu

As part of the fun of reinstalling an OS, you need to set up all the small things again (and you also get rid of all the small things you had set up and that you don’t need any longer…). This message is mainly a note to self about how to move windows between screens on Ubuntu with a key combination, found at stackexchange:

  1. Install CompizConfig Settings Manager:  sudo apt install compizconfig-settings-manager compiz-plugins-extra
  2. Run Compiz from the dash
  3. Click Window Management
  4. Enable the Put plug-in (select the check-box)
  5. Click on Put
  6. Configure the shortcut for Put to next Output (click enable). I like to use <super-less>, since that key combination is very convenient on a Norwegian keyboard
  7. Log out and back in to make changes take effect

Split PDF files easily using Ubuntu scripts

One of the fun parts of reinstalling an OS (yes, I think it is fun!), is to discover new software and new ways of doing things. As such, it works as a “digital shower”, getting rid of unnecessary stuff that has piled up.

Trying to also get rid of some physical mess, I am scanning some piles of paper documents. This leaves me with some large multi-page PDFs that I would like to split up easily. In the spirit of software carpentry I looked for a simple solution for splitting up a PDF file, and came across the command “burst” in the little terminal application pdftk. To use it on Ubuntu, you will first need to install it, using the terminal command:

sudo apt update && sudo apt install pdftk

Then this one-liner is all that is necessary to split a PDF file into a series of individual PDFs:

pdftk your-file.pdf burst

For convenience, I also made it into a small Ubuntu script:

This script can run by right-clicking on a file in the file manager:

And the end-result is a series of individual PDF files:

And then you can of course also combine the files again, either all PDFs:

pdftk *.pdf cat output newfile.pdf

or only the files you like:

pdftk file1.pdf file2.pdf cat output newfile.pdf

Shell script for compressing PDF files on Ubuntu

ubuntu-logo112Back on OSX one of my favourite small programs was called PDFCompress, which compressed a large PDF file into something more manageable. There are many ways of doing this on Ubuntu as well, but nothing really as smooth as I used to on OX.

Finally I took the time to figure out how I could make a small shell script based on ghostscript. The whole script looks like this:

#!/bin/sh
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile="compress_$@" "$@"

and by saving it in the nautilus scripts directory:

 ~/.local/share/nautilus/scripts

It shows up when I right click on a file. For most of the files I have tried so far today (uncompressed PDF files), it compresses the files to at least 1/10th of the original size. Very useful, particularly when I only need screen resolution for files.

Screenshot from 2016-06-29 16-55-49

Finally moving from Apple’s Keynote to LibreOffice Impress

Apple’s Keynote has been my preferred presentation tool for about a decade. For a long time it felt like the ideal tool, easy to use, powerful and flexible. But at some point, probably around the time when the iOS version of Keynote came along, the Mac version of Keynote started loosing features and became more limited than it had used to be. Since then, I have experienced all sorts of problems, including non-compatibility of new and old presentation file versions, problems with linked video files, crashes, etc.

Even with its increasing amount of shortcomings, Keynote has been one of the few programs that I have been missing after my move to Ubuntu as my main OS three years ago. Keynote has also been one of the few reasons I have often decided to bring along my old MacBook rather than my current Lenovo Yoga 2 Pro workhorse.

Over the years, I have been trying other presentation software. I was an early user of Prezi, and still like the looks and non-linear approach that it affords. However, the lack of a native Prezi client for Linux has been a turn-off, particularly since I never trust the network connections when I am out traveling. I am also somewhat skeptic about not being able to use local media in Prezi presentations, particularly since I often use a lot of video material.

I have also been excited about trying out some markdown-based presentation solutions, including reveal.js and Remark. This has been refreshing, and I like such an approach when working mainly with text-based presentations. I do realize, however, that many of my presentations rely heavily on images, sounds and videos, which make the markdown-based approaches less ideal.

I have been trying Impress, the presentation part of OpenOffice/LibreOffice, on and off for several years, and have, to say it mildly, never been impressed. The design of the software has been ok, not even close to as intuitive as Keynote, but not so far away from MS PowerPoint. The biggest drawback, however, has been its performance, both when it comes to editing presentations, but also when presenting. After all, a presentation software has to be efficient to work with and needs to perform flawlessly in presentation mode.

Luckily, I decided to give Impress yet another try before giving a presentation in Hamburg this week. I exported a Keynote presentation to a .pptx file, and opened it up in LibreOffice Impress on my Ubuntu laptop. To my big surprise it worked very well! Not only did the graphical elements look good, but also the embedded videos worked well. There must have been some major update to the software recently, because suddenly the speed of editing also worked quite fine. There are still some issues when scrolling through a large presentation with lots of multimedia content, but not more than I can live with.

The conclusion: today I held my first multimedia-rich conference presentation using my Ubuntu laptop. Not only did the projector connection work flawlessly (which has not always been the case with Linux systems…), but also the presentation ran without any performance issues whatsoever. A new era has begun in my presentation life! LibreOffice Impress is still not as smooth and solid as Keynote was a few years back, but it is now at a point where it is stable and easy enough that I actually want to use it professionally.