Planet Larry

May 31, 2008

Steven Oliver

Bye bitch…x ;)


That ellipses was a comedic pause. You may laugh.

Anyway, I got rid of BitchX. While I was glad that I tried it, this client called Irssi is much better. It was one of those feelings where the program just feels crappy. Irssi doesn’t feel like that yet, but we’ll see. And if you need any help simply follow this guide. Worked for me. Irssi appears to rememer commands on its own which is nice, but I’d like to edit some conf or script files. Haven’t looked for them yet, but I’ll see later

Enjoy the Penguins!

May 31, 2008 01:51 AM :: West Virginia, USA  

May 30, 2008

Jürgen Geuter

Feature uniformity in open source and opinionated software

In open source software there's a trend towards feature uniformity. Let me explain what I mean:

When for example Mediaplayer_A gets a new "killer feature" (like for example sharing of music over the net as we have it with DAAP) it does not take long till libraries emerge that implement the functionality and all the other media players integrate it, too, often most of them relying on one library (like for example libgpod for Ipod access). If there was no easy library to include to get the feature with "little" work probably way less projects would integrate it (cause reverse engineering is a whole lotta work). That is what we see in closed source software from time to time where one has that killer feature the others don't seem to be able to pull off.

Now one could say that this makes it boring (as uniformity often does) and that it spawns more of same-old, which is a valid concern. As long as the developers don't have a clear "vision" where they wanna go with their software it will spawn an army of clones, all pretty much the same thing (maybe implemented in different languages/toolkits).

I argue that it gives developers more possibility to be "opinionated". There's not the need to throw countless development hours at things that other people had already done or at reverse-engineering some kind of protocol. This frees up resources to actually invent and do things in new ways.

These new ways might scare some of your users away cause they don't like the new way but that's a sacrifice you'll have to make to write the best possible software. Staying similar to everyone might bring more people in (as in "Oh it's amarok in Python? Cool!") but creating something new and exciting is the way to push things forward.

Fighting uniformity while on the other hand profiteering from it is a tough line to walk, it's a very narrow path between being a clone and going the whole NIH-way both of which make your software of little use to the community. But it's an awesome opportunity to actually challenge the abstractions and representations that we thing are "god-given". It's a way to rethink human-interface-design because you know that many of the basic features are actually already covered.

The fact that open source gives you a large box of blocks to play with is what makes it so interesting. You just have to make the step to actually challenge the things that be.

May 30, 2008 10:59 AM :: Germany  

May 29, 2008

Zeth

SFTP in Python: Really Simple SSH

ssh.py provides three common SSH operations, get, put and execute. It is a high-level abstraction upon Paramiko.

I wrote it yesterday for my own needs, so it is still very much in the beta stage. Any improvements or comments gratefully accepted.

In short, it works as follows:

import ssh
s = ssh.Connection('example.com')
s.put('hello.txt')
s.get('goodbye.txt')
s.execute('du -h --max-depth=0')
s.close()

That is it, in the rest of this post, I walk through this line by line.

Installation

First, we need to install paramiko, if you don't have it already.

On Gentoo Linux:

emerge paramiko

On Ubuntu/Debian and so on:

apt-get install python-paramiko

If you want to use Python's easy_install then:

easy_install paramiko

Secondly, you need to grab the ssh.py module, grab it from my code-page, and save it as ssh.py.

Connecting to a remote server

To play with the script interactively, you need to start Python:

python

Now, import the ssh module:

import ssh

Next we need to initiate the connection. If your username is the same on both systems, and you have set up ssh-keys, then all you need to do is:

s = ssh.Connection('example.com')

Connection supports the following options:

host The Hostname of the remote machine.
username Your username at the remote machine.
private_key Your private key file.
password Your password at the remote machine.
port The SSH port of the remote machine.

The host is essential of course. Port defaults to 22. The username defaults to the username you are currently using on the local machine.

You need to use one of the authentication methods, a private key or a password. If you don't specify anything, then ssh.Connection will attempt to use a private_key at ~/.ssh/id_rsa or ~/.ssh/id_dsa.

So to specify a username and password, you can do it like this:

s = ssh.Connection(host = 'example.com', username = 'warrior', password = 'lennalenna')

Of course, Python also allows you to use the order to specify the arguments, so the last example can be written as:

s = ssh.Connection('example.com', 'warrior', password = 'lennalenna')

Operations

Once you have set up the connection, there are three methods you can use. Firstly, to send a file from the local machine, you can use put:

s.put('hello.txt')

The above example copies a file called hello.txt from the current local working directory to the remote server. We can also be more explicit if we want:

s.put('/home/warrior/hello.txt', '/home/zombie/textfiles/report.txt')

So the above example copies /home/warrior/hello.txt on the local server to /home/zombie/textfiles/report.txt on the remote server.

The second operation works in a similar way but in reverse:

s.get('hello.txt')

get takes the file from the remote server to the local server, again we can be more explicit if we want:

s.get('/var/log/strange.log', '/home/warrior/serverlog.txt')

The above example copies the strange.log from the server and saves it as serverlog.txt.

The last operation is execute, this executes a command on the remote server:

s.execute('ls -l')

This returns the output as a Python list.

Closing the connection

You can do as many operations you like while the connection is open, but when you are finished, you need to close the connection between the local and remote machines. You do this with the close method:

s.close()

There we go, that is all I needed to do with SSH. Please do let me know using the comments below if you have any problems using it.

If you import my module in your program and later find that you need more power or flexibility, you should be able to swap it out for the full paramiko with a minimum of fuss.

Discuss this post - Leave a comment

May 29, 2008 09:28 PM :: West Midlands, England  

George Kargiotakis

Another day, another debian headache

The case is this, a debian server running Debian 4.0 etch has it’s motherboard broken. We send it for replacement but they don’t have another of the same model to send us so they send us a shiny new model. The new model houses a P35 chipset. The latest Debian 4.0 etch kernel is 2.6.18 [...]

May 29, 2008 09:21 PM :: Greece  

Jason Jones

Postgres Authentication in Proftpd

Today I was commissioned to create an FTP server here at work.  Through persistent pestering of the hideously insecure nature of FTP in general, my boss let me dedicate an entire server just for the company's need to FTP.  This was to negate the possibility of any hacking of the web server, should the FTP server be compromised.  It's even going to be  restricted to its own subnet.

All technicalities aside, my boss told me just to put up a "quick" site for a "couple" of users.  Well, I've been a web dev for long enough to know better.  A "quick" site put up quickly becomes the site everyone uses, and the subject of incessant requests for improvement.

I didn't want that to be the case for this FTP server, so I spent the time and hopefully did it right.

I'm using Proftpd 1.3.1 on gentoo (of course), and I'm authenticating through a postgres database.  Yes, it's probably overkill, but at least I'll be able to sleep at night after 5,000 people are using it each having their own repositories.

Here's how the config looks, just in case anyone is trying to do the same.

ServerName            "Natures Way FTP Server"
ServerType            standalone
DefaultServer        on
RequireValidShell    off
SQLAuthenticate        users
SQLAuthTypes        Plaintext
SQLBackend        postgres
SQLConnectInfo        proftpd@localhost username password 120
SQLDefaultHomedir    /var/ftp/default
SQLDefaultUID        21
SQLDefaultGID        21
SQLEngine        auth
SQLNamedQuery        get_user_info SELECT "username, passwd, uid,gid,homedir,shell FROM users WHERE username = '%U' LIMIT 1;"
SQLUserInfo         custom:/get_user_info

SystemLog        /var/log/ftp/system.log
TransferLog        /var/log/ftp/transfer.log
DebugLevel        9

DefaultRoot        ~

AuthPAM                off
AuthPAMConfig        ftp
Port                21
Umask                022

MaxInstances        30

User                proftpd
Group                proftpd

<Directory />
    AllowOverwrite        on
</Directory>



I created a simple table containing username, passwd, uid, gid, homedir, and shell fields and I was off!

