How to set screen resolution for VNC Server

Here is how you change the screen resolution for VNC Server on a Raspberry Pi.

Go to terminal and type:
sudo nano /boot/config.txt

Find this section of the config.txt file:
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=2
#hdmi_mode=16

Change to this to set the default resolution to 1280×720:
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=2
#hdmi_mode=16
hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=85

These values are valid if hdmi_group=2 (DMT):

hdmi_mode resolution frequency notes
1 640×350 85Hz
2 640×400 85Hz
3 720×400 85Hz
4 640×480 60Hz
5 640×480 72Hz
6 640×480 75Hz
7 640×480 85Hz
8 800×600 56Hz
9 800×600 60Hz
10 800×600 72Hz
11 800×600 75Hz
12 800×600 85Hz
13 800×600 120Hz
14 848×480 60Hz
15 1024×768 43Hz incompatible with the Raspberry Pi
16 1024×768 60Hz
17 1024×768 70Hz
18 1024×768 75Hz
19 1024×768 85Hz
20 1024×768 120Hz
21 1152×864 75Hz
22 1280×768 reduced blanking
23 1280×768 60Hz
24 1280×768 75Hz
25 1280×768 85Hz
26 1280×768 120Hz reduced blanking
27 1280×800 reduced blanking
28 1280×800 60Hz
29 1280×800 75Hz
30 1280×800 85Hz
31 1280×800 120Hz reduced blanking
32 1280×960 60Hz
33 1280×960 85Hz
34 1280×960 120Hz reduced blanking
35 1280×1024 60Hz
36 1280×1024 75Hz
37 1280×1024 85Hz
38 1280×1024 120Hz reduced blanking
39 1360×768 60Hz
40 1360×768 120Hz reduced blanking
41 1400×1050 reduced blanking
42 1400×1050 60Hz
43 1400×1050 75Hz
44 1400×1050 85Hz
45 1400×1050 120Hz reduced blanking
46 1440×900 reduced blanking
47 1440×900 60Hz
48 1440×900 75Hz
49 1440×900 85Hz
50 1440×900 120Hz reduced blanking
51 1600×1200 60Hz
52 1600×1200 65Hz
53 1600×1200 70Hz
54 1600×1200 75Hz
55 1600×1200 85Hz
56 1600×1200 120Hz reduced blanking
57 1680×1050 reduced blanking
58 1680×1050 60Hz
59 1680×1050 75Hz
60 1680×1050 85Hz
61 1680×1050 120Hz reduced blanking
62 1792×1344 60Hz
63 1792×1344 75Hz
64 1792×1344 120Hz reduced blanking
65 1856×1392 60Hz
66 1856×1392 75Hz
67 1856×1392 120Hz reduced blanking
68 1920×1200 reduced blanking
69 1920×1200 60Hz
70 1920×1200 75Hz
71 1920×1200 85Hz
72 1920×1200 120Hz reduced blanking
73 1920×1440 60Hz
74 1920×1440 75Hz
75 1920×1440 120Hz reduced blanking
76 2560×1600 reduced blanking
77 2560×1600 60Hz
78 2560×1600 75Hz
79 2560×1600 85Hz
80 2560×1600 120Hz reduced blanking
81 1366×768 60Hz
82 1920×1080 60Hz 1080p
83 1600×900 reduced blanking
84 2048×1152 reduced blanking
85 1280×720 60Hz 720p
86 1366×768 reduced blanking

How to clean up Ubuntu /boot partition

After time your Ubuntu /boot partition can fill up with multiple kernel versions. To clean up unused kernel’s use the following steps.

Command line method:

First check your kernel version, so you won’t delete the in-use kernel image, running:

uname -r

Now run this command for a list of installed kernels:

dpkg –list ‘linux-image*’ | grep ^ii

and delete the kernels you don’t want/need anymore by running this:

sudo apt-get remove linux-image-VERSION

Replace VERSION with the version of the kernel you want to remove.

When you’re done removing the older kernels, you can run this to remove ever packages you won’t need anymore:

sudo apt-get autoremove

And finally you can run this to update grub kernel list:

sudo update-grub

Root File Browser for Raspbian Jessie

I am often asked how to run the file browser with root privileges on a Raspberry Pi, here are the instructions.

Typing gksudo in Terminal and then hitting enter. A window named Run program will pop up.

Then typing pcmanfm on the Run text field. Pressing ok. Always use caution when running the file brower with root privileges, you can easily break your system if you don’t know what you are doing.

Ardour Digital Audio Workstation

I recently switched my video editing software from Windows based Sony Vegas to Linux based Blender.  I had also used Vegas as my digital audio workstation for audio projects. Wanting to do both on Linux I started researching Linux based DAW systems and found Ardour. After testing Ardour I quickly realized that I found my solution.  Ardour was very intuitive to learn and had all of the features that I required for my audio mixing projects. Good news for you OSx and Windows user, there are versions available for both of you. Linux VST support provides access to high quality proprietary plugins on Linux from Loomer, Pianoteq/Modartt. Excellent open source plugins from Distrho and others.   It’s also a free under GNU Public License v2  but if you end up using do as I do and make a donation to help keep the project going.

