OSGalaxy

published by Vivek Gite on 2010-09-04 08:48:14 in the "FAQ" category
Vivek Gite Our FAQ section is updated in last few days with new howtos:

nixCraft is on Facebook!

Not our Fan yet? We suggest you become one right away! Just visit our Facebook Page. Click on the "like" button.

> Read More... | Digg This!

published by Vivek Gite on 2010-09-03 18:05:04 in the "Ubuntu Linux" category
Vivek Gite
This blog post listed Linux Compatible USB wireless adapters. It seems that many new Linux users frequently have problems learning how to install RT2870 driver under Linux. I also received email requesting installation instructions for the same device. This quick tutorial will explains how to install RT2870 based chipset device with WPA2 authentication and TKIP wireless encryption.

> Read More... | Digg This!

published by Vivek Gite on 2010-09-03 15:57:40 in the "Linux" category
Vivek Gite
I recently brought Canon EOS 500D mid-range DSLR cameras with good promotional discounts. My photography interests date back to my school days but I did not take photography seriously until recently. Now, I'm researching for quality open source photo-software which may be available to photographers. This blog post gives a quick and dirty view of the different photo applications available for Linux operating systems:

> Read More... | Digg This!

published on 2010-09-03 04:06:00 in the "cuddletech" category
Ben Rockwood

All the panels from the Silicon Valley DevOps Days are now online. A huge round of applause for InfoQ for putting this entire event online and making it available to the world.

If you want a glimpse into the next 10 years of system administration as a career path, you need to get up to speed now so it doesn't take you by surprise in the coming years.



> Read More... | Digg This!

published by jono on 2010-09-01 06:51:55 in the "Canonical" category
It was with great sadness that I read earlier that my friend and colleague Ian Clatworthy passed away after his fight with cancer. Although I never knew Ian that well, whenever I did work and spend time with him I always found him to be a fun, light-hearted, and always pleasant person to be around. Words [...]

> Read More... | Digg This!

published by jono on 2010-08-30 19:12:11 in the "Community" category
A little while back I blogged about wanting to reconnect with our ethos. In a continuation of that theme I am keen to talk about stories. I have talked about stories quite a bit in my writings on community management (particularly so in my book The Art of Community). Stories are important entities in communities – [...]

> Read More... | Digg This!

published by amantia on 2010-08-30 07:59:04 in the "KDE General" category

The above combination was never a painless experience, still at some point in past it seemed to be better to have a NVidia card on Linux then anything else, so I continued to buy them whenever my system was upgraded. Lately although it started to make me rather bad. I have two computers, one that is a 4 core Intel CPU with 8GB of memory, the other is a Core2Duo with 3GB. The latter is a Lenovo laptop. Both have NVidia, nothing high end (Qudaro NVS something and 9300GE, both used with dual monitor setup), but they should be more than enough for desktop usage. Are they?
Well, something goes wrong there. Is that KDE, is that XOrg, is that the driver? I suspect the latter. From time to time (read: often), I ended up with 100% CPU usage for XOrg. Even though I had 3 cores doing nothing the desktop was unusable. Slow scroll, scroll mouse movements, things typed appearing with a delay, things like that. Like I'd have an XT. I tried several driver version, as I didn't always have this issues, but with newer kernel you cannot go back to (too) old drivers. I googled, and found others having similar experience, with no real solution. A suspicion is font rendering for some (non-aliased) fonts, eg. Monospace. Switching fonts sometimes seemed to make a difference, but in the end, the bug returned. Others said GTK apps under Qt cause the problem, and indeed closing Firefox sometimes helped. But it wasn't a solution. Or there was a suggestion to turn the "UseEvents" option on. This really seemed to help, but broke suspend to disk. Sad Turning off the second display and turning on again seemed to help...for a while. Turning off the composite manager did not change the situation.
Finally I tried the latest driver that appeared not so long ago, 256.44. And although the CPU usage of XOrg is still visible, with pikes going up to 20-40%, I gain back the control over the desktop. Am I happy with it? Well, not....
As this was only my desktop computer. I quickly updated the driver on the laptop as well, and went on the road. Just to see 100% CPU usage there. Sad Did all the tricks again, but nothing helped. Until I had the crazy idea to change my widget theme from the default Oxygen to Plastique. And hurray, the problem went away! It is not perfect, with dual monitor enabled sometimes maximizing a konsole window takes seconds, but still in general the desktop is now usable. And of course this should also make me have more uptime on battery.
Do I blame Oxygen? No, not directly. Although might make sense to investigate what causes there the NVidia driver going crazy and report to NVidia.

