Category Archives: bash

flowblade, mirage and other python-gtk2 applications crashing in debian

version
-------
flowblade    = 1:0.12.0-dmo1
mirage       = 0.9.5.1-3
python-gtk2  = 2.24.0-4 
debian       = jessie/sid 

how to reproduce
----------------
launch on the CLI
mirage or flowblade

you will get:
-------------
"""Attempt to unlock mutex that was not locked
Aborted"""


ugly fix:
---------

search:
"gtk.gdk.threads_init"
(example vim /usr/lib/python2.7/dist-packages/mirage.py, line 74)

replace by:
gtk.gdk.threads_init()
gtk.gdk.threads_enter()


source:
-------
https://bugs.mageia.org/show_bug.cgi?id=13776

Adafruit’s TFT + raspberrypi + camera

I finally managed to have a working camera + touchscreen using a raspberry pi
All I did was assembling the hardware and some copy/paste to have a working configuration.

Youtube video of the boot

TODO
====
put this contraption and the telescope together 😉

unboxing the TFT
preparing the stuff
assembling
bad soldering
bad soldering
mounting

console on TFT

lxde on r-pi
lxde on r-pi

Sources:

to build
to make X start as youwant to
to make the camera work as you’d expect

bash inverse wildcards

If you want to ls all BUT the .sh files:


ls !(*.sh)

Example:

tatico@tortuguita:~/codigo/python/files_keeper/random_files$ ls *.sh
random_file-clean.sh  random_file_generator.sh  random_file_spread.sh
tatico@tortuguita:~/codigo/python/files_keeper/random_files$ ls !(*.sh)
file4ShdNk  filea6uHLm  fileB4sRgx  filecdQQzj  fileLYvbHv  fileo4TKHj  fileoKaCVj  fileSxbv0v  fileTlphlz  fileYLJ43w
tatico@tortuguita:~/codigo/python/files_keeper/random_files$ ls
file4ShdNk  fileB4sRgx  fileLYvbHv  fileoKaCVj  fileTlphlz  random_file-clean.sh      random_file_spread.sh
filea6uHLm  filecdQQzj  fileo4TKHj  fileSxbv0v  fileYLJ43w  random_file_generator.sh

raspberrypi + lots of external USB drives

I used two different USB hubs, one from The Pi Hut and another (sexier) one from pimoroni plugged to each of the USB ports of a rapsberry pi model B.
I was able to plug 7 500G hard drives: 3 to the 7 port USB Hub (which also powers the Raspberry Pi) and 4 to the Pi Hub. This gave me about 3.5 Gb of storage.
Don’t expect high speed data transfers 😉

    • software
      • blkid

If, for instance, you reboot the raspberry, disk may “appear” in a different order at boot, sdX1 will not be the same disk it was prior to the reboot, this will fuck mess your mount points. Use blkid to get the UUID for each device (see example). Use it as root.

      • fstab

The options defaults,user allow any user to mount the disk and gives read/write access.

    • hardware
      • Pi Hub
      • 7 port Hub
      • USB external hard drives
    • code
 blikd example:
/dev/sda1: LABEL="My Passport" UUID="EA6854D268549F5F" TYPE="ntfs"
/dev/sdb1: LABEL="My Passport" UUID="9C64D17064D14DA0" TYPE="ntfs"
/dev/sdc1: UUID="788889661CDB8DC8" TYPE="ntfs"
/dev/sdd1: LABEL="KINGSTON" UUID="423A-9647" TYPE="vfat"
/dev/sr0: LABEL="WD SmartWare" TYPE="udf"
 fstab example:

UUID=9C64D17064D14DA0 	/media/wdblack1 auto	defaults,user 	0	0
UUID=EA6854D268549F5F	/media/wdblack2	auto	defaults,user	0	0
UUID=788889661CDB8DC8	/media/wdred	auto	defaults,user	0	0

Pictures:

pi usb hub
pi usb hub
pi usb hub unboxing
pi usb hub unboxing
pi hut usb hub
pi hut usb hub

comment savoir qui est connecté sur ma freebox + bonus

Pour connaitre les IP et adresses mac des appareils qui sont connectés sur une Freebox, il suffit de faire

wget 192.168.0.254/pub/fbx_info.txt

et avec un petit coup de grep, ceux qui connaissent pourront avoir les infos précises.
Pour savoir à qui appartiens une mac adresse, voici un lien: coffer ou pour les bricoleurs, un petit script qui fais pareil: github

Bonus:

Pour avoir la playlist qui marche bien avec VLC après:

wget 192.168.0.254/freeboxtv/playlist.m3u

setting up a DNS server for my local network

root@raspberrypi-1:/home/pi# cat  /etc/powerdns/bind/home.zone
$ORIGIN home     ; base for unqualified names
$TTL 1h                 ; default time-to-live
@                       IN      SOA ns.home hostmaster.home (
                                1; serial
                                1d; refresh
                                2h; retry
                                4w; expire
                                1h; minimum time-to-live
                        )
                        IN      NS      ns
                        IN      A       192.168.1.6
ns                      IN      A       192.168.1.6
raspberrypi-1           IN      A       192.168.1.6
raspberrypi-2           IN      A       192.168.1.26
root@raspberrypi-1:/home/pi# cat /etc/powerdns/bindbackend.conf 
zone "home" {
        type master;
        file "/etc/powerdns/bind/home.zone";
        allow-update { none; };
};

Source here