Tag Archives: techtalk-pse

TechTalk PSE fork with markdown support

Matthew Astley just emailed me to say he has forked TechTalk and added support for markdown (the wiki-ish markup language).

Leave a comment

Filed under Uncategorized

Tech Talk PSE 1.1.0

Tech Talk — the superior technical presentation software — is back!

(Not surprisingly this coincides with me doing a presentation at FOSDEM this weekend …)

The new version has been rebuilt around WebKit (all the work for this was done by Dan Berrange). Mozilla were never really serious about “MozEmbed”, and in practice it crashed all the time. WebKit (or KHTML as we like to call it) is built from the ground up for embedding and it is rock solid, so it was just better to switch.

Also in this development version is support for VTE, which is a simpler way to display terminal output. Any shell script called *.term is rendered in a built-in VTE terminal emulator. You can still use *.sh for shell scripts that you want to run during your presentation (eg. for using your own terminal, or just running arbitrary programs).

Tech Talk PSE is available from git or in Fedora Rawhide.

Leave a comment

Filed under Uncategorized

Tech Talk PSE 1.0.0 released

Tech Talk PSE home page and downloads

Tech Talk PSE is technical demonstration software which doesn’t suck. It uses Mozilla’s rendering engine to display slides, so it’s easy to use (just write HTML) and powerful. And you can intersperse your talk with shell scripts to run demonstrations.

New in version 1.0.0 is a menu that lets you jump straight to different parts of your talk and take screenshots:

Here is a talk I gave at GLLUG using Tech Talk PSE.

I think that Tech Talk PSE may be one of the best programs I’ve ever written. Let’s compare it to “OpenOffice Impress”:

  OpenOffice Tech Talk PSE
Open source Yes Yes
Play videos Yes Yes
Open a shell during a talk No Yes
Use your own editor No Yes
Induces RSI during use Mouse-controlled Keyboard-controlled
Lines of code 109 (approx) 850
Comes in Platinum edition No Yes

It’s better than OpenOffice on any measure. Yet even if you include all the autoconf, documentation and examples, it’s only 1 kLoC and was written over 3 days in my spare time. For giving technical demonstrations, it’s totally “Right”, where OpenOffice is basically “Wrong”.


Filed under Uncategorized

Dear Lazyweb, how do I put buttons in a Gtk Menubar?

Tech Talk PSE needs a better menu bar:

| [Next slide] [Prev slide]  ...  [ V More Options ] |
+---------------------------------|                |-+
                                  | First slide    |
                                  | Last slide     |
                                  | Slides       > |
                                  |                |
                                  | Quit           |

But how do you do this? It seems like either I want to put a regular button into a GtkMenuBar, or else put a drop-down menu button into the GtkButtonBox that we currently use to hold the next/prev buttons.

I can’t make either of these work …


Filed under Uncategorized

Every time you use Powerpoint Edward Tufte kills a kitten

To avoid any unnecessary kitten killing, use Tech Talk PSE instead.

(from BoingBoing)

1 Comment

Filed under Uncategorized

GLLUG talk on libguestfs (18th March 2010)

Back in 2008 we faced a pressing problem with virtualization. How do we look at what’s going on inside a virtual machine?

Let’s step back: what is a virtual machine? In nuts and bolts terms, it’s a big file or partition containing a disk image, and when it’s running, it’s a complicated emulation of CPUs, memory, and virtual devices like network cards. It’s interesting and necessary to be able to look inside all of those things. (“How many packets are coming out of the virtual network card?” “How is the virtual CPU coping with the load?”). But for the purpose of this talk I’m just going to talk about looking inside that disk image.

That large (multi-gigabyte) disk image file has a rich internal structure: a Master Boot Record; a boot partition; LVM, which has its own internal structures. Then it contains filesystems and those contain directories and files and more besides.

