Friday, August 5, 2011

water on mars

Wednesday, August 3, 2011

planetarium

Something cool from mozillademos.org -- The Planetarium: http://mozillademos.org/demos/planetarium/demo.html

I guess this is supposed to be for Firefox, but here I've got it running in Google Chrome. A screen shot from AwesomeWM in Debian Squeeze:



No Pluto, though. :(

You click on a planet to get some info:

more awesome stuff

Of the DEs/WMs I use, AwesomeWM is easily the most difficult to configure -- I still don't understand everything that's going on in the config file, ~/.config/awesome/rc.lua -- but once it's set up it might be the best for doing a lot of work with several application windows open.

I really haven't been using Awesome enough to have acquired a good understanding of all of the things I can do with it. I log into an Awesome session perhaps once every two weeks or so.

It's the only "tiling window manager" I've had much experience with. There are like 9 different layouts to choose from, but I've edited my config file to use only 5 of them -- max, floating, tile, spiral, and magnifier -- and I use the first one, max, almost all the time. Maybe that defeats the purpose of using a tiling window manager, but I'm a rookie, so that's my excuse.

The max layout simply maximizes each application window. The floating layout is more like what folks are used to from other DEs/WMs in that you can move the windows around. I like the tile and spiral layouts because I can get a good look at each open window, and it's nice how the magnifier layout brings the active window (okay, "client" in Awesome talk) to the forefront.

The icon at the top right shows which layout you're using, if you know which layout each icon image represents.

A nice thing about is AwesomeWM is that, like Fluxbox, you can tab application windows. Another feature is that an application window (client) can have more than one tag (sorta like virtual desktops), kinda like having the same window open on desktop #3 as well as on desktop #1. Useful sometimes.

Further, different tags can have different layouts, so I can be using the max layout on tag (desktop) 1, and the magnifier layout on tag 3, for example.

I'm sure that in my comments here I'm getting some of the terminology messed up, but that's okay, I'll get better at it. For now, here's the order of my layouts, from the ~/.config/awesome/rc.lua file (left-clicking on the layout button at the upper right changes the layout in Awesome; right-clicking on it takes you backwards through the layouts):


layouts =
{
    awful.layout.suit.max,
    awful.layout.suit.floating,
    awful.layout.suit.tile,
    awful.layout.suit.spiral,
    awful.layout.suit.magnifier
}


And here are some screen shots showing some of the different layouts I've been using, in the same order as above (note the layout icon in the upper right corner):

"max" -- my default layout:



"floating," with the gedit window dragged over to the side a bit:



"tile," with a view of all open windows:



"spiral" -- kinda messy:



"magnifier" -- here, the active window (client) is brought to the forefront:



And, finally, another view of the open desktop, for your viewing pleasure:



Not bad for a neophyte, right? :)

Tuesday, August 2, 2011

when fsck runs at boot

Sometimes when you boot into Linux,  fsck runs and checks this or that filesystem (partition). This is a good thing, even though sometimes you wish it wouldn't because you're in a hurry!  You can see which filesystems will be checked at boot time by looking at the file /etc/fstab.

Partition info is shown in /etc/fstab under these columns: file system, mount point, type, options, dump, pass. According to man fstab, the numbers under the last column (pass) determine the order in which filesystem checks are done at boot time.

The entry for the root filesystem should have a "1" under the "pass" column. Other filesystems will have a "2" under this column; man fstab says, "Filesystems within a drive will be checked  sequentially,  but  filesystems  on  different drives  will  be checked at the same time to utilize parallelism available in the hardware."

If there's a "0" under the "pass" column, or if there's nothing present there, then fsck assumes that the filesystem does not need to be checked.

fsck will run at boot time after the filesystem has been mounted a set number of times, or if that number hasn't been reached, after a set time interval. For ext2, ext3, and ext4 partitions, you can find a bunch of info about a filesystem, including last mount time, mount count, maximum mount count (before fsck runs), last time checked, check interval, and next scheduled check (according to the check interval) by using the tune2fs and/or dumpe2fs commands.

The following two commands output mostly the same info (see man tune2fs and man dumpe2fs) -- I can use either of them for getting info about the partition at sda7 in Debian Squeeze (run as root):

#  tune2fs -l /dev/sda7

#  dumpe2fs -h /dev/sda7

Piping either of these commands into grep, with the -i flag (to ignore case), gives me the output relating only to the info I'm looking for in this situation:

#  tune2fs -l /dev/sda7 | grep -i 'mount count'
Mount count:              5
Maximum mount count:      24

#  tune2fs -l /dev/sda7 | grep -i 'check'
Last checked:             Fri Jul 29 21:52:37 2011
Check interval:           15552000 (6 months)
Next check after:         Wed Jan 25 20:52:37 2012

Or I can use egrep to get the above info all from one command:

#  tune2fs -l /dev/sda7 | egrep -i 'mount count|check'
Mount count:              5
Maximum mount count:      24
Last checked:             Fri Jul 29 21:52:37 2011
Check interval:           15552000 (6 months)
Next check after:         Wed Jan 25 20:52:37 2012

Or:

#  dumpe2fs -h /dev/sda7 | egrep -i 'mount count|check'
dumpe2fs 1.41.12 (17-May-2010)
Mount count:              5
Maximum mount count:      24
Last checked:             Fri Jul 29 21:52:37 2011
Check interval:           15552000 (6 months)
Next check after:         Wed Jan 25 20:52:37 2012

Monday, August 1, 2011

pipe menus

Thanks to this article, I recently found out about Openbox pipe menus.

For more info, see these Openbox wiki articles:

http://openbox.org/wiki/Openbox:Pipemenus

http://openbox.org/wiki/Help:Menus

I like the SysInfo pipe menu:



To add the “SysInfo” pipe menu in Openbox in Ubuntu Lucid, I downloaded sysinfo.sh from http://openbox.org/wiki/Openbox:Pipemenus (see the System Information section). I created the directory ~/.config/openbox/scripts and moved sysinfo.sh into it. Going by the notes in the scritpt, I edited ~/.config/openbox/menu.xml, adding the following line:

<menu execute="~/.config/openbox/scripts/sysinfo.sh" id="sysinfo-menu" label="SysInfo"/>

I placed that line in the menu between the obmenu and wallpaper.sh entries. Then I edited the script as follows to reflect Lucid's partitions:

MountPoint1=$(echo /dev/sdb5)
MountPoint2=$(echo /dev/sdb6)

Made the script executable, then did a restart from the Openbox menu, and the pipe menu worked.

I haven't yet found any other pipe menus that I'd like to add, but there are many of them that other people have created, and of course you can create your own. Here's a post about them at the PCLinuxOS forums, by forum member "menotu."

choices!

It's funny, no matter how much I enjoy KDE4 or Unity, it doesn't take anything away from how I feel when I log into an Openbox or Xfce session. I can go either way; I enjoy using Openbox as much as anything else. Even if I successfully install Ubuntu 12.04 next year and I'm able to run Unity on my main pc, I'm sure I'll be adding Openbox; and I'll certainly be running Xfce in other distros. There simply isn't any one Linux DE or WM that I like better than all others, so I'm glad that I don't have to stick with just one.

Openbox in Ubuntu Lucid (using xfce4-panel):