Anyway...  I just thought of putting in a quick 'n' dirty reference for anyone trying to use postgres authentication through proftpd.

Hope it helped (and sorry it wasn't very thorough.  I had about 10 minutes to throw this together)

May 29, 2008 06:20 PM :: Utah, USA  

Michael Klier

What Are You Doing In Front Of Your Computer All Day?

This is a question I hear way too often from my flat mates, friends and family. Most of the time, a conversation that started with such a question goes something like:

<someone> What are you doing in front of your computer all day?
<me> Hmmmmm, I'm working ... kind of.
<someone> All the time?
<me> Not all the time, but well, probably most of it.
<someone> Aren't you chatting or stuff like that?
<me> Yep, but that's not the type of chatting you're used to I guess.
<someone> What are you working on?

Now the conversation reached a point where you can either terminate it by saying something that just pops into your mind, like you're preparing something for work tomorrow (most people I met aren't interested enough in the job I have to ask further questions) or you get yourself prepared to explain:

  1. FOSS to someone who has absolutely never heard about it
  2. what the whole story really means to you
  3. and why you're participating (which way ever)

or simply that you're trying to make your NAS drive playing music, while being remote controlled via bluetooth from your cell phone (chances to terminate a conversation with this answer are actually quite good).

Regardles of which of the above options you choose, you'll have a hard time to explain something that most people (at least the ones I met) can't accept as being rational.

<me> Well, there's this Open Source project, called foo I am helping a little bit here and there.
<someone> What is Open Source?
<me> Hmmmm, well ... 
[skipping stuff about available source code, licenses, the M$ example of closed sources and so forth].
<someone> Aaaaaha (I haven't really understood 75% of what you've just said but).
<someone> Are you or the others getting paid for what you do?
<me> Actually, nope, there are exceptions of course.
<me> However, chances are that someone maybe donates a few bucks.
<someone> That doesn't make any sense at all, why are you doing this?

This is the hardest part of the story. At least for me. In fact, I have to answer the “Why am I doing this question?” (apart of the fact that Open Source makes sense) from time to time for myself to keep me on track and motivated.

Fun

I am an hobbyist. I have fun exploring new things. I'm self taught. Even though I've never studied computer science or the like, I am quite interested in programming and managed to develop I think at least average programming skills in some programming languages (yes, I make/made mistakes and like probably everyone else I am still learning). Some people I've met fail to understand why learning programming could be fun in any possible way, but to me it's just that, fun.

People

The other thing that drives me are the people. To me, Open Source also means meeting (not necessarily in real life) a lot of new interesting people (with far superiour coding skills ;-)). Often these people happen to share the same sense of humour or other interests and you can have a good time hanging around in IRC/forums (though that as well depends on the community).

Reward

