Month: July 2016

RaspberryPi and Pushbullet Notifications

I posted previously about using Twlio to get an RPi to send text message notifications to me using a Twilio trial account. These trial accounts used to keep going unless you stopped using them for a period of time, but now they time out like most trial accounts do.

I scouted around looking for another notification method. I didn’t want to use email. I’d previously used sSMTP with some success, but I wanted to try something different.

Pushbullet is working well for me. You can get a free account, and apps for Android and Apple. Once you’ve got your free API authentication key you can make web requests to the Pushbullet service and they’re delivered to your mobile.

I use the cUrl app to make the requests. If you need to install it, you can do so by entering this command in a terminal. (For other unrelated purposes, I also incorporate cUrl into some applications I develop, so I always install the libcurl3 development libraries as well. If you don’t need them you can leave them off the command. For completeness, this is the command I use to install all things cUrl on my boxes.)

sudo apt-get -y install curl libcurl3 libcurl3-dev

Then I create shell scripts similar to the following which can be called by other scripts or applications, or triggered by cron.

In the title= parameter, it is often convenient to use the name of the process you’re reporting on, or the name of the RPi or PC it is running on.

#!/bin/bash

API="enter your API key here"
MSG="This is where you would put your message text"

curl -u $API: https://api.pushbullet.com/v2/pushes -d type=note -d title="Message Title" -d body="$MSG"

Nice and simple, and free.

Tags : , ,

Nautilus Showing Hidden Files By Default

Out of nowhere, each time I opened Nautilus it was showing hidden files by default.

If I used Ctrl-H to hide them they went away. But next time I opened Nautilus, they were back. This was a global issue, not something goofy with a single folder. So the issue seemed to reside with Nautilus itself.

I found a way to correct it by using the dconf-editor application. Open dconf-editor (you may need to install it first, it isn’t a default part of Ubuntu 16.04) and navigate to org, gtk, file-chooser and then uncheck the show-hidden checkbox.

dconf-editor

Tags : ,

Reigning in the Dash

The Dash in Ubuntu 6.04 had decided to come up in full screen mode every time I opened it. This wasn’t what I wanted. After a period of Googling (during which I was surprised to discover that most questions on the Dash were asking how to make that the default behaviour) I found the command I was looking for:

gsettings set com.canonical.Unity form-factor Desktop

Entering this in a terminal forces the Dash to adopt my preferred fashion, taking up the top left of the screen only.

Dash

Tags : , ,

Google Earth and Ubuntu 16.04

After upgrading to 16.04 (for upgrade, read wipe and re-install) I needed to re-install all my applications. I have a shell script that runs through them and installs them in one quick batch, which is great.

There’s one package that requires manual intervention and I haven’t found a way round that, so I set that to be installed last. When I leave my shell script running and come back to it, it’ll be sat waiting for the few options to be selected in this particular package, and then I’m done. That package is the ttf-mscorefonts-installer package that installs some of the common Microsoft TrueType fonts.

From a backup, I drag back in the appropriate dot folders and files and pull back in my data and that’s it, we’re good to go.

Apart from Google Earth.

Desktop with Google Earth

To install Google Earth in Ubuntu always seems to require a special incantation, and that incantation changes (in my personal experience, your mileage might vary) for each new version of Ubuntu. It’s a pain, because it means it can’t be automated.

Anyway, after the usual period of research and frustration (do people even test the instructions they post online?) I whittled the required steps down to this sequence below.

To be specific, this loaded Google Earth onto Ubuntu 16.04 on an Asus R500V core i7 laptop with an nVidia Geforce 610m graphics card. It has been tested on two other lower-spec dekstop PCs.

You need to download these packages first:

http://ftp.us.debian.org/debian/pool/main/l/lsb/lsb-security_4.1+Debian13+nmu1_amd64.deb
http://ftp.us.debian.org/debian/pool/main/l/lsb/lsb-invalid-mta_4.1+Debian13+nmu1_all.deb
http://ftp.us.debian.org/debian/pool/main/l/lsb/lsb-core_4.1+Debian13+nmu1_amd64.deb

Then open a terminal and cd to the folder containing the downloaded files and install them one after the other.

sudo dpkg -i lsb-security_4.1+Debian13+nmu1_amd64.deb
sudo dpkg -i lsb-invalid-mta_4.1+Debian13+nmu1_all.deb
sudo dpkg -i lsb-core_4.1+Debian13+nmu1_amd64.deb

If you have any dependency issues this should fix them (although on my box it didn’t appear to do anything at all).

sudo apt-get install -f

Reboot, then go to the following page and download the Google Earth .deb. Note that although I have a 64bit machine and 64bit Ubuntu, I had to use the 32bit .deb package.

http://www.google.com/earth/download/ge/agree.html

Install the downloaded file. Substitute the name of the file you’ve downloaded, the 32bit .deb is shown in the example below.

sudo dpkg -i google-earth-stable_current_i386.deb

That should be it. Google Earth should now run. It is still a bit flaky trying to show the embedded Panorama photographs, but that is a feature I never use anyway. If I find a way to make that work I’ll post it here.

Tags : ,