the permanent TODO

September 2, 2010

PulseAudio + Gnome in Debian

Filed under: Debian, tech — Tags: , , , — {Francisco,François} Varas @ 10:01 am

From the pulseaudio wiki + some googling:

$ apt-get install pulseaudio libao-common paprefs libpulse-mainloop-glib0 pulseaudio-module-jack pavucontrol alsaplayer-alsa pulseaudio-module-hal pulseaudio-module-x11 libgstreamer-plugins-base0.10-0 pulseaudio-module-lirc pulseaudio-utils pulseaudio-module-zeroconf libasound2-plugins padevchooser paman pulseaudio-module-gconf libgconfmm-2.6-1c2 libpulse-browse0 pavumeter libglademm-2.4-1c2a pulseaudio-esound-compat libpulse0 libpulse-dev

$ ln -sf /usr/local/bin/esdcompat /usr/bin/esd

Then, you launch gnome and eerything works!

links:

http://forums.debian.net/viewtopic.php?t=12497

http://pulseaudio.org/wiki/PerfectSetup#GNOME

August 7, 2010

vlmc VideoLan Movie Creator on debian

Filed under: tech — Tags: , , , , — {Francisco,François} Varas @ 11:46 pm

I have taken this information from other blogs/websites + my experiencie with debian.
how to compile vlmc on debian:
install those libraries:

libavcodec-dev
libpostproc-dev
libmpeg2-4-dev

# cd /usr/local/src
# apt-get install automake1.11
be sure that you install at least version 1.11 or you will have lots of errors and you will not be able to build.
be sure to uninstall you current vlc version
#apt-get remove vlc
install the dependencies for vlc:
#apt-get build-dep vlc
#apt-get install libtool build-essential git-core libqt4-dev qt4-qmake liblua5.1-dev libswscale-dev cmake

  • Download VLC source from GIT: git clone git://git.videolan.org/vlc.git
  • Download VLMC from GIT: git clone git://github.com/VLMC/vlmc.git

first build VLC:
#cd vlc
#./bootstrap
create a build directory to avoid messing the source code
#mkdir build
# cd build/
#../configure (I will not suggest any options here, but you should take a look)
#make && make install && make clean
#ldconfig
#cd /usr/local/src/vlmc/
#echo "LIBS = -L/usr/local/lib -lvlc" >> vlmc.pro
#cmake .
#make

references:
http://www.frenssen.be/content/install-vlmc-video-editor-ubuntu
http://wiki.videolan.org/UnixCompile
http://wiki.videolan.org/Building_VLMC

May 18, 2010

twisted web file server for ignorant cowboys

Filed under: tech — Tags: , , , — {Francisco,François} Varas @ 1:05 pm

To serve files over http, you can install Twisted

apt-get install python-twisted

To launch the web server:
twistd web –path /var/www/ –port 80

To stop the web server:
kill `cat twistd.pid` (on the same directory you launched it)

You will find complete doc at:

http://twistedmatrix.com/documents/current/web/howto/using-twistedweb.html

March 18, 2010

Enabling 6to4 with debian (now nobody will now what this post is about)

Filed under: tech — Tags: , , — {Francisco,François} Varas @ 11:08 am

ipv6 is about ten years old, and it is well and largely supported by most operating systems.
So, coming back to Debian, if you want to enable ipv6 in your machines, here’s how to:

You will need:

  • an editor (a real one, like vi)
  • ifconfig’s output
  • ipv6calc (exists as a debian package)
  • two ipv6 enabled machines

go to root, use ifconfig, read the output carefully.
let’s say your IP is 10.0.10.68
Edit /etc/network/interfaces with your favourite vi version


auto tun6to4
iface tun6to4 inet6 v4tunnel #tun6to4 can be changed by any other name
address 2002:a00:144::1 #to obtain this value, see below
netmask 16
gateway ::192.88.99.1
endpoint any
local 10.0.1.68

Calculating ipv6 address
ipv6calc --quiet --action conv6to4 10.0.1.68
this will give the the prefix, you can add a “1″ at the end, like I did. (if you want to know why: ipv6 )

If you are brave enough, try this script. It will give you your ipv4 and ipv6 IPs
8<-----------------------------------------------