And last not least, there's this warm feeling you get once you've accomplished something. When I think back to the day my first patch was merged upstream my heart still beats a little faster and it's still a great moment when that happens nowadays. I am really not addicted to the whole thing, though some would probably guess so by the time I spent in front of my computer, but I'd surely miss quite a lot if all that would be gone one day (though I can't think of how that could possibly happen other than by going blind or loosing my hands).

What about you? Why are you contributing to Open Source projects (or maybe you've even started your own)? What are your motivations?

Read or add comments to this article

May 29, 2008 12:01 PM :: Germany  

Steven Oliver

Setting up Gentoo


Setting up Gentoo has become, for me, more painful than installing these days. Everything from SLiM to Fluxbox to Conky to bitchX gives me trouble.

I’ve got everything installed and restart and SLiM won’t start despite the nVidia logo popping up. Well, apparently I had the mouse named one thing in the device section and something else in the screen section. Then I tried again and the same thing happened. Apparently on Gentoo you have to install the evdev driver independently. So now SLiM will start but Fluxbox will not after logging in. Yes, you can see where this is going. So apparently leaving the ampersand off of the command to start conky on login stopped fluxbox in its tracks. I cannot explain that one but that appears to be what happened.

I then spent the next hour or so trying to figure out bitchx. I never would have guessed that making bitchX appear in the background as part of the desktop was such a painful ordeal. Yeah, well it is. If anyone ever wants help doing it leave me a note. Maybe I’ll stuff on article in the Gentoo Wiki on it. Maybe I’ll do it for my own sake. Either way I think I now have it working. Here’s another oddity though. I set the geometery of the Eterm terminal through the command and through Fluxbox’s app file. For some reason doing that made bitchX take up 100% of my processor usage. I can’t explain that one either.

Good luck setting yours up. This is crazy. Oh yes, and lets not forget my adventures in font land. Needless to say Paludis still works flawlessly with no setup hassle.

Enjoy the Penguins!

May 29, 2008 03:02 AM :: West Virginia, USA  

May 28, 2008

George Kargiotakis

pcmanfm 0.4.1.1 ebuild

A new pcmanfm version (0.4.1.1) is out and since there’s no ebuild yet available I made one by modifying a bit the one I found about version 0.3.2.2 on sunrise overlay. I’ve included a patch I found about enabling/disabling deletion confirmations. Downloads: pcmanfm 0.4.1.1 ebuild pcmanfm 0.4.1.1-r1 ebuild confirm_delete.patch tested on x86 and ppc (thanks to comzeradd) enjoy! P.S. Looks like I [...]

May 28, 2008 11:14 PM :: Greece  

Zeth

SFTP in Python: Paramiko

In your scripts or applications, you might need to copy a file from one server to another. One way to do this is to use SFTP, the secure file transfer program, which uses an encrypted SSH (Secure Shell) transport which in turns runs over TCP/IP.

One of the Python implementations of SSH is called Paramiko (available in package managers as paramiko or python-paramiko).

Paramiko is extremely comprehensive so you can get as complicated as you like, but for me, I just want to be able to copy files from a known remotepath to a known localpath and back again.

In this post I explain how to do this using Paramiko directly, in the next-post, I look at another approach.

So we start by importing the module, and specifying the log file:

import paramiko
paramiko.util.log_to_file('/tmp/paramiko.log')

We open an SSH transport:

host = "example.com"
port = 22
transport = paramiko.Transport((host, port))

Next we want to authenticate. We can do this with a password:

password = "example101"
username = "warrior"
transport.connect(username = username, password = password)

Another way is to use an SSH key:

import os
privatekeyfile = os.path.expanduser('~/.ssh/id_rsa')
mykey = paramiko.RSAKey.from_private_key_file(privatekeyfile)
username = 'warrior'
transport.connect(username = username, pkey = mykey)

Now we can start the SFTP client:

sftp = paramiko.SFTPClient.from_transport(transport)

Now lets pull a file across from the remote to the local system:

filepath = '/home/zeth/lenna.jpg'
localpath = '/home/zeth/lenna.jpg'
sftp.get(filepath, localpath)

Now lets go the other way:

filepath = '/home/zeth/lenna.jpg'
localpath = '/home/zeth/lenna.jpg'
sftp.put(filepath, localpath)

Lastly, we need to close the SFTP connection and the transport:

sftp.close()
transport.close()

In my humble opinion, one should not have to write so many lines or care about the SSH protocol just to send a file from a to b. In the next-post, I will share my own higher level API that runs on top of Paramiko.

Discuss this post - Leave a comment

May 28, 2008 07:59 PM :: West Midlands, England  

Sean Potter

Weekly Workings

I've been very busy the past week, mostly just for the fact that I worked eight days straight. It might have been good money, but tomorrow is a well-earned break. In these past eight days, I fell behind in some of the reviews I've been writing.

I meant to post a review of the OCZ Reaper HPC DDR2 RAM I used in my reviews of the 780G motherboard and Radeon HD3870 Toxic, but fell behind because of all the extra hours spent at work. There're several more reviews to follow the review of this RAM, but my main concern right now is the RAM.

BIOSLEVEL has several fantastic reviews coming up, but what I'm really excited about is a home theater series of articles I'm trying to plan out utilizing MythTV. We have one machine that's able to act as a MythTV box itself, as well as a MythTV server so other units can connect to it. This'll be a great option for some units such as the Asus barebones I recently reviewed for BIOSLEVEL

On the bright side of my time issues, I did manage to get a little done on a new design for this site, as well as business cards for BIOSLEVEL. Once both are completed, I'll post the final designs. Or, that is, change the design of the side and post an entry about the business cards.

May 28, 2008 08:13 AM

Brian Carper

mp3gain

I listen to MP3s in the car and it's annoying when the volume isn't normalized. I can't be fumbling around with the tiny buttons on my MP3 player to adjust the volume while I'm driving. I found mp3gain and used it on a bunch of files and it appears to have worked.

If anyone knows of a better program for normalizing volume of lots and lots of MP3s, post now or forever hold your peace.

May 28, 2008 01:52 AM :: Pennsylvania, USA  

May 27, 2008

Steven Oliver

Vim trickery


I found two new things to stuff in my vimrc file. I thought I would post about them here so that others could revel in the glory of v-i-m.

set backupdir=$VIM\vim71\backup
set directory=$VIM\vim71\backup

On Linux these two commands do not really appear to help you that much. On Windows though (haven’t tried on any other OSes) these two lines are a life saver.

If you have backup set in your vimrc you’ll notice that Vim leaves little backup files of every file you edit in the same location as that file. Well, generally, these are hidden files on Linux so you might very well have hundreds of them laying around and you don’t even know it. On Windows though they’re not hidden and constantly clog of you desktop along with every other folder full of text files. So the first one is a lifesaver.

The second command, the directory setting, is were Vim will store its swap files that it creates. I do not honestly know what exactly is kept in these things, but they’re temp files who are removed as soon as the editor is closed. But this command keeps them out of sight if nothing else. I’m anal about my desktop so that explains my love of the second setting as well.

I put both of mine in a directory, simply titled, “backup.” I do not know what the difference is between the vimfiles directory and the vim71 directory, but I put them in the latter. Everything else seemed to be there.

So there you have it. Two little tidbits to tiddy of your desktop.

Enjoy the Penguins!

May 27, 2008 07:01 PM :: West Virginia, USA  

Exherbo!


These new beast they call Exherbo looks tempting. Almost tempting enough to ruin a perfectly fine Gentoo installation just to see if I can do it or not. For now though I believe I will hold off and wait. At least until the new init system is fairly usable. Then you can bet your ass I’ll be all over it. But until it gets to that point I’ll have to settle for the feed. Which has thus produced some fairly interesting posts.

Being built from scratch with paludis makes this distro more than interesting. Paludis has always felt like it was only living up to half its potential on Gentoo. But various parts of the distro were holding back. Hopefully Exherbo will cure that sensation.

May 27, 2008 06:19 PM :: West Virginia, USA  

Another Install Story


If there is one thing I love, its a good install story. The trial and tribulations of the people who think they know what they’re doing and how badly they screw it up.

I actually installed Gentoo this weekend. At this point my only  saving grace when it comes to installing Gentoo is I’ve screwed up in just about every way possible so when I screw it up these days I generally know how to get out of it. Everything went great except for the vga parameter in my grub.conf. I should write down which one I use because I spend at least an hour rebooting a blank screen every time trying to figure out the right one.

One thing I have noticed though is the ridiculous amount of posts (blogs and forums) on the speed comparisons of the various package managers. Personally, numbers mean nothing to me, speed is subjective. Just like how my car feels really fast at 50 on curvy road but slow as hell at 50 on the interstate. What I’m getting to here is that the discussion of speed always leads to other talks about how terribly hard it is to setup the various package managers. Well, I’ll just tell you right now, anyone who cannot get paludis up and running within 5 minutes of installing is an idiot. The portage2paludis.bash script has worked flawlessly for me every time.

Regardless of all of that, I now have Gentoo Linux, Fluxbox, and Paludis all working together to make me a happy camper.

Enjoy the Penguins!

May 27, 2008 06:15 PM :: West Virginia, USA  

Martin Matusiak

OpenID deserves to die

Here’s my perspective on it. We all have ideas, some good and some bad. Now it’s understandable that people who have invested themselves into a bad idea, especially if they thought it was good, are reluctant to walk away from it. It’s painful to have to realize that. But the flip side is that we have to maintain the myth of Santa Claus because, well, so many kids believe in him that we can’t let them down. Bad ideas deserve to die for the good of everyone.

The first thing a good idea must have is a real problem to solve. OpenID does very well here. The point of OpenID is to solve our common problem of the internet age: many websites, many accounts, many usernames and passwords. This is probably why OpenID still appears to some people as being a good idea.

Here’s how they do it. Instead of keeping track of your accounts on all the sites you’re a member of, just let one site keep all your account records (sound ominous yet? it did to me). Now, whenever you want to login to one of your sites, instead of using your username/password for that site, you use your OpenID login, which looks like this: http://username.myid.net. This url is effectively your OpenID provider, ie. the site you use to keep track of all your accounts. So now the site you’re logging into sends you to your provider, where you login with a username/password belonging to the account on the provider site, and that logs you into the site you were visiting. So in other words, your account on the provider is the gatekeeper to all your accounts. Sounds simple, right?

I remember when I first heard about this idea years ago. The first concern I had was that in order for this to work, I need a provider to keep track of all my accounts. So I asked myself the question: whom do I trust do this for me? The answer came back: myself. I don’t know about you, but the idea of some third party storing all my logins doesn’t make me feel warmy and cuddly. As it happens, the open in OpenID means you can choose any provider you want, including yourself. You just set up some php scritps and voila, you can use http://mysite.com as your provider. So basically, instead of storing your accounts in some “account manager” program on your computer, you do the same thing on your server. This is where the concept of OpenID died for me. I don’t want to have to depend on my own OpenID provider to work in order to use other sites. I don’t want to add a dependency on my ability to login to some other site contingent on the assumption that my own site is available and working properly at all times (which it isn’t, I have a little downtime like everyone else).

If you don’t want the hassle of being your own provider, you can pick a provider from a list. This is not an attractive fallback option, because now your account on the provider is your key to all your other accounts. If I have an account on some site and I forget my credentials, big deal, I only lose that one account. But if I lose my credentials on the provider, I lose everything.

In theory, OpenID tries to improve your overall security. The hassle of keeping track of accounts is known to us all, and we get around the problem by reusing the same (or similar) credentials on a lot of sites. This is obviously bad for security, because if someone gets your password to one site, they can access all your other accounts that use this password. So security people will always recommend that you use distinct credentials for every account. Suppose you do this, and you use OpenID to alleviate record keeping. Now, OpenID actually works against you. Your account on the OpenID provider is the key to everything. With a different password on every site, you’re that much less likely to remember what it was, therefore your account on the provider is proportionally more valuable.

There is a strange irony at play here. Supposedly, the more accounts you manage with OpenID the more useful it is. But on the other hand, the more accounts you manage with it, the more you depend on it, and the more you make it the one gateway to all your online identities for a potential attacker or for abuse by a dishonest or incompetent provider.

Most importantly, however, OpenID’s solution to the login problem isn’t a very clever solution at all. Typing http://username.myid.net is not a big improvement over a username/password form. My browser already gives me the option to login without typing anything.

Those are my reasons why OpenID is a bad idea and should have died years ago. If you want more, Stefan Brands has an exhaustive laundry list of problems with OpenID.

May 27, 2008 04:15 PM :: Utrecht, Netherlands  

Dirk R. Gently

Quick Tips


Linux Quick Tips
Hello blogosphere! As I’m working on putting my bash scripts together, here’s a few quick tips that one may use in everyday life.

Background Command

Ever started a program in the terminal because it doesn’t have a menu listing, or need to see it’s error output and then realize later that you need the terminal? Opening another tab is simple enough but you really don’t need the program hogging the terminal anymore. Well, there is a way to do this.

Previously, people may have viewed my bash script that can start programs in the terminal in the background. Already running applications can be backgrounded as well. First type ctrl-Z to release the application, then using the bg program will background it’s output.

Gnome’s Middle-Click, Title-Bar Trick

For the long time I’ve been using Gnome and just learned about this one. A quick way to look at a window below the current on is to middle-click on title bar. Voila! The current window izzz lowered. More tricks can be found on Gnome Tip’s and Tricks page.

Firefox Hunt

I have the tendency that once I’m on the keyboard, I like to stay on the keyboard, so doing a search in Firefox by going to the mouse selecting the search engine, and typing in the field seems like extra legwork to me. To do a fast search in Firefox on the keyboard is as easy as: ctrl-K to move to the search box and alt-up/down to select the search engine.

Grep Two Search Terms

On the occasion that a grep search needs to look for two words, egrep it:

egrep -w 'word1|word2' /path/to/file

Fox in Hounds Teeth

This is personal advice, but take it from me - worth it. Don’t use Foxmarks Bookmarks Synchronizing Service. I used this service as I sold my old computer when I got the new. I trusted this service to hold my web bookmarks and… it didn’t. It errored with the line, “Can’t synchronize bookmarks, transfer error.” I asked about the error and only got the explanation that, “…this sometimes happens”. Also I got no explanation on why or what happened to their backup service.

There’s another Bookmark Synchronizer out there but for the life of me can’t remember the name of it. Anyone?

Thunar Custom Actions

Thunar has the ability to create custom scripts built directly into it. For the most part it’s self explanatory. For greater degree of difficultly scripts, here’s the documentation.

Have a Good Day! :)

May 27, 2008 04:13 PM :: WI, USA  

Martin Matusiak

kwin leaks memory

Something is very wrong here. Right after starting a KDE session everything looks normal.

But after running for a day we have a different story. I’m assuming this isn’t the expected behavior (if so I didn’t expect it).

This time I specifically took a screenshot to prove it, but I’ve seen it eat up as much as 1.3gb of my memory, which is rather unnerving.

kwin-kde4        4:4.0.4-0ubuntu1

Bug report.

May 27, 2008 01:00 AM :: Utrecht, Netherlands  

May 26, 2008

Jürgen Geuter

Thinkwhack

I was in a project-y mood today and since work was going good all day, I started some work on a little pet-project called "Thinkwhack".

It's somewhat inspired by smack.py but I wanna make it somewhat more flexible and useful.

What it will do is to allow you to have certain action triggered when "whacking" the laptop (if your laptop has a hdaps module which only Thinkpads have I think). Right now it's pretty simple and just plays a sound but it already has a proper systray icon so things should be easy to add there.

I play to give the user the option to play sounds or trigger other options when whacking the machine (maybe tilting also): Hide all the windows on your desktop for example, switch workspaces, run a random script.

The next step will be to get a proper motion detection algorithm in there cause right now it's not that smart, then some proper configuration.

Here is some video footage:


It's not really all that useful I admit but still might turn out to be useful later ;-)

What this definitely will spawn are a few python howtos so it's not in vain.

May 26, 2008 08:49 PM :: Germany  

Jason Jones

Ultrasound For 3rd Child

For the last two children, I've been relatively relaxed with the rest of my life, so I was eagerly awaiting and up-to-date with the happenings of our pregnancy.

This time around, I'm quite busy otherwise, and this ultrasound crept up on me.

I'm also quite amazed at the technology which wraps around the medical field.  At the last portion of the video, you can see our little boy's profile quite clearly.  It's amazing.

Anyway...  I was really excited to hear the heartbeat and see our little guy this time, as I wasn't really thinking much about it until it happened.  Kind of a spiritual occasion.

The video was quite big this time, and I haven't got around to editing videos yet, so the above is the complete ultrasound.

Thanks for watching!

May 26, 2008 03:16 PM :: Utah, USA  

Daniel de Oliveira

Unmasking Gnome 2.22 and more…


For those (like me) that are tired of 2.20 and don’t want to install autounmask for any random reason, here’s the list of packages:

sys-apps/hal ~x86
dev-python/pyxf86config ~x86
app-misc/hal-info ~x86
net-wireless/bluez-libs ~x86
media-plugins/gst-plugins-dvb ~x86
media-libs/gst-plugins-bad ~x86
media-plugins/gst-plugins-fluendo-mpegdemux ~x86
media-plugins/gst-plugins-mythtv ~x86
media-libs/gmyth ~x86
gnome-base/gnome ~x86
media-libs/gst-plugins-base ~x86
dev-libs/liboil ~x86
media-libs/gstreamer ~x86
gnome-base/gnome-applets ~x86
dev-libs/glib ~x86
dev-libs/libgweather ~x86
gnome-base/control-center ~x86
gnome-base/gnome-settings-daemon ~x86
gnome-base/gnome-desktop ~x86
gnome-base/libgnomekbd ~x86
x11-wm/metacity ~x86
gnome-extra/fast-user-switch-applet ~x86
gnome-base/gconf ~x86
gnome-extra/gconf-editor ~x86
x11-libs/libwnck ~x86
gnome-base/gnome-panel ~x86
gnome-base/gvfs ~x86
net-libs/libsoup ~x86
gnome-base/gnome-session ~x86
gnome-base/gnome-keyring ~x86
app-editors/gedit ~x86
x11-libs/gtksourceview ~x86
dev-python/pygtksourceview ~x86
gnome-extra/evolution-data-server ~x86
dev-util/gtk-doc-am ~x86
gnome-base/libgnomeui ~x86
gnome-extra/gnome2-user-docs ~x86
gnome-base/gnome-vfs ~x86
gnome-extra/deskbar-applet ~x86
gnome-extra/gucharmap ~x86
gnome-extra/nautilus-cd-burner ~x86
gnome-base/nautilus ~x86
gnome-base/eel ~x86
net-misc/vinagre ~x86
net-libs/gtk-vnc ~x86
gnome-base/gnome-menus ~x86
gnome-extra/gnome-system-monitor ~x86
media-video/totem ~x86
dev-libs/totem-pl-parser ~x86
dev-python/gdata ~x86
media-plugins/gst-plugins-meta ~x86
gnome-base/gdm ~x86
sys-auth/pambase ~x86
sys-libs/pam ~x86
x11-themes/gnome-themes ~x86
media-sound/sound-juicer ~x86
gnome-extra/bug-buddy ~x86
media-gfx/eog ~x86
mail-client/evolution ~x86
gnome-extra/gtkhtml ~x86
app-arch/file-roller ~x86
net-analyzer/gnome-nettool ~x86
app-crypt/seahorse ~x86
x11-terms/gnome-terminal ~x86
x11-themes/gnome-icon-theme ~x86
gnome-extra/swfdec-gnome ~x86
media-libs/swfdec ~x86
gnome-extra/zenity ~x86
gnome-extra/yelp ~x86
app-text/rarian ~x86
gnome-extra/gnome-games ~x86
gnome-base/libgnome ~x86
x11-libs/pango ~x86
x11-libs/gtk+ ~x86
net-misc/vino ~x86
net-im/ekiga ~x86
gnome-extra/gnome-power-manager ~x86
www-client/epiphany ~x86
dev-python/gnome-python-desktop ~x86
gnome-base/libgtop ~x86
gnome-base/gnome-volume-manager ~x86
gnome-extra/gnome-screensaver ~x86
gnome-base/libbonobo ~x86
gnome-base/librsvg ~x86
app-misc/tomboy ~x86
dev-dotnet/dbus-sharp ~x86
dev-dotnet/mono-addins ~x86
dev-dotnet/dbus-glib-sharp ~x86
gnome-extra/evolution-webcal ~x86
x11-misc/alacarte ~x86
dev-libs/atk ~x86
gnome-base/libbonoboui ~x86
gnome-extra/gnome-media ~x86
app-text/evince ~x86
app-text/libspectre ~x86
gnome-extra/gcalctool ~x86
app-admin/sabayon ~x86
x11-themes/gtk-engines ~x86
x11-themes/gnome-backgrounds ~x86

May 26, 2008 08:29 AM :: São Paulo, Brazil  

Brian Carper

Emacs undo is horrible

Emacs has a, well, "unique" undo system. It only has undo, no redo. When you undo something, the act of undoing is added as itself onto a stack of undo actions. When you've un-done enough things, you do "something, like move the cursor, and that breaks the chain. From there if you undo again, you will traverse back over the undo actions you just did.

This is supposedly powerful. It does help with the following situation:

  1. Type something.
  2. Type something #2.
  3. Type something #3.
  4. Undo undo undo.
  5. Type something #4.

In most programs once you reach step 4, you can redo to get back to the text you just undid But once you reach step 5, the first three things you typed are lost forever. You've gone back in time and changed history, eradicating the old future and replacing it with a new one. You can never get back to the old future. Emacs undo, on the other hand, where undo actions are just like any other actions and pushed onto a stack of actions, does let you undo back first three things you typed.

However in practice this doesn't work so well. This site has a nice quote:

“By [undoing] repeatedly, you can gradually work your way back to a point before your mistake. This is convenient if you’ve made a mistake four or five commands back. It is marginally useful if you’ve made a mistake twenty or thirty characters back. And it is completely useless if your mistake is ancient history.” - Learning GNU Emacs (page 42)

The problem being, supposing you undo 20 times, and break the chain (by moving the cursor for example), if you then decide to undo one step FURTHER back, you have to undo all 20 of your previous undos, undo 20 more times, then undo once more. Eventually you end up feeling like you're going up and down a roller coaster of undos.

If you hate this, which you probably do, you could use redo mode, which gimps up Emacs undo/redo to be like any other program's, i.e. you get the same behavior as Microsoft Notepad. (Although when I tried it, it was buggy as heck, failing to undo my actions properly, mangling text from different lines together and whatnot.)

Vim's undo system on the other hand is far better and equally powerful. You have a standard undo / redo option via u and CTRL-R. You also have a second completely different way to undo: you can "go back in time". In the above example, Vim will create two undo "branches" and you can jump from one to the other even if you undo and "break the chain" by typing something new.

Doing :undol lists the branches, in a somewhat confusing format. But you can just pound g- and g+ to go to older / newer text states, or use :earlier with a human-readable time (say, 10s or 5m) and it will take you to that point. These will get you all the power of Emacs' undo stack, with none of the pain or confusion. See also :h undo-two-ways.

This is one of many instances where Vim wins, hands-down. Vim's undo system isn't as reprogrammable as Emacs, but it's so powerful and so perfectly what you'd want that it doesn't matter. This is beautifully typical of Vim. I don't have a year to figure out all the nooks and crannies and edge cases and idiosyncrasies of Emacs undo system, let alone the time it'd take to write a custom, crusty elisp script to buggily re-implement it.

Being an "extensible text editor" doesn't help much when such basic functionality is so broken. Unless you want to play your undo history back like a movie, in rainbow colors, which I don't. I want undo/redo that works.

May 26, 2008 06:54 AM :: Pennsylvania, USA  

May 25, 2008

Zeth

Is Django stable?

I have a friend and fellow member of the Python West Midlands group. Whenever, someone mentions Django, he asks the person "but is it stable?". This has been repeated so much that is has become a local in-joke. However, lets take the question seriously.

To explore this further, we need to ask what does stable mean? I.e. can we replace the word "stable" with something else to provide some more meaningful questions:

  • Can Django handle traffic loads?
  • Is Django actively maintained, i.e. are bugs being fixed?
  • Will the Django API evolve in the most backwards compatible way possible?

Lets take these one at a time.

Traffic loads

Django's frequently-asked-questions says:

Is Django stable?

Yes. World Online has been using Django for more than three years. Sites built on Django have weathered traffic spikes of over one million hits an hour and a number of Slashdottings. Yes, it's quite stable.

The first sentence is a testimony, useful but not a direct answer. In the second sentence, 'stable' is used as in 'strong table', i.e. Django can handle a heavy load, (i.e traffic rather than physical objects).

It goes on to explain that Django has a "shared-nothing" approach, i.e. you can throw more servers directly at whatever bottleneck you have. If the database is the database, then you can add more hardware to the databases, if it is images the are the problem, you can add more hardware to the media servers, and so on.

Is Django maintained?

The next question is whether Django is actively maintained. One simplistic measure is to look at the bug database and see what is going on. In what follows I use "ticket" in the broadest sense, i.e. not just a confirmed code error, but also enhancement requests, invalid bugs and so on.

At time of writing, Django has 1092 open tickets, out of which, 311 are new and unreviewed, I would guess that half of these are valid problems, and half are not.

Meaning the other 781 open tickets have reviewed by someone at least once. Some have been triaged and are waiting to be worked on, some are already being worked on, some will have been closed wrongly and reopened.

In the last three years, 6047 Django tickets have been closed, we can break these down further:

Number Closed As
3348 "fixed"
867 "invalid"
809 "duplicates"
797 "wontfix"
226 "worksforme"

A ticket being fixed is very useful, but a ticket being found to be not a problem or not Django's problem is still useful information, marginally useful perhaps, but still useful if you have that issue.

So Django is three years old, which is pretty new. In that time, they have closed 85% of tickets, while 10.6% of tickets are open but have been read, 4.4% are open and have never been read.

This seems competitive with similar open-source web frameworks:

Framework Years Tickets % closed
Django 3 7139 82
Pylons 2 444 90
Symphony 3 3612 82
Turbogears 3 1840 85
Zope2 7 2352 81
Zope3 6 886 76

The 'years' column represents how far the ticket tracker data goes back for, not necessarily the age of the project. There may also be sampling errors caused by differences in the ticket tracker software, or a project might have had a clear-out of closed tickets.

On the whole, it is all impressive stuff, all six open-source projects seem to be on top of things. One nice thing about Pylons is that, at the time of writing, it appears that all of the open tickets have been reviewed to some extent. Some other projects such as Django would benefit from more a few more triagers to review new tickets.

API

This is perhaps what my friend meant, i.e. if one makes a web application using Django in 2008, how much pain will it be for it to still work in 2013?

There is of course a balance to be struck between backwards compatibility on the one hand, and keeping the framework modern enough for meet the needs of today's web applications. It is a difficult balance.

As Joel Spolsky points out in How-Microsoft-Lost-the-API-War, if you change your API such that users of it have to learn new things or change software in any significant way, the risk is that the users of the API will instead decide this moment to jump to the next big thing.

On the other side, changing too slow is also a risk. Apart from people like me when I am feeling retro, does any one really create web applications of any complexity using only the CGI support in the Python standard library? The API has not changed much in the last half-decade which is good, but the standard Python CGI is lacking in any pre-built features so you have to do all the repetitive boilerplate yourself. Also CGI generally has no persistence or caching meaning that it is far more processor intensive.

I don't want to be mean, but all the cool things that people are actually using to make web applications in 2008, such as SQLAlchemy, Django and Pylons are outside the standard library and have very little chance of merging with the standard library. I am not going to mention Python Server Pages, (oh I did - d'oh).

