Tag Archives: python

Help translate pastebinit

pastebinit is one of my pet projects. It’s a command line pastebin client that let you easily send any command output or file to a pastebin. It’s packaged and available in quite a few distributions.

Pastebinit started at the end of 2006 with support only for pastebin.com. Over the time, a lot of other pastebin websites have been added to end up supporting over 15 different pastebins.

I recently went through all the bugs on Launchpad, fixed most of them and I think pastebinit is now in pretty good shape. I plan on releasing version 1.2 on Friday if no major issue is found by then.

That leaves between now and Friday to have it properly translated in as many languages as possible. So please go to https://translations.launchpad.net/pastebinit and make sure your language will be included in the next release !

Posted in pastebinit, Planet Revolution-Linux, Planet Ubuntu | Tagged | 3 Comments

Want your own Edubuntu weblive ?

Since I announced Edubuntu WebLive 8000 users have been testing Edubuntu using it.

Edubuntu WebLive

After a bit of cleaning up and packaging, I’m now pleased to announce that the source code for both our Drupal plugin and the XML-RPC daemon is available on Launchpad: https://code.launchpad.net/vmmanager.

Drupal plugin


  • Provider the user interface for Weblive, like the one on: http://www.edubuntu.org/vmmanager
  • Gives a basic administration interface to enable/disable the NX servers and update all the text shown in the user interface
  • Code is PHP using the Drupal form APIs and php-xmlrpc to contact the ltsp-cluster-agent plugin

Installation is relatively trivial, just follow the README file in the branch.

ltsp-cluster-agent plugin


  • XML-RPC service (authenticated and using HTTPS) that Drupal uses to create new users
  • Database of all accounts ever created, their status and expiry time
  • Support for multiple SSH servers
  • Client to query the database (also over xml-rpc) to gather statistics or manually create/remove accounts
  • Code is python, using paramiko for SSH and storm+sqlite as ORM

Installation is straightforward as everything is packaged here: https://launchpad.net/~stgraber/+archive/experimental

ltsp-cluster-agent is a python daemon designed for use by LTSP and LTSP-Cluster. More on that in a later post.

The VM itself

For Edubuntu, our VMs are entirely automatically generated using debian-installer preseeding and KVM.
Unfortunately these scripts are not clean enough yet for me to release them, I’d expect to have them out very soon though.

The basic requirement for the VM is to have these packages installed:

  • ltsp-cluster-accountmanager (used to cleanup session leftovers)
  • freenx-server (the NX server)

We have recent versions of both in Revolution Linux‘s PPA. ltsp-cluster-accountmanager is also in the archive since karmic and I’m hoping for freenx-server to enter the archive soon.

I’d also recommend removing the following packages as they caused some issues with Edubuntu WebLive:

  • network-manager, network-manager-gnome, network-manager-pptp, network-manager-pptp-gnome
  • jockey-common, jockey-gtk
  • rtkit

As usual, comments, patches and bug reports are welcome. I’d also be happy to hear from other deployments of WebLive !

Posted in Edubuntu, LTSP, Planet Revolution-Linux, Planet Ubuntu | Tagged , | 3 Comments

sandbox 0.2 released and packaged !

Yesterday, while enjoying the snow falling outside (finally!) I went through my TODO list for sandbox and implemented most of what was on it.

Ext4 support for the copy-on-write partition

You can now have the copy-on-write stored on disk instead of RAM memory (tmpfs).
The tmpfs support is still available as an option for these who have plenty of RAM or don’t have a separate /home (due to the aufs limitation).

Nautilus extension

sandbox now has a nautilus extension which lets you start any executable binary/script directly in a sandbox.
sandbox nautilus integration

Updated GUI

The GUI is no longer showing any option by default and just “does the right thing” (in most cases).
sandbox new gui

All the options being hidden behind “Show sandbox options”.
sandbox new gui advanced

Released and packaged it

Finally, I released sandbox 0.2 (0.1 wasn’t in a packagable state) and packaged it for Ubuntu Natty Narwhal.
It’s made of 3 different packages:

  • sandbox: The command line utility and the C part.
  • sandbox-gui: The python GUI and .desktop file (Applications -> System Tools -> sandbox)
  • sandbox-nautilus: The nautilus extension, you need to restart nautilus to have it to load

The packages (for natty) can be found in my experimental PPA: https://launchpad.net/~stgraber/+archive/experimental/
and code is still available at: https://code.launchpad.net/~stgraber/+junk/sandbox

sandbox running software

For now, everything is called “sandbox” which is more of a concept than an actual project name. As it’s becoming more and more of an actual project and I’m quite bad at finding good names, I’m open for suggestions of a better name for that thing.

Update: Release 0.2.1 which auto-detect separate /home partition and fall-back to tmpfs when necessary. Packages are available for Natty (Ubuntu 11.04) and Maverick (Ubuntu 10.10).

Posted in LXC, Planet Revolution-Linux, Planet Ubuntu, Sandbox | Tagged , | Leave a comment

Sandbox gets a GUI

Last Friday at work enjoying the fact that most of the US weren’t working, I spent a few hours working on my current pet project, sandbox.

Most of the code has now been moved from the C code to a shell script, keeping only what’s really needed in C.
I also added the possibility of directly starting a command in a container (once the command ends, the container is destroyed).

On top of that, I played a bit with Glade and pygtk to implement a basic GUI on top of Sandbox as shown below:
Sandbox GUI screenshot

This is still very basic but should be a lot more user friendly than having to start the tool from the command line.

Next on the TODO list is support for saving/restoring containers and some kind of nautilus integration (Right-Click => “Run in a container” would be sweet).

As always, the code can be found in a bzr branch:
bzr get lp:~stgraber/+junk/sandbox
Or from: https://code.launchpad.net/~stgraber/+junk/sandbox

Posted in Planet Revolution-Linux, Planet Ubuntu, Sandbox | Tagged , | Leave a comment

Switched to wordpress (again)

So, after almost 3 years running Drupal 6 for my blog, I switched back to WordPress.

It just feels a lot easier to blog with it. I still really enjoy Drupal and use it for a lot of projects. It just wasn’t the best fit for my blog at this time.

My biggest issue with WordPress was its lack of official PostgreSQL support which was a bit of an issue as I’m avoiding MySQL as much as possible. After some poking at it, I actually managed to get PG4WP to work on a recent WordPress installation.

To make the transition as seamless as possible I also wrote a Python script which takes all Drupal “stories” and convert them into WordPress “posts”. It also handles categories and comments (including threading). It’s a bit hackish and could certainly be made a lot faster by reducing the number of queries.
Code can be found on Launchpad here: drupal2wordpress

So now, everything is imported in an all new WordPress instance, URLs should be mostly compatible. Now, back to blogging!

Posted in Planet Revolution-Linux, Planet Ubuntu | Tagged | 3 Comments