Connect to Raspberry PI active session via VNC

Install x11vnc package (on Raspbian):

Set the vnc password:

Create the autostart directory (if not exist):

Create the startup file:

Startup file:

Restart or activate the VNC service with:


Create a public SSH key from the private key

sshI you don’t have or you deleted by mistake the ssh public key of a ssh private key, you can regenerate the public key with the ssh-keygen command:

From the ‘man ssh-keygen’

Easy way to install Oracle Java on Ubuntu

The default Java packages (JRE and JDK) on Ubuntu come from the OpenJDK project. Sometimes we need to use specifically a Oracle Java SE Runtime (JRE) Environment or Oracle Java SE Development Kit (JDK) package on our Ubuntu Desktop or Ubuntu Server and a manual installation on paths like /opt or /usr/local paths isn’t a elegant or clean solution, other than that, you will not receive new package updates.

An easy way to install the Oracle JDK and the Oracle JRE and receive software updates of those packages is by add a repository with installation packages to our system with those instructions:

The following commands add the new apt repository and update the local list of packages:

Now you can choose a version to install, at the moment of this post was written there are Oracle Java 6, Oracle Java 7, Oracle Java 8 and Oracle Java 9 versions:

You don’t need to uninstall the OpenJDK packages that sometimes is needed by other packages as dependencies. Instead you can configure the system to use as default all the Java executables (e.g. javajavac, javadoc, javap and javaws) from a specific installed JRE or JDK with the following commands:

To list the installed Java packages:

To use a specific installed java package:

Now you confirm that the Java executables are used from the chosen Java package:


With those instructions, you will receive new versions of the Java packages through the normal software updates of your Ubuntu operation system.


Launchpad WebUpd8 team

Visual Bell in GNOME 3 Terminal

When using a terminal in GNOME 3, tab auto completion makes the audio bell, you can use a visual bell instead.

Disable audible bell and enable visual bell with:

The default visual bell type is a fullscreen flash, you can change to a titlebar flash only with:

If you prefer the fullscreen flash:

How to execute Symfony Console command in any project subdirectory

With this script on your path, you can execute the command console  to execute the Symfony Console command in any of the project subdirectory.

Save the follow script as  console  (or choose other name, like “sf”) on /usr/local/bin or other location specified on your $PATH variable.

Remember to change the permissions to execute:

Now you can go to any subdirectory of your Symfony project and execute the console just typing “console”.

Encrypt and decrypt files with a password


Instructions to encrypt files and decrypt files with a password using the gpg command from the GnuPG project.

To encrypt a single file:

Sample output:

This will create a filename.gpg file.

To decrypt the file encrypted with gpg:

Sample output:


Installing Adobe Source Code Pro fonts


Source Code Pro is a monospaced It is the second open source font family created by Paul D. Hunt for Adobe and distributed under the SIL Open Font License.

The Source Code Pro fonts has been designed to work well in coding environments. This family of fonts is a complementary design to the Source Sans family. It is available in six weights (Regular, ExtraLight, Light, Semibold, Bold, Black).

To install Adobe Source Code Pro fonts on linux, execute the follow commands in the terminal:

Enjoy your new font!

Running .desktop files from command line

Follow these instructions to run desktop files from command line in Ubuntu 14.04.


1) Create a new file: ~/bin/run-desktop

2) Set the execute permission

3) Create a new file: ~/.local/share/applications/run-desktop.desktop

4) Add a new entry to ~/.local/share/applications/mimeapps.list