So the balance between backwards compatibility and providing modern features that people want is the life-or-death question for a larger toolkit such as a web framework.

Django provide their answer in a webpage called API-stability, in this document, they explain what seems a reasonable compromise between backwards compatibility, and changes that are required to keep the framework both modern and secure.

Of course, the document is mere policy/propaganda and the real issue is whether they stick to it. However, Django is free software/open source and it is being used by a large number of people. If the Django developers change the API unnecessarily, people will vote with their feet and not upgrade and/or fork the API.

Django Development

So is Django stable? Well given what we looked at above, we can at least say that it does not seem any less stable than any other similar toolkit.

The philosophy of a traditional software application, often goes like this: there is a cycle, starting with the development window, followed by a code freeze, followed by stabilisation, followed by a release, followed by a new cycle.

The current fashion in the Django community is to develop sites using the SVN version of Django. This philosophy is that the mainline branch should be usable at all times, and the latest SVN revision is likely to be less buggy and more secure than previous revisions.

This approach is somewhat all or nothing; you decide yourself to become a web developer using Django and so commit yourself with keeping up with the state-of-the-art. Perhaps this is the only way for a toolkit of such complexity. This investment is perhaps less of an issue if Django becomes the mainstream way to make a web application in Python.

The Django developers do however plan on an eventual 1.0 release, their plans are nicely summarised on a wiki page called VersionOneFeatures. At Version 1.0, the toolkit will (in theory) have a fixed point. After that they plan to do the Pythonic thing of not breaking the API in one step. So if they want to introduce an incompatible change that requires code changes to the user's web application, they will provide a warning in the next release, and then make the incompatible change in the release after.

