Pages

Ads 468x60px

Labels

Linkie ♥

Featured Posts

10 May, 2016

Raspberry PI VNC Server (Same HDMI Screen)

 
Raspberry PI  VNC Server (Same HDMI Screen) on Raspbian Jessie (2016-03-18)
all command under root user

Pre-Install

  • Set Boot Option to "Desktop"
root@raspberrypi:~# raspi-config

  • Update Raspbian
root@raspberrypi:~# apt-get update
root@raspberrypi:~# apt-get upgrade
root@raspberrypi:~# apt-get dist-upgrade

Installation  X11 VNC Server

 1. Check & install x11vnc

 root@raspberrypi:~# apt-cache search x11vnc
 x11vnc - VNC server to allow remote access to an existing X session
 root@raspberrypi:~# apt-get install x11vnc

2. Set VNC Sever password 

root@raspberrypi:~# x11vnc -storepasswd raspberry /etc/x11vnc.pass
stored passwd in file: /etc/x11vnc.pass

3. Service script for startup

root@raspberrypi:~# vi /lib/systemd/system/x11vnc.service
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -forever -loop -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log
[Install]
WantedBy=multi-user.target

4.Add Startup Script to Service 

root@raspberrypi:~# systemctl daemon-reload
root@raspberrypi:~#  systemctl enable x11vnc.service
Created symlink from /etc/systemd/system/multi-user.target.wants/x11vnc.service to /lib/systemd/system/x11vnc.service.
Start Server and Test from VNC viewer
root@raspberrypi:~# systemctl start x11vnc.service

5.Check status of VNC Service 

root@raspberrypi:~# systemctl status x11vnc.service
● x11vnc.service - Start x11vnc at startup.
   Loaded: loaded (/lib/systemd/system/x11vnc.service; enabled)
   Active: active (running) since Tue 2016-05-10 15:31:58 ICT; 8s ago
 Main PID: 1120 (x11vnc)
   CGroup: /system.slice/x11vnc.service
           ├─1120 /usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -forever -loop -noxrecord -noxfixes -noxdamage -...
           └─1121 /usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -forever -loop -noxrecord -noxfixes -noxdamage -...
May 10 15:31:58 raspberrypi systemd[1]: Started Start x11vnc at startup..
May 10 15:31:58 raspberrypi x11vnc[1120]: --- x11vnc loop: 1 ---
May 10 15:31:59 raspberrypi x11vnc[1120]: --- x11vnc loop: waiting for: 1121
May 10 15:31:59 raspberrypi x11vnc[1120]: disabling -bg in -loop mode
May 10 15:32:03 raspberrypi x11vnc[1120]: PORT=5900


21 January, 2013

Twitter from Aruduino + Ethernet Shield





1.Get a token to post a message using OAuth.
  • Click  at  "Authorize app"

  • Save you Token: xxxYouTokenxxx

16 January, 2013

Python-Twitter Install on MK802 Lubuntu




After you install Lubuntu OS on MK802 or Lubuntu os. Next step to install python-Twitter
on root user.

Register Twitter Develop Account.
  • Go to https://dev.twitter.com/apps/new and log in, if necessary
  • Supply the necessary required fields, accept the TOS, and solve the CAPTCHA.
  • Submit the form

  • Copy the consumer key (API key) and consumer secret from the screen into your application
consumer_key = ‘ConsumerKey######’
consumer_secret = ‘ConsumerSecret######

13 January, 2013

MK802 Zabbix Arduino Sensor


Setup Zabbix connect to Arduino Uno whit sensor LDR, CO2, Tempeture and Humidity


Arduino connection to sensor
   LDR    Light Sensor connect to  Digital 1   from bldr.org
   SHT11  Temp/Humidity connect to clock = Digital2 / data = Digitalbldr.org 
   CO2    MQ-7 Carbon Monoxide Sensor connect to analog pin 0 from wiring.org.co


Install Zabbix on MK802 Lubuntu


Install Zabbix 2.02 from source on MK802 runing Lubuntu 12.06  (login root or su - )
Upgrade Lubuntu after install Lubuntu on MK802
#apt-get update
#apt-get upgrade
timezone and time from ntp.
#su -
#cd /etc
#cp /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
#ntpdate clock.nectec.or.th
Install text editor(s), mailer, openssh server and wget
#apt-get install openssh-server openssh-client wget

07 January, 2013

MK802 Lubuntu Change Resolution




MK802 Lubuntu Change Resolution 1080p to 720p ( Linaro 12.07 by Toby)
1. Install change resolution A10 or "Utility to control A10 displays"  from  Jeff@doozan.com



root@linaro-alip:~# chmod +x a10_display

root@linaro-alip:~# cp a10_display /usr/local/bin
root@linaro-alip:~# a10_display
a10_display <hdmi|vga|tv|lcd> <on|off|mode> [mode_number]
root@linaro-alip:~# a10_display hdmi mode 5
root@linaro-alip:~# a10_display hdmi mode 10
 

Mode 5 = 720p x 60hz   1280x720
root@linaro-alip:~# gtf 1920 1080 60
 # 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
 Modeline "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync

Mode 10 = 1080p x 60hz  1920x1080
root@linaro-alip:~# gtf 1280 720 50
 # 1280x720 @ 50.00 Hz (GTF) hsync: 37.05 kHz; pclk: 60.47 MHz
 Modeline "1280x720_50.00"  60.47  1280 1328 1456 1632  720 721 724 741  -HSync +Vsync



Resize Partition MK802 Lubuntu

Resize Partition MK802 Lubuntu  by FDISK and RESITE2FS
Resize parttion ofMK802 Lubuntu 12.01 to 16 GB
1.  check porgram fdisk and resize2fs

root@miniand:~# ls -l /sbin/fdisk /sbin/resize2fs  
-rwxr-xr-x 1 root root 76796 Mar 30  2012 /sbin/fdisk
-rwxr-xr-x 1 root root 34708 Mar 31  2012 /sbin/resize2fs