So in case you have similar problems, try to switch to 256.44 and if it doesn't help chose a different widget style.

Now, don't say me to use nouveau or nv. Nouveau gave me graphic artifacts and it (or KDE?) didn't remember the dual card setup. Nv failed the suspend to disk test with my machine and doesn't provide 3D acceleration needed eg. for Google Earth.



> Read More... | Digg This!

published by amantia on 2010-08-30 07:59:04 in the "KDE General" category

The above combination was never a painless experience, still at some point in past it seemed to be better to have a NVidia card on Linux then anything else, so I continued to buy them whenever my system was upgraded. Lately although it started to make me rather bad. I have two computers, one that is a 4 core Intel CPU with 8GB of memory, the other is a Core2Duo with 3GB. The latter is a Lenovo laptop. Both have NVidia, nothing high end (Qudaro NVS something and 9300GE, both used with dual monitor setup), but they should be more than enough for desktop usage. Are they?
Well, something goes wrong there. Is that KDE, is that XOrg, is that the driver? I suspect the latter. From time to time (read: often), I ended up with 100% CPU usage for XOrg. Even though I had 3 cores doing nothing the desktop was unusable. Slow scroll, scroll mouse movements, things typed appearing with a delay, things like that. Like I'd have an XT. I tried several driver version, as I didn't always have this issues, but with newer kernel you cannot go back to (too) old drivers. I googled, and found others having similar experience, with no real solution. A suspicion is font rendering for some (non-aliased) fonts, eg. Monospace. Switching fonts sometimes seemed to make a difference, but in the end, the bug returned. Others said GTK apps under Qt cause the problem, and indeed closing Firefox sometimes helped. But it wasn't a solution. Or there was a suggestion to turn the "UseEvents" option on. This really seemed to help, but broke suspend to disk. Sad Turning off the second display and turning on again seemed to help...for a while. Turning off the composite manager did not change the situation.
Finally I tried the latest driver that appeared not so long ago, 256.44. And although the CPU usage of XOrg is still visible, with pikes going up to 20-40%, I gain back the control over the desktop. Am I happy with it? Well, not....
As this was only my desktop computer. I quickly updated the driver on the laptop as well, and went on the road. Just to see 100% CPU usage there. Sad Did all the tricks again, but nothing helped. Until I had the crazy idea to change my widget theme from the default Oxygen to Plastique. And hurray, the problem went away! It is not perfect, with dual monitor enabled sometimes maximizing a konsole window takes seconds, but still in general the desktop is now usable. And of course this should also make me have more uptime on battery.
Do I blame Oxygen? No, not directly. Although might make sense to investigate what causes there the NVidia driver going crazy and report to NVidia.

So in case you have similar problems, try to switch to 256.44 and if it doesn't help chose a different widget style.

Now, don't say me to use nouveau or nv. Nouveau gave me graphic artifacts and it (or KDE?) didn't remember the dual card setup. Nv failed the suspend to disk test with my machine and doesn't provide 3D acceleration needed eg. for Google Earth.

UPDATE: I upgraded my laptop to 4.5.1 (from openSUSE packages).Well, this broke composition completely, I got only black windows. I saw a new driver is available (256.53), let's try it. So far, so good, even with Oxygen. Let's see on the long run how it behaves, I didn't test it in deep.



> Read More... | Digg This!

published by rich on 2010-08-28 13:55:54 in the "Qt" category

In my last blog post, I showed how to use a proxy QNetworkAccessManager to restrict network accesses to sites included in a whitelist. One limitation the previous version had is that it stopped the disallowed requests by rewriting the request itself to be to an invalid url. This then caused the default implementation of QNetworkAccessManager to generate an error reply for us. This post will look at how to create a custom reply directly, to allow us to display messages to the user etc. or even provide 'virtual' content.

The approach I've taken is to try to write a reusable utility class for sending basic network replies. I've called the class QCustomNetworkReply since if there's a reasonable level of support then I'll try to work it up into a merge request for Qt. To begin with, lets see how the whitelisting proxy looks now that it uses the new class:

