Monday, 15 February 2016

Keyboard Shortcuts



Internet

Firefox

sub-category: Browser
description: Web Browser
Shortcut:
Effect:
Additional Info:
CTRL + T
new tab

CTRL + W
close tab

CTRL + SHIFT + T
recover closed tab

CTRL + TAB
next tab

CTRL + SHIFT + TAB
previous tab

ALT + [1-8]
jump to tab [number]

ALT + 9
jump to the last tab

CTRL + L
focus url bar

ESC
stop loading page

CTRL + K
focus search bar

CTRL + F
search page
search bar is always visible
/
quick search
search bar is not always visible - CTRL + G → next
CTRL + SHIFT + E
tab groups
organize tasks in tab groups
CTRL + SHIFT + Y
open download window

CTRL + SHIFT + A
open addon preferences

CTRL + D
bookmark page

CTRL + H
history

ALT + arrow left
back

ALT + arrow right
forward

F11
fullscreen

CTRL + Q
quit



Thunderbird

sub-category: E-Mail
description: Mail Client
Shortcut:
Effect:
Additional Info:
CTRL + N
new mail

CTRL + ENTER
send mail

CTRL + S
save draft

CTRL + L
create link
select textarea
CTRL + Q
quit


Transmission

sub-category: Peer-to-Peer
description: P2P Client
Shortcut:
Effect:
Additional Info:
ALT + C
toggle view
normal, compact
CTRL + E
open torrent folder

CTRL + P
pause

ALT + ENTER
torrent properties

DELETE
remove

SHIFT + DELETE
delete file and remove

CTRL + N
new

CTRL + U
open url

CTRL + Q
quit


Empathy

sub-category: Chat
description: Text, Voice & Video Chat Program
Shortcut:
Effect:
Additional Info:
CTRL + F
find account

F3
history

CTRL + Q
quit


Remmina

sub-category: Remote Access
description: Remote Desktop Client
Shortcut:
Effect:
Additional Info:
CTRL + N
new

CTRL + O
connect

CTRL + E
edit

CTRL + D
delete

CTRL + X
quit


Ubuntu Desktop

Nautilus

sub-category: File Manager
description: File Manager
Shortcut:
Effect:
Additional Info:
CTRL + T
new tab

CTRL + W
close tab
or app if all tabs are closed
F2
rename file/folder

F3
split window

CTRL + 1
icon view

CTRL + 2
list view

CTRL + 3
compact view

CTRL + SHIFT + N
new folder

ALT + [number]
tab [number]

CTRL + L
go to location
view current path / connect to a ssh server...
CTRL + D
add bookmark
bookmarks the folder you are currently into
CTRL + Q
close all nautilus windows
it close all instances!

Dash

sub-category: Desktop
description: Overlay to search for files, applications, music, videos...
Shortcut:
Effect:
Additional Info:
SUPER (Windows key or Apple Command key)
open Dash home lens
press SUPER again to close dash
SUPER + A
application lens
opens dash if it isn’t already, can be used to immediately enter applications lens
SUPER + F
file lens
opens dash if it isn’t already, can be used to immediately enter files lens
SUPER + M
music lens
opens dash if it isn’t already, can be used to immediately enter music lens
CTRL + TAB
switch to next lens


Launcher

sub-category: Desktop
description: Start and switch between applications
Shortcut:
Effect:
Additional Info:
SUPER (long press)
display Unity shortcuts

SUPER + [number]
open starter on launcher position [number]

SUPER + SHIFT + [number]
open new window of app at position [number]

SUPER + TAB
switch app using the launcher


Desktop & Windows

sub-category: Desktop
description: Manage multiple workspaces to organize open applications
Shortcut:
Effect:
Additional Info:
CTRL + ALT + D
minimize all windows

ALT + F4
close window

CTRL + SUPER + arrow up
maximize window

CTRL + SUPER + arrow down
un-maximize window

CTRL + SUPER + arrow left
take 50% of the screen, on the left

CTRL + SUPER + arrow right
take 50% of the screen, on the right