#!/bin/sh
echo “your ipv4 ip is: ”
a=$(/sbin/ifconfig | grep eth. -C 2 | grep “inet addr” | sed s/[a-z,:]//g | awk -F ‘ ‘ ‘{print $1}’)
echo $a
if [ -e /usr/bin/ipv6calc ]
then
echo “your ipv6 ip is:”
printf `ipv6calc –quiet –action conv6to4 $a`”1\n”
else
echo “ipv6calc is not installed, please install it”
fi

8<-----------------------------------------------
Now do the same for the second machine, and try ssh or ping6
Good Luck!

February 15, 2010

exporting users between two debian machines

Filed under: tech — Tags: , , — {Francisco,François} Varas @ 9:00 am

I wanted to create an account in my backup machine for a good friend of mine.
As laziness is a fundamental virtue I wanted to avoid as much work as possible, including the part of calling my good friend to tell him to change the password that was random generated in the second machine.
mi first try was:
(as root)
grep <user> /etc/{passwd,shadow,group} >> user_info.text

Then, copy each line of users_info.text into the passwd, shadow and group file in /etc/ on the second unit

February 1, 2010

Installing Go with debian

Filed under: tech — Tags: , , , — {Francisco,François} Varas @ 10:50 am

I tried to install Go (Google’s programming language) this WE.
Under MAC OS X the install was clean, but under Debian I had a lot of error messages.
To avoid all that noise, you need to go to $GOROOT/src/pkg and edit the Makefile
search the NOTEST section and (respecting the identation) add:

http\
net\
syslog\

Try again and let me know if it works :)

January 25, 2010

mounting an NFS filesystem

Filed under: tech — {Francisco,François} Varas @ 9:00 am

Imagine you want to share all your music at home, avoiding annoying VoD servers. Here’s the trick:

Server: 192.168.0.11
Clients: 192.168.0.0/24 (this means: “everybody in this network”)

in the server:

  • apt-get install nfs-kernel-server
  • then edit /etc/exports
    • add the line:
    • /home/invitado/ 192.168.0.13(rw,no_root_squash)
  • exportfs -a

in the client(s):
192.168.0.11:/home/invitado /mnt/storage2 nfs nfsvers=3,intr,timeo=5 0 0
If you find weird RPC errors and are unable to mount NFS, edit /etc/default/portmap and comment the line OPTIONS=”", which makes portmap to listen locally.
If you are using nfs-user-server, avoid “nfsvers=3″ in the client conf.

January 18, 2010

dumb apache2 iptables security

Filed under: tech — Tags: , , — {Francisco,François} Varas @ 9:00 am

This is an aggressive script that will -j DROP anything that moves.

This is the regexp list (noisily named “regexp-list.ib” in my filesystem):

#file containing idiotblocker's database
w00tw00t
php.my.admin

This is the script:

for i in `grep -iv ^# regexp-list.ib`
do for a in `grep -i $i /var/log/apache2/access.log | awk -F'-' '{print $1}' |sort -n | uniq`
do echo "$a found and screwed with iptables"
iptables -A INPUT -s $a -j DROP
done
done

December 14, 2009

unmanaged network interface gnome in Debian

Filed under: tech — {Francisco,François} Varas @ 9:00 am

A few months ago (13?) I made an upgrade and ever since I had the network icon with an X over it.
After a few moths googling I give up.
This morning I was googling for pptp help and (logically) I found the answer to my previous question:
[troll]
use vi to edit the file
[/troll]
/etc/NetworkManager/nm-system-settings.conf
change:
[ifupdown]
managed=false

to:
[ifupdown]
managed=true

Then gracefully kill all nm-system-settings instances:
killall nm-system-settings

You think that was too easy?
Me too.

November 30, 2009

python socket

Filed under: tech — {Francisco,François} Varas @ 9:00 am

another quick howto, shoot-then-ask type.

i needed to send automagic answers using a telnet connection to my VoD server in order to achieve a little less shocking home Vod experience for news users, beta testers, friends.

The code can by optimized, and needs handling error exceptions.

By some obscure reason, indentation is not working. I;m sorry for this.


import sys
from telnetlib import Telnet
from time import sleep

############################
## INSTALL this in your PC #
############################

#set up your own data, see the setupify.sh script
#for additional info
serverHost = '192.168.0.13'
serverPort = 4212 #you shouldn't need the change this
serverPassword = 'videolan' + '\r\n'
serverDown = 'shutdown' + '\r\n'
serverLoad = 'load /home/<your_user>/vod-setup' + '\r\n'
data = True #don't you dare...

vlc = Telnet( serverHost, serverPort )
sleep(3) #some sleeps are made only for waisting your time
print vlc.read_very_eager()
sleep(1) #some sleeps are made to wait for the server (fine tuning)
print vlc.read_very_eager()
vlc.write(serverPassword)
sleep(1)
print vlc.read_very_eager()
print "type x to exit, l to load setup file"
while data != "x":
    data=raw_input('send to vlc: ')
    if data == 'x':
        try:
            vlc.write(serverDown)
            sleep(2)
            print vlc.read_very_eager()
            exit()
        except EOFError:
            print "connection to VoD server closed by user\nBye!"
    elif data == 'l':
        vlc.write(serverLoad)
    else:
        instruction= data + "\r\n"
        vlc.write(instruction)
        sleep(1)
        print vlc.read_very_eager()

Older Posts »

Powered by WordPress