Home Linux Community Community Blogs

Community Blogs

NEWB's adventure's in Linux From Scratch

 Back again,

   This time I've started a new LFS install,  The install of the binutils tools went rather well. However, I cannot say the same with Gcc. I first read the entry on the manual and assumed that my install would require that i build mpfr and gmp then install them in the gcc-build directory and then compile, after trying four or five times to get it to work, I had to go to IRC chat. Well, now configure would run you see I was supposed to untar mpfr and gmp then gcc. Then mv mpfr and gmp into gcc directory then cd to gcc-build directory. But from where I stand, it doesn't communcate that in the book??? Am I the only one?

 Currently, I'm building glibc. No problems as of yet.  Something that I will point out though. Once the day is through is how successful I am at stop/resume of the install. :) 


Working with filesystems using NFSV4 ACLs

Here's a great cheet sheet on managing NFSv4 ACLs on different filesystem with different commands. This article discusses and compares the different commands that you might use to migrate from one filesystem to another.

Getting HAL to allow Horizontal Scrolling

This is how I got it working on my little netbook.  Seems somehow more and more websites are being designed for larger than 1024 wide screens and so horizontal scrolling is becoming more of a need.

Two steps are needed 1st I edited Firefox and then I edited the files for HAL.  In the end we have to reboot the system because somehow the implemintation of X on a number of modern distro's (cough *buntu cough) are more windows like and so every change now requires a reboot. (CNTRL-ALT-BKSpace doesn't work, even when enabled) 

So on to the needed changes.  Open Fx (Firefox) and enter "about:config" (without the quotes) in the URL bar.  If this is the first time you have to promise the Mozilla gods that you'll be a good boy/girl and you are presented with a list of all of the configuration options Fx has.  Now in it's equivalant of a URL bar enter this:


double click on the config line that is below the bar, and change the 0 to a 1.  Now you are done with Fx. 

Now on to getting it working in X.  Gone are the days of a single config file no matter how long.  Additionally some distro's (see above cough) have decided not to follow the FHS and have put the config files outside of /etc.  No problem despite attempts to hide them so that "dumb users" don't find them (tounge firmly in cheek on that btw) we can locate them.  

The correct place to find the file would be 


With *buntu and it's derivatives the file is in /usr/share


The correct file we will edit will be *synaptic.fdi (where the full name can vary by distro) If you don't find it there then at a command line run this:

 locate synaptic | grep fdi

This should allow you to find the correct file.  Now let the editing begin.  open the file you found in your favorite editor. (remember to save a backup copy just in case of an "oh S***" moment, and to edit it as root).  With *ubuntu the file would look something like this: (The code here is edited so that the blog software doesn't pick it up as code, the real version uses angle braces instead of square ones. If you cut and paste be sure to make the required brace change or else it won't work and you may be left with a dead mouse cursor.)