However, I imagine most people will continue tracking SVN. Since a person needs a certain level of technical skills to use Django at all, then they probably have enough skill to handle some minor API changes.

Stability is a process. Complex software is never finished, it just runs of money or becomes obsolete.

Your turn. What do you think? I would love to know your opinions?

Discuss this post - Leave a comment

May 25, 2008 09:07 PM :: West Midlands, England  

Dan Ballard

Turning your laptop into a wired to wireless router for your wirelessly challenged friends

Say you're at a party and the only internet is a wireless router and for whatever reason, no one can plug into it. Wireless internet only. You with your fancy laptop are sitting pretty and this is just fine. They your friend shows up lugging his clunky old desktop that only has an ethernet port for internet connectivity. Is he out of luck? Turns out not, because you an come to the rescue!

It's really easy, especially with Ubuntu.

To start with, you need to be a router, so you need firewall software that can do NAT (network address translation). This is part kernel side (NAT and iptables options enabled and modules loaded) and part user space side, in the form of the program 'iptables', so make sure it is installed, which it is by default on Ubuntu (I think).

Now all you really need to do is add two routing rules, one says anything coming on the ethernet port should go through the NAT procedure, which basically means it's IP headers are tweaked to make it look like they originated from your computer and then you send them along to the internet. The second rule helps facilitate this (I'm a little less sure what it does, but it's needed).

