Planet Larry

January 13, 2009

John Alberts

Conky now supports MOC player

So, I found myself tweaking my Conky rc file today.  I’ve been using mocp for playing music becuase it’s a really lightweight, versatile and can run detached from the console.  I really wanted to see my currently playing music info on my desktop in Conky, but Conky’s documentation shows no mention of any support for moc and thier are no mention of variables to use for the config.

So, in doing some googling, I found a website that has a patch for moc support and also mentions that it’s been in Conky since September 28th!  I guess they haven’t updated the documentation yet.

Here’s a list of the new variables you can use in your conkyrc file to add moc support.

  • $moc_state: Current state of MOC; playing, stopped etc.
  • $moc_file: File name of the current MOC song.
  • $moc_title: Title of the current MOC song.
  • $moc_artist: Artist of the current MOC song.
  • $moc_song: The current song name being played in MOC.
  • $moc_album: Album of the current MOC song.
  • $moc_totaltime: Total length of the current MOC song.
  • $moc_timeleft: Time left in the current MOC song
  • $moc_curtime: Current time of the current MOC song.
  • $moc_bitrate: Bitrate in the current MOC song.
  • $moc_rate: Rate of the current MOC song.

January 13, 2009 :: Indiana, USA  

Steven Oliver

Question?


You have a good job. You make good money. And you like 99% of your coworkers. But, and there always is one, you get little to no benefits. No paid time off, no insurance, etc.  Now, the catch. Despite not actively seeking a new job, you’ve more or less been offered one anyway. You would make less money, but you would get all your benefits back. The jobs are of similar nature and are equally distant from your home.

What do you do?

Enjoy the Penguins!

      

January 13, 2009 :: West Virginia, USA  

January 12, 2009

Dirk R. Gently

Encrypting/Decrypting a File Easily With a Couple Bash Scripts


Once in a while a person might like to encrypt a file for security purposes. In Linux it is real easy to create good encryption using openssl with the Triple-DES Cipher.:

openssl des3 -salt -in unencrypted-data.file \
-out encrypted-data.file.des3

After entering this command, openssl will ask for you to enter the password twice. And decryption is likewise:

openssl des3 -d -salt -in encrypted-data.file.des3 \
-out unencrypted-data.file

Warning: Make sure you don’t accidentaly reverse the file names in the decryption process or you’ll lose all your data!

Remembering this command though is the tricky bit so I decided to create a couple bash scripts that made the process thoughtless. I named the bash scripts “crypten” and “cryptde“.

Crypten

#!/bin/bash
# crypten - a script to encrypt files using openssl

FNAME=$1

if [[ -z "$FNAME" ]]; then
    echo "crypten <name of file>"
    echo "  - crypten is a script to encrypt files using des3"
    exit;
fi

openssl des3 -salt -in "$FNAME" -out "$FNAME.des3"

The filename ends with .des3 to be easy to recognize.

Cryptde

#!/bin/bash
# cryptde - a script to decrypt files using openssl

FNAME=$1

if [[ -z "$FNAME" ]]; then
    echo "cryptde <name of file>"
    echo "  - cryptde is a script to decrypt des3 encrypted files"
    exit;
fi

openssl des3 -d -salt -in "$FNAME" -out "${FNAME%.[^.]*}"

I like to put my bash scripts in a ~/.bin folder. Don’t forget to make both files executable:

chmod +x crypten cryptde

This shouldhelp make encrypting/decrypting files easier.

      

January 12, 2009 :: WI, USA  

Martin Matusiak

svn builds for the commoner

I had a small revelation this week. I got svn builds working, both with Mono, and at along last, KDE4. It turns out it doesn’t have to be maddeningly error prone.

Mono SVN

To build Mono you should look at the release tarballs of a recent release, like 2.0.1. That tells you which modules you need. It doesn’t really tell you much about the order in which you should build them, however. Then you grab the sources from svn. The names of the modules in trunk/ largely match the names of the tarballs in the release.