[deviceinfo version="0.2"]
    [match key="info.capabilities" contains="input.touchpad"]
        [merge key="input.x11_driver" type="string"]synaptics[/merge]
           [!-- Arbitrary options can be passed to the driver using
             the input.x11_options property since xorg-server-1.5. --]
        [!-- EXAMPLE:
        [merge key="input.x11_options.LeftEdge" type="string"]12[/merge]

The important part for us is the lines that start with 

[merge key...... 

We are going to add(or if it exists edit) the line 

 [merge key="input.x11_options.HorizEdgeScroll" type="string"]true[/merge]

Other distro's may have this line there already, and if horizontal scrolling didn't work in regular apps it will say "false" instead of "true".  Edit and change this and you are off and running.   In your *buntu system the file will now look like this:

[deviceinfo version="0.2"]
    [match key="info.capabilities" contains="input.touchpad"]
        [merge key="input.x11_driver" type="string"]synaptics[/merge]
        [merge key="input.x11_options.HorizEdgeScroll" type="string"]true[/merge]
        [!-- Arbitrary options can be passed to the driver using
             the input.x11_options property since xorg-server-1.5. --]
        [!-- EXAMPLE:
        [merge key="input.x11_options.LeftEdge" type="string"]120[/merge]

Note: In an xml file anything between !-- and -- is a comment make sure you don't add lines in the middle of a comment.  

Now to get your mouse working right.  As mentioned on *buntu you probably need to reboot (cough), however the following procedure should work on all others.  As root restart the hal daemon (/etc/init.d/hal restart), with some you may additionally need to restart X (logout and use Cntrl-Alt-Backspace).  At this point enjoy the scrolling.

More config options for HAL do exist and one place I found a "list" is here in an article at thinkwiki.


We don't need you either Asus.

After reading articles like this one today. It's safe to say that this sucks.  Linux MADE Asus the market leader it is.  Xandros bent over backwards to tailor a UI specifically for the tiny 7inch screeen that really did make the first netbooks fly.  Now this crap.

Some of the things that I've learned by asking (off the record) some local retailers of the Asus systems.  These retailers tend to be more hands on than a "Best Buy".

1.  Linux outsold XP until Asus stopped shipping Linux

2.  The average buyer was either a college age buyer, or the over 50 crowed. Both wanted something light, fast and reliable. These two groups tended to like the Linux UI, more, but the over 50 crowed was more dismayed that the software they had wouldn't run (surprised at the cost of replacement) 

3.  They were able to sell more addons to the Windows systems. (anti-virus 3rd party software) 

4.  Windows systems had a higher customer complaint rate.  

In the end.  Asus did with Linux what Lee Iacoca said Ford did with the Mustang market in the 70's "We walked away from the market, It didn't walk away from us" Asus has walked away from a market that it proved exists.  Especially bad move now that, Intel and Dell are getting harder into the Linux market. Even more foolish now that Microsoft has declared that it is going to "define" what is or isn't a netbook and charge it's partners more based on the screen size.  Now the horse has taken charge of the cart once again, and Asus is left hoping that Microsoft will lead it to the promised land.

What can we do.  Well we can do what we always do.  Buy from those who support what we support. 

UPDATE:  Asus now apologizes to Microsoft for a partner company showing an Adroid (Linux) based system at Computex instead of the Asus mandated XP only displays. 


Linux market share growing, growing, growing

Q: What's the true market share of Linux?

A: Depends who you ask!

Some reports say Linux has broken 1% desktop market share, while other findings put it up to 4%. Meanwhile, of course, server adoption is 46% or more.

Read all about it!


Swapping STDOUT and STDERR under Bash Shell

I usually forgot this simple command so I've decided to write down some notes on it so I can cut 'n' paste from here easily, here's another common question:

"How to swap stdout and stderr descriptors ?" 

This enables your scripts to parse stderr and forget stdout (or redirect it to a file)


command <parameters> 3>&1 1>/dev/null 2>&3-

Here's what it does:

Moves stdout to /dev/null (or your preferred file if needed).
Moves stderr to file descriptor (3)
Moves file descriptor (3) (containing stderr) to stdout (real stdout, not null!)


This is what I use to parse errors with my scripts when I got something bad from external programs


Glad to see comments



The monkeygame

Apparently a certain harware store have decided that they will not sell machines with Linux. In Taiwan Asus appears determined to abandon Linux. I do not have much to say about it really...  Apart from this:


Fill a room with nothing but bananas and let the monkeys in. Count the number of apples they eat and you'll understand that all monkeys prefer bananas. Monkeys are obviously extremely intelligent and know their fruitbasket. No need for apples.


Find a string in files (using grep easily)

Here's a quick command for a quite common problem:

Is there a way to find a text string inside a bunch of files in a dir ?

Sure it is, here's one :

grep 'MyCoolString' /my/preferred/directory/*

Searches "MyCoolString" inside the specified path and willcard, or if you prefer to ignore case take a look at:

grep -i 'mycoolstring' /my/preferred/directory/*

Easy isn't it ?

Obviously this is not the only method but it's my preferred one, easy syntax, easy to remember, glad to see your comments or alternative methods for this task

Hope it helps




Pods and Blogs and the Open Source movement from the point of view of a Cambridge Professor.

Pods & Blogs LogoWelcome to my first blog post. I tend to write long, but I'll try to make it entertaining.

Pods and Blogs is my favourite non-comedy BBC podcast. It tends to be very informative and fun, and I recommend it to anyone who listens to podcasts.

The last podcast (dated June 2nd 2009) was again another excellent show. They had several interviews from Cambridge University, celebrating it's 800th anniversery, including some interviews with venerable computing people.

One such person was an Alan Blackwell (who is strangely absent from the show notes) but is an inter-disciplinary-designer who says some pretty damning things about Linux. If you want to listen to the podcast you can grab it only for the next 7 days.

Ok, so a few caviets, the interview is clearly edited, to what extent I don't know, and the really incriminating sentance (transcribed below) is pretty garbled.

Interviewer (Jamillah): So therefore is it worth trying to spread the word of things like Open Source online? You've got more of general society on things like Facebook than maybe are addressing something like open source or looking at Ubuntu or how they can make things themselves... how can you break down those barriers?
Alan Blackwell: I think the philosophy of open source is exactly the way that the internet is taking us, and Wikipedia is a great example of something where everybody is an expert on some small thing, and everybody can make useful contributions to Wikipedia. I think the assumption has been when it comes to creating the source code that runs the internet that that's something that is only for the experts. And the experts that original created the open source movement are people like Richard Stallman [rms]. He was working at MIT, at one of the centres of hardcore technology, and the whole world and I think they accidentally made open source to be something that was useable to people like themselves. They created programming languages that weren't easy to understand and they created tools that weren't as easy to use as every day products like Macintoshes or indeed the iPhone.

[I'm giving you a break here to breathe. The bit that really piqued my interest is just coming up.]

AB: It would be very nice if the open source movement had people in it who were sympathetic to user needs and were interested in giving other people that power, not just people like themselves. So a very good start for the open source movement would be for them to ask themselves why no women write open source software. I think about 0.1% of open source programmers are w... one of the biggest open source err... operating system projects are women.

I: That's a pretty sad fact.

AB: And it has a lot of implications. I think that is a reflection of the fact that although the philosophy of open source is wonderful, not all open source programmers are able to apply that internal philosophy to the outside world. And I think there is a lack of social engagement, and I think the gender politics in the open source world are reflective of their politics with respect to their world as a whole. Though still sadly something of a technocratic elite and not really a democratic movement for all that they like to use the word 'democracy' to describe their own relationships amongst themselves.

I: Well I am sure that will please all of our OS audience no end, but if you are a female open source coder do drop me a line.

So listening to it, it's clearly heavily edited, and a lot of it doesn't make a whole lot of sense you can kind of get the jist of it, I recommend you listen to the whole thing (from about 5mins in and 5mins long) to get better context.

To be fair on Alan Blackwell, I think the guy is a bit out of his depth, he, like a lot of people, has a 1980s view of Linux and Open Source and doesn't even mention Ubuntu. He also manages to claim RMS invented C and that GNU tools was built in the same era as the iPhone.

If anyone knows how to get in contact with Alan Blackwell there is a LUG event happening on August 1st in Cambridge that I would be interested in him seeing Linux users being social.

I think this post is getting a bit long now, so I might leave the discussion to another day, I have a copy of the podcast so it ain't going anywhere. But I'd be interested to hear anyone elses point of view.

Personally I don't belive the lack of women in Linux is as much of a problem as the lack graphic designers and ergonomists. If we can get them to build the bridges then women, men, children, and intelligent monkeys with laptops will come, rather than having to carry each one of them across the moat.


Debian: Find package name from program name

Back again,
This time it's Debian's time, when managing multiple hosts and installations sometimes happens you need to know what package owns a certain utility.

Recently I've faced a quite common problem, I'll take it as an example so it's more clear, I had a common and popular program "pdftotext" and I wanted to have it into another debian installation, quite easy isn't it ? you only need to remember what package has it.

While fighting with Ghostscript program and PostScript files was quite easy to check where this utility is, just take a look at ghostscript related packages (with apt-get, aptitute, ...) and see where your program could be (guess it...)

In my particular case "pdftotext" (my example) wasn't inside some package called "ghostscript*" but inside "poppler-utils"; don't want to blame poppler maintainers but I don't really remember where the utility was

So while looking at dpkg (Debian father for all CLI packages utilities) command line I was captured by -S switch and here's my final solution:

mymachine:/# dpkg -S `which pdftotext`
poppler-utils: /usr/bin/pdftotext

And here's, easy and dirty trick to get information from an utility name, then poppler-utils was my package name and I've installed it in the other machine

This goes for Debian, Ubuntu and mainly Debian based distros


Easy, isn't it ?


Hope it helps, glad to hear your comments

Andrea (Ben) Benini



Enhancing the Scala Twitter library for Java Clients

Make it substantially easier to access Twitter than just opening an HTTP connection and doing the work by hand as well as making Twitter easily accessible to Java clients and Java developers. With this new Scala Scitter library you wont have too much to do to get started leveraging  the Twitter API.
Page 112 of 148

Upcoming Linux Foundation Courses

  1. LFS220 Linux System Administration
    05 Jan » 08 Jan - Virtual
  2. LFD331 Developing Linux Device Drivers
    12 Jan » 16 Jan - Virtual
  3. LFS520 OpenStack Cloud Architecture and Deployment
    12 Jan » 15 Jan - Virtual

View All Upcoming Courses

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board