What might we want to do with the disk image if we could look inside it at this rich internal structure? Clone the machine, changing a few config files like the hostname. Edit grub.conf in a VM which isn’t booting. Audit a VM to find out what licensed software is installed. Is the VM running out of disk space? Offline resizing or backups. Make a new virtual machine from scratch …

In 2008 (and now) you could look inside the disk image. First of all you’d need to be root. Then you could run a command line tool called kpartx which splits the disk image partitions into device mapper devices (this is why you need to be root). These are actually global devices on your host, visible to everyone. If you’re lucky, LVM on the host might find the volume groups located in the disk image, but you might have to adjust the global host LVM configuration to get that to work. If you’re unlucky, those could conflict with volume groups already in your host.

So if you are root, you should usually be able to mount a guest disk in the host. If your program crashes, of course, it will leave unattached device mapper devices, loopback devices and mount points on the host system.

It’s not clear from a security point of view if mounting untrusted guest devices on the host as root is a good idea.

That said, kpartx is a useful tool if: you are already root on the host, you just want to mount a partition, it’s ad hoc (no scripting), you can clean up if you make a mistake, and if you can trust the guests.

So we considered how we could improve this process and provide more features.

You shouldn’t need to be root: If you have a word-processor document, you don’t need to be root to edit that document. If you have a JPEG file, you don’t need to run GIMP as root to crop it. So why are disk image files any different? You should be able to modify disk images from CGI scripts, or from shell scripts. You shouldn’t have to clean up after it. There should be no gotchas or corner cases where it doesn’t work.

What is libguestfs? An API for creating, accessing, manipulating and modifying filesystems and disk images. Access from many different programming languages, or the command line. A set of useful tools. And applications built on top.

Today is going to be mainly a demonstration of what can be done with libguestfs and the tools we’ve built around this.

[Demonstration of guestfish]

“Guestfish” is the “guest filesystem interactive shell”, and you can just run it on any disk image you happen to find. You don’t need to be root, unless you need root to access that particular image. In this case, the image is just a local file so I don’t need root.

$ guestfish -a disk.img
><fs> run

You can see this image is a Linux virtual machine of some sort.

><fs> cat /etc/fstab
[the fstab from an unidentified Linux machine is shown ...]

We can use the “cat” command to look for some identification:

><fs> cat /etc/motd
><fs> cat /etc/redhat-release
><fs> cat /etc/debian_version
[this shows that it is a Fedora 12 VM]

We can also edit files. For example, we can edit the /etc/issue file to change the console login message:

><fs> vi /etc/issue

Guestfish is the shell-scripting interface to the libguestfs API. It exposes the entire API, and as you can see that’s quite large:

><fs> help

(The full list of commands is here in the manpage).

Since the API is quite daunting, we do offer an overview of the whole API in the man page. So I won’t go through that here.

[Demonstration of using the API from Perl and Python]

This is the Perl example. Notice the use of the Augeas configuration API to pull out the list of NTP servers:

#!/usr/bin/perl -w

use strict;

use Sys::Guestfs;

my $g = Sys::Guestfs->new ();
$g->add_drive_ro ("disk.img");
$g->launch ();

my @logvols = $g->lvs ();
print "logical volumes: ", join (", ", @logvols), "\n\n";

$g->mount_ro ("/dev/vg_f12x32/lv_root", "/");
print "----- ISSUE file: -----\n";
print ($g->cat ("/etc/issue"));
print "----- end of ISSUE file -----\n\n";

# Use Augeas to list the NTP servers.
$g->aug_init ("/", 16);
my @nodes = $g->aug_match ("/files/etc/ntp.conf/server");
my @ntp_servers = map { $g->aug_get ($_) } @nodes;
print "NTP servers: ", join (", ", @ntp_servers), "\n\n";

This was the Python example:


import guestfs
g = guestfs.GuestFS ()
g.add_drive_ro ("disk.img")
g.launch ()

