Enrico Zini: Pride
http://www.linux.com/article.pl?sid=06/07/03/1744235
"Roaming Ethernet configuration with Guessnet"
Much that I bound I could not free Much that I freed returned to me (I didn't manage to transcribe the attribution)And this one for Bubulle, about translation:
When you speak to me in my language you speak to my heart when you speak to me in English you speak to my head (sb.)Incomplete list of questions I've been asked, in bogosort -n order:
I'm happy to find that we've been successful in building more and more good answers for these questions.
- How do I get support?
- Are the configuration files always the same accross different distributions?
- What is the level of interoperatibility between the various Linux distributions? And between different Unix-like systems?
- Does plug and play work well when I change hardware?
- Can I access NTFS partitions?
- How do I play multimedia files in restricted formats?
- I heard that NFS has security problems: can it be secured, or are there other file sharing alternatives?
- Can I access a desktop remotely?
- Can I install Linux on a computer where there's Windows already? Do I need to partition?
- Can I be sure to find drivers for my hardware?
$ tools/debtags smartsearch image editor Tag selection: 1) hardware::camera (44/18710) 2) works-with::image:raster (335/18710) 3) hardware::storage:dvd (27/18710) 4) special::meta (86/18710) 5) devel::debian (55/18710) 6) works-with::archive:iso9660 (44/18710) 7) use::typesetting (61/18710) 8) special::not-yet-tagged (5745/18710) 9) devel::library (3727/18710) 10) role::sw:utility (2707/18710) 11) interface::x11 (2434/18710) 12) interface::commandline (2137/18710) 13) x11::application (2040/18710) 14) role::content:data (1573/18710) 18710 packages selected so far. Your choice (+#, -#, =#, K word, View, Done, Quit, ?): +2 -9 +11 Tag selection: 1) interface::x11 (wanted) 2) works-with::image:raster (wanted) 3) devel::library (unwanted) 4) hardware::camera (10/113) 5) special::meta (1/113) 6) use::typesetting (1/113) 7) works-with::video (8/113) 8) made-of::lang:c++ (2/113) 9) suite::gnome (9/113) 10) uitoolkit::athena (9/113) 11) uitoolkit::gtk (50/113) 12) role::sw:application (41/113) 13) use::viewing (39/113) 14) role::sw:utility (33/113) 15) use::editing (30/113) 16) uitoolkit::qt (23/113) 17) suite::kde (18/113) 113 packages selected so far. Your choice (+#, -#, =#, K word, View, Done, Quit, ?): +15 Tag selection: 1) interface::x11 (wanted) 2) use::editing (wanted) 3) works-with::image:raster (wanted) 4) devel::library (unwanted) 5) hardware::camera (1/30) 6) special::meta (1/30) 7) works-with::video (3/30) 8) made-of::lang:c++ (1/30) 9) suite::gnome (2/30) 10) uitoolkit::athena (4/30) 11) x11::application (24/30) 12) role::sw:application (15/30) 13) uitoolkit::gtk (11/30) 14) uitoolkit::qt (7/30) 15) suite::gimp (6/30) 16) suite::kde (6/30) 17) x11::application (24/30) 18) role::content:data (5/30) 30 packages selected so far. Your choice (+#, -#, =#, K word, View, Done, Quit, ?): d gimp - The GNU Image Manipulation Program babygimp - An icon editor in Perl-Tk cinepaint - motion picture image painting and retouching tool cinepaint-data - data files for CinePaint digikamimageplugins - image editor plugins for digikam and showfoto kiconedit - an icon editor for KDE kchart - a chart drawing program for the KDE Office Suite gimp-data-extras - An extra set of brushes, palettes, and gradients for The GIMP scribus - Open Source Desktop Publishing xpaint - simple paint program for X puredata - realtime computer music and graphics system gimp-data - Data files for The GIMP gimp-python - Python support and plugins for The GIMP gimp-gap - The GIMP Animation Package gimp-texturize - generates large textures from a small sample gnome-iconedit - A small tool to create icons for the gnome-desktop gpaint - GNU Paint - a small, easy to use paint program for GNOME gsumi - pressure sensitive "ink" drawing gtkmorph - Digital image warp and morph (gtk) gtkmorph-example - digital image warp and morph, examples xmorph - digital image warp and morph (x11) imaptool - A tool for creating client-side image maps junior-art - Debian Jr. Art kcoloredit - a color palette editor and color picker for KDE kolourpaint - a simple paint program for KDE kimagemapeditor - HTML image map editor for KDE pixmap - A pixmap editor saods9 - image display tool for astronomy sppc - Simple Panel Plot Composer tkpaint - Versatile bitmap/pixmap editing toolThis other section is worth seeing as well: it shows the relevant tags computed for various keyword searches (I cut out the part which is always the same):
$ tools/debtags smartsearch kernel image 1) admin::boot (132/18710) 2) use::driver (108/18710) 3) admin::kernel (252/18710) 4) protocol::dhcp (24/18710) 5) role::sw:source (79/18710) 6) admin::hardware (161/18710) 7) devel::debian (55/18710) Your choice (+#, -#, =#, K word, View, Done, Quit, ?): k audio editor 1) sound::midi (33/18710) 2) works-with::music-notation (25/18710) 3) works-with::audio:wav (51/18710) 4) works-with::video:oggtheora (5/18710) 5) field::arts (21/18710) 6) sound::mixer (65/18710) 7) sound::recorder (10/18710) Your choice (+#, -#, =#, K word, View, Done, Quit, ?): k package manager 1) x11::window-manager (79/18710) 2) suite::xfce (34/18710) 3) x11::display-manager (10/18710) 4) x11::theme (82/18710) 5) works-with::software:package (110/18710) 6) suite::kde (503/18710) 7) made-of::data:icons (43/18710) Your choice (+#, -#, =#, K word, View, Done, Quit, ?): k debian package 1) suite::debian (282/18710) 2) devel::packaging (75/18710) 3) devel::debian (55/18710) 4) works-with::software:package (110/18710) 5) use::dialing (47/18710) 6) admin::user-management (114/18710) 7) hardware::modem (87/18710) Your choice (+#, -#, =#, K word, View, Done, Quit, ?): k linux kernel 1) admin::kernel (252/18710) 2) role::sw:source (79/18710) 3) use::driver (108/18710) 4) interface::svga (31/18710) 5) hardware::usb (32/18710) 6) admin::filesystem (151/18710) 7) hardware::camera (44/18710) Your choice (+#, -#, =#, K word, View, Done, Quit, ?): k gps 1) field::geography (57/18710) 2) hardware::emulation (98/18710) 3) works-with::image:vector (107/18710) 4) devel::ide (41/18710) 5) works-with::software:running (93/18710) 6) made-of::lang:ada (26/18710) 7) x11::application (2040/18710) Your choice (+#, -#, =#, K word, View, Done, Quit, ?): qThis thing is getting smart. Can't wait for this to get seriously picked up by some GUI (think adept!).
Then with vim7 I could just load files in different tabs and do everything inside vim. But sometimes I have more than one vim running anyway. Today I figured out a better way:
- Select the code using V
- :w!/tmp/foobar
- Switch to the other vim
- :r/tmp/foobar
It SO works. It'll even allow you to copy and paste block selections accross different vim instances. Of course this can also be used to copy and paste pieces of text to/from any other program that can access the X clipbpard, like X applications or the nice xclip commandline tool:
- Select the code using any of v, V, ^V
- Copy into the X clipboard: "*y
- Switch to the other vim
- "*p
Of course that is just an example: a better way to do it directly in vim is:
- (any command) xclip
- Switch to vim
- "*p
But I'm happy, for two reasons:
- :r!(any command)
Update: some kind people suggested to use the :set paste and :set nopaste trick and then do normal copy&pasting using the X terminal.
- I can copy an paste arbitrary vim things between aribtrary vims using the X selection
- Within 10 minutes I'll receive 5 e-mails telling me of even better ways of doing this.
Welcome to Benq-Siemens mobile phone support. Where do I click on this program in front of me to get the answer you need?And when I'd tell them where exactly they should click, they weren't trusting me. It must be because I wasn't using the precise words they have on screen: the interface and user manual of my phone are in Italian, and I had to translate back to English. So I later downloaded the English manual. I was saying "phone lock code" when the English manual said "phonecode". I'm impressed. So at some point I asked them: "Suppose that my phone is broken. Do you have a list of repair services near Manchester?". Turns out they don't. The Benq-Siemens support center has no list of their own repair centers, and tells you (I swear) to google for it. I'll wait to be back to Italy: I know where to go, there. Conclusion: is there a SIP-VoIP software with a "record phone call" functionality? I don't know of any so far. Some things, if you just tell them, they're hard to believe.
SQLSetStmtAttr(stm, SQL_ATTR_CURSOR_SCROLLABLE, (SQLPOINTER)SQL_NONSCROLLABLE, SQL_IS_INTEGER);But not, of course, before having set the DSN Options field to 1048576 (with the ODBCConfig tool or something similar). It wasn't too hard to find out after reading most of the MySQL driver source code. And qalculate has a nice useful built-in shift operation.
S ::= Debian grammars for Polygen
Debian Polygen grammars
;
You can find it at http://people.debian.org/~enrico/polygen-debian/ with all
the instructions on how to play.
DB-All.e is a fast, temporary, on-disk database where meteorological data can be stored, searched, retrieved and updated. To make computation easier, data is stored as physical data, that is, as measures of a variable in a specific point of space and time, rather than as a sequence of report.These are the main characteristics of DB-ALLe:
DB-ALLe has been written by me on behalf of ARPA-SIM a public agency which realises that being funded with public money also means letting the public access the result of what they do:
- it is temporary, to be used for a limited time and then be deleted.
- does not need backup, since it only contains replicated or derived data.
- write access is enabled for its users.
- it is fast for both read and for write access.
- it is based on physical principles, that is, the data it contains are defined in terms of omogeneous and consistent physical data. For example, it is impossible for two incompatible values to exist in the same point in space and time.
- it can manage fixed station and moving stations such as airplanes or ships.
- it can manage both observational and forecast data.
- it can manage data along all three dimensions in space, such as data from soundings and airplanes.
- it can work based on physical parameters or on report types.
Copyright (C) 2005,2006 ARPA-SIM <urpsim@smr.arpa.emr.it> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the LicenseOh, and they make an outstanding weather forecast, the best you can find for my region. It's so good that people even started to trust them! :)
Installing the base system. This will take a while! Copying files from host to image. Finished Something went wrong with the debootstrap installation AbortingThis basically means that the invocation of debootstrap failed to leave the system with a /bin/ls present - meaning it failed for some reason. My immediate mad debugging skillz suggest retrying with either –verbose, or –cache=no. The first will hopefully show the problem, the second will most likely fix the problem. I’ve seen this a few times, but haven’t updated the code to check for it. When creating a new Xen instance of, say 4gb, we copy all the packages from the host systems /var/cache/apt/archives so that debootstrap doesn’t redownload things and use up bandidth. If these cached files are >4gb then the new image is 100% full and debootstrap won’t run successfully! In related news I’m currently working on a system called image-server - this is a distributed xen-create-image script. The idea is that you have a central host which is responsible for creating Xen images of Debian, RedHat, Gentoo, and serving them to clients. This isn’t much use for a home user, but as a hosting company wanting to provide Xen instances of semi-arbitary Linux distributions it should come in handy. In other news I want to work on modularising the Xen tools scripts and moving them onto xen-tools.org.
#! /bin/sh WORK=" mktemp " wget -O- "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=$1&mbox=yes" > "$WORK" mutt -f "$WORK" # -e 'push D~=\n$' rm "$WORK"Now, it would be nice if it integrated with bts cache... abi on #debian-devel suggests to use:
bts show --mbox <bugid>Wow! I didn't know it existed! And indeed it integrates with bts cache :)
apt-get install scim-chewing im-switchThen, as a user:
im-switch -s scimThen log out and in again. It should work. If it doesn't, then you need to tell pango to use SCIM: right click wherever you have the cursor, choose "Input method" and then "SCIM". There! It works! ^^d ^^Y
apt-get install linux-image-2.6-xen-686 xen-hypervisor-3.0-i386 xen-utils-3.0 xen-toolsxen-tools tries to recommend xen, which is old and has been requested to be removed from the archive. The recommends needs to be ignored, which is not that trivial to do with aptitude. The linux-image doesn't happen to have an initrd. The bug has already been reported. One can recreate one using:
mkinitrd -o/boot/initrd-2.6.16-2-xen-686.img 2.6.16-2-xen-686Then one adds this to /boot/grub/menu.lst:
title Xen root (hd0,0) kernel /boot/xen-3.0-i386.gz module /boot/vmlinuz-2.6.16-2-xen-686 root=/dev/hda1 module /boot/initrd.img-2.6.16-2-xen-smpAnd it boots lovely:
# xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 939 2 r----- 4677.9Now xen-tools provides xen-create-image. I'll try to create the Dapper image (deboostrap in my system has already been changed to be able to install dapper):
xen-create-image --size=4G --swap=128M --dhcp --volume=marvin \
--hostname=cavazza --dist=dapper --fs=xfs
But I get:
[...] Creating swapfile : /dev/marvin/cavazza-swap Done Creating disk image: /dev/marvin/cavazza-root Done Creating xfs filesystem Done Installing the base system. This will take a while! Copying files from host to image. Finished Something went wrong with the debootstrap installation AbortingI love detailed error messages. This one is not. So I'll have to do by hand. The documentation says:
Before you can start an additional domain, you must create a configuration file. We provide two example files which you can use as a starting point:But in Debian there's no trace of the two example files. I've reported to Guido Trotter. Then I googled for the two files and found them. Now, on to adapt Dapper to run under Xen. The good Ubuntu wiki has an HOWTO which crudely makes you install the Tarballed Pre-built installations of Xen 3.0. It's sad that xen-enabled kernels didn't make it into Dapper roper. I can make this:
- /etc/xen/xmexample1 is a simple template configuration file for describing a single VM.
- /etc/xen/xmexample2 file is a template description that is intended to be reused for multiple virtual machines. Setting the value of the vmid variable on the xm command line fills in parts of this template.
kernel = "/boot/vmlinuz-xen-domu" memory = 128 name = "Dapper" disk = [ 'phy:marvin/dapper,hda1,w' ] dhcp="dhcp" root = "/dev/hda1 ro"I used the pre-built kernel as a domU, but:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)Sigh. I'll try with the Debian Xen-enabled kernels. Installing yaird and linux-image-2.6.16-2-xen-686_2.6.16-14_i386.deb and linux-modules-2.6.16-2-xen-686. It WORKS! Now, that's not Dapper: that's a debootstrap install of it. No user, no root password, no desktop, no shiny Ubuntu custom config. How to finish the installation? No idea. In the past, I could run base-config, but now it doesn't exist anymore. It seems that the best bet is not to use debootstrap, but to install the CD in the LVM partition using QEMU and then chroot into it and then install the debian xen kernel to boot it. A QEMU install will take ages, and I expect some trouble, like getting partman to see LVM. Maybe I better install on a disk image file and then use tar and netcat to bring the ubuntu installation out of the disk image and into the LVM image. For today, I didn't make it. This job slips another day. Frustration. I hope that at least this description of my efforts so far can be helpful to someone trying similar things. One suggestion I got was to boot the Dapper CD and install from there. I can't: this computer has no bootable CD. Update: I found out http://xensource.com/summerofcode.html and it says:
Project Idea 3: Xen Desktop Outside of Domain 0 This project would deliver a Xen desktop to the user of a client system that presents an abstraction of a virtual desktop to the user in which multiple guests share the virtual desktop, each with a subset of the desktop resources (pixels, etc). Smart management of the sound drivers would allow mixing of sound from multiple guests to the single device used for output. Microphone input could be broadcast to all guests. Technologies such as ALSA already emulate playback settings by downsampling for the hardware etc. so its not hard to imagine a xen-snd-front device munging the data to a common format used for the internal sound card. Issues: synchronization of playback.So, what I'm trying to do has been proposed as a SoC project and (I guess) is something that can't be done overnight. Although I was planning to run a diskless gdm accessed with XDMCMP from domain0's X server, and to just hand out the audio card to the domU using pciback, so my task would have been easier. Thus I give up using Xen for this one. I'll work around the lack-of-bootable-cd limitation of this computer by installing Ubuntu using QEMU. Which I found out requires using the "Alternate install" CD. The desktop install CD is a live CD installing with Ubuntu Expresso, and the live CD doesn't seem to work in QEMU. Or, I'll install in a LVM partition in the laptop and then move it around using the network. This one's probably faster. Could this experience be an interesting use case for Edgy Eft?
Many people had asked me the notes for the "Advanced ways of wasting time" talk: they're finally online, translated and with the links pointing to English Wikipedia pages. Sorry it took me so long.
pbuilder create --debootstrap debootstrap --debootstrapopts --keyring=/etc/apt/trusted.gpgThis tells pbuilder to tell debootstrap to check packages using the default apt keyring. In turn, debootstrap will install the keyring in /etc/apt/ in the chroot, and so that the rest of the apt-installing done inside the chroot will verify the packages. Note that I also had to force pbuilder to use debootstrap instead of cdebootstrap, because cdebootstrap doesn't support --keyring. Also, --keyring is not (yet) documented in debootstrap's manpage, although you can find it in debootstrap --help. Note: I put this tip on the Debian Wiki at: http://wiki.debian.org/SecurePbuilder, and that version may in the future become more up to date that this blog entry. Note: pbuilder will still install untrusted packages, although it will warn about it. Check your pbuilder output!
wget -q -O- http://www.hermann-uwe.de/files/debian_packages_release_names.txt \ sed 's/^.\+ \* //' dadadodo - wget -q -O- http://www.hermann-uwe.de/files/debian_packages_release_names.txt \ sed 's/"//g' sed 's/^.\+ \* //' tr '[A-Z]' '[a-z]' dadadodo - # For ~/.bash_profile, instead of fortune sed 's/"//g' debian_packages_release_names.txt sed 's/^.\+ \* The //' \ sed 's/[Rr]elease[.!]\?$//' bogosort -n head -1 # Or directly create a fortune database wget -q -O- http://www.hermann-uwe.de/files/debian_packages_release_names.txt \ sed 's/"//g' debian_packages_release_names.txt sed 's/^.\+ \* The //' \ sed 's/[Rr]elease[.!]\?$//' sed 's/$/\n%/' > release-names strfile release-names fortune release-namesHappyness.
#!/usr/bin/ruby
# pkgsizestat - Display the installed size of packages in a filesystem
#
# Copyright (C) 2006 Enrico Zini <enrico@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Display the installed size of packages in the given filesystem
# Defaults to /usr if non specified
#
# Usually used as "./pkgsizestat /usr sort -nr less" to see what packages
# are filling up your /usr partition
dev = File.stat(ARGV[0] "/usr").dev
def pkgsize(name, dev)
size = 0
IO.foreach(name) line
begin
st = File.stat(line.chomp)
if (st.file? && st.dev == dev)
size += st.size
end
rescue
end
return size
end
Dir.glob("/var/lib/dpkg/info/*.list").each file
puts "%d %s" % [pkgsize(file, dev), file.gsub(/.+?\/([^\/]+)\.list/, '\1')]
Neat little useful ruby script.
Ruby is nice in making scripts short clean and compact. Now I need a shorter
version of the GPL :)
Update: Florian Ragwitz suggests to use dpigs(1) from debian-goodies
instead. What my script does that dpigs doesn't do, however, is counting
only those files provided by the packages that reside in the given partition.
I could for example use my script to see what's filling up the root ('/')
partition when /usr is mounted elsewhere, and I find out that the top package
is not openclipart-svg, but linux-image-2.6.15-1-686.
Update: htom sent an updated version to sum all sizes and show only up to a
certain size:
dev = File.stat(ARGV[0] "/usr").dev
def pkgsize(name, dev)
size = 0
IO.foreach(name) line
begin
st = File.stat(line.chomp)
if (st.file? && st.dev == dev)
size += st.size
end
rescue
end
return size
end
pkgs =
Dir.glob("/var/lib/dpkg/info/*.list").each file
pkgs[pkgsize(file, dev)] = file.gsub(/.+?\/([^\/]+)\.list/, '\1')
pkgs = pkgs.sort
pkgs.reverse!
to_size = 1024**3 # show up to 1 GB
size = 0
pkgs.each do a
size += a[0]
puts "%d %d %s" % [a[0], size, a[1]]
break if size >= to_size
end
Ralph Amissah posted a different variant:
# [License part omitted]
dev=File.stat(ARGV[0] "/usr").dev
def pkgsize(name, dev)
size=0
IO.foreach(name) do line
begin
st=File.stat(line.chomp)
if (st.file? && st.dev == dev)
size += st.size
end
rescue
end
end
return size
end
def space(file,dev)
"%d %s" % [pkgsize(file,dev),file.gsub(/.+?\/([^\/]+)\.list/,'\1')]
end
@used=Array.new
Dir.glob("/var/lib/dpkg/info/*.list").sort.each do file
x=Array.new
x << space(file,dev).split(/\s+/)
p [x[0][0].to_i,x[0][1]]
@used << [x[0][0].to_i,x[0][1]]
end
#p @used.sort.each x p x
@used.sort.each x puts "# x[0] # x[1] "
#redirect to file?
Thank you everyone for the nice feedback!
I found that with my projects, when someone posted a mail about a problem I would work maybe some days to find a solution, and just post the solution at the end. However, now I realised it's more costructive to have the problem-solving process itself happen online. This way, instead of keeping people waiting in silence for a few days they can get quicker feedback and extra informations, and they also have a chance to participate to solving the problem before I manage to. For example, when I have to interrupt to go home or sleep, someone else can pick it up and do another step. Plus, the entire problem-solving process remains documented, which will provide more written information for future readers.This note was from a few months ago; however, I still fail to do it. Bad habits are sometimes hard to change. Please kick me about it :)
Next.