In this case we are assuming the interface eth0 is the wired network and eth1 is the wireless. Change as required.

iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT

Next you just need to tell the kernel port forwarding should be turned on, and you can do this through the wonderful /proc filesystem.

echo 1  > /proc/sys/net/ipv4/ip_forward

Now you're pretty much ready to go. Connect to the wireless, presumably though NetworkManager or your wireless toll of choice. Then enable the wired network manually.

ifconfig eth0 up 192.168.1.1

This turns on eth0 with a local network address of 192.168.1.1. Now plug your friend's computer into the ehternet port with a crossover ethernet cable or into a hub and then the hub into you with regular ethernet cable and have them manually pick an address on 192.168.1.* (or whatever local network you chose, it doesn't matter) and set you (192.168.1.1) as the gateway router.

If this is a little much for them or they are running an OS that makes this non trivial, than its really another easy step for you to set up a DHCP server and do all the configuration for them :).

So install dhcpd, on Ubuntu it's 'dhcp3-server', on Gentoo I think it's just 'dhcpd'.

Now we have to configure it. We have to tell it the gateway router, which is us (192.168.1.1), the nameservers (the servers in /etc/resolv.conf) and the pool of IPs to use and what interface/network to listen on.

Open the config file, on Ubuntu '/etc/dhcp3dhcpd.conf'.

The relevant parts are as follows

...
# servers in /etc/resolv.conf
option domain-name-servers 192.168.0.1;

...

# the local network you created
subnet 192.168.1.0 netmask 255.255.255.0 {
        #IPs free to assign
        range 192.168.1.100 192.168.1.200;
        #your computer, the router
        option routers 192.168.1.1;
}

And that's it. (Re)Start the server

/etc/init.d/dhcp3-server restart

And you are now serving all the information your friend's computer will need to automatically connect properly.

They should now be online once they restart their internet connection.

One annoying thing about Ubuntu vs Gentoo is that on Ubuntu, the init system is a bit more kludgy and old fashioned. Any server software installed is automatically configured to start at boot time, forever, which in this case isn't what you want. You only want the dhcpd server to run very rarely, at parties, the rest of the time it's a waste. So we need to turn it's auto starting off. Apparently the /ubuntu init system barely supports this, we have to force it.

update-rc.d -f dhcp3-server remove

Now just turn it on when you need with its init.d file.

May 25, 2008 08:23 PM :: British Columbia, Canada  

Daniel de Oliveira

(easy) LVM on Gentoo


LVM (Logical Volume Manager) is a great piece of software which allow you to deal with Logical Volumes. Using LVM, you are able to extend/reduce your filesystems which is pretty handy when you need more space.

Let’s get the easy way to do that.

Obs.: My post about LVM on ubuntu have a lot of info, so I’ll paste the important info about LVM here

What is LVM?

LVM (Logical Volume Manager) is a great piece of software which allow you to deal with Logical Volumes. Using LVM, you are able to extend/reduce your filesystems which is pretty handy when you need more space.

A lot of distributions support out of the box in installer. Unfortunately, Hardy Heron doesn’t offer this on the Desktop Install CD.

What can I do with LVM?

* Resize volume groups online by absorbing new physical volumes (PV) or ejecting existing ones.
* Resize logical volumes online by concatenating extents onto them or truncating extents from them.
* Create read-only snapshots of logical volumes (LVM1).
* Create read-write snapshots of logical volumes (LVM2).
* Stripe whole or parts of logical volumes across multiple PVs, in a fashion similar to RAID0.
* Mirror whole or parts of logical volumes, in a fashion similar to RAID1.
* Move online logical volumes between PVs.
* Split or merge volume groups in situ (as long as no logical volumes span the split). This can be useful when migrating whole logical volumes to or from offline storage.

What can’t I do with LVM?

* LVM does not provide parity-based redundancy across LVs, as with RAID4, RAID5 or RAID6. This functionality is instead provided by Linux metadisks, which can be used as LVM physical volumes.
* Converting regular filesystems into LVM filesystems online (you also can copy the stuff to a logical volume).

Implementation

LVM keeps a metadata header at the start of every PV, each of which is uniquely identified by a UUID. Each PV’s header is a complete copy of the entire volume group’s layout, including the UUIDs of all other PV, the UUIDs of all logical volumes and an allocation map of PEs to LEs. This simplifies data recovery in the event of PV loss.

In the 2.6-series Linux kernels, the LVM is implemented in terms of the device mapper, a simple block-level scheme for creating virtual block devices and mapping their contents onto other block devices. This minimizes the amount of relatively hard-to-debug kernel code needed to implement the LVM. It also allows its I/O redirection services to be shared with other volume managers (such as EVMS). Any LVM-specific code is pushed out into its user-space tools, which merely manipulate these mappings and reconstruct their state from on-disk metadata upon each invocation.

To bring a volume group online, the “vgchange” tool:

1. Searches for PVs in all available block devices.
2. Parses the metadata header in each PV found.
3. Computes the layouts of all visible volume groups.
4. Loops over each logical volume in the volume group to be brought online and:
1. Checks if the logical volume to be brought online has all its PVs visible.
2. Creates a new, empty device mapping.
3. Maps it (with the “linear” target) onto the data areas of the PVs the logical volume belongs to.

To move an online logical volume between PVs, the “pvmove” tool:

1. Creates a new, empty device mapping for the destination.
2. Applies the “mirror” target to the original and destination maps. The kernel will start the mirror in “degraded” mode and begin copying data from the original to the destination to bring it into sync.
3. Replaces the original mapping with the destination when the mirror comes into sync, then destroys the original.

