Thursday, May 19, 2011

The flexibility of Linux

I'll admit, I'm somewhat interested in Google's Chromebook concept. The Chromebook is Google's spin on the "netbook". Announced in May last year, Chromebook goes on sale in mid-June.

The Chromebook runs Google's Chrome OS, which is based on Gentoo Linux. While Linux has appeared on netbooks in the past (and were the only option on the very first netbooks) this is another example of the flexibility of Linux. You can use Linux as a base for almost any computing platform - it's small, fast, and supports a variety of hardware.

When I first heard about the Chromebook, I started thinking about how you might go about "building" a Chromebook-like netbook. Now that Chromebooks are about to go on sale, I thought I'd revisit this idea here.

First, let's understand the concept of the Chromebook, what makes it different from other netbooks.

The idea is that you have a netbook where all your data is stored in "the Cloud" (Google Docs, etc.) so that nothing of value is really on the netbook. There's no "desktop" concept, you can't really save anything to your Chromebook. You do everything (including documents, email, games) via a web browser. This potentially makes for a very secure computing environment.


Starting from that, the Chromebook is essentially a mobile web computer, under the assumption the Internet is "always on" (or at least, "mostly on" - leveraging Google Chrome's support of HTML5 offline mode to continue working.)

Google Chrome is already available for Linux. And that's all we need to start "building" a Chromebook-like netbook:

Start with a "bare" version of the "X" Window System. Imagine a "window manager" that doesn't really manage any windows. If the Chromebook doesn't support a "desktop", then your "window manager" doesn't need to do much. In the simplest case, you need an "action bar" that lets you connect to open wi-fi networks, displays battery, and lets you logout.

The Samsung Chromebook sports a 1280x800 display. Here's a mock-up in those dimensions. I'll fill in the pink area next.


In this mock-up, maybe clicking on the user's name will bring up a simple dialog with "logout". The icons on the right could be clickable too, to join a network or to put the netbook to sleep. There's no option to bring up local applications - because you do everything in "the Cloud".

The "window manager" only has to keep track of one window: Google Chrome. The "window manager" doesn't need to support features such as virtual desktops, because Chrome supports tabbed browsing on its own.


You won't have the option of a file manager or a terminal program ("shell" window) in such an environment, but neither does Chrome OS. This is really intended to get you online, for you to do your work there.

How fast could such a system boot up? I installed a minimal Fedora Linux on an old laptop to test. This machine only takes 9 seconds to boot into text mode on a 2GHz single-core CPU with 1GB memory, no services running. Assuming a graphical environment like I've described above, this system might take a total of 11 seconds to boot up into a "login" screen.

Once you've logged in, probably another 2 seconds to bring up the "window manager" and start Chrome.

That's not very different from what Google is claiming for the Chromebook: about 8 seconds to boot. I'd guess that's the time it takes to get their "login" window, which is pretty bare:


So there you have it - all it takes is a "window manager". I used to have the programming madskillz to write such a thing, but my C is a bit rusty these days. I haven't looked around, but I'd bet someone has written a minimal "window manager" like the above. Maybe someone can point me to a link in the comments.

13 comments:

  1. Is Google Chrome OS really based on Gentoo? For some reason, I was under the distinct impression that it was based on Ubuntu, though Gentoo makes far more sense in terms of being able to optimize it for the specific hardware. Also, having Compiz to make a DIY Chromium OS could help in making sure Chromium has no titlebar and is always maximized.
    --
    a Linux Mint user since 2009 May 1

    ReplyDelete
  2. I want this with TWO windows. One window is Chrome (I suppose ... I'm agnostic in the browser) and the other is emacs. Those are the two apps I use most of the time. Since I OFTEN write away from the web (quite intentionally) the pure cloud thing does not work for me. Both a web browser and emacs can read email and do lots of other functions.

    I suppose this could be done with a simple terminal and the window for the browser, but the two environments would not be interactive enough without some serious tweeking to create a clipboard. On the other hand, since clipboards are singularly undeveloped, the kill ring is probably the way to go if it could include graphics, and it is accessible, it might be possible to get the browser running in a hacked window manager to use the same kill ring ....

    ReplyDelete
  3. @Greg: Off the top of my head, the best way I can think of doing this is to create a desktop using minimal (few effects) Compiz as the WM and making it always draw the browser and the text editor side-by-side taking up the whole screen together and without titlebars so that neither can be closed easily with the mouse. How does that sound?
    --
    a Linux Mint user since 2009 May 1

    ReplyDelete
  4. On a small screen (i.e. laptop) I'm not sure that would work. Also, Compiz is mean, bloated, and behaves badly on many graphics cards, in my experience. So that's a very high resource way of paring down resource use. However, the idea of having Compiz draw windows in specific static places is a very interesting one for other settings. I'll have to keep that in mind.

    ReplyDelete
  5. Ping: http://tinyurl.com/3t7koh2

    ReplyDelete
  6. http://maketecheasier.com/easily-create-a-custom-lightweight-desktop-environment/2010/08/10/ This is the article I was referring to; apparently once you turn off the shiny effects Compiz becomes a great lightweight WM.
    --
    a Linux Mint user since 2009 May 1

    ReplyDelete
  7. What about just running a terminal with no windows manager but having a wrapper for GUI software. The wrapper would launch a windows manager for that one window.

    ReplyDelete
  8. just check out www.omgubuntu.co.uk article on a guy's method of turning ubuntu into Chrome OS (kinda). At least you xan stillvlog in to a 'real' or 'full' desktop when needed...

    ReplyDelete
  9. This is the original article on that: http://tutafuta.com/2011/05/13/convert-your-ubuntu-into-chrome-os/

    ReplyDelete
  10. What you want is a lightweight window manager (like Openbox) and a minimal panel that just shows battery, and network/wifi. Gnome-panel might do it, but maybe something 'lighter' would be better for you. Fbpanel isn't quiet it.

    ReplyDelete
  11. Greg wrote:
    "What about just running a terminal with no windows manager but having a wrapper for GUI software. The wrapper would launch a windows manager for that one window."

    I don't think you quite understand what a 'window manager' does. You can't have it run just for ome program. But some wm's let you control what programs get window decorations (titlebars, etc) and which do not.

    ReplyDelete
  12. I like openbox. It's small, and does what I need on a dedicated system. I have a small Shuttlepc to do email on my tv. This is the .xinitrc to run openbox and a browser:

    openbox &
    gnome-terminal &
    firefox

    Exit firefox, and you're logged out (and my system shuts down automatically.) You can alt-tab to use the terminal to run commands if you need to, but otherwise its hidden.

    I configurd openbox to show firefox in full-screen mode, so I don't see a titlebar taking up space when its never going to be used.

    ReplyDelete
  13. I have a CR48 and I really like it, but on my desktop, I run Arch Linux.

    The desktop computer has a base install of Arch and Xorg with Ratpoison set as the window manager. I have two applications set to launch in my .xinitrc: Xterm (which I use with the Tamsyn font) and Chromium. And for my music, I use MPC with shortcuts to control it set via my ratpoisonrc.

    ReplyDelete

Note: Only a member of this blog may post a comment.

Followers