This is my [Debian](http://debian.org/) page. Since March 2009, I'm running [Debian squeeze](http://www.debian.org/releases/squeeze/) on my main workstation. Since March 2010, I'm running Debian squeeze on my [[Dell Latitude 2100]] netbook. Since June 2010, I'm running Debian squeeze on my Dell Latitude D520. [[!toc levels=2]] ## 6to4 init script Here is a script I wrote for a Debian-style `/etc/init.d` that configures a [[!wikipedia 6to4]] IPv6 tunnel. * Dependencies: * [[!debpkg iproute]] * [[!debpkg moreutils]] * [[!debpkg perl]] * [[!debpkg curl]] ## irssi-notify This script is based on (linked from ). It makes notifications on your desktop when you get messages in irssi. I fixed the link handling, added comments to the sed script, and used portable character classes in the regular expressions. [[!format bash """ #!/bin/bash # Run this script in the background from the machine you want # notifications to appear on: irssi-notify & # Load the script fnotify.pl in irssi. ssh -f irssi-server "tail --lines=10 $HOME/.irssi/fnotify; > $HOME/.irssi/fnotify; tail --follow $HOME/.irssi/fnotify" | sed --regexp-extended --unbuffered " s/(.)&/\1\&/g; # replace characters with HTML entities s//\>/g; s%(#[[:alpha:]]+ )<([^>]{0,10})>%\1\2 %g # bold the channel s%(https?://[^ ]+)%\1%g; # make clickable links s%([\w+-]+@[^ ]+\.[[:alpha:]]{1,3})%\1%g;" | while read heading message do notify-send --category=im.received --expire-time 5000 --icon /usr/share/openclipart/png/computer/icons/flat-theme/applications/ksirc.png -- "${heading}" "${message}" done """]] Dependencies: * [fnotify.pl](http://kenyonralph.com/fnotify.pl) * [[!debpkg libnotify-bin]] for notify-send * [[!debpkg openclipart-png]] for the icon ## debconf Make it so all questions are asked: `sudo dpkg-reconfigure debconf` and answer lowest priority. ## disable console beep [[!format sh """ modprobe -r pcspkr echo blacklist pcspkr >> /etc/modprobe.d/blacklist.conf """]] Set 'bell-style' to 'none' in `/etc/inputrc`. `setterm -blength 0` ### See also * [Removing annoying console beeps](http://www.debian-administration.org/articles/110) ## Rebuilding Debian packages This is just my local, condensed version of [Raphaël Hertzog's](http://raphaelhertzog.com/) article [Howto to rebuild Debian packages](http://raphaelhertzog.com/2010/12/15/howto-to-rebuild-debian-packages/). 1. `apt-get source ntp` 1. `sudo apt-get build-dep ntp` 1. Make changes to package (or not), `dch --local foo` to record a changelog entry and increase the version. 1. `debuild` 1. `dput local whatever.changes` or just install the resulting deb with `gdebi`. ## Local Debian package repository Here is how I created a local Debian package repository, also called an archive, using [[!debpkg mini-dinstall]]. ### ~/.mini-dinstall.conf [DEFAULT] architectures = all, amd64 archivedir = ~/repo archive_style = flat generate_release = 1 release_signscript = ~/bin/sign-release.sh [squeeze] alias = stable Run `mini-dinstall --batch` to initialize the repository. ### ~/bin/sign-release.sh [[!format bash """ #!/bin/bash # -*- coding: utf-8 -*- # Based on Sample script to GPG sign Release files # Copyright © 2002 Colin Walters # License: GPLv2 set -e KEYID=0xc9b912d5 rm -f Release.gpg.tmp gpg --default-key "$KEYID" --detach-sign -o Release.gpg.tmp "$1" mv Release.gpg.tmp Release.gpg """]] Now `gpg --armor --export 0xc9b912d5 | sudo apt-key add -` to get APT to trust the local repository. ### ~/.dput.cf [local] method = local run_dinstall = 0 post_upload_command = mini-dinstall --batch incoming = ~/repo/mini-dinstall/incoming Run `dput local pkg.changes` to upload the package to the repository. ### ~/.devscripts [[!format bash """ DEBUILD_DPKG_BUILDPACKAGE_OPTS="-k0xC9B912D5 -sa" DSCVERIFY_KEYRINGS="~/.gnupg/pubring.gpg" """]] ### sources.list entries deb file:///home/kenyon/repo squeeze/ deb-src file:///home/kenyon/repo squeeze/ Now after a `sudo aptitude update` you should be able to install packages from the local repository. ### References * manual pages and `/usr/share/doc` (read with `debmany` from [[!debpkg debian-goodies]]: sources.list, mini-dinstall, dput * * * ## External links * [[!tag Debian Linux]]