ALT + TAB
switch to next window
scope: single workspace
ALT + SHIFT + TAB
switch between window
scope: all workspaces
ALT + `
switch to app instance
scope: single workspace
ALT + [the key above tab]
CTRL + ALT + arrow
move to workspace
e.g. arrow down → move to the bottom workspace
ALT + F2
run terminal command

ALT + SPACE
open window menu
another way to minimize or close a window
CTRL + SHIFT + ALT + arrow
move focused window to workspace

SUPER + S
workspace overview

PRINT
screenshot whole desktop

ALT + PRINT
screenshot focused app

SHIFT + PRINT
take screenshot of area


HUD

sub-category: Desktop
description: Search application menus with text
Shortcut:
Effect:
Additional Info:
ALT (tap)
show HUD
type to search app menu
ALT + F10
open traditional app menu


Gedit

sub-category: Editor
description: Powerful Text Editor
Shortcut:
Effect:
Additional Info:
CTRL + N
new document / tab

CTRL + W
close document

CTRL + ALT + N
new tab group

CTRL + SHIFT + W
close all

CTRL + S
save

CTRL + SHIFT + S
save as

CTRL + SHIFT + L
save all

CTRL + F
find text

CTRL + H
find and replace text

CTRL + I
go to line
i not l
CTRL + C
copy

CTRL + X
cut

CTRL + V
paste

CTRL + Q
quit


Terminal

sub-category: Command-Line Interface
description: Text Console
Shortcut:
Effect:
Additional Info:
TAB
autocomplete text
2x TAB, to see options
CTRL + SHIFT + V
paste
like CTRL + V in other apps
CTRL + SHIFT + T
new tab

ALT + [number]
move to tab [number]

CTRL + D
close tab
or app if all tabs are closed
CTRL + L
clear screen

CTRL + K
delete text before cursor

CTRL + R + [text]
find command in history
next → press again CTRL + R
CTRL + A
move cursor to the beginning

CTRL + E
move cursor to the end

CTRL + C
kill current task

CTRL + Z
move task to background
type ‘fg’ → foreground
~
symbol for the home folder
e.g. ‘cd ~/Documents’

Help

sub-category: Desktop
description: Ubuntu Desktop Guide
Shortcut:
Effect:
Additional Info:
CTRL + N
new window

CTRL + L
focus url bar
type e.g. ‘man:ls’ to see the ls man page
ALT + arrow left
back

ALT + arrow right
forward

CTRL + W
quit


Media

Totem

sub-category: Video
description: Video Player
Shortcut:
Effect:
Additional Info:
SPACE
pause

CTRL + H
toggle video controls

F11
fullscreen

F9
toggle sidebar

CTRL + S
take screenshot

CTRL + Q
quit


Rhythmbox

sub-category: Audio
description: Audio Player
Shortcut:
Effect:
Additional Info:
CTRL + SPACE
toggle play

CTRL + F
search

CTRL + J
jump to playing song

ALT + arrow right
next song

ALT + arrow left
last song

CTRL + U
shuffle

CTRL + R
repeat

CTRL + D
small mode (visual)

 CTRL + arrow up
increase volume

CTRL + arrow down
decrease volume

ALT + ENTER
edit song metadata
used to fix errors in ID3 tags
CTRL + Q
quit

F11
party mode / fullscreen



Shotwell

sub-category: Photography
description: Photo Organizer
Shortcut:
Effect:
Additional Info:
CTRL + I
import photos from folder

CTRL + N
create new event
events essentially act as folders for your photos
CTRL + F
find

CTRL + E
enhance
automatically balance color and contrast.
CTRL + T
add tag(s)

CTRL + M
modify tag(s)

CTRL + SHIFT + P
publish photo(s)
upload selected photo(s) to facebook or other online sources
F2
rename photo

F5
start slideshow

CTRL + Q
quit


 

Office

LibreOffice Writer

sub-category: Word Processor
description: Word Processor compatible with Microsoft Office file formats
Shortcut:
Effect:
Additional Info:
CTRL + S
save current document

CTRL + SHIFT +S
save current document as
create a copy of the file, choosing a new name or location
CTRL + O
open existing document

CTRL + N
create new document

CTRL + I
italicize text

CTRL + B
bold text

CTRL + U
underline text

CTRL + ALT + C
add comment

CTRL + P
print

CTRL + SHIFT + V
paste text unformatted (spezial)
useful when inserting pre-formatted content, such as from the web
F7
check spelling

CTRL + F
find text

CTRL + H
find and replace text

CTRL + Q
quit


LibreOffice Calc

sub-category: Spreadsheet Generator
description: Spreadsheet Application (opens Microsoft file formats)
Shortcut:
Effect:
Additional Info:
CTRL + S
save current spreadsheet

CTRL + SHIFT + S
save current spreadsheet as
create a copy of the file, choosing a new name or location
CTRL + O
open existing spreadsheet

CTRL + N
create new spreadsheet

CTRL + F2
insert function

CTRL + +
insert cell(s)

CTRL + 1
format cell(s)

F9
recalculate cell contents

F11
modify styles and formatting

CTRL + M
clear formatting

CTRL + I
italicize text

CTRL + B
bold text

CTRL + U
underline text

CTRL + ALT + C
add comment

CTRL + P
print

CTRL + SHIFT + V
paste text unformatted
useful when inserting pre-formatted content, such as from the web
F7
check spelling

CTRL + F
find text

CTRL + H
find and replace text

CTRL + Q
quit


 

 

LibreOffice Impress

sub-category: Presentation Creator
description: Create Presentations (opens Microsoft file formats)
Shortcut:
Effect:
Additional Info:
CTRL + S
save current presentation

CTRL + SHIFT + S
save current presentation as
create a copy of the file, choosing a new name or location
CTRL + O
open existing presentation

CTRL + N
create new presentation

CTRL + I
italicise text

CTRL + B
bold text

CTRL + U
underline text

CTRL + P
print

CTRL + SHIFT + V
paste unformatted
useful when inserting pre-formatted content, such as from the web
F5
start slideshow

F7
check spelling

CTRL + F
find text

CTRL + H
find and replace text

CTRL + Q
quit


LibreOffice Draw

sub-category: Graphics
description: All-Purpose Diagramming and Charting Tool
Shortcut:
Effect:
Additional Info:
CTRL + S
save

CTRL + SHIFT + S
save as
create a copy of the file, choosing a new name or location
F2
switch to text mod

+
zoom in

-
zoom out

CTRL + SHIFT + G
group

CTRL + SHIFT + ALT + G
ungroup

CTRL + SHIFT + K
combine

CTRL + Q
quit


Games

AisleRiot Solitaire

sub-category: Card
description: Play many different Solitaire games
Shortcut:
Effect:
Additional Info:
CTRL + N
new game

CTRL + D
deal

CTRL + H
hint

CTRL + O
select game

CTRL + W
quit


FreeCell Solitaire

sub-category: Card
description: Solitaire Card game
Shortcut:
Effect:
Additional Info:
CTRL + N
new game

CTRL + H
hint

CTRL + W
quit


Mahjongg

sub-category: Logic
description: Mahjongg Game
Shortcut:
Effect:
Additional Info:
CTRL + N
new game

CTRL + H
hint

CTRL + Z
undo

CTRL + SHIFT + Z
redo

CTRL + Q
quit


Sudoku

sub-category: Logic
description: Sudoku Game
Shortcut:
Effect:
Additional Info:
CTRL + N
new game

CTRL + H
hint

CTRL + B
reset game

CTRL + Z
undo

CTRL + SHIFT + Z
redo

CTRL + W
quit


Terminal Applications

less

sub-category: Command-Line Interface
description: Console document viewer - man pages are displayed by less
Shortcut:
Effect:
Additional Info:
Q
quit
lowercase q
/
search
press N or SHIFT + N → next/previous search result
ALT + <
begin

ALT + >
end

h
help


vim

sub-category: Command-Line Interface
description: Text Editor
Shortcut:
Effect:
Additional Info:
ESC
shift to command mode
Vim has following modes:
1. Command Mode
2. Insert Mode
3. Visual Mode
Y
yank (copy) line

U
undo line

u
undo line

yy
yank current line

y[number]
yank [number] of lines

I
insert at beginning of current line and enter insert mode

i
enter Insert mode

P
paste before

p
paste after

D
delete to EOL
EOL → End of Line
dd
delete current line

d[number]
delete [number] of lines

v
enter visual mode
Good for manipulating large amount of text.
:w
save

:new
new file

:e [filename]
open file [filename]

:%s/x/y/g
replace x by y filewide

:h
help

~
toggle case

:q
quit
VIM will give error if document has pending changes
:q!
quit without saving


top

sub-category: Command-Line Interface
description: Console System Monitor
Shortcut:
Effect:
Additional Info:
q
quit

u
monitor [user] only

# [number]
set max. tasks displayed

> 
move down

< 
move up

m
memory info

k [PID]
kill [PID]
PID = Process ID
r [nice number]
renice
none root: 0 to 19
root:             -20 to 19
h
help


nano

sub-category: Command-Line Interface
description: Simple Text Editor
Shortcut:
Effect:
Additional Info:
CTRL + O ENTER
save
CTRL + O, then ENTER
CTRL + C
cancel

CTRL + X
quit




Thursday, 11 February 2016

Beaglebone USB Webcam MJPG streamer

You might be thinking to stream video from your robot to your phone or laptop, or design a surveillance system like CCTV via beagle bone. So this post is for you. Here we will see how to install MJPG streamer on your Beagle bone and see its output on your WiFi enabled phone or other devices.
webcam
I am using Beaglebone Black Rev.C and Logitech C170 usb webcam. You can see a huge list of Raspberry Pi compatible peripherals list here. They are also compatible with BeagleBone. http://elinux.org/RPi_VerifiedPeripherals



Especially for webcams , http://elinux.org/RPi_USB_Webcams
So connect webcam using USB on beaglebone and connect miniusb of Beaglebone to you host PC. Login using SSH.
Then check first if the webcam is detected or not. For thatrun ‘lsusb’ command. and check whether detected or not.
The connect your beaglebone to internet via port forwarding on your Linux host PC.
Now lets install libraries needed to compile mpeg-streamer.
sudo apt-get install g++ curl pkg-config libv4l-dev libjpeg-dev build-essential libssl-dev vim cmake

sudo apt-get install imagemagick
Now we need to download mpeg-streamer.
wget https://github.com/shrkey/mjpg-streamer/raw/master/mjpg-streamer.tar.gz
So we will uncompress it now as it is in the tar.gz extension
tar -xvf ./mjpg-streamer.tar.gz
So now we are ready to compile it. So lets navigate to its folder and compile it.
cd mjpg-streamer

make

sudo make install

Now we are ready to proceed last step.
  ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w ./www"
  MJPG Streamer Version: svn rev:
    i: Using V4L2 device.: /dev/video0
    i: Desired Resolution: 640 x 480
    i: Frames Per Second.: 5
    i: Format............: MJPEG
    o: www-folder-path...: ./www/
    o: HTTP TCP port.....: 8080
    o: username:password.: disabled
    o: commands..........: enabled
Now lets open this video on your browser using following address.
http://192.168.1.100:8080
That is nothing but the port 8080 on your beaglebone IP address assigned by your router.  You can press ‘ctrl+c’ to stop this streaming.
I appreciate and respect the work of ” www.shrkey.com ” for helping me for guidance of this tutorial. His efforts are valuable for this article.

Wednesday, 10 February 2016

Bluetooth Dongle


Bluetooth Dongle for pi


Introduction
Bluetooth is a useful tool for getting devices communicating wirelessly. If you want your Raspberry Pi interacting with anything, from a printer, to a mobile phone, to setting up media streaming, bluetooth is the way to go! The nano dongle available from ModMyPi is the perfect low cost solution, and this guide will show you how to install it.
This guide is completed on Raspian, so the first step is to make sure you have the latest Raspbian Operating System (OS) installed on your Raspberry Pi. You can download the latest version here: http://www.raspberrypi.org/downloads
Step 1. Update and Install
A.
There's a few updates we need to run to make sure that our Raspberry Pi's software packages are all spiffy before we can proceed to installing the software we need for the bluetooth dongle. Skip this step if you're happy that your Pi's packages are already OK! Make sure you have a decent internet connection on your Pi before proceeding! 
We'll need to make sure we've got the latest firmware drivers by running the following commands:
sudo apt-get update
(This updates the list of available packages and their versions, but it does not install or upgrade any packages.)
sudo apt-get upgrade
(This actually installs newer versions of the packages you have. After updating the lists, the package manager knows about available updates for the software you have installed.)
sudo apt-get autoremove
(This will then remove all of the reduntant packages after the latest upgrade)
B.
We're now ready to install the software we need to interact with the bluetooth dongle!
sudo apt-get install bluetooth bluez blueman
Easy :)
I usually turn off my Pi before proceeding with any hardware changes. So switch your Pi off, plug the nano dongle in, and switch the Pi back on.
Step 2. Plug and Play Command Line Access
This part is for people who feel like having a play from the command line, so ignore it if you're happy with access via the GUI - which to be honest will allow for the majority of connections!
A.
You can run a quick check on the command line to see if the bluetooth device has been successfully registered:
lsusb
(This will list the currently connected USB devices)
This should yield the following connected device:
Bus 001 Device 005: 1D 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HC1 mode)
B.
You can also check to see whether the bluetooth is live by running the following command:
/etc/init.d/bluetooth status
(This command will give you basic functionality, by replacing 'status' with the following - 'start', 'stop', 'restart', 'force-reload')
Running 'status' should yield the following status message:
[ ok ] bluetooth is running
C.
Next we need to scan for devices:
hcitool scan
This will show any devices in range of the dongle, for example my mobile phone.
68:69:7C:31:9A:75 JAKE-IPHONE
D.
If you want, you can then ping your devices and make sure they're communicating OK! Please note the l2ping command this is the letter L2ping NOT 12ping (twelveping) - I went around in circles with this one for a while :D
sudo l2ping -c 1 68:69:7C:31:9A:75
Make sure you put in your MAC address - don't just copy the one above :) This pings the device via bluetooth and will yield the following if successful:
Ping 68:69:7C:31:9A:75 from 00:1B:10:00:ZA:EC (data size 44) . . .
44 bytes from 
68:69:7C:31:9A:75 id 0 time 26.88ms
1 sent, 1 recieved, 0% loss
That's probably enough playing for now on the command line, so we'll pick this up via the GUI.
Step 3. GUI Access
A.
Boot to the GUI
startx
Then all you need to navigate to 'start >> preferences >> bluetooth manager' which will bring up the bluetooth device manager.

First we need to ensure that our Raspberry Pi is discoverable. So, hit Adapter >> Preferences:

Then make sure that your Pi is set to "Always visible". You can also change the name of your Pi device is you wish. Once finished, just click close.

You can then search for nearby devices using the "Search" button. Make sure that your devices are on and discoverable!

Select the device you want to Pair to, and click the little key item to begin the pairing process.

If you're using a phone to pair to, a message will appear on the phone asking you to pair - DO NOT PRESS OK/CONFIRM ON THE DEVICE YET!
First, check in the top right corner of your Pi's desktop for a notification message like so:

Due to a little grahical anomoly in the latest iteration of Jessie (Jan '16) the confirm/deny message is very easy to miss. To pair the device, you need to hit confirm on this message. Then go back to your device, and click confirm/pair.
If you miss this message, you can bring it up again using the notification email tab.
Your devices should then be paired!
You can send and receive files using the send file button.

That's it! From here on you can search for and pair with devices, send files, and generally access bits and pieces via bluetooth!

Tuesday, 9 February 2016

Raspberry PI Ultrasonic Distance Sensor

Raspberry PI Ultrasonic Distance Sensor

 

Ultrasonic Distance Sensor is an amazing product that provides very short to long-range detection and ranging with a resolution of 1mm. The ECHO-PRO is a 5 in 1 sensor module which output the distance data as Serial ASCII, Pulse width and Analog output. The module has an onboard temperature sensor which outputs the ambient temperature via Serial ASCII. Apart from this the module is also equipped with Proximity sensing output, which will generate a high going signal if any object comes under the presented distance range (2-500cm). Since there are various interfacing options (ASCII, PWM and ANALOG) available on the module as a standard, it will be easy for a developer to select the optimum one based on the resources available on the micro controller.

Here Raspberry Pi2 is interfaced with this sensor to measure the obstacle’s distance. As the Raspberry pi could be used for high end applications, the interfacing with particular sensor will be very much useful to create an intelligent embedded system. Making of an advanced robot using Raspberry pi should meet these requirements in a proper manner, so that an intelligent robot will be developed. In this type of sensor there is an option for getting the distance in the form of serial ASCII, and we make use of this property to obtain data to the Raspberry Pi.

 NEED:

Make the connections as shown in the figure, the sensor module is powered with a power supply using 5V and the ground connection of the supply is provided to both sensor and Raspberry Pi (pin 6). The ASCII output pin is connected to the reception pin of the Raspberry Pi.  Now power on the Pi module and receive the data coming through the reception pin using Python. A sample code for this process is given below:

CODING:
import serial
import RPi.GPIO as GPIO     
import os, time
from decimal import *

# Find a character in a string
def find(str, ch):
    for i, ltr in enumerate(str):
        if ltr == ch:
            yield i

#Enable Serial communication
port = serial.Serial("/dev/ttyAMA0", baudrate=9600, timeout=0.1)

while True:
    rcv = port.read(10)  # Read the data from the port

    if len(rcv)>5:
        # Data Extraction
        L1=list(find(rcv, "D"))
        L2=list(find(rcv, "T"))
        Dist=rcv[(L1[0]+1):(L2[0])]
        Dist=Decimal(Dist)
        print str(Dist) + " cm"

GPIO.cleanup()

By running this code the distance in centimeters is shown in the python shell. ASCII Serial Data output produces a TTL (Transistor Transistor Logic) output at a baud rate of 9600 including both distance and temperature sensor outputs in the format “DXXX.XTXXX” along with a ‘\r’ symbolizing the end of the string. For example “D145.6T030” where ‘D’ followed by distance in centimeters and ‘T’ followed temperature in degree Celsius. Here the user doesn’t need to calibrate the value read making it easier to interface. So as in the program, to get the distance the data in between the characters ‘D’ and ‘T’ should be extracted.