Ubuntu 12.10 upgrade / install eclipse and ADT 
After upgrade from 12.04 to 12.10 eclips wont work anymore :-(

Only deleting ~/.eclipse and ยจ/workspace and reinstalling ADT did not work i got:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee,
phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=,
action=).
No repository found containing: osgi.bundle,com.jcraft.jsch,0.1.42
No repository found containing: ...

My solution was to reinstall eclipse:
dpkg -P eclipse eclipse-jdt eclipse-pde eclipse-platform \
eclipse-platform-data eclipse-rcp eclipse-rcp
apt-get install eclipse eclipse-jdt eclipse-pde eclipse-platform \
eclipse-platform-data eclipse-rcp eclipse-rcp
apt-get --reinstall install libequinox-osgi-java

eclipse: Help > Install New Software > Add...

juno - http://download.eclipse.org/releases/juno
ADT - https://dl-ssl.google.com/android/eclipse/

[ view entry ] ( 1511 views )   |  print article
hostap with a wifi usb stick on demand 
After plug in of a wifi usb stick linux act's as a hostap.

apt-get install isc-dhcp-server hostapd

changes in /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=MYSSID
country_code=AT
ieee80211d=1
hw_mode=g
channel=11
beacon_int=1000
dtim_period=20
ieee80211n=1
wpa=2
wpa_passphrase=MYPASSPHRASE
wpa_pairwise=TKIP CCMP

/etc/network/interfaces
iface wlan0 inet static
address 192.168.9.1
netmask 255.255.255.0
hostapd /etc/hostapd/hostapd.conf
up iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
up /etc/init.d/isc-dhcp-server restart
down iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
down killall hostapd

first check vendor and product id with lsusb:

/etc/udev/rules.d/local.rules
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="148f", ATTRS{idProduct}=="3070", \
RUN+="/sbin/ifup wlan0"
ACTION=="remove", SUBSYSTEM=="net", KERNEL=="wlan0", RUN+="/sbin/ifdown wlan0"

On booting this does not work for me so i started the hostap by

/etc/rc.local
lsusb | grep -q "148f:3070" && /sbin/ifup wlan0



[ view entry ] ( 1531 views )   |  print article
transcode a mjpeg ip cam on demand with a cgi script using ffmpeg 
To minimize bandwidth for video streaming i have to transcode mjpeg to h264.
To do this on demand ffserver is no option for me.
Therefore a small cgi script on the webserver with ffmpeg did the trick:

#!/bin/bash

echo -e "Content-type: video/avi\n"

#ffmpeg -an -analyzeduration 0 -f mjpeg -r 8 -i http://IP_CAM:PORT \
# -c:v libx264 -preset ultrafast -r 8 -threads 2 -b:v 150k -f avi - 2>/dev/null &

avconv -an -analyzeduration 0 -f mjpeg -r 8 -i http://IP_CAM:PORT \
-c:v libx264 -pre ultrafast -r 8 -threads 2 -b:v 150k -f avi - 2>/dev/null &
pid=$!
trap "kill $pid" SIGTERM SIGPIPE
wait


[ view entry ] ( 2601 views )   |  print article
port forward with iptables 
iptables -I FORWARD -i INTERFACE -p tcp --dport PORT -j ACCEPT
iptables -A PREROUTING -t nat -i INTERFACE -p tcp --dport PORT -j DNAT --to-destination LOCAL_IP


[ view entry ] ( 1305 views )   |  print article
apt-get behind a server port redirected with ssh to a proxy 
There is an apt proxy (Apt-Cacher NG), a workstation, a server and a server behind that server.
workstation> ssh -R3142:proxy:3142 server

server> ssh -R3142:127.0.0.1:3142 server_behind

server_behind> cat /etc/apt/apt.conf.d/01proxy
Acquire::http { Proxy "http://localhost:3142"; }

server_behind> apt-get update; apt-get upgrade


[ view entry ] ( 1107 views )   |  print article

<<First <Back | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Next> Last>>