Network proxy using privoxy and tor
Network proxies can be useful. Maybe you want private browsing or proxied IM connections. Maybe you'd like to filter ads for your entire LAN including browsers without adblock support. All this and more can be accomplished using privoxy and
tor.
On Debian based systems: apt-get install privoxy tor
Take a look at /etc/privoxy/config - you need to set a listen address for you LAN and/or your ip in place of domain.org for remote access. You may want to adjust email address and hostname also. Here's a sample config file.
For additional privacy, we can forward connections from privoxy to tor. Add this line to the privoxy config file (be sure to include the trailing . ):
forward-socks4a / 127.0.0.1:9050 .
It's already been added at bottom in the sample privoxy file. This assumes you set tor to run on localhost port 9050 - which is the default. Restart privoxy after making any changes:
/etc/init.d/privoxy restart
Point any program on the LAN (or outside network if enabled) to the ip/domain and port privoxy runs on, http proxy. In the provided example this is:
192.168.0.1:8118 or for remote access domain.org:8118 (obviously you'll need to adjust domain.org to your ip)
lire - fun generating syslog reports
Posted by Sharar Ravitz in Linux, Lire, System Log Reports on Monday, October 6, 2008
lire is a groovy little tool for generating html or text reports from syslogs. Debian users can: apt-get install lire
to list log types lire handles:
lr_log2report --help dlf-converters
generate a html report from apache logs:
lr_log2report --output html combined /var/log/apache2/access.log apache_report
generate a txt report from apache logs:
lr_log2report combined /var/log/apache2/access.log apache_report.txt
generate a html syslog report:
lr_log2report --output html syslog /var/log/syslog syslog_report
rip last.fm streams to mp3's

lastlonger is a groovy little program. It's a command line last.fm player that also rips streams to a specified directory creating nice, separate mp3 files of each track played. Grab it at the link above.
Here's a dependency list (to save time):
perl splay libid3-3.8.3c2a libterm-readpassword-perl libdigest-md5-file-perl libmd5-perl libcompress-raw-zlib-perl libcompress-zlib-perl libio-compress-base-perl libio-compress-zlib-perl libmp3-info-perl libmp3-tag-perl libunicode-string-perl libansicolor-perl or perl-modules libterm-readkey-perl libterm-readpassword-perl
Compiling and installing Nouveau
Posted by Sharar Ravitz in Linux, Nouveau driver on Friday, July 25, 2008
This began as an effort to purge all non-free blobs from my machine. In that quest I found an interesting program: vrms. From the wikipedia: "vrms (Virtual Richard M. Stallman) is a program that analyzes the set of currently-installed packages on a Debian-based system, and reports all of the packages from the non-free tree which are currently installed. Software gets placed in the non-free tree when it is agreed not to be too problematic for Debian to distribute but does not meet the Debian Free Software Guidelines and therefore cannot be included in their official distribution. For each program from 'non-free' installed, vrms displays an explanation of why it is non-free, if one is available."
Neat.
This mostly follows instructions found on the nouveau wiki page.
Install dependencies:
sudo apt-get install libsdl1.2-dev xorg-dev libdrm-dev git git-core libtool mesa-common-dev automake autoconf
grab the drm source:
git clone git://anongit.freedesktop.org/git/mesa/drm/
and the driver:
git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/
I placed these in the /usr/src directory. cd into drm.
./autogen.sh --prefix=/usr/
./configure --prefix=/usr/
make LINUXDIR=/path/to/kernel-headers
sudo make install
then cd into the linux-core directory.
make nouveau.o
then I made sym links for the modules (which only worked if I first cd into /lib/modules/`uname -r`/kernel/drivers/char/drm directory):
ln -s /usr/src/drm/linux-source/drm.ko drm.ko
ln -s /usr/src/drm/linux-source/nouveau.ko nouveau.ko
cd out of that directory and into xf86-video-nouveau
./autogen.sh
make
cp src/.libs/nouveau_drv.so /usr/lib/xorg/modules/drivers
depmod -ae
Final task is editing xorg.conf - This configuration worked for me:
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules/"
EndSection
Section "Device"
Identifier "Configured Video Device"
Driver "nouveau"
Option "Randr12"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
EndSection
If you have troubles compiling, specifically a complaint of "Module.symver is missing; modules will have no dependencies and modversions" - cd in to your /usr/src/linux dir and run:
make prepare scripts
After a day of pulling out hairs and tweaking - It works! Now I think I'll boldly test Gallium3D.
Update - galluim 3d works for me with openarena! I built using the instruction from the link above - and fired up openarea for a successful test. It actually ran the game - too fast. Here's some screenshots from a few other games I tried - supertux, freetennis, and netpanzer.


Setting up postgresql for Amarok in Ubuntu
Posted by Sharar Ravitz in Amarok, Linux, Postqresql on Wednesday, February 6, 2008
First we need to install postgresql:
sudo aptitude install postgresql
Then change the default password for the postgres user - replace password with your password:
Now we add a user *in this example username should be your system username - setting up non system users requires additional steps*:
sudo -u postgres createuser -D -A -P username
you will be promted to enter a password for the user
Then create a database for amarok *replace username with your sytem user name as above*:
sudo -u postgres createdb -O username amarok
Finally we configure amarok to use the database. If you are running amarok for the first time enter settings then using the username/password and amarok database just created. Set hostname to "localhost" and port to "5432". Otherwise from amarok goto settings, configure amarok, collection