

I recently bought a DCS-932L Webcam to monitor my little son. Its a really nice cam, with wlan and infrared leds. It runs on linux firmware and works great from debian as the web interface can be set to use java instead of activex.
Important links:
http://dcs-932l/docmd.htm => runs any command as root, this is useful to start telnetd but also a gaping security hole
http://dcs-932l/mjpeg.cgi => video stream
http://dcs-932l/image/jpeg.cgi => still image
For whatever reason i was unable to play the live stream in mplayer or vlc. Apparently something is wrong with the stream, however, ffmpeg comes to the rescue:
ffmpeg -f mjpeg -i http://admin:@dcs-932l/mjpeg.cgi -vcodec copy -acodec copy -f avi pipe: | mplayer -cache 40 -
This is on a Kindle 4nt version 4.0 firmware
GAIN ROOT:
connect kindle to computer
open terminal in kindle folder
"touch ENABLE_DIAGS"
reboot kindle (menu=>einstellungen=>menu=>neustart)
=> Misc individual diagnostics
=> Utilities
=> Enable USBnet
login:
SSH USBNET:
user: root
pass: mario
(thats the pwd for the diag partition)
WIFI SSH:
Kindle: mount /dev/mmcblk0p1 /mnt/base-mmc/
Kindle: cp -r /usr/local/ /mnt/base-mmc/usr/
sync
vi /mnt/base-mmc/etc/sysconfig/iptables
add :
# Kindle SSH rule
-A INPUT -i wlan0 -p tcp --dport 22 -j ACCEPT
bevore last line (COMMIT)
Kindle: reboot
SSH via WIFI:
user: root
pass: fionaxxx from http://members.ping.de/~sven/kindle.html
use Capitals in the serial or the pass will not work!
SSH-Key-Login:
Kindle: mkdir /root
Kindle: vi /etc/passwd; remove /tmp from root line
ssh-copy-id root@xxx.xxx.xxx.xxx
SSHFS:
download sftp binary: sftp-server
scp sftp-server root@xxx.xxx.xxx.xxx:/mnt/base-us/
Kindle: mkdir /usr/libexec
Kindle: mv /mnt/base-us/sftp-server /usr/libexec
HOSTNAME:
vi /etc/network/interfaces
add "hostname karls_kindle " under wlan0 line
SCREENSAVER:
mntroot rw
cd /mnt/us
mkdir /mnt/us/screensaver
mount /dev/mmcb1k0p1 /mnt/base-mmc
mv /mnt/base-mmc/opt/amazon/screen_saver/600x800 /mnt/base-mmc/opt/amazon/screen_saver/600x800.old
ln -sfn /mnt/us/screensaver /mnt/base-mmc/opt/amazon/screen_saver/600x800
Two possibilities:
CalDAV
According to https://wiki.mozilla.org/Calendar:QA_CalDAV_Support#Google_Calendar_Notes you need to replace the part “/ [ your Google Calendar email address ] /” with the Calendar ID. Your email address is the Calendar ID for the first calendar, for all other calendars take them from the calendar settings page.
iCal
just copy the iCAL link from the Calendar settings of the google calendar
(apparently did not have write access for a long time, but works for me now)
edit 2012: seems to not work properly, reverted to google provider plugin
Sometimes you get spikes in your munin data which messes up the graphs.
To remove them run this perl script remove_munin_spikes.pl on your data files and then refresh your graphs like:
sudo -u munin perl ./remove_munin_spikes.pl -dv /var/lib/munin/lan/server.lan-ntp_offset-jitter*
sudo -u munin /usr/share/munin/munin-graph --nolazy
babilen wants you to know: To get a list of packages that are not available from any repository in your sources.list:
aptitude search '?narrow(?not(?archive("^[^n][^o].*$")),?version(CURRENT))'
babilen wants you to know: To see what repository a package may have come from, try http://svn.noreply.org/svn/weaselutils/trunk/apt-listrepository , or use
dpkg -l | awk '/^.i/ {print $2}' | xargs apt-cache policy | awk '/^[a-z0-9.\-]+:/ {pkg=$1}; /\*\*\*/ {OFS="\t"; ver=$2; getline; print pkg,ver,$2,$3}'
, or ask me about , or http://people.debian.org/~dannf/apt-inventory, or , or bdo list
To list all packages you have installed from backports.debian.org:
aptitude search '?narrow(?version(CURRENT),?origin(Debian Backports))' -F'%100p'
apt must know about the origin repository for this to work (i.e. you have a ‘deb’ line for it in sources.list and ‘apt-get update’ has been run). To list all backported packages available for your system: aptitude search ‘?origin(Debian Backports)’. See also .
obsolete
If you remove a repository from your sources.list (e.g. removing ), then you should check what packages you have installed from the other repository. Synaptic and aptitude have a “Obsolete and Locally Created Packages” list. Or, “aptitude search ~o”. Note this doesn’t include packages that exist in the repo at a different version to the one you have installed; see
.
Gnome in squeeze uses nautilus to auto-mount external drives. It mounts all partitions it can recognize. There is no way to tell it to ignore specific partitions, you can only disable the automount globally. It even ignores the noauto entry in fstab….
So, my backup-disk which should only be visible during backup is getting mounted into /meda/UUID. This is not so good as it could result in accidental deletion of my backups.
The only way i could succeed in stopping gnome/nautilus mounting the disk is by setting the partition on the usb disk to FSTYPE 93.
Apparently setting the filesystem type of a partition to FSTYPE+10 is a loose convention for hiding partitions. In my case (standard Linux = 83 + 10 = 93) this results in 93 as FS type for a hidden ext3 partition. Forum Posting
so i did this:
sudo cfdisk /dev/sdh
select Type
set to 93
select Write
Voila, no automounting any more, but mounting via fstab (where you explicitly provide the filesystem type) still works.
It happened to me that something inside a VBox of mine started to go bonkers and eat all memory. After a while i could not ssh into the machine any more. So how to find out what is running wild ?
VBoxManage guestcontrol execute vboxname /bin/sh –username xxxx –password “xxxx” –wait-for stdout –arguments “-c ‘/bin/ps -eo pmem,pid,cmd | sort -b -k1,1n | pr -TW$COLUMNS’”
runs the ps command inside the virtualbox and captures stdout ! Cool !
This gives us a list of processes sorted for memory usage, then a kill -9 PID should solve the immediate problem.
This time oom-killer was faster though….
This makes the computer use s2both when suspending. Thus, when power is running out while in suspend, you can still resume from disk.
sudo aptitude install uswsusp
sudo mv /usr/sbin/pm-suspend /usr/sbin/pm-suspend.bak
sudo ln -s /usr/sbin/s2both /usr/sbin/pm-suspend
Tesseract-OCR crashed for me:
karl@probook-debian:~/Desktop/ocr$ tesseract test.tif text.txt -l deu
Tesseract Open Source OCR Engine
Page 1
tesseract: unicharset.cpp:76: const UNICHAR_ID UNICHARSET::unichar_to_id(const char*, int) const: Assertion `ids.contains(unichar_repr, length)’ failed.
Abgebrochen
Apparently its a known bug:
https://bugs.launchpad.net/ubuntu/+source/tesseract/+bug/565688
Bug was fixed in 3.0 which is not even yet in sid, so grab the debs from the bottom of the above link and then install libleptonica from testing:
sudo aptitude install -t testing libleptonica
Now install the 3.0 packages of tesseract and voila ! ocr-ing works !
If you want to convert a massive, multi-page pdf like i had to (233 pages..) use this:
#! /bin/sh
for i in {0..233}
do
echo Seite $i
convert -density 600×600 input.pdf[$i] -type grayscale -depth 8 page.tif
tesseract -l deu page.tif test
cat test.txt >> ergebnis.txt
done
this will convert only single page after page, thus not need all your ram and hdd
it sets the input density of the pdf to 600×600 cause apparently thats not always properly encoded in the pdf leading to very bad quality of the tif
it also makes a grayscale 8bit tif as needed by tesseract
To use snapshots you need free extents in your lvm setup.
pvdisplay will show free extents, if you have none you have to shrink a partition.
Boot with gparted livecd, but enter text mode only, then:
sudo fs2chk -f /dev/volumegroup/logicalvolume
note: you can find the volume group name, or logical volume name you can use vgscan and lvscan (both are located in /sbin/)
Now lets shrink the ext3 partition:
sudo resize2fs /dev/volumegroup/logicalvolume 10G
note: 10G is the NEW size that you want it to be
Once those are completed, you can finally shrink the Logical Volume (isn’t this what we wanted in the first place?), to do this do:
sudo lvreduce -L 10G /dev/volumegroup/logicalvolume