Ardour is a multichannel hard disk recorder (HDR) and digital audio workstation (DAW). It can be used to control, record, edit and run complex audio setups.

Ardour supports pro-audio interfaces through the ALSA project, which provides high quality, well designed device drivers and API’s for audio I/O under Linux. Any interface supported by ALSA can be used with Ardour. This includes the all-digital 26 channel RME Hammerfall, the Midiman Delta 1010 and many others.

Ardour has support for 24 bit samples using floating point internally, non-linear editing with unlimited undo, a user-configurable mixer, MTC master/slave capabilities, MIDI hardware control surface compatibility.

It supports MIDI Machine Control, and so can be controlled from any MMC controller and many modern digital mixers.

Ardour contains a powerful multitrack audio editor/arranger that is completely non-destructive and capable of all standard non-linear editing operations (insert, replace, delete, move, trim, select, cut/copy/paste). The editor has unlimited undo/redo capabilities and can save independent “versions” of a track or an entire piece.

Ardour’s editor supports the community-developed LADSPA plugin standard. Arbitrary chains of plugins can be attached to any portion of a track. Every mixer strip can have any number of inputs and outputs, not just mono, stereo or 5.1. An N-way panner is included, with support for various panning models. Pre- and post-fader sends exist, each with their own gain and pan controls. Every mixer strip acts as its own bus, and thus the bus count in Ardour is unlimited. You can submix any number of strips into another strip.

Ardour’s channel capacity is limited only by the number on your audio interface and the ability of your disk subsystem to stream the data back and forth.

JACK (the JACK Audio Connection Kit) is used for all audio I/O, permitting data to be exchanged in perfect samplesync with other applications and/or hardware audio interfaces.

Ardour is sample rate and size neutral – any hardware formats from 8 to 32 bits, and rates from 8kHz to 192kHz. Internal processing in 32/64 bit IEEE floating point format.

Further information can be found at http://ardour.org/.

 

VirtualBox Host Keys

I’m always forgetting the  host keys when using the VirtualBox install on my laptop. I did  a Google search for them and could not find a comprehensive list of all of the VirtralBox shortcut keys in one place so I made up a list myself.

Default Host Key = Right-CTRL
Main Menu Bar = Host-Home
Full Screen = Host-F
Scaled Mode = Host-C
Adjust Windows Size = Host-A
Take Screen Shot = Host-E
Settings = Host-S
Take Snapshot = Host-T
Pause = Host-P
Reset = Host-R
ACPI Shutdown = Host-H
Close = Host-Q

Press the Host key to capture/ uncapture mouse.

PiShrink

Making backups of your Pi images is essential but restoring them to a new SD card can sometimes be problematic when the image is the same size or larger than the target SD card. You will get the message that the image is too large for the target device when the image won’t fit.  The solution is a simple bash script called pishrink.sh.

The first step is to backup the image that you want to shrink.

Step 1:
Startup the “Win32DiskImager” program, Here’s the opening screen:
Notice you will need to select which drive is your SD card. in this case my SD card is H:\ then click the NAVIGATE icon just next to the H:\ pull down box, this will open a file-explorer window.

Step 2:
Select a folder on your hard-drive where you want to SAVE the image file of your SD card. In my example, i have a folder named “rpi_backups”.
Also type in a filename of the image you’re about to create, and click SAVE to continue to next step.

Step 3:
Confirm the folder/filename are correct, and now you can click the READ button to start reading your SD card into your (about-to-be-created) image file.

Step 4:
Here’s my image file being written, almost complete at 90% .

Step 5:
It will indicate “Read Successful” and  “Done” when the image has finished writing.

Step 6:

The next step is to shrink the image you just backed up.

PiShrink is a bash script that automatically shrink a pi image that will then resize to the max size of the SD card on boot. This will make putting the image back onto the SD card faster and the shrunk images will compress better.

Usage: ./pishrink [-s] imagefile.img [newimagefile.img]

If the -s option is given the script will skip the autoexpanding part of the process. If you specify the newimagefile.img parameter, the script will make a copy of imagefile.img and work off that. You will need enough space to make a full copy of the image to use that option.

Prerequisites

If using Ubuntu, you will likely see an error about e2fsck being out of date and metadata_csum. The simplest fix for this is to use Ubuntu 16.10 and up, as it will save you a lot of hassle in the long run.

Example

[user@localhost PiShrink]$ sudo ./shrink.sh pi.img
e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/loop1: 88262/1929536 files (0.2% non-contiguous), 842728/7717632 blocks
resize2fs 1.42.9 (28-Dec-2013)
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/loop1 to 773603 (4k) blocks.
Begin pass 2 (max = 100387)
Relocating blocks             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 236)
Scanning inode table          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 4 (max = 7348)
Updating inode references     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/loop1 is now 773603 blocks long.

Shrunk pi.img from 30G to 3.1G

Download pishrink.sh

 

Ubuntu Mate

If you are looking for a good Raspberry Pi OS for general computing Ubuntu Mate is the way to go.  Ubuntu MATE is a stable, easy-to-use operating system with a configurable desktop environment. It is ideal for those who want the most out of their computers and prefer a traditional desktop metaphor. With modest hardware requirements it is suitable for modern workstations, single board computers and older hardware alike. Ubuntu MATE makes modern computers fast and old computers usable.