QNetworkReply *WhiteListNetworkAccessManager::createRequest( Operation op,
                                                             const QNetworkRequest &req,
                                                             QIODevice *outgoingData )
{
    // If host is not whitelisted then kill it
    if ( !isAllowed( req.url().host() ) ) {
        QCustomNetworkReply *reply = new QCustomNetworkReply();
        reply->setHttpStatusCode( 403, "Forbidden" );
        reply->setContentType("text/html");
        reply->setContent( QString("<html><body><h1>That url is not in the whitelist</h1></body></html>") );

        return reply;
    }

    QNetworkReply *reply = QNetworkAccessManager::createRequest( op, myReq, outgoingData );
    return reply;
}

The new code operates if the request is to be disallowed. First it creates our custom reply, it then specifies the HTTP response code to send. Finally it sets up the content type and the content itself. Finally, we return our custom reply. As you can see, the API of the QCustomNetworkReply class is fairly simple to use (in fact the only required part is setting the content).

Now we've seen how it's used, lets take a look at how the custom network reply works. The class declaration is fairly simple:

class QCustomNetworkReply : public QNetworkReply
{
    Q_OBJECT

public:
    QCustomNetworkReply( QObject *parent=0 );
    ~QCustomNetworkReply();

    void setHttpStatusCode( int code, const QByteArray &statusText = QByteArray() );
    void setHeader( QNetworkRequest::KnownHeaders header, const QVariant &value );
    void setContentType( const QByteArray &contentType );

    void setContent( const QString &content );
    void setContent( const QByteArray &content );

    void abort();
    qint64 bytesAvailable() const;
    bool isSequential() const;

protected:
    qint64 readData(char *data, qint64 maxSize);

private:
    struct QCustomNetworkReplyPrivate *d;
};

The first group of methods are those for setting the various headers on our response. They are really just convenience wrappers around existing methods (for example making some protected functionality public). I won't go into any more detail about them since the implementations are obvious looking at the source. The two setContent methods are where things start to get interesting:

void QCustomNetworkReply::setContent( const QString &content )
{
    setContent(content.toUtf8());
}

void QCustomNetworkReply::setContent( const QByteArray &content )
{
    d->content = content;
    d->offset = 0;

    open(ReadOnly | Unbuffered);
    setHeader(QNetworkRequest::ContentLengthHeader, QVariant(content.size()));

    QTimer::singleShot( 0, this, SIGNAL(readyRead()) );
    QTimer::singleShot( 0, this, SIGNAL(finished()) );
}

The first method is simple a convenience and allows us to use a QString rather than a bytearray for the content, yhe second is where the real action is. First, we store the content. Next, we zero the offet that stores how much data has been read from our reply (remember a QNetworkReply is a QIODevice) and open our io device. Now that we have the content, we also set the response header that specifies the amount of data we have. Finally, we use two single shot timers to cause the readyRead() and finished() signal to be emitted when the event loop is reentered. We can't simply emit these signals immediately since the reply has not yet been returned by our QNetworkAccessManager, so nothing is listening for them.

The final part of the code is to provide a basic implementation of a QIODevice to allow the stored content to be read back out:

void QCustomNetworkReply::abort()
{
    // NOOP
}


qint64 QCustomNetworkReply::bytesAvailable() const
{
    return d->content.size() - d->offset;
}

bool QCustomNetworkReply::isSequential() const
{
    return true;
}


qint64 QCustomNetworkReply::readData(char *data, qint64 maxSize)
{
    if (d->offset >= d->content.size())
        return -1;

    qint64 number = qMin(maxSize, d->content.size() - d->offset);
    memcpy(data, d->content.constData() + d->offset, number);
    d->offset += number;

    return number;
}

That's all there is to it - see all fairly straight forward. The nice part is that now we have the QCustomNetworkReply, we don't need to do any of that work again and can simply reuse this class whenever we want to send data directly to clients of QNetworkAccessManager. As usual, the code is available from my qt-examples git repository at http://gitorious.org/qt-examples/.



> Read More... | Digg This!

published on 2010-08-28 09:10:00 in the "cuddletech" category
Ben Rockwood

Randy Pausch, you may recall, became infamous because of his dying "Last Lecture". Just tonight I happened to come across a talk he did on Time Management, "because time is all we have." As he particularly pointed out, "you may have less of it than you think." Time management tips from a dying man, who better to speak on the subject?

Whats shocking to me is that the talk is not philosophical, rather its 1 hour 16 minutes of non-stop practical pointers, ideas and applications.

Randy Pausch Lecture: Time Management

