Category Archives: Linux

Install Team Viewer on Ubuntu

I have been using Ubuntu for a long time, I run it along side with windows. I have a tutorial on how to dual boot windows and any other operating system, you can also read that. One of the softwares I use often is team viewer, but unlike windows it is not as simple to install team viewer for windows.

And I have been getting multiple requests on how to install it, so I taught I would set up an instructable on how to do that.

So lets get started….

Step 1: Getting Started

This instructable shows how to install team viewer on Ubuntu 14.04 and I will keep updating this as time goes by. I’m showing you how to install the original build and I would recommend you not to use any out-of-date repos.

Also, I will be show how to install the 32 bit version.

Step 2: Download

Team viewer can be downloaded from the team viewer official site.

Download the 32bit version.

Note the location of the downloaded file

Step 3: Installing

Open up a terminal

Run command

cd ~/file path/

Run command

sudo dpkg -i teamviewer_linux.deb

Run command

sudo apt-get -f install

to install any missing dependencies

Raspberry remote control with Telegram

Telegram is a very versatile instant messaging software that can be used with the same phone number on different devices simultaneously.
In this tutorial we saw how to install it, and we tried to send text and media messages.
We have also seen that it is possible to set the Raspberry to send messages automatically.
In this tutorial we will ask Raspberry to take a specific action as a function of the received message, for example, we could send a text message with the word “photo” and Raspberry will sends us a photo of the apartment, or “lamp” to turn a lamp, or “open” to open the garage door.
Well, let’s start

You need:

a Raspberry Pi B or B+, with the latest version of Raspbian, or our MIcroSD Card 8GB Class 10 Raspbian preinstalled.

Step 1: Installation

Installation:

Read this tutorial, we use this configuration as start point.

To intercept a new incoming message we create a file action.lua

“Lua is a powerful, fast, lightweight, embeddable scripting language.

Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.” From https://www.lua.org.

sudo nano /home/pi/tg/action.lua

with this content

function on_msg_receive (msg)
      if msg.out then
          return
      end
      if (msg.text=='ping') then
         send_msg (msg.from.print_name, 'pong', ok_cb, false)
      end
  end
   
  function on_our_id (id)
  end
   
  function on_secret_chat_created (peer)
  end
   
  function on_user_update (user)
  end
   
  function on_chat_update (user)
  end
   
  function on_get_difference_end ()
  end
   
  function on_binlog_replay_end ()
  end

Save and exit, when incoming text message is “ping”, Telegram answers us with a text message containing “pong”.

move in tg

cd /home/pi/tg

then type

bin/telegram-cli -k tg-server.pub -W -s action.lua

Try to send a message, if all goes well, Telegram answers only on “ping” and not “PING”, we should see something like this

Raspberry Telegram onreceive

 

Raspberry Telegram onreceive

Ok, let’s do something more interesting.

Install the Raspberry Camera, see this tutorial, then create a new folder where we will save the captured photos.

sudo mkdir /home/pi/camera

create a new file camera.sh

sudo nano /home/pi/camera/camera.sh

with this content

#!/bin/bash  
   
  raspistill -w 800 -h 600 -o /home/pi/camera/photo.jpg

save and exit, give it execution permissions

sudo chmod -R 0655 /home/pi/camera/camera.sh

Edit action.lua

sudo nano /home/pi/tg/action.lua

add this lines in function on_msg_receive

if (msg.text=='photo') then
     os.execute('/home/pi/camera/camera.sh')
     send_photo (msg.from.print_name, '/home/pi/camera/photo.jpg', ok_cb, false)
  end

Raspberry Telegram action.lua

Step 2: Test

Test it

bin/telegram-cli -k tg-server.pub -W -s action.lua

Now if you send a text message with “photo”, Raspberry answer with a photo

Raspberry telegram send photo

Raspberry photo with Telegram

To enter additional commands simply change the file action.lua inserting a new if block , for example, we could activate a relay or ask the status of a sensor.

In the next tutorials will achieve some other example of use.

Follow us on social to stay informed.

www.emmeshop.eu

Stepper Motor dan Arduino

Stepper motors fall somewhere in between a regular DC motor and a servo motor. They have the advantage that they can be positioned accurately, moved forward or backwards one ‘step’ at a time, but they can also rotate continuously.

In this lesson you will learn how to control a stepper motor using your Arduino and the same L293D motor control chip that you used with the DC motor in lesson 15.

List of IP Space used by Facebook

31.13.24.0/21
31.13.64.0/18
66.220.144.0/20
69.63.176.0/20
69.171.224.0/19
74.119.76.0/22
103.4.96.0/22
173.252.64.0/18
204.15.20.0/22
  1. 127.0.0.1   localhost
  2. 127.0.1.1   master
  3. # disunting pada Monday, October 19, 2015 10:30 AM
  4. 0.0.0.0   fbcdn-creative-a.akamaihd.net
  5. 0.0.0.0   85.25.199.30
  6. 0.0.0.0   fbcdn.net
  7. 0.0.0.0   173.252.88.66
  8. 0.0.0.0   69.171.230.5
  9. 0.0.0.0   static.fbcdn.net
  10. 0.0.0.0   static.ak.fbcdn.net
  11. 0.0.0.0   scontent-sin1-1.xx.fbcdn.net
  12. 0.0.0.0   31.13.79.251
  13. 0.0.0.0   23.63.99.242