If you are new to Ubuntu MATE, or only casually acquainted with Linux based distributions, it can be difficult to understand how a Linux operating system compares with other computer systems that you may already be familiar with. Hopefully this page will help demystify Ubuntu MATE for new-comers.

Ubuntu is one of, if not the, largest deployed Linux based desktop operating systems in the world. Linux is at the heart of Ubuntu and makes it possible to create secure, powerful and versatile operating systems, such as Ubuntu and Android. Android is now in the hands of billions of people around the world and it’s also powered by Linux.

Ubuntu is available in a number of different flavors, each coming with its own desktop environment. Ubuntu MATE takes the Ubuntu base operating system and adds the MATE Desktop.

The MATE Desktop is one such implementation of a desktop environment and includes a file manager which can connect you to your local and networked files, a text editor, calculator, archive manager, image viewer, document viewer, system monitor and terminal.

MATE Desktop provides an intuitive and attractive desktop environment using traditional metaphors, which means if you’ve ever used Microsoft Windows or Apple Mac OS, it will feel very familiar.

The MATE Desktop has a rich history and is the continuation of the GNOME2 desktop, which was the default desktop environment on many Linux and Unix operating systems for over a decade. This means that MATE Desktop is tried, tested and very reliable.

Powerful Applications

While MATE Desktop provides the essential user interfaces to control and use a computer, Ubuntu MATE adds a collection of additional applications to turn your computer into a truly powerful workstation.

Productivity & Entertainment

Firefox

Safe and easy web browser

Thunderbird

Email client with integrated spam filter

LibreOffice

Full-featured office productivity suite that is Microsoft(R) Office compatible.

Rhythmbox

Music player and organizer

Shotwell

Digital photo organizer.

VLC

Play, capture, broadcast your multimedia streams.

Naturally you’ll also find a firewall, backup application, document/photo scanner and printer management all included in Ubuntu MATE. And this is just the start. The Ubuntu Software Center includes thousands of applications suitable for just about any professional or recreational pursuit.

Games

In recent years Linux has become a first class gaming platform thanks to Valve bringing the Steam platform to Linux. At the time of writing Steam has thousands of high quality indie and AAA titles available for Linux. Ubuntu MATE is fully compatible with Steam for Linux.

While Steam is a major step forward for gaming on Linux, there are also many high quality and enjoyable Open Source games titles available for Ubuntu MATE via Software Boutique and Software Center. It doesn’t matter if you like flight simulators, motor racing, first person shooters, jump and run or card games, you’ll find something to keep you entertained.

Open Source

Open Source Initiative

What Linux, Ubuntu and MATE Desktop all have in common is they are Open Source. Open source software is software that can be freely used, changed, and shared (in modified or unmodified form) by anyone. In a nutshell Ubuntu MATE is free, in the truest sense of the word.

Although you will find some versions (distributions) of Linux for purchase, the vast majority are provided free of charge, like Ubuntu MATE. Open Source software is licensed in a way that allows anyone to give it away for free, no strings attached. For example, the license gives any member of the user community the freedom to use Linux for any purpose, to distribute, modify, redistribute, or even sell the operating system. If you do modify and then redistribute Linux with your modifications, you are required by the license to submit your modifications for possible inclusion into future versions. There is no guarantee that this will ever happen, but if you have made it better, then your changes just might be included in the next release of Ubuntu MATE.

This is how we can continually improve and grow without having to charge our users money. Many of the users of Linux are corporations that use the operating system to run their businesses, or include it within their products. Many of these corporations provide fixes and new features for Linux as they use the software for their businesses. These improvements are given back to the Linux distribution and the software improves as a result.

Unlike Windows, and OSX, Linux is not created and supported by just one company. It is supported by Intel, Redhat, Linaro, Samsung, IBM, SUSE, Texas Instruments, Google, Canonical, Oracle, AMD, and Microsoft. Over 4,000 developers contributed to Linux over the last 15 years.

Whether you are a home user of Ubuntu MATE, a Ubuntu MATE software or application developer, or an employee of an organization that uses the operating system, you are a member of the Linux and Open Source communities and benefit from the efforts of the developers who contribute to Ubuntu MATE and its related projects, Linux, MATE, and Ubuntu. Members of the community can and do run Linux on almost any hardware, from the prettiest Macbook to the cheapest netbook, from the newest Chromebook to some very old machines designed for Windows, and from the most powerful Internet servers to the smallest smart thermostat.

Pi Cluster Super Computer

pi cluster super computer

The Raspberry Pi family of single board computers transformed education and has become one of the drivers of the Internet of Thinks revolution. These boards are low-cost, well-featured, and easily available. So what do you get when you take a bunch of Raspberry Pi boards and wire them together? An incredibly cheap and surprisingly high performance parallel computing system that’s not only valuable in education but can also solve some useful, real world problems.

In my case I am in the process using my cluster into a Turing Bombe to break the Kriegsmarine four rotor  Enigma M4 machine.