These device mapper operations take place transparently, without applications or filesystems being aware that their underlying storage is moving.

How can I learn more?

http://en.wikipedia.org/wiki/Lvm
http://tldp.org/HOWTO/LVM-HOWTO
http://sourceware.org/lvm2/
http://www.gentoo.org/doc/en/lvm2.xml

Requirements

* Gentoo 2007.0 livecd/livedvd or any other distribution livecd able to load lvm modules and applications.

Preparing

1) Start dm-mod (if not started yet)

modprobe dm-mod

3) Redetect disks and/or start lvm stuff.

vgscan
vgchange -a -y

Preparing Disks

Let’s create a boot partition outside of LVM and all the rest for LVM (120Mb for /boot in 2*40Gb hardisks).


$ sudo fdisk /dev/sda

The number of cylinders for this disk is set to 4865.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-4865, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1033-9729, default 9729): +120M

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (17-4865, default 17):
Using default value 17
Last cylinder or +size or +sizeM or +sizeK (17-4865, default 4865):
Using default value 4865

Command (m for help):t
Partition number (1-4): 2
Hex code (type L to list codes): 8e

Command (m for help):w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

$ sudo fdisk /dev/sdb

The number of cylinders for this disk is set to 4998.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-4998, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-4998, default 4998):
Using default value 4998

Command (m for help):t
Partition number (1-4): 2
Hex code (type L to list codes): 8e

Formating Partitions

1) Format /boot partition
$ sudo mke2fs /dev/sda1

2) Create physical volumes for LVM

$ sudo pvcreate /dev/sda2
$ sudo pvcreate /dev/sdb1

3) Create volume group (I’ll use rootvg, like AIX)…

$ sudo vgcreate rootvg /dev/sda2

4) …then add the second physical volume

$ sudo vgextend rootvg /dev/sdb1

5) Create the logical volumes.

$ sudo lvcreate -n rootlv -L 15G rootvg
$ sudo lvcreate -n varlv -L 5G rootvg
$ sudo lvcreate -n homelv -L 30G rootvg
$ sudo lvcreate -n usrlv -L 15G rootvg

6) Now you’re able to *see* this logical volumes in Ubuntu Installer.

7) After installation ends, don’t reboot yet. Mount your logical volumes, proc and dev.

$ sudo mount /dev/rootvg/rootvg-rootlv /mnt
$ sudo mount /dev/rootvg/rootvg-usrlv /mnt/usr
$ sudo mount /dev/rootvg/rootvg-varlv /mnt/var
$ sudo mount /dev/rootvg/rootvg-homelv /mnt/home
$ sudo mount -t proc proc /mnt/proc
$ sudo mount -o bind /dev /mnt/dev

You know the rest… and don’t forget to put LVM support on kernel.

May 25, 2008 03:10 PM :: São Paulo, Brazil  

Patrick Nagel

GPRS with Nokia 9300i, Gentoo and China mobile (2, OpenRC)

Since I moved my laptop to the new OpenRC init framework, my GPRS connection stopped working. At first I didn’t know what needed to be changed, but after having a careful look at /usr/share/doc/openrc/net.example and adjusting the proposed ppp chat script, I got it up and running again. Here is my configuration:

### GPRS ###

config_ppp0=( “ppp” )

link_ppp0=”/dev/rfcomm0″

pppd_ppp0=(
“noauth” # Do not require the peer to authenticate itself
“debug”
“local” # Ignore carrier detect signal from the modem

“defaultroute” # Make this PPP interface the default route
“usepeerdns” # Use the DNS settings provided by PPP

“lcp-echo-interval 15″ # Send a LCP echo every 15 seconds
“lcp-echo-failure 3″ # Make peer dead after 3 consective
# echo-requests

“lock” # Lock serial port
“115200″ # Set the serial port baud rate
“crtscts” # Enable hardware flow control
)

chat_ppp0=”
ABORT BUSY
ABORT ERROR
ABORT ‘NO ANSWER’
ABORT ‘NO CARRIER’
ABORT ‘NO DIALTONE’
ABORT ‘Invalid Login’
ABORT ‘Login incorrect’
” AT
TIMEOUT 5
OK ‘ATH’
OK ‘ATE1′
OK ‘AT+CGDCONT=1,\”IP\”,\”cmnet\”‘
OK ‘ATD*99#’
TIMEOUT 60
CONNECT ”
TIMEOUT 5
~– ”

May 25, 2008 03:18 AM :: Shanghai, China  

Jason Jones

New Camera, Nikon Cool Pix S210

Not much more to say, other than what was in the video.  I'm trying now to work out the best bitrate to video quality trade-off with FLV files.

I plan on having a bit of fun with this new camera in the ensuing weeks.

I'm amazed at the technology with which these new cameras / camcorders are built.

May 25, 2008 12:54 AM :: Utah, USA  

May 24, 2008

Jürgen Geuter

Multi-Pointer X

The X-Server will be getting multipointer support soon (I guess in Xorg 7.5). That looks like it might allow some awesome stuff. Using more that one mouse for example might change the way that we work with 3D design tools or graphics software. Looking forward to playing with it!

May 24, 2008 10:18 PM :: Germany  

Dieter Plaetinck

Announcing the Netlog Developer Pages

At work, we've setup the Netlog Developer Pages

It is the place where you can/will find all information around our OpenSocial implementation, our own API, skin development, sample code and so on.
We've also launched a group where you can communicate with fellow developers and Netlog employees.
The page also features a blog where you can follow what is going on in the Netlog Tech team.

read more

May 24, 2008 10:39 AM :: Belgium  

May 23, 2008

Jason Jones

Job Security

I've been pondering on how I am to write about this without seeming haughty or prideful, because quite honestly, I feel nothing more than blessed beyond words.

When I was offered this job, it just felt right.  Six months previous to my being offered this job, I was offered another job in SLC which seemed right in every aspect but the fact that it was in SLC.  I decided I'd take it, but after making the decision, it did not feel right.  It just didn't jive with my mojo, ya know?

Well...  I've been at Nature's Way now for almost a full year.

We've got a new server, a new website, a new sales reporting system, and I'm working on getting the website admin system up.  Life is good.

If you didn't get it in the video, might I say that today two of the three owners of this  multi-million (possibly billion) dollar company came to my office to tell me what a great idea it was to hire me.

First, the CEO came in smiling and said something to the effect of, "In the executive meeting today, lots of good words were said about you."

Then, just a couple of minute ago, the CFO came in and he, being a bit more of a relaxed guy said, "Scott (the President of Marketing) said, 'Hiring that guy was the best decision....  He has saved us so much money.'"

What wonderful words to hear in this time of economic trouble in the USA.

Anyway...  I just thought I'd write this down.  I almost wanna celebrate.

Also, for those of you who don't know, Nature's Way was a 100% microsoft shop.  The website was served on an IIS server running Windows Server 2003, using ASP and MSSQL as the scripting and database technology.

It now uses Gentoo Linux as the OS, running Apache as the server.  The scripting language is PHP and it's connected to a Postgres database.  All open-source, 100% free software.

Yeah, I'd say we're saving a load of money from the change.

Thank you, open source technology.  You're paying my bills quite well these days.

Maybe I should ask my boss if he could throw in a turbo-charger for my Mustang as a "thank you." *wink wink*

May 23, 2008 04:36 PM :: Utah, USA  

Jürgen Geuter

Linux Sucks-Rules-O-Meter

To cheer up all the Gentoo users I give you a like to the result of the Linux Sucks-Rules-O-Meter: Gentoo is by far the one that "rules" the most and most others "suck" more.

It's just the result of a perl script searching altavista for "DistroX sucks" and "DistroX rules" but still it's funny to see the results. Of course Ubuntu gets bad results because of its mindshare and because it's a beginner distribution that has many people trying it out and bashing it when it does not work but I had not thought that SuSe would be that close to Ubuntu. Nothing serious but still fun.