I think my chief takeaway was that time is, and should be treated as, a precious commodity. If you are spending time, it should be on something worthy of that sacrifice. What this also implies is that if someone wants my time, I should ensure they are using my time wisely. Time is not an infinite resource.

This point is particularly key to me because I am a wanna-be perfectionist. I will drag on and on and on for days, weeks, months trying to think something through before truly devoting myself to it. For code this means that I want to be able to visualize all the logic before I start writting. Now, this is an entirely flawed concept, because any reasonably complex program is going to have more lines of code in it that you can keep in your head. Therefore, when I try to visualize everything I'm actually just moving from visualizing one small part to another, and loosing something during the mental context switch. I should instead just start writing the program and then deciding ahead of time to improve it later. This is essentially my version of "a working program today is better than a perfect program in a year".

I'm reminded of a phrase I cooked up with Tamarah (my wife, the lovely women above) several years ago. When discussing something emotional and complex, you can spend a lot of time thinking over and re-thinking the right way in which to phrase it to provide clarity. But this is exceptionally hard to do and very time consuming. Therefore, when we see eachother in this "I'm not sure how to put it..." pause, we will say: "Badly... and work from there." So we work in drafts, making it clear that the first draft is probably horrifically inaccurate and wrong, but we'll work towards clarity together and in doing so get a clearer picture of the topic than we'd ever get from the perfect one line explanation.

For sysadmins I find this really hard. It seems all we sysadmins are both perfections and ADHD at the same time. I wish I were exaggerating, but most of us really actually are clinically hyperactive... its a job qualification. The problem is that while we can keep a lot of plates spinning, we're very bad (on the whole) of providing timely delivery with high quality, unless an external force demands it. This is why sysadmins have to have managers. Geeks without overlords will do amazing things and deliver very few of them. (The description of a good overlord is an excessive left for the reader.)

I digress. I personally recommend watching this video repeatedly, say every 3 months. I re-watch David Allen's GTD talk at Google every couple months already. I always find something new in it and it's a great reminder to get back on the wagon. More importantly, personal management is dry and tedious, so hearing enthusiastic guys like David Allen or even Tony Robbins (say what you will, his TED talk was fantastic) can be a real pick-me-up.



> Read More... | Digg This!

published by jono on 2010-08-27 23:06:30 in the "Random" category
These views are my own, and not necessarily those of Canonical. Some time back the always awesome Earl and Cathy from Zareason loaned me one of their Strata laptops to play with. I met them at an event some time before, and while I had heard of Zareason, I really knew nothing about them. Since then [...]

> Read More... | Digg This!

published by noreply@blogger.com (milek) on 2010-08-27 15:59:51
Here is worth reading collection of blog entries on what's going on recently in regards to Open Solaris and Solaris 11.



> Read More... | Digg This!

published on 2010-08-26 18:53:00 in the "OpenSolaris" category
Ben Rockwood

Sorry for the late notice, but SVOSUG is meeting tonight. Myself and several folks from the Joyent crew will be onhand.

6:45pm
274 Castro Street, Suite 204
Mountain View
above Meyer Appliance & Kitchens look for the OpenSolaris sign on the door 

Tonights guest will be Garrett D'Amore presenting Illumos and Anil Gulecha presenting Nexenta.

The discussion will really be in essence about the rebirth of OpenSolaris in a post-Oracle era.

If you can't attend in person, it will be webcast: http://www.ustream.tv/channel/svosug-feed2

Be there in person or attend the webcast, but don't miss it!

A big thanks goes out to Alta Elstad for keeping the faith and keeping SVOSUG alive! Alta rules!



> Read More... | Digg This!

published by jono on 2010-08-26 00:35:24 in the "Community" category
Just a quick reminder: as part of our awesome Ubuntu Global Jam I am organizing the Ubuntu California Rockridge Jam at A’cuppa Tea, College Ave, Berkeley. The jam is from 10am – 6pm – I hope to see you there! Don’t live near me? Go and find your nearest jam or organize your own!

> Read More... | Digg This!

published by jono on 2010-08-25 22:27:11 in the "Community" category
Some time back the Ayatana project introduced the Application Indicator Framework, based upon technology created by the KDE project. We have been shipping this technology in Ubuntu for a few releases now and it makes the top-right part of the desktop a smooth, efficient, and pleasant experience, getting over the inconsistent and limiting notification area [...]

> Read More... | Digg This!