parts = g.list_partitions ()
print "disk partitions: %s" % (", ".join (parts))

[Demonstration of guestfish on a Fedora live CD]

We show unpacking a Fedora live CD, as shown before on this blog.

[Demonstration of virt-df]

You can see examples of virt-df output similar to what was demonstrated in the talk.

[Demonstration of virt-inspector]

We demonstrated virt-inspector. You can see earlier examples from this blog here and here.

[Demonstration of virt-win-reg]

You can see examples of using virt-win-reg on this blog. The infamous Windows Registry sucks posting.

[Demonstration of guestmount]

On this blog, FUSE support for libguestfs and some screenshots showing a Debian guest being mounted on the host.

[Demonstration of guestmount and hivexsh]

An example of using hivexsh can be found earlier on this blog.

This was the first talk given using Tech Talk PSE. You can download Tech Talk PSE from the git repository.


Filed under Uncategorized

Tech Talk PSE, now a bit usable

You can run arbitrary commands, shells, editors etc during your presentation. Here, I run a gnome-terminal with a prepopulated command history:

Download it from my git repository. The requirements are fairly light: perl, perl-Gtk2 and perl-Gtk2-MozEmbed (all in Fedora).

Previous angry rant about presentation software.

The diagram in the first slide was done using PGF and Tikz 2.00 (examples) (manual).


Filed under Uncategorized

Presentation software sucks – introducing …

How many dull presentations have you been to where the presenter simply reads bullet points off slides?

FrobSoft Express 2.0 is:

  • up to 5% faster
  • supports Windows
  • XML enabled!

I’m giving a talk about libguestfs on 18th March and I hate reading out slides to people as much as I hate listening to presenters reading out slides to me. In every talk I’ve given in the last few years I have tried to keep my notes separate (written on paper in front of me, or memorized) from what is on the slides. Presentation software, such as the mighty, all-pervasive OpenOffice, doesn’t make this easy. Nor does it make it easy to demonstrate software in the middle of your talk. You end up having to switch away to another virtual desktop, where (hopefully) you’ve remembered to set up some xterms “su”‘d to root and “cd”‘d into the right directory. I usually need several virtual desktops set up like this so I can demonstrate different parts of the software, so I’m standing in front of an audience using [Alt][←] and [Alt][→] while I hastily try to remember which virtual desktop has the next stage of the talk.


Introducing “Tech Talk”. Actually, Tech Talk is too generic in Google, so we brainstormed adding extra words on the end until it became unique: Introducing “Tech Talk Platinum Supreme Edition!” (Tech Talk PSE).

The concept is simple. You create a directory and drop a mixture of HTML files and shell scripts in there:

$ ls
$ techtalk-pse

When Tech Talk PSE runs, it sorts the files numerically, and then displays the HTML ones (using Mozilla embedding) as slides and runs the shell script ones. Next and previous keys move through the slides, ensuring that your demonstrations [the shell scripts] run automatically at the right place in the talk.

Only files matching ^\d+(-.*)\.(html|sh)$ are considered, everything else is ignored. So you can style your HTML using stylesheets, include READMEs and Makefiles, and move common shell functionality into sourced shell files:

#!/bin/bash -
# Source common functions and variables.
source functions
# Pre-populate the shell history.
guestfish -a vm.img
# Open gnome-terminal.
exec $TERMINAL --geometry=+100+100

Tech Talk PSE itself doesn’t have to deal with rendering, which is pushed off to a browser, making it far more flexible, powerful and simpler than existing presentation software. This means you can show figures or play video in your presentation, or use Javascript to make your slides resolution-independent or to add animations. Additionally you can use any existing tool you want to write HTML. (If you’re like me, that tool will be emacs.)

You’ll be able to download Tech Talk PSE after my talk in two weeks time, or get early previews from my git repository. Requirements are Perl, Perl Gtk2 and Gtk2::MozEmbed.


Filed under Uncategorized