The sourcecode is free and you can run your own Sucks-Rules-O-Meters with it (if you can bear to fiddle around with Perl).

May 23, 2008 02:18 PM :: Germany  

Zeth

Firefox is your nanny?

Extensions are cool

Extension frameworks are a good way to add new functionality to large applications that are messy to alter directly, they also help to quickly add functionality now, without having to wait six months for the next release.

The whole fun of extensions is that you can make your own and download random ones from the Internet, try them out for a bit, remove the ones you don't like, share the ones you do.

This of course implies two things. Firstly, that the extension interface is well thought out so that a badly written extension does not crash or unexpectedly interfere with the main application. Secondly, that the user who installs the application is adept enough to know what they are doing.

The killer feature of Firefox has been its extension framework, having hundreds or even thousands of useful extensions is what has enabled Firefox to break into the IE-dominated browser market where so many have failed.

All your extensions belong to us

Firefox 3 has changed many things compared to previous versions. One unexpected change is that the extension framework has been locked down.

I have mixed feelings about this. I understand there is a balance between on the one hand, fun and spontaneity, and on the other hand, security and protecting clueless people from themselves. However, for me, I hate software designed as a jail for idiots. That is why I refuse to use Windows for anything beyond testing that web applications work on it.

Firefox 3's extensions framework has a new DRM-like security barrier. You have to either submit your extension to be vetted and hosted by Mozilla, or you must use SSL, or use cryptographic keys.

I am all in favour of cryptography (as long as it is open for everyone to play), but I would be worried if this implementation makes it harder for people to write and share updates.

Computer says no

I tried to install an extension the old fashion way, by going to the author's homepage and clicking on link to install the extension.

Firstly, there a warning popped up, the same warning that was also in Firefox 2:

/images/posts/firefox/firenanny1.png

So I clicked "Allow" and then reclicked the install link.

Then, like a naughty child, we have to wait 4 seconds as a cooling off period, before we can click "Install".

/images/posts/firefox/firenanny2.png

Thirdly, even though we clicked "Allow", then were put into time-out like a child, then clicked "Install", it flatly refused to do what I had told it to do:

/images/posts/firefox/firenanny3.png

'Secure' here being defined as "approved by Mozilla", very few Firefox extensions are secure in the formal sense of 'trusted'.

I am root

I know Firefox are trying to keep us safe, but I have to admit that the interface here gets on my nerves somewhat. There are "Allow" and "Install" buttons, I press them, but Firefox changes its mind and does not do what the button says.

Fortunately, in Firefox, the extension censorship can be overridden in the about:config settings dialog. So I went to Firefox 3's about:config page, and guess what? Yes you guessed it, they have added another new confirmation screen!

/images/posts/firefox/firenanny4.png

Oh well, all's well that ends well. I am sure some of you will have strong views either way on this. Let me know!

Discuss this post - Leave a comment

May 23, 2008 01:13 AM :: West Midlands, England  

May 22, 2008

Zeth

Ekiga VoIP client on Windows

I have used Ekiga quite a bit. It is one of the main free software voice over IP clients. It is often installed by default on many GNOME-based systems such as many free software distributions, and it is also available on Solaris.

It also now has a Windows port, so I thought I would try it out. Giving any remaining Windows-using relatives Ekiga means they can chat to you online without you having to install proprietary phone clients that do strange things on your network.

To start with, you need a SIP username, I got a free SIP username from Ekiga's online-registration, but you can get one from any SIP provider, or you can be your own provider by running your own SIP server such as Asterisk.

To start with, lets just use Ekiga's free usernames.

So once you have a SIP username, we want to download Ekiga. the Windows binary is available from Ekiga's Windows-Users page.

Download the exe and click on it. This will bring up a little box asking you for your language. My first language, English, was the default so I went with that.

http://commandline.org.uk/images/posts/ekiga/ekiga0.png

Next comes the Ekiga Setup Wizard:

http://commandline.org.uk/images/posts/ekiga/ekiga1.png

Press next twice and you get this:

http://commandline.org.uk/images/posts/ekiga/ekiga2.png

Press finish. I did this on Windows XP, which brought up a warning me that Ekiga is attempting to connect the Internet. Being a program to chat over the Internet, I pressed "Unblock":

http://commandline.org.uk/images/posts/ekiga/ekiga3.png

Next is the First Time Configuration Assistant.

http://commandline.org.uk/images/posts/ekiga/ekiga4.png

It will ask you for your SIP username and password (i.e. the username we created at the beginning of this article), and it will try to detect your microphone, speakers and webcam (if you have one).

Press "Forward" a lot and read through each of the screens. when you are done it will summarise your choices:

http://commandline.org.uk/images/posts/ekiga/ekiga5.png

Press "Apply" if you are happy, or press "Back" to change them.

So now hopefully you are done with all the hard work. You should see the main Ekiga interface like this:

http://commandline.org.uk/images/posts/ekiga/ekiga6.png

The first icon on the right allows you to open a text chat with the person you are talking to.

So far, I only really use Ekiga to call my friends over the Internet, I have never phoned a landline, therefore I turned the numberpad off, you can do this by clicking the second item on the left, or by going to the "View" menu, and choosing "View Mode" then "Videophone".

Typing usernames into the address bar is a bit dull, so pressing the third icon on the left of the interface brings up the address book. If you add your friends to the address book then you can click on them rather than having to remember their SIP username.

Ekiga has many more features, but you can easily discover most of them yourself.

http://commandline.org.uk/images/posts/ekiga/ekiga7.png

Now you probably want to test it. Put sip:500@ekiga.net in the address bar and press enter. This will call the Ekiga 500 echo service. It is a robot who will echo back whatever you tell it, this way you can tell whether your connection, microphone and speakers are working properly.

Happy chatting!

Discuss this post - Leave a comment

May 22, 2008 06:13 PM :: West Midlands, England  

Michael Klier

Meme Your Favorite Desktop Linux Software

Seems I got tagged by JayPiKay and Demod :-).

Here are the rules:

  1. blog a list with your favorite destktop Linux software (as many or few you want)
  2. add links to the software project's websites
  3. post these rules
  4. tag three other Linux using bloggers

Since Splitbrain said the list should contain applications which provide a GUI I fear mine is going to be a little short :-/.

Well then, here is the list of my current favorites desktop apps:

  • Awesome - an awesome window manager
  • Firefox - my browser of choice
  • Gajim - for all things jabber
  • Sonata - the MPD frontend I use to listen to my music (when I don't use ncmpc directly on my NSLU2 8-))
  • (g)Vim - my favorite text editor
  • Mirage - a simple and lightweight GTK+ image viewer
  • Gimp - image editing
  • Viking - a GTK program to manage/manipulate GPS data
  • Urxvt - Terminal

The bloggers I tag are:

Have fun!

Read or add comments to this article

May 22, 2008 05:59 PM :: Germany  

Patrick Nagel

Uploading mail to an IMAP server with Thunderbird (2.0.0.14) sucks - perl script to the rescue

Today I was trying to upload a lot of mail (something like 160000 mails stored in a deeply nested folder structure of about 13000 folders) to an IMAP server. Those mails were converted from the Eudora mailbox format to a more sane Eudora mailbox format using “Eudora rescue”, and then imported into Thunderbird’s “Local folders”. From there, so we thought, it would only be a matter of minutes to put those mails onto the newly setup dovecot IMAP server, with one drag-and-drop action.

But…

The upload horribly failed after the 3rd folder or so, with no error message whatsoever. No matter what I tried, it would just fail silently. The debug logging (see Debugging/Thunderbird article in the Dovecot wiki) didn’t help, and neither did dovecot’s log on the server. The problem seems to be connected with creating folders on the server somehow - because uploading a big amount (400 for a small test) mails within one folder wasn’t a problem. I couldn’t find out if Thunderbird or dovecot is to blame here