I found this order to work okay:

  1. libgdiplus
  2. mcs (download only, mono module builds both)
  3. mono
  4. debugger
  5. mono-addins
  6. mono-tools
  7. gtk-sharp
  8. gnome-sharp
  9. monodoc-widgets
  10. monodevelop
  11. paint-mono (from http://paint-mono.googlecode.com, yes it runs!)

When you’re checking out from svn, don’t check out the entire history (this would take forever to download), use

svn checkout -r HEAD <url>

so that you only get the current HEAD.

Before you set out, it’s also a really good idea to set up a special build/runtime environment for this process. That way your existing Mono (if you have it installed) won’t interfere with the svn build.

Now for the building. Generally, this is all you need:

  1. ./autogen.sh –prefix=/opt/mono-svn
  2. make
  3. make install

There are slight variations in that some packages use bootstrap.sh instead of autogen.sh, but this you’ll find in the respective READMEs. And those instructions actually worked for me. :cap: The mono module is a bit more complicated, because there is the whole concern about building mono using mono. So I recommend using

make get-monolite-latest

first to bootstrap the build. And then it works.

Sometimes you’ll have failures because of missing dependencies. There will be a message like “You need package Hello”. In that case look in your package manager for something resembling libhello-dev and that’s more than likely it.

Last but not least, you obviously need a working toolchain.

KDE4

To build KDE4 there is a great tool called kdesvn-build. It comes with a sample config file you just tweak and then run the script.

Again, you’ll probably have some failures, but kdesvn-build saves *all* output. So just look in log/latest/<module>/<operation>.log and you should be able to figure out what happened. Cmake has a very nice summary at the end of its output, where you can see exactly what was set up to be built.

The same note applies with respect to missing libraries as with Mono.

NOTE: KDE and Qt are massive and the amount of disk space this will cost you runs in gigabytes, so make sure you have plenty. My kde-sources directory with a full KDE build in progress is now 7gb, I kid you not. Mono is much smaller: 2gb.

January 12, 2009 :: Utrecht, Netherlands  

Jason Jones

Starting 2009 off right!

Well....  It became time again quickly to have a LAN party after the craziness of the holiday season.  So, we decided to have one two days ago.  It was fairly awesome.

I didn't bring my camera, so I don't have a video of this one, but suffice it to say that this one was pretty darned fun.  It started with Eric Hansen and I loading up my mustang with a bunch of computer equipment and heading up to Perry (Shane's house) around 4:30 on Friday.

When we arrived, we had some scrumptious burritos with ingredients home-made by Becca (Shane's wife)...  Those were awesome!  Then there were the pies and desserts and such which pretty much kept the sugar levels high.  Not to mention the plethora of SportEnergy drinks brought by Shaun.  So yeah... I was pretty caffeinated.

I think the best part of the games this time around was the selection of games we played.  UT2004 was exceptionally fun this time because we focused on teamwork.  We played hours of ET:QW, Nexuiz, and UT2004 before we went to bed at 5:30.

Oh yes... Shane also seemed to be in heaven the whole time because of the recent purchase of a new 42" LCD HDTV!  Yes... He used it as his monitor, and he loved it.  hehe...  Good times.

The next morning I woke up around 10:30am, went downstairs and before ya know it, we all started playing the original Enemy Territory, and we ended up playing until 2:15pm.  Totally unanticipated, but man... That was fun!  Good times!

So, another year, another LAN party.  Bring it on.  Very good times.

*UPDATE*  - I finally got some pics of that night. - Thank you Blaine!





January 12, 2009 :: Utah, USA  

Starting off 2009 Right!

Well....  It became time again quickly to have a LAN party after the craziness of the holiday season.  So, we decided to have one two days ago.  It was fairly awesome.

I didn't bring my camera, so I don't have a video of this one, but suffice it to say that this one was pretty darned fun.  It started with Eric Hansen and I loading up my mustang with a bunch of computer equipment and heading up to Perry (Shane's house) around 4:30 on Friday.

When we arrived, we had some scrumptious burritos with ingredients home-made by Becca (Shane's wife)...  Those were awesome!  Then there were the pies and desserts and such which pretty much kept the sugar levels high.  Not to mention the plethora of SportEnergy drinks brought by Shaun.  So yeah... I was pretty caffeinated.

I think the best part of the games this time around was the selection of games we played.  UT2004 was exceptionally fun this time because we focused on teamwork.  We played hours of ET:QW, Nexuiz, and UT2004 before we went to bed at 5:30.

Oh yes... Shane also seemed to be in heaven the whole time because of the recent purchase of a new 42" LCD HDTV!  Yes... He used it as his monitor, and he loved it.  hehe...  Good times.

The next morning I woke up around 10:30am, went downstairs and before ya know it, we all started playing the original Enemy Territory, and we ended up playing until 2:15pm.  Totally unanticipated, but man... That was fun!  Good times!

So, another year, another LAN party.  Bring it on.  Very good times.

January 12, 2009 :: Utah, USA  

Starting off 2009 Right!

Well....  It became time again quickly to have a LAN party after the craziness of the holiday season.  So, we decided to have one two days ago.  It was fairly awesome.

I didn't bring my camera, so I don't have a video of this one, but suffice it to say that this one was pretty darned fun.  It started with Eric Hansen and I loading up my mustang with a bunch of computer equipment and heading up to Perry (Shane's house) around 4:30 on Friday.

When we arrived, we had some scrumptious burritos with ingredients home-made by Becca (Shane's wife)...  Those were awesome!  Then there were the pies and desserts and such which pretty much kept the sugar levels high.  Not to mention the plethora of SportEnergy drinks brought by Shaun.  So yeah... I was pretty caffeinated.

I think the best part of the games this time around was the selection of games we played.  UT2004 was exceptionally fun this time because we focused on teamwork.  We played hours of ET:QW, Nexuiz, and UT2004 before we went to bed at 5:30.

Oh yes... Shane also seemed to be in heaven the whole time because of the recent purchase of a new 42" LCD HDTV!  Yes... He used it as his monitor, and he loved it.  hehe...  Good times.

The next morning I woke up around 10:30am, went downstairs and before ya know it, we all started playing the original Enemy Territory, and we ended up playing until 2:15pm.  Totally unanticipated, but man... That was fun!  Good times!

So, another year, another LAN party.  Bring it on.  Very good times.

January 12, 2009 :: Utah, USA  

Starting off 2009 Right!

Well....  It became time again quickly to have a LAN party after the craziness of the holiday season.  So, we decided to have one two days ago.  It was fairly awesome.

I didn't bring my camera, so I don't have a video of this one, but suffice it to say that this one was pretty darned fun.  It started with Eric Hansen and I loading up my mustang with a bunch of computer equipment and heading up to Perry (Shane's house) around 4:30 on Friday.

When we arrived, we had some scrumptious burritos with ingredients home-made by Becca (Shane's wife)...  Those were awesome!  Then there were the pies and desserts and such which pretty much kept the sugar levels high.  Not to mention the plethora of SportEnergy drinks brought by Shaun.  So yeah... I was pretty caffeinated.

I think the best part of the games this time around was the selection of games we played.  UT2004 was exceptionally fun this time because we focused on teamwork.  We played hours of ET:QW, Nexuiz, and UT2004 before we went to bed at 5:30.

Oh yes... Shane also seemed to be in heaven the whole time because of the recent purchase of a new 42" LCD HDTV!  Yes... He used it as his monitor, and he loved it.  hehe...  Good times.

The next morning I woke up around 10:30am, went downstairs and before ya know it, we all started playing the original Enemy Territory, and we ended up playing until 2:15pm.  Totally unanticipated, but man... That was fun!  Good times!

So, another year, another LAN party.  Bring it on.  Very good times.

January 12, 2009 :: Utah, USA  

Starting off 2009 Right!

Well....  It became time again quickly to have a LAN party after the craziness of the holiday season.  So, we decided to have one two days ago.  It was fairly awesome.

I didn't bring my camera, so I don't have a video of this one, but suffice it to say that this one was pretty darned fun.  It started with Eric Hansen and I loading up my mustang with a bunch of computer equipment and heading up to Perry (Shane's house) around 4:30 on Friday.

When we arrived, we had some scrumptious burritos with ingredients home-made by Becca (Shane's wife)...  Those were awesome!  Then there were the pies and desserts and such which pretty much kept the sugar levels high.  Not to mention the plethora of SportEnergy drinks brought by Shaun.  So yeah... I was pretty caffeinated.

I think the best part of the games this time around was the selection of games we played.  UT2004 was exceptionally fun this time because we focused on teamwork.  We played hours of ET:QW, Nexuiz, and UT2004 before we went to bed at 5:30.

Oh yes... Shane also seemed to be in heaven the whole time because of the recent purchase of a new 42" LCD HDTV!  Yes... He used it as his monitor, and he loved it.  hehe...  Good times.

The next morning I woke up around 10:30am, went downstairs and before ya know it, we all started playing the original Enemy Territory, and we ended up playing until 2:15pm.  Totally unanticipated, but man... That was fun!  Good times!

So, another year, another LAN party.  Bring it on.  Very good times.

January 12, 2009 :: Utah, USA  

January 11, 2009

Matija Šuklje

Jamendo + Electric Sheep

I just made an account on Jamendo and am loving it!

Instantly I found two great albums — Salomé on Blue Planet's Butterfly by Bruno-EM and Electronic Works (EP) by Tom La Meche.

Also there's this awesome community-driven animated fractal flame downloader, presenter, voting machine and screensaverElectric Sheep, that complements the mellow jazz and lounge quite nicely. Maybe androids listen to mellow experimental electronic jazz as well :]

hook out >> listening to Jamendo's artists, Electric Sheep running in the background and studying hard
<!--break-->

January 11, 2009 :: Slovenia  

Ciaran McCreesh

Paludis 0.34.0_alpha2 Released


Paludis 0.34.0_alpha2 has been released:

  • Unpackaged repository now defines merge and strip phases, making phases useful for importare.
  • Fixed build errors on certain systems.
  • Stop pythons from eating all your rams when compiling.
  • Updates to zsh completions.
   Tagged: paludis   

January 11, 2009

Stopping Pythons from eating your Rams


As various people have found out the hard way, and much to my annoyance because my laptop is memory starved, building Paludis can sometimes take lots and lots of RAM.

Originally, we didn’t do anything about this. But unfortunately lots of users have silly things like MAKEOPTS="-j9", which can result in the build process wanting somewhere in the region of eight gigs of RAM, which in turn leads to users whining about gcc internal errors or random processes being OOMed. So we stuck a nasty hack in the ebuild that would reduce MAKEOPTS based upon how much free memory you had — all very well, but it screws over distcc users and isn’t even necessary for many combinations of USE flags and CXXFLAGS.

It’s worth working out exactly what makes the compiler memory usage so high. It’s fairly easy to figure out that it’s only an issue when building the Python bindings. We use Boost.Python for these, and unfortunately Boost will quite happily use horrible preprocessor hacks that result in huge generated source files and all sorts of nasty workarounds just to get code to work on ancient unsupported Microsoft compilers. It’s enough of a problem for enough people that there’s a tutorial section on reducing memory consumption for Boost.Python, but we already do those things.

There’s something else interesting, though. With debugging turned on (which autotools does by default), we need something like 800MBytes to compile one particular Python binding file. With it turned off, we only need 300MBytes, which is much less likely to be a problem (and more to the point it won’t make my laptop start swapping). It turns out that building the Python bindings with -g isn’t even useful — gdb doesn’t give particularly useful backtraces on the Python interpreter, and there are better ways of tracking down problems there.

So it looks like it makes sense to add -g0 (after checking that the compiler supports it) to CXXFLAGS for the Python bindings. Easy enough, right?

Wrong. As with everything else involving autotools, we have to jump through all sorts of convoluted hoops to do this. CXXFLAGS is a user variable (so we aren’t supposed to change it), and it takes precedence over AM_CXXFLAGS (which we can change). There’s no ‘more important than the user variable’ variable, and we can’t sensibly override CXXCOMPILE, so this gets messy. We have to abuse configure.ac to remove the debugging options from the user’s CXXFLAGS and move them into something that ends up in AM_CXXFLAGS, which we can then override. Horrid.

The next Paludis release will include this voodoo, which should improve things considerably and let us avoid the nasty MAKEOPTS mangling. But it’s still not ideal.

Most Gentoo users have USE="python" set, either from profiles or explicitly. Most of these users do not want to build the Python bindings. Some of these users don’t think to look at the dependencies before moaning that Paludis requires Boost, so they don’t even realise it’s only because they’re using a USE flag they probably don’t want enabled. So what can we do about this?

We can’t use IUSE defaults, since we don’t really want to use anything later than EAPI 0 for package manager ebuilds. We could turn off python selectively in package.use, but lots of users still have USE="python" set explicitly. So we use a different USE flag name. We’ve gone for python-bindings, along with a use description that makes it clear that thinking “well I have some things that use Python so I probably want this flag on” is wrong.

For consistency, we’ve also renamed ruby to ruby-bindings. These are a lot more useful than the Python bindings (playman is written in Ruby), and a lot faster to build thanks to Ruby having a reasonably sane API, so we might end up having to mess with profiles to turn them on by default.

I might end up reverting all of this if it turns out it does more harm than good. We’ll see.

   Tagged: boost, c++, gentoo, paludis, python, ruby   

January 11, 2009

January 10, 2009

Clete Blackwell

Windows 7 Build 7000 First Impression

For a brief period of time yesterday, the first public beta of Windows 7 was released. However, due to server overload issues, Microsoft pulled the beta. They are waiting to officially re-release it until they revamp the infrastructure for the servers hosting the beta.

Luckily, I was able to snag a key and copies of both the 32-bit version and the 64-bit version of Windows 7 Build 7000. It now appears that anyone can get one of 10 universal keys (e.g. these are non-unique) and a copy of Windows 7 on the Microsoft website using a workaround. Although the beta isn’t officially re-released, you can snag it. Neowin shows you how.

I decided to install the 64-bit version of Microsoft’s new operating system. The first thing I noticed is its similarity to Windows Vista. The installer was nearly identical, except for the branding change. The installation progress took about the same amount of time that Vista’s installation process took. However, upon the first boot, I was not delayed for five minutes while it checked my Windows Experience Score. This was one thing that greatly bothered me about Vista. Upon the first boot, you had to wait about five minutes while Windows created a ’score’ for your computer that rates its performance. This feature is still integrated into Windows 7, but you must do a manual update of the score.

One nice thing upon the first boot was that it immediately ran Windows Update and downloaded drivers for both my graphics card and my memory card reader. This was a welcomed addition to the OS. Prior to Windows 7, the OS would wait 10-20 minutes before running Windows Update, but not now. Windows 7 updated (and didn’t even ask me if I wanted to update) my drivers automatically.

The OS is fairly snappy, but not without its problems. I have had quite a few Internet Explorer crashes, which are expected since Internet Explorer 8 is still in beta. It seemed to have an issue where a page would sometimes just refuse to load and the process would have to be killed. Sometimes, Internet Explorer would crash when you click on a link and then, all of a sudden, a few seconds later the page would be completely loaded. IE also had some scrolling issues.

The major addition is the Super Bar, which (in my opinion) is a much-needed change to the old-style task bar. Quick launch is gone; now you just pin items to the bar. You can easily drag and re-arrange the icons on the bar in any order you want them to be. Also, you can easily scroll over the far-right side of the bar and see your desktop easily. You can scroll over an instance of a program and see a thumbnail of it just like in Vista. But now you can roll over a specific instance of a window and it will temporarily come in front of all the other windows. This is really useful when you’re downloading something and you just want to check on the progress and then have the window go back behind the work that you’re doing.

I really liked the Super Bar. It definitely takes some getting used to when you’re used to the old-style task bar, but it is a really great feature.

I haven’t noticed a whole lot of other changes, but if I notice something striking, I’ll write a post about it. Be sure to head over to the Neowin article and try out the beta yourself!

January 10, 2009

Ciaran McCreesh

Paludis 0.34.0_alpha1 Released


Paludis 0.34.0_alpha1 has been released:

  • Masks that have been overridden by the user are now shown.
  • Support phases.
  • Paludis internals are now threaded using pthreads, and provide the SGI guarantee.
   Tagged: paludis   

January 10, 2009

John Alberts

Linux 2.6.28’s five best features

Nice little summary of great features of the 2.6.28 kernel. I have to agree. I just installed the 2.6.28 kernel as part of my new Funtoo install a few days ago, and I haven’t run into any problems yet. I’m about to give ext4 a try. Hopefully all goes well.
[excerpt]
This Christmas Linux kernel release brings several great new features to Linux, and its improvements promise even more Linux desktop goodness in the future.[/excerpt]

read more | digg story

January 10, 2009 :: Indiana, USA  

Martin Matusiak

the good that Apple does

Technology is a market. As all markets, it’s prone to the forces of supply and demand, of perceived demand, of risk, and hype, and potential revenue in the wide digits. But let’s face it, far too much time is spent standing around wondering what the “next big thing” is going to be.

Phones

That’s where Apple is different. They just say “We want this, so we’re building this. To hell with everyone else.” Now, if this were a tree in an empty forest (if it were empty, there wouldn’t be any other trees, would there?), noone would know about their products. But Apple has this talent for attracting attention. They’re so secretive, and they love to surprise you. So when they stand next to that new statue and lift the veil, the technology press feels obligated to clap and cheer despite themselves, because of the anticipation.

Now, in this market of ours, Apple creates an action, widely perceived. This sends all those drones waiting for “the next big thing” running out of the room to their labs. The action creates a reaction. Google says “We want to build a phone, also with a rich runtime environment, but one that *doesn’t* make the owner feel like he lives in Guantanamo Bay.” Would Google have created Android without the iPhone? Who knows, but the fact is they didn’t. Along come other responses. Palm is getting in on the game now. And Nokia finally got to work on a Linux-based phone platform (what on earth have they been waiting for all these years??).

It’s a strange thing. Now, all these companies are rolling up their sleeves to build better phones. So why the hell didn’t they before? The same exact companies that have been selling junk for a decade are now trying to improve their products. Why? Because Apple got everyone thinking that there is a demand for this. Before the iPhone, all the companies kept stealing quick glances at each other, scrambling to deliver whatever new tiny piece of junk the other was selling.

Apple, despite the murkiest of intentions, have brought about a positive development.

Software

Vendors in free software don’t spend a lot of time on marketing, it’s not their game. And even if they did, they don’t have armies of marketeers and astronomical advertising budgets, so it’s a different kind of marketing. KDE4 might be the best example of that; they really made an effort to be heard. But they’re not in a position to stir up the same kind of hype that Apple can do with hard cash on the table. And thus the role of free software is often that, not of actor, but of reactor.

Free software is often the re-implementor. It doesn’t seem very glamorous, but it delivers a very important product. OpenOffice is clearly a ploy to replace Ms Office, but its users are nevertheless very grateful that it’s there. Mono isn’t a “new thing”, but it does bring the rich .NET runtime to Linux. Linux itself is just a reimplementation of Unix, but who could argue it hasn’t been a wonderfully positive force? And how much good has the Wine project done, enabling countless people to run their legacy apps?

Sometimes a reaction is just the thing you need to get what you want. Stallman spent a decade warning people about the “java trap”. Now that java is free software, does that make the people who worked on Classpath, Kaffe and all the other free java projects feel stupid? I doubt it, because it was their response that led to a free java. Sun, who had been forever clutching to java like a kid to his teddybear, didn’t want to give up control of java. But they realized that left unchecked, this activity in the community would replace java and they would lose all control over it. So they made it free. But someone had to make them do it.

January 10, 2009 :: Utrecht, Netherlands  

January 9, 2009

John Alberts

Huge List of Tips and Tricks

I can’t believe I never saw this before.  Sourceforge has an absolutely HUGE list of tips and tricks.  There’s hundreds of Linux tips and lots of programming tips as well.

January 9, 2009 :: Indiana, USA  

Kevin Bowling

Welcome back, Palm! The New Palm Pre

I’ve always been a fan of Palm hardware, and even had a soft spot for PalmOS until it was left to rot for so long.

Indeed, my Palm 800w is a fine piece of hardware even though it was quickly eclipsed by the Treo Pro, but Windows Mobile has been really painful. It is slow, bloated, and crashes frequently. It has zero intuition and single-handed operation is out of the question. Worst of all, there seems to be a lack of useful or quality apps that were abundant in PalmOS.   I am a bit mad that I paid $500 for such a lemon.

Enter the Pre, which looks like just the thing to get me back on board with Palm and get them back in the game.

The hardware design looks beautiful, giving a large screen but keeping the tactile and speed of a keyboard (this is the iPhone’s biggest weak spot IMHO).  It looks like typical form factor for this style of phone, similar to the new Blackberry, so nothing earth shattering there, but the OS looks top notch and is based on Linux.  I think if Palm is able to deliver, they will once again be competitive, and they will keep me as a customer.

Take a look at these links for a nice report:
http://arstechnica.com/news.ars/post/20090108-palm-launches-new-handset-pre-operating-system-at-ces.html
http://www.palm.com/us/products/phones/pre/index.html

Share and Enjoy: Digg del.icio.us Slashdot Facebook Reddit StumbleUpon Google Print this article!

Related posts:

  1. Phoronix Benchmarking.. Statistically Significant? and Other Performance Concerns Phoronix has been cranking out a slew of benchmarks recently,...

January 9, 2009

January 8, 2009

Martin Matusiak

Hello .NET

So I’m researching .NET/Mono for an application I might be doing for Windows. There are two important constraints:

  • The application shall not require installation privileges. (Or users in locked down environments might not be able to run it.)
  • The application shall be maximally robust with respect to runtime environment. (So that I can leave it behind with the best possible hope that it will work for years.)

The first rules out shipping an install bundle of any sort, and the runtime environment is presumed to be a vanilla Windows install. At most I can hope for a .NET runtime since it comes with XP-SP2 (I think) and certainly Vista and onwards. As for the second, I’ve considered things like py2exe, which bundles code with .dlls for Qt and whatever else the python code actually uses. While this seems to produce a self sufficient bundle (without requiring an install), how do I know if py2exe is going to be around in a few years when I may need to rebuild? And the Qt libs for that matter, they depend on OS-level libs that may change over time, that I have no control over.

So .NET seems to be the best only choice. Now, I obviously want to be able to run it on Mono as well, if for no other reason than to run it myself. So I have to stay clear of .NET-only bits.

That means hello Windows Forms (WPF is out, Mono doesn’t support it). Now, I should say first off the bat that I’m not a gui coder. I don’t like gui, it takes too much work to produce a really good gui, and it’s way more hassle than I like to put up with. Nevertheless, I’ve seen a few of them. And Windows Forms… it’s something else. On the face of it, the .NET library seems to be stocked reasonably, with classes for gui controls (System.Windows.Forms) and for drawing primitives (System.Drawing).

But then you look at some example code and you have to pinch yourself cause it’s so unbelievable. I should preempt here by saying that all the gui toolkits I have seen in recent history handle layouting the same way: with layouts. You create a container that is, say, a grid, and put some widgets in it. The layout takes care of distributing the widgets in the container in a particular way. This takes care of resizing, because the widgets scale to the size of the container (and the containers, in turn, to the size of the gui). Containers can be nested to produce panels and so on.

Far be it for me to say that I like coding gui this way. It’s a huge pain to set all this up. And it doesn’t make resizing work well either, you have to put in a lot of extra effort just for that part. But at least it’s a reasonably clean solution, and it’s how Swing, WxWidgets, and I’m pretty sure Gtk and Qt as well, work.

Not Windows Forms. In Windows Forms you have containers, but there are no layouts. Everything is positioned with coordinates. As in here is a button, put it 5 pixels from the edge of the container; here’s another button, put it in this location I have computed manually based on the first button. This has implications:

  • positioning is pixel based,
  • dimensioning is absolute - no resizing possible,
  • there is no rendering.

As it turns out, the gui form is basically a canvas you can paint on. Widgets and drawing mix freely on the same pane. But remember that Drawing api I mention? It’s pixel based, no Qt or Cairo rendering for shapes or fonts. Neither does .NET have any kind of svg-based rendering that I know of.

The whole thing makes me feel like a time traveler. Remember that Windows Forms isn’t a deprecated library, it’s still actively used (and Mono just recently got done implementing it).

So why bring this up? It’s good to remember sometimes that just because something is hyped a lot doesn’t make it good. Remember, .NET 3 only appeared recently, in 2006. That makes Windows Forms the designated gui toolkit right up to that point. Swing, ugly as it may be to look at (and sluggish as it’s always been) came out with Java 1.2 in 1998. (As a matter of fact, I think even AWT had layout managers in 1995.)

January 8, 2009 :: Utrecht, Netherlands  

Jürgen Geuter

You know you are a valued customer when ...

... the company you buy your stuff from does some housecleaning and throws away crap that was included in the stuff you bought. But instead of just making your bought items crap-free you have to pay another fee.

Welcome in the world of the (Cr)Apple customer ;-)

January 8, 2009 :: Germany  

Daniel Robbins

Portage is now Git-Friendly

I’m pleased to let everyone know that Portage is now git-friendly. As of version 2.2_rc20, Portage will now operate at full efficiency with git-based Portage repositories. Here are details on the changes:

First - “emerge --sync” will now properly recognize an existing git-based Portage repository. When you run “emerge --sync” with an existing git-based repo, Portage will run “git pull” inside the repository to update it.

Second - due to cache fixes, dependency calculations and searches are now just as fast as they are with rsync-based trees, and eix works properly with no issues. To benefit from cached metadata (this is what makes things fast,) you must use “emerge --sync” to update your git-based Portage tree.

Many thanks to Zac Medico (Gentoo Portage developer) for integrating our fixes into Portage, as well as providing general guidance, support and an excellent and much-appreciated fix for the cache speed issue.

So, if you are using the Funtoo Portage tree, first upgrade to Portage 2.2_rc20 or later, and then start using “emerge --sync” to update your tree. This will allow Portage to work optimally for you.

Note that the one thing that Portage does not yet do for you is to create the initial git-based Portage tree for you. To create your git-based portage tree, you can grab one of the Funtoo snapshot tarballs, or use git clone. The only additional step required beyond this is to create and checkout the branch you want to use. From that point forward, “emerge --sync” will take care of everything.

And a word for developers and distro creators:

One of the goals of Funtoo is not just to give you goodies, but to give you all the tools that we use ourselves, so you can do exactly what we do. So, one thing I am hoping to package up soon is the Portage code that I use to generate all that cached metadata that we add to our git tree that makes Portage fast for you. This will allow you to create your own git-based Portage trees that are fast for your users. The code itself is written by Zac, and we are both looking at the best way to package these tools up and make the cache-creation process as simple as possible for everyone.

January 8, 2009

Dirk R. Gently

Grub Password-protection


Password-protecting Grub is a good thought to add security to the computer. It is especially good thought if the BIOS doesn’t have support to require a password to boot. Here’s a basic easy way of going about it.

Decide what the password is going to be and remember it. If you’re like me and for good security don’t allow the CD/DVD player to load at boot in the BIOS, forgetting a password can be disastrous - write it down and put it in your wallet if needed. Now use grub-md5-crypt to create an encrypted password:

$ grub-md5-crypt
Password:
Retype password:
$1$ZOGor$GABXUQ/hnzns/d5JYqqjw

Type in the password twice and copy the md5 encrypted password. In the /boot/grub/grub.conf file type in password --md5 followed by the password as one of the beginning lines in the grub.conf.

# /boot/grub/grub.conf
password --md5 $1$ZOGor$GABXUQ/hnzns/d5JYqqjw

Grub documentation says that the password line must be one of the beginning lines in the grub.conf file, so I put mine as the first entry. Also if there are a lot of comments at the beginning of the grub.conf file, erase them as I found out too that they can cause grub to ignore the password line. Take out the timeout line unless the default entry is wanted to be loaded automatically and is not password-protected.

To password-protect a boot entry just enter lock after the title line:

title Gentoo Linux 2.6.27-r1
lock
root (hd0,4)
kernel /boot/vmlinuz-2.6.27-gentoo-r2 root=/dev/sda5

Add the lock line to each boot entry and the computer will be protected from anyone being able to boot it without entering a password.

      

January 8, 2009 :: WI, USA  

January 7, 2009

Jason Jones

New Song - "Dance With Me"

Well... Nothing too exciting in my life, but I thought I'd tell everyone that I wrote a new song.  As you can probably guess, it's called Dance With Me.  It's nothing more than a bass-line I came up with and a few more instruments.

I've gotta say though, Ryan Phillips, the guy on the guitar is awesome.  I love working with him, and I love working through the Internet.  All the guitar parts were learned and performed remotely and sent to me via email.

Isn't the Internet great?

Also, as usual, the entire song was built using open source applications running on gentoo Linux (I don't know how Ryan records the guitar part, but we'll pretend he uses Linux)

  • ardour 2.7

  • JAMin .95

  • LADSPA effects

  • MUSE sequencer



I can't wait to start working on the next one...  I really am enjoying this.

*note* - The way to listen to the song is to click the little "play" button at the top-right corner of this page.  It's a circle with a "play" icon.

January 7, 2009 :: Utah, USA  

New Song - "Dance With Me"

Well... Nothing too exciting in my life, but I thought I'd tell everyone that I wrote a new song.  As you can probably guess, it's called Dance With Me.  It's nothing more than a bass-line I came up with and a few more instruments.

I've gotta say though, Ryan Phillips, the guy on the guitar is awesome.  I love working with him, and I love working through the Internet.  All the guitar parts were learned and performed remotely and sent to me via email.

Isn't the Internet great?

Also, as usual, the entire song was built using open source applications running on gentoo Linux (I don't know how Ryan records the guitar part, but we'll pretend he uses Linux)

  • ardour 2.7

  • JAMin .95

  • LADSPA effects

  • MUSE sequencer



I can't wait to start working on the next one...  I really am enjoying this.

*note* - The way to listen to the song is to click the little "play" button at the top-right corner of this page.  It's a circle with a "play" icon.

January 7, 2009 :: Utah, USA  

Daniel Robbins

My LinuxCrazy Interview

Before Christmas, I did my first-ever podcast Interview with David Abbott (comprookie2000) of LinuxCrazy.com.

In the interview, we talk about Funtoo, as well as a bunch of other things. Be sure to check it out – David is a great guy and I had a great time doing the interview.

January 7, 2009

Jürgen Geuter

Changing the boot order on an NSLU2 running Debian (for fun and profit)

So I got this NSLU2 and run Debian on it, just one problem: I have the system installed on a thumbdrive in slot2 and as soon as I plug a harddrive into slot1 the order of drives (/dev/sd*) gets messed up and the system won't boot cause it can't find the kernel and root device. Which is bad. I mean I could turn it on and plug in the harddrive later but where's the fun in that?

So what to do? Use UUIDs to access drives and partitions since they don't change. Here's how that goes.

First find out the UUID of your root device. Let's just assume it's /dev/sda1 so you run vol_id /dev/sda1. You get a bunch of lines one starting with "ID_FS_UUID", this is the relevant value. Run the command for all your partitions, which gives you a list of UUIDs for your crap.

$MY_UUID is a placeholder, you have to insert the actual value there. Just wanted to make that clear, don't wanna get complains here that $MY_UUID doesn't work.

Let's first do the easy thing, fix /etc/fstab. Replace your partition names with "UUID=$YOUR_UUID" as for example replace "/dev/sda1 / ext3 noatime,nodiratime,errors=remount-ro 0 1" with "UUID=$MY_UUID / ext3 noatime,nodiratime,errors=remount-ro 0 1". Do the same for all partitions (don't forget swap ;-)) and your system will always mount the partitions right. YAY! Wait.

The kernel might still pick up the wrong device as root device. We need to fix that, too. The annoying thing is that the NSLU2 needs a second-stage bootloader called APEX which passes the parameters to the kernel. That APEX lives in the flash memory (/dev/mtdblock2) but you don't wanna fuck around there with a text editor. Luckily there's the "apex-env" tool that allows changing the parameters (this page in the NSLU-linux wiki gives more details about it).

What you need to do is to pass the kernel the right device via the "root=" parameter. The good thing is that udev, the system that creates device nodes automagically already created all the nodes we need. When yo ugo to /dev/disk/by-uuid you'll see all your partitions listed there as their uuid. So you can pass root=/dev/disk/by-uuid/$MY_UUID to the kernel and it will boot the right device, whether it's /dev/sda or /dev/sdb or /dev/your_mom.

Running apex-env gives you the current variables APEX passes to the kernel. Most might look like black magic (and it probably is) but you only need the "cmdline" parameter. Copy the contents (in my case it had "console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug" in it) and append " root=/dev/disk/by-uuid/$MY_UUID" by running:

apex-env setenv cmdline 'console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug root=/dev/disk/by-uuid/$MY_UUID'


Now your kernel knows where your real root device is and all is fine and dandy. Yay.

If it does not work you might have a debian version plagued by a bug which is detailled here (go to "Root filesystem bug"). To fix it you basically just do "
echo "ROOT=/dev/disk/by-uuid/$MY_UUID" > /etc/initramfs-tools/conf.d/my-root-device-hack && update-initramfs -k all -u
.

January 7, 2009 :: Germany  

Daniel Robbins

Funtoo and Sunrise

Just wanted to let everyone know that I’ve gone ahead and merged the Sunrise overlay into the Funtoo Portage tree.

Much thanks to Caleb Cushing (xenoterracide) who did all the hard merging work. It took him a few hours, and because of his work, the merge only took me a few minutes. We both thought that git made things a little too easy – very cool as well as a bit spooky at the same time.

For those who don’t know, Sunrise is one of the oldest and biggest Gentoo overlays, and is an official Gentoo project as well. It contains about 590 new packages in a variety of categories.

Caleb is going to be sending me regular updates to Sunrise so that we can keep Funtoo up-to-date. So if you want to learn more about Sunrise, please check out the Sunrise project page.

January 7, 2009

January 6, 2009

Steven Oliver

Effeciency in SQL


At work I would say 90% of my job revolves around writing SQL. Generally there is no Plus in that SQL but every now and then I dabble in the Plus side of things.  But I’ve recently hit a problem. If your query is pulling 14,000+ rows (on purpose) whats the most efficient way to do that? But its not quite that simple though. Any idiot can do a

select * from table

and end up with 14,000+ rows of data. But what do you do when your query turns vulgar? Say you end up with something like this

select *
from table1 foo,
table2 bar,
table3 baz,
(select yup from table4 where bub = ‘123′) buz
where foo.hi <= sysdate
bar.yo = baz.yo
bar.yo = foo.bye
buz.yup = baz.yup

That might seem a tad absurd at first but I run into worse than that on a daily basis. Now, even that example isn’t too bad. But the one I recently ran into looked more like this

select *
from table1 foo,
table2 bar,
table3 baz,

(select yup from table4 where bub = ‘123′) buz,
(select yalp from table5 where whiz = ‘ABC’) biz,
(select yam from table6 where cheese = ‘123′) hippy
where foo.hi <= sysdate
bar.yo = baz.yo
bar.yo = foo.bye
buz.yup = baz.yup
biz.yalp = buz.yup
hippy.yam = bar.yam

Once you’ve reached that level of complexity you start to loose track of which query depends on which query to get its info. If you really look at whats going on you’ve got three sub-queries or nested queries that rely on a combination of each other along with the results of the query pulled from the other tables.  So question still remains is there a better way to do it?

At work we use Crystal Reports. Instead of writing code similar to this I will instead use what they call a “sub-report.” For each record returned in the report you create a new smaller report simply about that record. Obviously that becomes horribly inefficient as time goes on. So I end up doing SQL not do much different than the code above in order to achieve my goals.

Are there better options? Especially since the code above still takes forever to return results. Sure, if you only end up pulling back 20 rows, it’s fine. More than a 100 the amount of time a query like this takes to run becomes exponential.

      

January 6, 2009 :: West Virginia, USA  

Jürgen Geuter

Who wants a SmartUPS 700?

Since I removed my local file server Kayasuma and replaced it with a local Linksys NSLU2 (running Debian) and a vServer for my mails and probably some web projects the thing you can see in the included pictures is up for grabs. It's a APC SmartUPS 700 complete with the SmartSlot Thingy that you can access via Ethernet or a special serial cable (special serial cable not included but easy to build yourself). It has protected my fileserver against power-outs for some time but without a fileserver I don't need t anymore. Before I try to sell that baby on Ebay or somewhere I thought I'd post it here so the readers of this blog have the best option to get it. I'm not actually asking for money for it, you just need to take care of getting this thing away from me (by fetching it here [I'd throw in a Coffee ;-) ] or by paying for transportation). If you run a local fileserver and want to make sure that you can properly shut it down in case of a power shortage drop me a comment.

As I said, the thing comes with Batteries, the SmartSlot thingamajing but no cables.

January 6, 2009 :: Germany  

January 5, 2009

Roy Marples

OpenRC-0.4.2 out

Misc fixes for start-stop-daemon with the --retry option, more wpa_supplicant fixes for ctrl_interface entries and we compile again on BSD platforms.

January 5, 2009

Jürgen Geuter

My playlist is my castle!

When I moved into my first flat share me and my then-roommate always gave our guests full control over the music that was being played: All audio files were on a local file server and they were all easy accessible from one computer that we had set up in a way that everybody could go and look for songs to have them played.

I was recently reminded of that when I was at a friend's party: A laptop was being used to play music and display visualizations on the wall using a beamer, the host had carefully built a playlist that would bring us through the evening. Then the whole thing failed.

It shouldn't have been a surprise, it always failed back when we had our parties, too: People either were just not skilled enough using the tools we provided and messed the whole thing up by accident or where just intentionally rude and eliminated everyone else's wished (and enqueued) tracks. So when the host wasn't too happy with a few guys using the laptop to play some youtube clips with "their" music (and we all know how shitty the audio quality on many youtube clips is!) I said that he should have just locked the computer so nobody could modify the whole playlist thingy to which he said a very smart thing: "That would be a technological solution to a non-technological problem, I want people to just behave well".

Now I do agree that technology sucks and usually fails when it comes to solving problems that are not inherently technological: You can improve software to do its job better but you can not build technology that reliably makes sure nobody can get a free subway ride (your technology either becomes a privacy madness, doesn't really hinder those that really don't wanna pay, or is very very clumsy to use).

I'm a very positive, so even say naive, person: I always believe that things will work out or that people will behave nicely when in fact I should have learned by now that many just don't.

The music selection thingy on parties might not be just a technical problem - people just wanna play their music and if there's a way somebody will use it - but it has a very important technical part: The music is played by a device, a device you (in case you use a free OS ;-)) have control over.

When it comes to parties I consider it a good idea not to just let people decide what to play, it leads to arguments and annoyed people, lock the system up and ask people whether they have any wishes when a bunch of tracks are done.

The advice not to try to solve non-technical problems with technology is a very important and solid one but sometimes it's important to realize that, while a certain problem might not be purely-technical, it can be made technical.

Our rules and what we call "good advice" can easily turn into a dogma and if dogmas do one thing it is limiting our ability to think, to invent, to make things better. Keep good advice in mind but always check whether it really fully applies.

The question why people just don't behave properly is one that should be answered in another post, I don't feel like a sociologist or psychologist today ;-)

January 5, 2009 :: Germany  

Jason Jones

Gentoo / Gnome USB Automount

Awhile back, almost every gentoo / gnome computer I built would do this wonderful thing called "auto-mounting" all devices plugged in via USB.

Well, I really didn't know what or how this was done until it started not doing it any more.

So, I went over to my brother's house armed with a determination to figure this stuff out, and I'll be darned if we didn't figure it out (sort of)

Here's what I found out (which may or may not be correct in any way shape or fashion, but what happened, definitely happened)

  1. I started NFS, which in turn started some other processes, one of which was portmap and others.

  2. I had an entry in fstab which mounted the usb device to a directory.  This was hindering the auto-mounting process!  Don't have the entry in fstab.

  3. I removed the entry in fstab, plugged in the usb device, and shazam!  A window popped up with the files contained in the device.



So, I guess I did something right.  I still have no idea as to the technical details of exactly what caused what, but now it's working, and I thought I'd write it down so in a year when the same problem happens, I can refer back to this.

Hope it helps someone else.

January 5, 2009 :: Utah, USA  

Gentoo / Gnome USB Automount

Awhile back, almost every gentoo / gnome computer I built would do this wonderful thing called "auto-mounting" all devices plugged in via USB.

Well, I really didn't know what or how this was done until it started not doing it any more.

So, I went over to my brother's house armed with a determination to figure this stuff out, and I'll be darned if we didn't figure it out (sort of)

Here's what I found out (which may or may not be correct in any way shape or fashion, but what happened, definitely happened)

  1. I started NFS, which in turn started some other processes, one of which was portmap and others.

  2. I had an entry in fstab which mounted the usb device to a directory.  This was hindering the auto-mounting process!  Don't have the entry in fstab.

  3. I removed the entry in fstab, plugged in the usb device, and shazam!  A window popped up with the files contained in the device.



So, I guess I did something right.  I still have no idea as to the technical details of exactly what caused what, but now it's working, and I thought I'd write it down so in a year when the same problem happens, I can refer back to this.

Hope it helps someone else.

January 5, 2009 :: Utah, USA  

January 4, 2009

Matija Šuklje

GNU is 25 years old!

Rejoice and sing the Gnu song! GNU is a quarter of a century old!!

Richard Stallman started the GNU project on September the 27th 1983, with its first code written on January the 5th 1984 ...which is, yes, exactly twenty-five years ago! Congratulations GNU!!! :D

Read more about it on FSFE's news post.

Hmmm, coincidence has it that I also came to be in 1983 — I suppose that makes me the GNU generation ;)

hook out >> drinking herbal tea and studying
<!--break-->

January 4, 2009 :: Slovenia  

Ciaran McCreesh

Three Shiny Things


   Tagged: bash, firefox, vim, vimrc   

January 4, 2009

Jürgen Geuter

25th Chaos Communication Congress, a (late) review

Better late then never, here's a short review of the 25th Chaos Communication Congress that took place in Berlin from December, 27th till December 30th. First I'll give a few general remarks and will later tell you a few things about the talks I saw.

The Congress was organized very well, though the wireless was very flaky. The catering was priced OK (a tea was 1€) the talks were mostly of a very high quality and there were many interesting projects there that allowed you to see what they were up to (like OLPC guys, Debian, Gentoo and people building little helicopters). The whole atmosphere was very creative, very motivating and fun. The talks started late enough to allow you to get enough sleep and a good breakfast. The congress was sold out on the first day so I think they'll have to move to a bigger location for next year; this made the whole building very very crowded on the later days and it was sometimes hard to get seats to certain talks. To get a few more direct impressions from the whole thing, check the identi.ca #25c3 hashtag.

Now let's look at some of the talks I saw. I'll tell you which talks I saw and whether they were good so you can decide whether you want to check them out yourself: All talks were recorded and can be downloaded from the official page. If any of the talks I hint at sounds interesting to you, you should absolutely grab the recording (they even offer them in a format that you can check out on your Ipod or other mobile devices).

Day 1 (27th)
Datenpannen - Forderungen nach dem jahr der Datenverbrechen was a good talk. 2008 had seen many privacy related disasters in Germany and many other countries where private data of people was leaked into the wild, those cases were summarized and a bunch of requirements for the future were derived. Nothing spectacular but still a great way to get into the congress (talk in German).

The Trust Situation - Why the idea of data protection slowly turns out to be protective sounded like a really interesting talk but turned out to lack focus. There were some problems with out concepts of data protection outlined but in the end you were left with an hour of (to me) pretty random slides that just kinda happened. But a good tickler for your own brain to think about a few aspects.

Der Hackerparagraph 202c StGB - Bestandsaufnahme und Auswirkungen was a fun talk outlining the problems with a German law that forbids the use end development of "hacker tools". Since most tools in that respect are of clear dual use: The good and the bad guys use them just for different purposes. If you already followed the discussion somewhat this talk does not bring a lot of news but it's still somewhat fun. (talk in German)

About Cyborgs and Gargoyles - State of the art in wearable computing sounded like a brilliant talk but turned out to be one of the worst I saw. It was pretty much the summary of one guy's PhD and mixed the typical "academic" namedropping ("this work was done by X,Y,Z, Professor A, Professor B..." ), which made the whole thing really annoying to listen to, with carefully mentioning every corporate sponsor of whichever project (which might be relevant when you want to make your masters happy but for people interested in the contents it just sucks cause you sound like an advertising machine. It was not a big summary detailing what people do, but just him talking about his (and his friends and coworker's) projects. Pretty much a wasted hour.

Terrorist All-Stars - Some cases of terrorism around the world that are not terrorist at all was a great talk. It outlined many cases all over the world where anti-terrorist laws was used to shut critics up and to fight demonstrations and other completely legal and desirable expressions of people's personal opinions. The style was maybe somewhat dry at times but it's absolutely worth checking out!

Das Grundrecht auf digitale Intimsphäre - Festplattenbeschlagnahme in neuem Licht outlined, how the confiscation of hard disks has to bee seen considering the given German laws. It explained the legal basics and described the everyday life of a judge in Germany (one of the people talking was a judge). Interesting talk in German.

Beyond Asimov - Laws for Robots - Developing rules for autonomous systems was an awesome talk. It outlined how autonomous systems work, what the state of the art is and why Asimovs Laws are great for stories but suck for real work use. In the end it outlined a new process that could make autonomous systems a lot safer to use. The slides, the style of the talk and the topic were all fun, you should absolutely check the talk out!

Advanced memory forensics: The Cold Boot Attacks - Recovering keys and other secrets after power off outlined how you can extract data from RAM even after the computer has been shut down. You might already have heard about the cold-boot attack but the talk gave some extra details in a fun way and outlined a few strategies to mitigate the risks though the problem isn't solved yet. Talk worth checking out!

Why were we so vulnerable to the DNS vulnerability? was Dan Kaminsky at his best. He outlined not so much his DNS Hack but what he did around it, what needed to be done to fix the problem and how he went to get that fix out in the wild. He also showed a bunch of lessons we can learn from that problem in our current state where we rely so much on so old standards and technologies. Definitely get this talk and watch it. You'll be entertained for an hour and learn something :-)

This ended the first day for me that had begun around 4 am when I had to get up to reach the train to Berlin.

Day 2 (28th)
Embracing Post-Privacy - Optimism towards a future where there is "Nothing to hide" was not a bad talk, it was actually a good mind-tickler though I saw a few problems with the referent's thesis. All in all it was a talk that you should probably check out if you are interested in privacy.

Attacking Rich Internet Applications - Not your mother's XSS bugs was not a bad talk, they showed a few interesting XSS attacks but all in all the talk was somewhat dry and I found that the heavy Italian accent made it hard for me to follow the talk. Interesting but not great.

Vulnerability discovery in encrypted closed source PHP applications was somewhat dry, too, cause it dealt with PHP Bytecode generation and such but was interesting, especially if you ever had to work with encrypted PHP applications (which suck donkey butt btw ;-)).

Scalable Swarm Robotics - Formica: a cheap, open research platform was awesome. The guys built super-cheap autonomous robots that can communicate on stock parts which runs on an open platform so you can play with it, too. Those robots looked like fun, /me wants some. Check the talk out and tell the guys you want a kit so they start selling them :-)

Rapid Prototype Your Life - The time is now to make anything you can imagine was probably one of the most fun talks I saw. Bre Pettis is just a joy to listen too and the idea of being able to just make things rocks. Also, if I was manufacturer of Laser Cutters, I'd hire him to do my advertising. Download the talk, you will not regret spending an hour on it, it's probably the talk I recommend most. (Fun fact, you can hear me asking a question at about the 51th minute ;-) )

The Infinite Library - Storage and Access of Pornographic Information was a fun talk about the organisation of Porn and how different people handle it. On a more serious note it was a talk about semantics and semantic structures in data which might not been what many people took away from it, but it can still give you some great ideas about semantic representation of data. The listener questions were especially fun so check that talk out, too.

Fnord News Show - Wir helfen Euch, die Fnords zu sehen was pretty much a just for fun thing. Big fuckups of corporations, individuals or governments were shown and some even got prizes, a fun hour that I listened to in German but that's also available in English.

Soviet Unterzoegersdorf - A Nation In Transit. I don't exactly know how to describe this. It's art/comedy and most of all: Fun! The nation of "Soviet Unterzoegersdorf" tells about its struggles in "bringing socialism to the world" which songs and talks and video games. Download it.

This ended the second day.

Day 3 (29th)

I didn't attend any talks this day cause me and my girlfriend slept late and went to the opera (La Traviata) and out for dinner in the evening. The day was great but you cannot download any of it ;-)

Day 4 (30th)

Why technology sucks - If technology is the solution, politicians are the problem tried to outline why you cannot solve non-technical problems with technology but somewhere lost its train of thought (probably cause the intended speaker couldn't make it to the congress). Not a bad talk but somewhat unstructured.

Not Soy Fast: Genetically Modified, Resource Greedy, and coming to a Supermarket Near You - The silent march of the multinational GMO soy industry and its growing power in South America, the EU, and around the World. A talk about food, especially soy, and how pretty much one company own "our foodchain" (Monsanto). Apart from showing how much of the world's food is in the hands of very few companies it also summarized a few problems with copyright ("What happens when the copyrighted, genetically modified soy from Monsanto somhow crosses into your unmodified crops? The Answer: You have to pay huge fees for copyright infringement"). Fun talk, worth downloading.

Wikileaks - Wikileaks vs. the World dealt with the wikileaks project and what they did so far. They outlined a few of the technical and non-technical problems they had to overcome and ended with a call for support of their project to get the information out into the public that we all want and need to be out there, things that governments and corporations don't want the public to know. The talk was somewhat dry but still not bad.

MD5 considered harmful today - Creating a rogue CA Certificate was probably (apart from Dan Kaminsky's talk on DNS) the most anticipated talk of the congress. The researchers showed how the combinations of the weakness in MD5 and the way certain SSL certificate vendors implemented their issuing allowed them to create a rogue certificate authority that was accepted by all major browsers out of the box. That would have allowed them (in combination with Kaminsky's DNS attack) to take over pretty much any website including every SSL signed website without any way for the end-user to notice the tampering. Awesome talk if you are interested in security and the web.

After the talk I had to leave to catch my train home.

Summarizing I gotta say that I loved it. Where I might as many have trouble listening to people talk about stuff I don't really care about (especially in "academic contexts") I never had any trouble to listen to the talks at the 25c3. Most speakers were well prepared and showed deep understanding of what they were talking about plus they were very open to suggestions and very approachable. I don't know of any other conference that allows you to get into contact with interesting people as easy as the Chaos Communication Congress.

Thanks go out to my girlfriend who came with me to Berlin and to Splitbrain who I did spend quite some time with at the congress. Let's hope we can repeat that next year!

January 4, 2009 :: Germany  

Johannes Gilger

rxvt-unicode 9.06 with 256 colors (and clickable links)

Up until right now I’ve been using xterm. While it’s not the best of terms it does support 256 colors out of the box (and I don’t use fancy stuff like transparency/translucency). What it has been lacking however, and which Flo pointed out, was the support to make URLs clickable. This is an important feature, especially since I use mutt and slrn regularly, and my IRC-client is irssi, so the majority of links I’m interested in arrives in my terminal.
So I went looking for a term with clickable urls but also with 256-color-support and found rxvt-unicode (or short: urxvt), which is a fork of the original rxvt with unicode-support (duh!). To get 256 colors working you have to apply the urxvt-8.2-256color.patch in the doc subdirectory of the source.
patch -p1 < doc/urxvt-8.2-256color.patch
autoconf
./configure --enable-xterm-colors

To configure urxvt you can conveniently use your ~/.Xdefaults. Mine looks like this:
URxvt.perl-ext-common: default,matcher
URxvt.urlLauncher: firefox
URxvt.matcher.button: 1
URxvt.reverseVideo: 1
URxvt.scrollBar: 0
URxvt.imLocale: de_DE.UTF-8
URxvt*foreground: grey6

The nice side-effect is that urxvt is about 10 times faster than xterm (try it by cat-ing a large file and using ‘time’ to measure it).

January 4, 2009 :: Germany  

John Alberts

Funtoo Articles

This is really old news, but it’s new news to me because I just noticed this.

Daniel Robbins Funtoo site now has some articles on it that he recently created.  Right now, he has posted some of the articles that we’ve previously seen on the IBM Developer Works website, but there’s also now a quide for installing Funtoo.

Technorati Tags: ,,

January 4, 2009 :: Indiana, USA  

January 3, 2009

John Alberts

Using CPAN Unattended

CPAN is great for easily installing and updating Perl modules. I use it all of the time on my servers. It’s a lot easier than managing Perl modules through the systems package manager. The problem is, when you want to install or update a Perl module, it asks you if you want to follow and install all of the dependencies and the dependencies for that… and so on. Sometimes you want to be anal and make sure it doesn’t install any extra crap, but quite often, it would be nice to just have it install what it needs automatically, so you can walk away and do other things while it’s installing.
I found this nice little blog post that shows you how to have CPAN automatically install all of the dependencies without prompting you.

January 3, 2009 :: Indiana, USA  

January 2, 2009

Kevin Bowling

I dream of pervasive virtualization…

I dream of a day where virtualization is pervasive.

Instead of thinking about services in terms of servers, CPUs or directly mapped resources, I should be able to to add virtual machines in terms of guaranteed throughput rate over a whole grid.  Scaling out should be as easy as adding a blade or racking another server.

At the low level, I should have the option of running N+N redundancy.  That is, the VM should run in lockstep across multiple machines - so if it is running on 2 vcpus, 4 in total would be used.  This would allow for any node to fail.  And the VM should be an aggregate of the low level hardware - e.g. a VM grid across 4 8-core servers should scale near-linearly when a single OS instance is running 32 processes.

Current solutions only attempt to do some of the tasks above, and most fail miserably.  IBM mainframes have been doing it for ages.

If I had the time, I know I could build software to do this better than anyone else.  All the puzzle pieces are there, especially the tough ones like hypervisors and Infiniband.  This could have been done at least 3 years ago.  I bet it will take the industry 3-4 years yet to get anywhere close.

This is a real virtual datacenter.

Share and Enjoy: Digg del.icio.us Slashdot Facebook Reddit StumbleUpon Google Print this article!

Related posts:

  1. Retrocomputing for Fun and Profit Buy Old Computers ??? Profit What is retrocomputing? I...
  2. Xen 3.3 in RHEL/CentOS 5 and more Link Aggregation Fun RHEL 5 includes the now ancient Xen 3.0 hypervisior.  A...
  3. Bulletproof your server to survive Digg/Slashdot implementing scale up for web 2.0 sites with current practices...

January 2, 2009

January 1, 2009

Kevin Bowling

Xen 3.3 in RHEL/CentOS 5 and more Link Aggregation Fun

RHEL 5 includes the now ancient Xen 3.0 hypervisior.  A lot has been improved since then, especially in the current 3.3 release.  Additionally, RedHat now owns the company behind KVM, so it is unlikely they will spend much time backporting Xen stuff for RHEL 5.3 or the likes.

Why Xen?

Xen is a proven hypervisor.  It works well on lots of hardware, including servers without hardware virtualization and older 64-bit Opterons that wont run 64-bit guests in the likes of VMWare.  Since the OS is usually paravirtualized, performance is top notch.  By making an OS aware of the environment it is running in, you can optimize it for virtualization.  KVM is playing catchup here, realizing that paravirtualization is still ideal for many things.

How..

Okay, so we are using or want to use Xen. Others have already built the packages we need, thankfully!

Head over to http://www.gitco.de/repo/ and grab the repo for your arch.  (Most likely wget http://www.gitco.de/repo/CentOS5-GITCO_x86_64.repo in /etc/yum.repos.d/ for the uninitiated).

If you already have Xen installed, you may need to remove and readd it.

yum groupremove Virtualization
yum groupinstall Virtualization

You’ll also get some updated tools like Virtual Machine Monitor 0.6.0 that make it easier to install newer guests such as Fedora 10 or Ubuntu.  Sweet!

Double check /etc/sysconfig/kernel.  It should be set to kernel-xen.  Likewise, check /boot/grub.conf and make sure that the Xen kernel is the default if the aforementioned was not done beforehand.

Reboot!

Xen 3.3 and Link Bonding

See my previous post for general information, but it gets harder.

This one is a nightmare.  In my previous post, I detailed how to get Xen to work with link aggregation with Xen 3.0.  Well, it doesn’t work in 3.3.  Xen decides that it still owns eth0 and completely destroys your bond0 setup.

Like these people, I’ve come to the conclusion that the integrated network scripts suck.  This is alarming since you’d think link bonded setups would be the norm for Xen setups.

The quick fix is to let the OS handle networking.  We do that like so: add a br0 interface and tell the bond to bridge with it.

File /etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.0.6.201
NETMASK=255.255.255.0
GATEWAY=10.0.6.1
NO_ALIASROUTING=yes
TYPE=Bridge

Then, edit your /etc/sysconfig/network-scripts/ifcfg-bond0 and add “BRIDGE=br0″ and comment out any IP related information (since you are now defining that in the bridge.  Head over to /etc/sysctl.conf and add:

net.ipv4.ip_forward = 1

Now, edit your Xen VMs in /etc/xen/ or /etc/xen/auto and change xenbr0 to br0:

vif = [ ‘mac=ee:cc:aa:88:66:44, bridge=br0′, ]

Okay, now disable the Xen networking garbage.  Open /etc/xen/xend-config.sxp and comment out anything  that looks like (network-script ….).

Almost done, but wait!  RHEL 5.2 has a bug that prevents the bridge coming up on a bonded interface.  Hopefully this will make the 5.3 cut or be pushed to 5.2, but until then go here.  Download the new patch into /etc/sysconfig/network-scripts/ and run patch -p0 < ifup-eth.patch for instance.

Finish

Reboot.  You now have Xen 3.3 goodness on a big Ethernet channel!  Post a comment if you have any trouble or questions.

Share and Enjoy: Digg del.icio.us Slashdot Facebook Reddit StumbleUpon Google Print this article!

Related posts:

  1. Link Bonding Craziness in RHEL/Centos 5 I just went through hell in a handbasket trying to...
  2. I dream of pervasive virtualization… I dream of a day where virtualization is pervasive. Instead...
  3. My thoughts on software and complexity My thoughts on the growth of the Linux kernel and...

January 1, 2009

Steven Oliver

Simple SQL Tips


1.) Don’t commit after every update statement
2.) Don’t commit once for every update statement

Both of those are really meant torwards updates that come in large groups. For example I dropped over 4000 rows out of database at work over the past month. One commit for that many rows is not a good idea. But one commit after each row is a bad idea too. Instead commit in smallish groups.

      

January 1, 2009 :: West Virginia, USA  

December 31, 2008

John Alberts

Quick and Dirty Linux Load Testing

Today I had a need to keep the load on a server at 20 for an extended period of time. I was doing this to test notification escalations in Nagios. So, I found a nice little program call cpuburn-in that will load a processor at 100%. It’s just a tarball with an executable and a single README file included. To run the program, call the executable and supply the number of minutes you want it to run. So, to run it for 60 minutes, just use:

./cpuburn-in 60

Since I wanted to generate a 20 load on the server for 60 minutes, I just put this in a loop and spawned 20 processes.

i=1; while [ $i -le 20 ];do ./cpuburn-in 60 & i=$(( $i + 1 ));done

This worked nicely for keeping the load right around 20 for me. If you want to kill things off early, just do the following:

ps a | grep cpuburn-in | awk '{print $1}' | xargs kill

December 31, 2008 :: Indiana, USA  

December 30, 2008

Matija Šuklje

More Christmas cleaning

I don't like things done only half (or three-quarters for in this case) made, so I've done some more cleaning up of my world.

What I did now was to check again what's obsolete by running:

dog /var/lib/portage/world | xargs paludis -up --all-versions

...and removing those entries from /var/lib/portage/world. I feel better now :]

hook out >> listening to Rage against the Machine and drinking my last cuppa of Doars F.F. — I'm just shy of being completely out of Darjeeling and similar Indian teas! Aaaaaaaaaaaaaarrgggggghhh!!! XD — while studying Property Law
<!--break-->

December 30, 2008 :: Slovenia  

Michael Klier

About Change

Nope, this post is not about world politics but about this blog and me ;-).

Like the year before it would be at the time to see how my plans for this blog and the last year worked out. In regards to this blog I almost reached them in that I'm near the 100 subscribers mark and my blog comes as the 6th result when I search for my full name on google.com. Real life wise I didn't manage to cross the Alps on my bike like I planned because of some continuing problems with my right leg after a long bike trip and because I wasn't able to take a vacation from work.

Normally I would continue to write about what goals/numbers I plan to abchive with this site next. Not so this year. 2008 brought a lot of change to my life. I began to like sports and I'm spending 3 to 5 evenings a week in my Tae Kwo Do Dojang. My interest in making music is growing stronger again after a long time of total absense and I learned how to live without Internet 24/7 for ~14 weeks (yeah, it's difficult for the first couple of weeks, but you get used to it). Especially the lack of Internet for such a long time changed the way I actually use/perceive it. Before this long break, I was kind of always online, always jumping from one tab to the next, looking if there's new interesting stuff somewhere. Now, that I'm back it often feels more of a burden trying to keep track with everything, and I sometimes feel reliefed when I shut down my computer at 22:00 instead of 02:00.

It's time for counter measures. No, I wont stop blogging or using the Internet, instead I start a little self experiment and try to free myself from the most stressful stuff so I'm able to focus on the things that matter without getting tired of it too fast. As a first step I completely removed any statistics gathering tools from my website including the webalizer cron job as well as the RSS subscribers counter because these where the things I checked way to often (without even knowing why). I also reduced the number of blogs in my feed reader. Beliefe it or not, 1000+ unread items can generate stress if you tend to keep your unread items count at zero ;-) (I know I could just stop caring about it, but that's not who I am). Also, even though I still consider the FOSS projects I'm involved important, I'll slightly shift the position they have in my life below other interests. No, that doesn't mean I'm discontinuing any of my work, I just stop worrying about for example delaying a bug fix for another 2 days because of sth. else (I was the type of person who blew off an evening with friends because I thought I have to fix things instead). The big goal in all this is to keep the fun in all this and take off some pressure, because when the fun is gone it doesn't make any sense at all, does it?

Some people might think that all this is related to recent events in my life. Partly yes maybe … and not at all ;-). I've been thinking a lot about all this the past 2 month since I have Internet again too, I just happened to have found out what I've been really missing the past three and a half years (even if it's probably just temporary). It's all about defining what matters in life … and single moments can be way more important than everything else out there … ahh now I'm getting off the track …

Filed under:
Read or add comments to this article

December 30, 2008 :: Germany  

Kevin Bowling

Link Bonding Craziness in RHEL/Centos 5

I just went through hell in a handbasket trying to get 802.3ad Link Aggregation set up on a Centos 5.2 Xen box.  Setting up link aggregation itself isn’t that bad - http://wiki.centos.org/TipsAndTricks/BondingInterfaces for a simple guide (after your managed switch is configd) - but what ever I did, I was unable to get both interfaces simultaneously active.

About the only useful debugging info I got was that the MAC was in use.  I was puzzled because as far as I know, link agg takes over the primary MAC and sets that up for both NICs.  Furthermore, the same exact hardware was working great on Fedora 10.

bonding: bond0: Warning: the permanent HWaddr of eth0
 - [MAC ADDR]- is still in use by bond0. Set the HWaddr of eth0
to a different address to avoid conflicts.
bonding: bond0: releasing active interface eth0
bonding: bond0: making interface eth1 the new active one.
bonding: bond0: Removing slave eth1
bonding: bond0: releasing active interface eth1
ADDRCONF(NETDEV_UP): bond0: link is not ready
bonding: bond0: Adding slave eth0.

Luckily, I stumbled across this bug report.  If you scroll down to the last comment, this appears to be a Xen specific issue.  By default Xen tries to set its bridge up on eth0, and I assume this prevents the kernel bonding driver from taking over the NIC.  By opening up /etc/xen/xend-config.sxp and adding:

(network-script 'network-bridge netdev=bond0')

Xen will bridge to the bond0 interface, and everything will work as expected.

Another trick I had to do was add a start delay to the networking scripts.  This is useful if your hardware is crap (cough Broadcom), you need a dhcp lease and it fails, or you are running STP, link aggr., etc.  On Fedora, RHEL, and derivitives this is accomplished by adding the NETWORKDELAY directive to /etc/sysconfig/network:

NETWORKING=yes
NETWORKDELAY=31

If you need more granularity, you can set delays to specific adapters in the /etc/sysconfig/ifcfg-{x} files with the LINKDELAY directive.

Just a couple of hard lesssons from the trenches, hopefully this will save someone else some time.

Share and Enjoy: Digg del.icio.us Slashdot Facebook Reddit StumbleUpon Google Print this article!

Related posts:

  1. Xen 3.3 in RHEL/CentOS 5 and more Link Aggregation Fun RHEL 5 includes the now ancient Xen 3.0 hypervisior.  A...
  2. Fedora 9, KDE 4.0 done right Wow! I just downloaded the Fedora 9 KDE live spin. ...

December 30, 2008

Zeth

On Comment Spam

I noticed an article on Slashdot today called Smart Spam Filtering For Forums and Blogs? where someone asks "Does anyone know of a good system for filtering spam".

In this post I reflect on comment spam and my approach to dealing with it.

Background

On this site I have previously talked about my past approaches to this topic:

  • My original post on the subject was called 'only the penitent man will pass - on captchas and cotton wool', where I explained why I do not go in for 'captchas' or other party games that make it harder for you the reader to leave a comment.
  • My next post was Akismet Blues where I discovered that a third-party comment judging service called Akismet was suddenly blocking everyone, due to the fact that the upstream changes in the service had broken the blog plugin I was using at the time.
  • My third post on the subject was Django FreeComments cleanup script where I shared a command line cleanup script for Django FreeComments, a comments system that appeared in the previous version of Django.

Now I recoded the site to use Django 1.0 (read about that here), I had to make these decisions again.

Principles

The aim of this site is to have a discussion about the topics I raise. The comments are not some optional add on, they are core to what the site is about. Furthermore, my readers are busy people, who take the time out of their busy lives to share their wisdom, thoughts and views by leaving a comment here.

Therefore I respect that very highly. I have 1431 comments, I may not have responded individually to each of them, but I have read them all many times, and I have written SQL to move them each time I have changed blog software, backed them up, reformatted them, and so on.

This is a website about fairly advanced computing, which is aimed at adults. If someone can use a bash recipe or write a Python script, then if the comment spam fighting techniques fail, they have the intellect to handle a Viagra advert in the comments for a few minutes or hours.

Therefore my first principle is that the cost of a false positive is far greater than any number of false negatives. If there are false positives then they must not be permanent, and they must be easy to spot and reverse.

Secondly, as mentioned above, spam fighting should be server-side, it is my problem not yours - I am not into making the reader guess the word, jump through hoops or pin the tail on the donkey while blindfolded and spun around.

What is a spam comment?

The commenting system here is for discussing the topic and communicating with other readers. Linking to a resource that is relevant to the discussion is clearly not spam. Many people, while leaving a relevant comment, will link to their own website as a kind of signature. This is clearly not spam.

A person or script using the comment system to leave links to irrelevant websites for financial gain, with no comment or something extremely generic, is comment spam. So obviously context is important.

Catching by URLs

Most genuine commentators paste the URL in the post directly. Those that want to markup their text use the markup that I have specified.

Meanwhile spam comments have HTML or BBCode marked up links in them, from a few to dozens or hundreds of them. So comments with HTML or BBCode marked up links can be held for moderation. Comments with a large number of URLs can also be held for moderation. These little measures stop the most of the indiscriminate spam scripts sent from zombie machines.

Catching by IP

This leaves the more discriminate spammers, those who probe and test to try to see what goes or up not. These appear to send multiple spams from the same IP Address.

/images/posts/django/sameip.png

In the Image above, you can see the admin panel showing 18 comments held for moderation. Highlighted in red are 16 comments from the same IP Address. I moderate all the comments caught using a new version of my command-line tool. When a comment is confirmed as spam, it is deleted and the originating IP address is blocked, thus stopping repeat offenders.

Extra herbs and spices

I have some other ingredients to my spam fighting recipe, but at the moment they are not being brought into play because the above ingredients seem to do the trick. One advantage of using Django and Soturi is that I can quickly reprogram the site if my spam fighting recipe stops being effective.

Since this approach seems to work, I personally I have no desire to use some third-party service to filter my comments, because I have no easy way of knowing if or how it is likely to make false positives. Also being a technology site, people often write comments involving command line commands or source code which gets flagged easily in these filtering services.

Anyhow, that is my setup, I would be interested to hear what other people find useful.

Discuss this post - Leave a comment

December 30, 2008 :: West Midlands, England  

December 28, 2008

Lars Strojny

Ubuntu Linux on an Asus EeePC 901

I got an Asus EeePC for Christmas. As a long time Linux user the pre-installed Windows XP version had a very short life, something around ten minutes to check that the hardware is working. In general installing Linux is not very hard, actually the harder part was to build the install USB stick, as the EeePC has no disk drive. But first a few sentences about the EeePC.

The Good

The device is small and looks cute so the girl acceptance level is pretty high as my personal girl acceptance level test girl confirmed. It just feels right. The weight is alright, 1.1kg is fair enough. Three USB slots, one more than my Apple Mac Book, so good too. VGA out, fine, SD card slot, alright, not that I need it but … RaLink WiFi chip, Gigabit network, built-in web cam, Bluetooth, synaptics touch pad. That’s pretty good, sounds like a complete computer, doesn’t it? The display resolution is 1024×600 – good for such a small device.

The Bad

As as result of the overall size, the keyboard is of course small too. Also I’m now writing this entry on it, it takes some time to get used to it. The position of the pipe/less/greater-key is annoying as it can only be reached in combination with the fn modifier key. This is not very convenient for a programmer. The rest of the layout is more or less standard and it doesn’t take so long to not miss every key.

The Ugly

When I tried Bluetooth the first time, the device was not detected at all. Neither on Windows nor on Linux. But while changing other stuff I found out that the Bluetooth adapter was disabled in the BIOS. It is a nice feature to allow to hard disable some features in the BIOS but disabling anything by default seems not like the most clever idea. So please fix, Asus.
Sadly the EeePC suffers a heat problem. If you stress it a bit it gets really hot on the downside (like the Mac Books). So don’t put it on your naked thigh.

Choosing the Right Distribution

I have the model with two solid state discs which makes a total of 12GB disk space. Not very much but enough for my use cases (and I always wanted to have a SSD based device). I decided to go with Ubuntu:http://ubuntu.com also I normally prefer Gentoo because of the size. Source base distributions like Gentoo don’t differentiate between the actual packages and the header files so a complete Gentoo installations takes a lot more disk space than any binary distribution. Additionally, it was Christmas evening and I wanted something quick. While Gentoo is flexible, it is not quick to install.
Although I chose Ubuntu, I would roughly guess that Fedora or SuSE would work fine too, please leave a comment if you have an experience to share.
I chose Ubuntu mainline, not Eeebuntu because I want to have the latest and greatest Ubuntu and I can configure my panel myself.

Preparing the Installation

Before you read on further make sure you understand that this is not about a dual boot installation. I completely removed the Windows system, so please make sure this is what you want too.
First of all we need a boot medium. There is an SD card slot and a number of USB ports, so the alternatives are USB disk drive, SD card, USB stick. I chose the latter but the rest should work too. Creating an USB boot stick requires a bit of manual work: download the Ubuntu Intrepid Ibex (8.10) ISO image for 32bit computers (Atom CPU) then:

  • Format the stick with FAT32: mkfs.vfat /dev/sdX1
  • Add an MBR to the stick: cat /usr/share/syslinux/mbr.bin > /dev/sdX
  • Install syslinux: syslinux -s /dev/sdX1
  • Mount the ISO image: mount -o loop <iso> /mnt/iso
  • Mount the USB stick: mount /dev/sdX1 /mnt/stick
  • Copy the contents of the image to the stick: cp /mnt/iso/.* /mnt/stick
  • Fix the dists directory: mv /mnt/stick/dists/intrepid /mnt/stick/dists/stable
  • Rename isolinux directory to syslinux: mv /mnt/stick/syslinux /mnt/stick/isolinux
  • Rename isolinux.cfg to syslinux.cfg: mv /mnt/stick/isolinux/syslinux.cfg /mnt/stick/isolinux/isolinux.cfg

Installing Ubuntu from the Stick

Now the USB boot stick is ready. Just plug it in, type F1 to select the boot menu, choose the stick as the boot medium, boot from it and install Ubuntu as usual. Everything is detected and configured correctly including the synaptics touch pad, web cam and screen. The only missing components are the WiFi adapter and the specials keys. The keys generate ACPI events so it should not be hard to get them running. However, I don’t use specials keys so I don’t care.
The WiFi adapter is a RaLink RT2860 and RaLink provides a driver for it. You could download and manually compile this driver but I found it more convenient to have specific package for it.

Installing the Right Kernel

The linux-eeepc-lean kernel from array.org works really well and includes support for the RaLink WiFI adapter. Just follow the setup instructions to install it. Then boot the new kernel and, if everything works fine, edit /boot/grub/menu.lst to use the eeepc lean kernel as the default kernel. The Ubuntu installation is now done, enjoy!

December 28, 2008

December 27, 2008

Dan Fego

Linux Kernel Queues

My senior design project for university has involved a lot of working in the Linux kernel. I’ve found that my primary difficulty with kernel work has been figuring out how the mass of code that already exists works and interacts with each other. It’s mostly very well thought out, but some things take a little time to wrap your head around. One such thing is the kernel’s unified implementation of linked lists.

It’s actually rather ingenious if you think about it, and there are plenty of references that give great explanations of how it all works, so I won’t do that here. The short version is that the list actually acts like an element within another data structure, which allows it to work for all types, rather than having to create new structures and functions for every structure to act like a list. What I recently found myself trying to do was create a queue (first-in-first-out) data structure using the linked lists provided. I decided to go about this after getting a little advice from a couple of fellas over at Stack Overflow. I haven’t fleshed it all out yet, but came to an important realization on how things work. It’s not really all that hard, but it was important enough for me to want to document: because it is a circular, doubly-linked structure, adding an item to the front and back of the list look very similar. In fact, they’re pretty much the same operation, except for where the external head and tail pointers point to. They’re so similar that I spent a bunch of time confused on how it all worked. I suppose that’s my fault for delving in and examining the overly-short elegant code.

The result of this is that their list_add_tail() function (which is commented to be useful for queues) is, in fact, useful for queues. It adds an element linked after the “last” element and before the “first,” given the head of the list. “Last” and “first” are in quotes here because it’s a circular list, so there technically aren’t a first and last, but there are. Anyway, what I still don’t quite understand is how the list_add() function is useful for stacks (also in the comments). Though I’m getting myself slightly confused just thinking about it further, so I’ll end the tirade here.

I guess if there’s one thing I can pass on here, it’s that if there’s comments documenting a series of functions (which the kernel’s include/linux/list.h file does), listen to the comments. I suppose this was a learning experience for me in the end, but I could have saved a bunch of time by just trusting what they said the functions do. On the flip side, if you’re curious, don’t trust them, and want to be sure about what the code is doing, you are always free to dive right in! I’m just convinced that the kernel developers are a lot smarter than I am, at least at this point in my career.

Related Links

December 27, 2008 :: USA  

Rodrigo Lazo

Awesome and xrandr

I use (the) awesome window manager. If you haven't heard of it, you are missing a great window manager. It can deal with tiling and floating windows, is very customizable and is the best wm I've tried (over openbox, fluxbox, xfce, gnome's, enlightenment, etc.) Go to it's website to learn more.

This post is because I've been trying it's support for multiple displays and is great!, Right now I have my laptop and monitor working together in a down-up configuration, and awesome have keybindings for handling the different displays. Absolutely great.

If you are a keyboard freak like me you will enjoy it!!

December 27, 2008 :: Arequipa, Perà  

Documenting a Django project with Sphinx

Sphinx is a documentation tool written for python (but could be used on other circumstances). I've learning how to used and I wanted to document a django project I've been working on, but when you try to import your modules you get an exception

 autodoc can't import/find module '<yourmodule>', it reported error:
 "Settings cannot be imported, because environment variable
 DJANGO_SETTINGS_MODULE is undefined.",please check your spelling
 and sys.path

This happens because django do some enviroment settings before using your app, so I wanted to do the same with. It was easier than I tought, just put the following snippet in your sphinx conf.py

from MYPROJECT import settings
from django.core.management import setup_environ

setup_environ(settings)

of course, for it to work you need to modify your path, in my case was:

sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../../'))

December 27, 2008 :: Arequipa, Perà  

December 26, 2008

Matija Šuklje

Christmas cleaning

From time to time I decide to seriously clean up my system — and today was one of those days.

What started as a simple config-decruft session to clean up the clutter in my /etc/paludis/* Paludis config files, evolved into an epic battle with the system.

I blame this mostly on myself, as it seems that what turned my world file into garbage was my own doing — I was pretty careless about normally emerging packages that shouldn't be a part of the world file in the first year — and I think my (ab)use of Kuroo didn't help either.

Well, long story short: after I cleaned up my Paludis configuration files, and ran paludis --uninstall-unused -p to see which obsolete packages I have on my system and should be removed, I got a 410 packages that Paludis claimed they were unneeded, because they were neither in world nor depended on a package that was. Amongst them was also most of KDE and a lot of other important packages! "Bloody hell!!", I though to myself and already started to calculate in my head how many days will it take to remerge all these packages to get them back into world.

But then I thought better of it and asked for help on #paludis and sure enough people suggested to insert the needed packages from paludis --uninstall-unused -p (or better yet: paludis --report because it says what's wrong) back into the world file.

Yes, this is exactly what all HOWTOs and manuals strongly advise you not to do!

But when you've got a seriously foo world, you just have to do it!

So, when I collected all the troublesome packages from paludis --report — which took quite a while, because I suck at sed and regexp, so I had to do most of it by hand — I appended it to /var/lib/portage/world.

Now, this could have been enough for an ugly workaround, but I've been cleaning my system, so I decided to clean up the world as well.

This meant that I had to remove all entries from /var/lib/portage/world that shouldn't be there (i.e. are dependencies or part of system), unless I explicitly want them as a part of the world. For those packages that I wasn't 100% sure, I checked with paludis --uninstall --pretend <package(s)> and equery depends <package>. The former command is better for many reasons, but amongst them a real time-saver was that with paludis you can test many packages at the same time.

I'll just say, I'm very glad that Kate has an integrated KonsolePart.

Well, when I cleaned up my world and ran paludis -s; paludis -i world; paludis --uninstall-unused; reconcilio to clean up the system, I got more then 40 packages that really were obsolete and now my system is finally clean and with a world that looks as it should!

...I'm sure glad, that's over with!

hook out >> after a Sacher cake with Sacher tea to complement it while hacking, drinking green jasmine tea and starting to study late
<!--break-->

December 26, 2008 :: Slovenia  

Zeth

Site upgrade please check your RSS feed

I have updated the software that this site runs on to match the blog code that I have open-sourced at https://launchpad.net/soturi This also means the site is running on the latest version of Django.

A couple of things have changed. Firstly, the comments facility has been replaced, and much to popular demand, there is now a field you can use to pimp your own website. Secondly, the RSS feed URLs have changed a little:

  • If you subscribe to the standard 'full' feed, then don't worry, nothing has changed.
  • The 'uncut' feed has been withdrawn. The full feed is now 'uncut', I decided to stop censoring myself. If someone does not like what I write about they don't have to read that post. The uncut URL directs to the full URL.
  • The single category RSS feed URLs have been simplified. The old URLs redirect to the new ones.

If you use an RSS reader, please double check that you are still getting everything you expect. Some good RSS readers are smart enough to handle redirects, however many braindead RSS readers have not fully implemented HTTP.

The different feed options are listed here, check them out if you are in any doubt. Thanks for subscribing.

Discuss this post - Leave a comment

December 26, 2008 :: West Midlands, England  

Jürgen Geuter

25C3 and Merry XMas

I didn't use my computer in the last few days so there was no XMas post, let me just wish you a few happy days this way.

I'll be at the 25C3 in Berlin from the 27th to the 30th, if you wanna meet, just use one of the many different ways to contact me that I have listed on my Contact Page.

December 26, 2008 :: Germany  

Kevin Bowling

Political correctness in open source doesn’t matter

See: http://www.itwire.com/content/view/22467/1090/.  To answer the sensationalist title, no.

I can’t believe people are trying to make this an issue.  I guess it was only a matter of time before the crap that we deal with in the rest of the world met up with open source.

I have seen several prominent developers on just the kernel that just happen to be women.  Many more on large projects like KDE.  Great, big deal.  They shouldn’t receive special privileges, recognition, or anything because of it.

“The strange thing about this episode is that it looks like the FOSS community seemingly doesn’t want to know about it.”
No shit.  This kind of crybaby attitude is why governments and large corporations can’t get anything done, too worried about offending people.  Most of us FOSS people are here for the goods, not to set up bureaucracy, politics, and political correctness.

This Gentoo developer is spot on: http://steveno.wordpress.com/2008/12/17/mad-gnu-women/.  The existence of women’s only groups like Debian women are wrong in the first place and harmful.  In the same category as Richard Stallman - well intentioned but counter-productive.

Isn’t the goal to write and use good software?  Gender has nothing to do with that.  Neither does race, color, or being the stereotypical guy that spends countless hours hacking away in the parent’s basement.  Yet we think nothing about laughing at the last.  The world would be a better place if people just grew thicker skin.

Share and Enjoy: Digg del.icio.us Slashdot Facebook Reddit StumbleUpon Google Print this article!

Related posts:

  1. KDE4 on Gentoo So I bit the bullet and installed KDE 4.0 on...
  2. KDE 4.2 beta 1 on Gentoo KDE 4.2 is set for release on January 27th.  Eager...
  3. How to upgrade to ext4 in place Here’s how you upgrade to ext4.  The process is pretty...

December 26, 2008

Steven Oliver

Merry Christmas!


Merry Christmas!

Enjoy the Penguins!

      

December 26, 2008 :: West Virginia, USA  

December 24, 2008

Dieter Plaetinck

Jobhunt over.

What better way to launch the new year then starting to work as a System Engineer/Developer for a consulting firm where everyone breathes Linux and Open Source?
Next week I'll start at Kangaroot. Woohoo.

December 24, 2008 :: Belgium  

Zeth

Five useful command one liners

I had a browse through my shell history (history | less), and there are some interesting commands that I have used recently. The really experienced command line warriors among you will probably know them already, but it never hurts to have a reminder.

1. How to migrate a MySQL database

If you want to export data from an MySQL server on one server, and then import the data on a new server, this is pretty easy when you know how, just use the redirect symbols, greater than ('>') and less than ('<').

On the first server use the following command:

mysqldump --user root -p database-name > filename.dump

This will give you a new file called filename.dump, transfer that file to the second server using SSH or however else you want.

On the second Server, you can import the data with the following command:

mysql -u root -p -D database-name < filename.dump

2. How to grep a large number of files.

The following command searches for files that contain the word 'term':

grep term *

If you grep over a very large number of files, grep will fail with "the parameter list is too long".

The way around this is to use xargs and pipe the filenames to grep.

find . -print0 | xargs -0 grep -H term

This approach uses null characters instead of newlines to separate the results. This means things won't go screwy if there are files with white space or newlines in the file names, e.g. files that have come from Windows or are on a Windows partition.

3 How to force rpm install

I don't like the RPM tool, there are more modern, i.e. less brain-dead, package managers available. Anyway if you have a machine with an RPM based distribution that is completely messed up, you may want to reinstall packages that have gone wrong. RPM does not let you reinstall the same version over itself, however you can force it, here is how:

sudo rpm -iv --replacepkgs --replacefiles packagefile.rpm

4 Mounting Mac Disk images

Mounting regular disk images in the ISO format is easy:

sudo mount -t iso9660 -o loop filename.iso /media/iso

What about Macintosh disk images (commonly known as DMG format)?

Well we have a similar plan, we want to go:

sudo mount -t hfs -o loop filename.dmg /media/iso

Or for newer files:

sudo mount -t hfsplus -o loop filename.dmg /media/iso

There are a couple of problems that might arise:

  • You might not have the relevant kernel modules for reading hfs or hfsplus.
  • It might not be a true .dmg file. Sometimes the files are archived in a zip or tar, even though the files may end .dmg.

The second one can be sorted out pretty quickly using the trusty file command. For example:

file GnuPG1.4.8.dmg

Results in:

GnuPG1.4.8.dmg: Macintosh HFS Extended version 4 data (mounted) (unclean) last mounted by: 'H+Lx', created: Tue Dec 30 17:24:08 2003, last modified: Wed Dec 24 03:40:12 2008, last checked: Tue Dec 30 18:24:08 2003, block size: 4096, number of blocks: 4096, free blocks: 1377

This is a true dmg file in hfsplus format.

  1. Don't forget to watch

If you want to repeat a command many times, for example you are monitoring something, then don't forget about the watch command. It will print the results of the command to screen every 2 seconds (you can change the interval with -n).

I tend to use watch with disposable one-off Python scripts for which writing a proper interface is overkill. However you can also use watch with sys-admin commands. Lets do some generic and clichéd examples.

Watching the disk space:

watch --no-title "df -h"

Watching who is logged in:

watch --no-title who

Watching the current IP Address on eth0:

watch --no-title "ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | cut -d ' '  -f1"

You will know what commands you use and how watch can be helpful.

Conclusion

So that was some of the commands from my shell history. What commands have you been using recently?

Discuss this post - Leave a comment

December 24, 2008 :: West Midlands, England  

Five useful command one liners

I had a browse through my shell history (history | less), and there are some interesting commands that I have used recently. The really experienced command line warriors among you will probably know them already, but it never hurts to have a reminder.

1. How to migrate a MySQL database

If you want to export data from an MySQL server on one server, and then import the data on a new server, this is pretty easy when you know how, just use the redirect symbols, greater than ('>') and less than ('<').

On the first server use the following command:

mysqldump --user root -p database-name > filename.dump

This will give you a new file called filename.dump, transfer that file to the second server using SSH or however else you want.

On the second Server, you can import the data with the following command:

mysql -u root -p -D database-name < filename.dump

2. How to grep a large number of files.

The following command searches for files that contain the word 'term':

grep term *

If you grep over a very large number of files, grep will fail with "the parameter list is too long".

The way around this is to use xargs and pipe the filenames to grep.

find . -print0 | xargs -0 grep -H term

This approach uses null characters instead of newlines to separate the results. This means things won't go screwy if there are files with white space or newlines in the file names, e.g. files that have come from Windows or are on a Windows partition.

3 How to force rpm install

I don't like the RPM tool, there are more modern, i.e. less brain-dead, package managers available. Anyway if you have a machine with an RPM based distribution that is completely messed up, you may want to reinstall packages that have gone wrong. RPM does not let you reinstall the same version over itself, however you can force it, here is how:

sudo rpm -iv --replacepkgs --replacefiles packagefile.rpm

4 Mounting Mac Disk images

Mounting regular disk images in the ISO format is easy:

sudo mount -t iso9660 -o loop filename.iso /media/iso

What about Macintosh disk images (commonly known as DMG format)?

Well we have a similar plan, we want to go:

sudo mount -t hfs -o loop filename.dmg /media/iso

Or for newer files:

sudo mount -t hfsplus -o loop filename.dmg /media/iso

There are a couple of problems that might arise:

  • You might not have the relevant kernel modules for reading hfs or hfsplus.
  • It might not be a true .dmg file. Sometimes the files are archived in a zip or tar, even though the files may end .dmg.

The second one can be sorted out pretty quickly using the trusty file command. For example:

file GnuPG1.4.8.dmg

Results in:

GnuPG1.4.8.dmg: Macintosh HFS Extended version 4 data (mounted) (unclean) last mounted by: 'H+Lx', created: Tue Dec 30 17:24:08 2003, last modified: Wed Dec 24 03:40:12 2008, last checked: Tue Dec 30 18:24:08 2003, block size: 4096, number of blocks: 4096, free blocks: 1377

This is a true dmg file in hfsplus format.

  1. Don't forget to watch

If you want to repeat a command many times, for example you are monitoring something, then don't forget about the watch command. It will print the results of the command to screen every 2 seconds (you can change the interval with -n).

I tend to use watch with disposable one-off Python scripts for which writing a proper interface is overkill. However you can also use watch with sys-admin commands. Lets do some generic and clichéd examples.

Watching the disk space:

watch --no-title "df -h"

Watching who is logged in:

watch --no-title who

Watching the current IP Address on eth0:

watch --no-title "ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | cut -d ' '  -f1"

You will know what commands you use and how watch can be helpful.

Conclusion

So that was some of the commands from my shell history. What commands have you been using recently?

Discuss this post - Leave a comment

December 24, 2008 :: West Midlands, England  

Kevin Bowling

How to upgrade to ext4 in place

Here’s how you upgrade to ext4.  The process is pretty easy, but requires an fsck which means unmounting or rebooting if the file system is in use.

Make sure you are using at least e2fstools 1.41.3 and kernel 2.6.28 (or a vendor kernel with latest ext4 patches applied)!  Also, its probably a good idea to have proper backups (really!).  ext4 has just been declared stable, but what that really means is that the battle hardening has just begun.  I’ve done several heavily used systems without fault so far though, so its probably good enough for your desktop.

WARNING: DON’T CONVERT YOUR /boot PARTITION. Right now, there is no stable version of grub with ext3 support.  Even if there was, it really won’t gain you anything  :-) .

Run tune2fs, e.g.:

tune2fs -I 256 -O sparse_super,filetype,resize_inode,dir_index,ext_attr,has_journal,\
extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize /dev/sd[x][n]

Those are the default options for an ext4 file system if you were to create it with mkfs.ext4 (e2fsprogs 1.41.3 - see /etc/mke2fs.conf).  I’m getting pretty damn good performance with this!  The ‘-I 256′ option sets 256 bit inodes, which most recent ext3 FSs use already. If this is the case, and you get a message telling you so, remove this option.  Note that extents will make the FS backwards INCOMPATIBLE with ext3.

Next, edit /etc/fstab, e.g.:

/dev/vg/home /home ext4 defaults 0 0

Either unmount and mount or reboot your system.  tune2fs marks the fs as dirty and performs a fsck and conversion.
NOTICE: distros with initrds may need to be regenerated or you won’t be able to mount your root file system.  In Fedora (replace kernel version with your own):

cd /boot
mv initrd-2.6.27.7-134.fc10.i686.img initrd-2.6.27.7-134.fc10.i686.img.old
mkinitrd initrd-2.6.27.7-134.fc10.i686.img initrd-2.6.27.7-134.fc10.i686.

That’s all there is to it.  Stay tuned for future ext4 developments like online defragmentation.

Also, ext{2,3,4} reserve 5% of space for root in case the drive fills up.  On large modern drives, this can be excessive (e.g: 50GB on a 1TB disk).  Consider running ‘tune2fs -m 1 /dev/sd[x][n]‘ to reduce this to 1%.

For more information and tweaking:

  1. Documentation/filesystems/ext4.txt from the latest kernel sources
  2. http://ext4.wiki.kernel.org/index.php/Main_Page
  3. man tune2fs
  4. http://e2fsprogs.sourceforge.net/
Share and Enjoy: Digg del.icio.us Slashdot Facebook Reddit StumbleUpon Google Print this article!

Related posts:

  1. KDE4 on Gentoo So I bit the bullet and installed KDE 4.0 on...
  2. Phoronix Benchmarking.. Statistically Significant? and Other Performance Concerns Phoronix has been cranking out a slew of benchmarks recently,...
  3. KDE 4.2 beta 1 on Gentoo KDE 4.2 is set for release on January 27th.  Eager...

December 24, 2008