Technology

Clean Unnecessary / Old Files on Raspberry Pie

Find the Fat file size..

du -hsx * | sort -rh | head -10

Use it wisely..

sudo apt-get install localepurge
sudo localepurge
sudo apt-get install deborphan
sudo apt-get remove --purge `deborphan --guess-all`
apt-get clean

Advertisements
Uncategorized

HTTP Status 500 – Solved JAVA_HOME in Windows

If you get this…

HTTP Status 500 - java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
type Exception report
message java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
description The server encountered an internal error that prevented it from fulfilling this request.

Solution

My Computer --> Properties --> Advanced System Properties --> Advanced --> Environment Variables --> PATH
add new PATH ".......;C:\Program Files\Java\jdk1.7.0_07\bin\;

Technology

Port Forward – Raspberry Pi for every boat.

nano /etc/rc.local

#port forward every boot
sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp --dport 801 -j DNAT --to-destination 192.168.1.1:80
iptables -t nat -A PREROUTING -p tcp --dport 802 -j DNAT --to-destination 192.168.1.2:80
iptables -t nat -A PREROUTING -p tcp --dport 803 -j DNAT --to-destination 192.168.1.3:80
iptables -t nat -A PREROUTING -p tcp --dport 804 -j DNAT --to-destination 192.168.1.4:80
iptables -t nat -A PREROUTING -p tcp --dport 805 -j DNAT --to-destination 192.168.1.5:80
iptables -t nat -A PREROUTING -p tcp --dport 806 -j DNAT --to-destination 192.168.1.6:80
iptables -t nat -A PREROUTING -p tcp --dport 807 -j DNAT --to-destination 192.168.1.7:80
iptables -t nat -A PREROUTING -p tcp --dport 808 -j DNAT --to-destination 192.168.1.8:80
iptables -t nat -A PREROUTING -p tcp --dport 809 -j DNAT --to-destination 192.168.1.9:80
iptables -t nat -A PREROUTING -p tcp --dport 8010 -j DNAT --to-destination 192.168.1.10:80
iptables -t nat -A PREROUTING -p tcp --dport 8011 -j DNAT --to-destination 192.168.1.11:80
iptables -t nat -A PREROUTING -p tcp --dport 8012 -j DNAT --to-destination 192.168.1.12:80
iptables -t nat -A PREROUTING -p tcp --dport 8013 -j DNAT --to-destination 192.168.1.13:80
iptables -t nat -A PREROUTING -p tcp --dport 8014 -j DNAT --to-destination 192.168.1.14:80
iptables -t nat -A PREROUTING -p tcp --dport 8015 -j DNAT --to-destination 192.168.1.15:80
iptables -t nat -A PREROUTING -p tcp --dport 8016 -j DNAT --to-destination 192.168.1.16:80
iptables -t nat -A PREROUTING -p tcp --dport 8017 -j DNAT --to-destination 192.168.1.17:80
iptables -t nat -A PREROUTING -p tcp --dport 8018 -j DNAT --to-destination 192.168.1.18:80
iptables -t nat -A PREROUTING -p tcp --dport 8019 -j DNAT --to-destination 192.168.1.19:80
iptables -t nat -A POSTROUTING -j MASQUERADE
#implement before exit 0
exit 0

Uncategorized

Virtual Keyboard for Raspberry Pi 2

sudo su
apt-get install matchbox-keyboard
nano /usr/bin/toggle-matchbox-keyboard.sh

#!/bin/bash
#This script toggle the virtual keyboard

PID=`pidof matchbox-keyboard`
if [ ! -e $PID ]; then
killall matchbox-keyboard
else
matchbox-keyboard&
fi

Make it executable;

pi@raspberrypi ~ $ sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh

Add an item to the start menu.

pi@raspberrypi ~ $ sudo nano /usr/local/share/applications/toggle-matchbox-keyboard.desktop

Copy in this text;

[Desktop Entry]
Name=Toggle Matchbox Keyboard
Comment=Toggle Matchbox Keyboard
Exec=toggle-matchbox-keyboard.sh
Type=Application
Icon=matchbox-keyboard.png
Categories=Panel;Utility;MB
X-MB-INPUT-MECHANSIM=True

 

Uncategorized

Raspberry Pi – Increase SD Card Reliability

sudo nano /etc/default/rcS

# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
TMPTIME=0
# automatically repair with inconsistencies during boot
FSCKFIX=yes

sudo nano /etc/rc.local


...
...
fi
# automatically check filesystems every boot
touch /forcefsck
exit 0

sudo reboot

Technology

Raspberry Pie Ver 2, Touchscreen USB Problem, AT070TN90 TFT 7 HDMI Display

root@raspberrypi:/# lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen
root@raspberrypi:/#

rpi-update
apt-get install xinput-calibrator
or
wget http://adafruit-download.s3.amazonaws.com/xinput-calibrator_0.7.5-1_armhf.deb
sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb

REBOOT, touchscreen will work..

Run to callibrate..

xinput-calibrator


Calibrating EVDEV driver for "eGalax Inc. USB TouchController" id=6
current calibration values (from XInput): min_x=127, max_x=1889 and min_y=1708, max_y=242
Doing dynamic recalibration:
Setting new calibration data: 1983 68 162 1902

nano  /etc/X11/xorg.conf.d/99-calibration.conf

Section "InputClass"
Identifier    "calibration"
MatchProduct    "eGalax Inc. USB TouchController"
Option    "Calibration"    "1983 68 162 1902"
Option    "SwapAxes"    "1"
EndSection