How To Deploy Kohana PHP Applications on a Debian 7 / Ubuntu 13 VPS with Nginx and PHP-FPM

Introduction

Kohana comes as a self-contained package, with each copy forming a new base for a new web application, making things quite easy for deployment.

In this DigitalOcean article, following our previous ones on installing and getting started with Kohana, we’ll see how to prepare a VPS to deploy a Kohana based PHP web application – using Debian 7 / Ubuntu 13 as our host operating system.

Note: This is the third article in our Kohana series, focused on deploying applications built using the framework. To see the first part and learn about installing it, check out Getting Started with Kohana. To see about understanding the framework’s modules to build a web application, check out Building Web Applications with HMVC PHP5 Framework Kohana.

Glossary

1. PHP Based Web-Application Deployment

Continue reading How To Deploy Kohana PHP Applications on a Debian 7 / Ubuntu 13 VPS with Nginx and PHP-FPM

How To Build Web Applications with HMVC PHP5 Framework Kohana

Introduction

We started out our series with talking about Kohana and its installation process. Since the framework does not require any additional configurations or modifications, we are ready to begin with learning web-application development basics using the Kohana framework.

In this DigitalOcean article, we will be jumping in on understanding how Kohana is designed to work along with its most important parts. We will go over the HMVC (Hierarchical Model View Controller) pattern and learn how to create one of each – and get them to work together!

Note: This is the second article in our Kohana series, focused on working with the framework. To see the first concerning installing it, check out Getting Started with Kohana. To see about deploying a Kohana based web application, check out Deploying Kohana Based PHP Web-Applications.

Glossary

1. Convention over Configuration

Continue reading How To Build Web Applications with HMVC PHP5 Framework Kohana

How to Install and Setup Kohana, a PHP Web-Application Development Framework

Introduction

Amongst many PHP based frameworks, Kohana sets itself apart from the rest with its ideology of following common conventions and rules to develop fully object oriented web applications. This BSD licensed framework does not come with commercial strings attached and it has a build-by-the-community, for-the-community type of philosophy.

In this three-part DigitalOcean series, we will be covering all the essentials a developer should be familiar with in order to start building web applications using the PHP5 Kohana framework. We will begin with going over some of the basics, continuing through the key concepts and modules after installing the framework.

Note: This is the first article in our Kohana series – and it mainly consists of the basics and its installation. To continue with learning the framework to create web-applications, check out its sequel Building Web Applications with HMVC PHP5 Framework Kohana.

Glossary

1. Web Application Development Frameworks

Continue reading How to Install and Setup Kohana, a PHP Web-Application Development Framework

How to Install Cinnamon 2.6 in Ubuntu 15.04/14.04

The 2.6 release of Mint’s Cinnamon desktop environment has reached feature-freeze. The stable release is planned for the end of this month.

Cinnamon 2.6 brings some exciting new features, include:

  • support for systemd
  • panel support for multiple monitors
  • support for new GTK headerbar (client-side decorations)

Cinnamon 2.6 will be made into the Romeo repositories for Linux Mint 17.1 Rebecca and LMDE 2 Betsy.

cinnamon

Install Cinnamon 2.6 in Ubuntu:

For Ubuntu 14.04 and Ubuntu 15.04 users, before it’s made into a stable PPA (I’ll update the PP once a stable PPA is available) you can now try out the new release through the Gwendal LE BIHAN’s nightly build PPA .

UPDATE: For Ubuntu 14.10 and Ubuntu 15.04, there’s now a stable PPA.

sudo add-apt-repository ppa:moorkai/cinnamon

sudo apt-get update

sudo apt-get install cinnamon

To add the PPA, open terminal and run command:

sudo add-apt-repository -y ppa:gwendal-lebihan-dev/cinnamon-nightly

Then update system package cache and install the desktop environment via commands:

sudo apt-get update

sudo apt-get install cinnamon

Once installed, log out and select login with Cinnamon.

(Optional) To remove this DE, run:

sudo apt-get purge cinnamon* nemo-* cjs muffin* python-nemo

Also remove the PPA:

sudo add-apt-repository -r ppa:gwendal-lebihan-dev/cinnamon-nightly

How to Authenticate Users to a SSH Server Using Monkeysphere on an Ubuntu VPS

Introduction

Administering large numbers of SSH keys and servers can be very difficult as your organization grows. Correctly identifying valid keys and removing invalid keys throughout an organization can be fraught with errors and have huge consequences on your server security.

In addition, when there are server changes, sometimes your users will receive warnings about being unable to establish the authenticity of your server. Most users will not double-check the key fingerprint of the server before connecting, allowing someone to potentially spoof the server and execute a man-in-the-middle attack.

A project called monkeysphere was created to address these issues. It does this by leveraging GPG keys and the web of trust model to both validate a server’s credentials, and provide easy user management.

In a previous guide, we discussed how to setup monkeysphere to validate servers to users. We will continue where we left off in this guide, where we will learn how to authenticate users to our servers automatically, based only on their GPG keys and our server administrator’s trust in these users. This will allow us to create authentication files that use plain English instead of mostly cryptographic information.

This guide will assume that you have the setup that we left off with in the previous guide (server.example.com, admin.example.com, client.example.com with the necessary trust relationships established). Let’s get started. Continue reading How to Authenticate Users to a SSH Server Using Monkeysphere on an Ubuntu VPS