Archive for May, 2009

Nothing lost

Arch LinuxFor the first time ever, or at least that I know of, an Arch installation CD has refused to start on my erstwhile-bulletproof Inspiron. The symptoms are rather unusual — a freeze during the udev sequence that results in a hard lock — but consistent, with several different burns of several different 2009-02 ISOs all failing at the same point.

I’ll have to search around for a solution, but to be honest, I have little reason to. One of the beautiful things about Arch is that I can jump straight to current regardless of the installation CD I use, and this isn’t the first time a particular release has acted peculiarly on a specific machine.

Nothing lost. Download the previous release, install across FTP, and I reach the exact same point, with only a slight delay. I can live with that.

It’s unfortunate that there’s a bit of a glitch on this machine — the one that introduced me to Arch Linux. And I hadn’t seen an Arch CD ever that wouldn’t at least reach the cursor prompt on it. But like I said … nothing lost.

Trimming the list, again

In the few moments I had this morning, I trimmed away a lot of the blogs on the list at right. If yours was there and it’s not any more, I probably visited it yesterday, saw nothing Linux-related posted in the recent past, and removed it. Let me know if I made a mistake.

If you want your blog or site added, by all means send me a note and I’ll check it out. The standing rule applies though: If you get lazy, or if your blog is more about your cat than Linux, well. … :twisted:

Portable Ubuntu: Definitely a keeper

I don’t use Windows at home. Windows has nothing to offer me, which is something that I have discussed before. I don’t worry that it’s designed to be defective, or that there are licensing issues, or about the price, or any of the other, common complaints. I don’t use it because it can’t do anything I want, and as a result, I can ignore it with a clear conscience.

On the other hand, at work, there is no option. The office is strictly a Windows-only zone, for better or for worse, and I am neither inclined nor obligated to reroute that trend. From my perspective, using Windows is a conscious choice these days, and if an office chooses to ally with Redmond, they do so with full knowledge aforethought that there are options.

And now I have an option too. I tried Portable Ubuntu for Windows today, during a few hours’ break from my weekly grind. This is the culprit, running on a fresh installation of Windows XP.

I’m impressed, really. I did a quick swing past a Windows-Linux hybrid last year, and while it was interesting, I didn’t think it was very useful, for me. On the other hand, this one might be worth buying a cheap USB drive and keeping.

Everything looks and behaves like a shoehorned version of Gnome Ubuntu, riding shotgun to a normal WinXP desktop. True, that top central panel thing isn’t really Ubuntu canon (that was a pun :roll: ), but the idea is there, and it behaves just like the Gnome menu cluster.

By default, the 450Mb .exe download comes with a slightly different variety of software too — Abiword and Gnumeric over the entire OpenOffice tumor, for example. Which is what I would prefer, really: OpenOffice is far too fat for my liking.

There are some other little differences. This is built on Hardy Heron, so some of the newer bells and whistles you might be used to from Ibex and up might not be in there. And don’t charge into this thinking you’re going to spin your Windows 98 desktop like a cube. That preconception has “fail” written all over it.

But it does act and behave identical to a full system. You can adjust the repositories (they’re preset to Argentina :| ), download updates, install new software, adjust themes or whatever, just like you would expect in a full Ubuntu system.

Except it’s not, and that’s kind of obvious in other ways too. Some core Linux thingies don’t behave the same — you can’t, for example, expect to find an ext2 modular drive that’s plugged into the system, and mount it like a normal Ubuntu system could. Oh well, I can’t have it all, can I? :(

But this is definitely a keeper for me, and I’ve already recommended it to a couple of people that I know either rely on Windows machines from time to time, or dual boot for the odd Windows program. Because after all, there’s not much difference between this and Wine, it’s just that the tables are turned: Instead of relying on an interpretation layer to handle Windows applications, you’re relying on a collection of software that is built to run along with the Windows core.

And for what I’ve seen thus far, it might, in some cases, be preferable to use this instead of Wine. I know of a couple of old games which just don’t ever seem to work for me in Wine, but behave fine against a basic XP installation. I can use those in XP if I want, and rely on the rest of Portable Ubuntu to assuage my conscience over licensing and ethics concerns.

But that’s enough postulation. I plan on keeping this around mostly for use at work (provided, of course, that it behaves as well with Vista … but that might be asking too much :roll: ), so I have access to applications I prefer without installing them fully. And that’s what it’s all about, really: Use the things you prefer, without feeling hemmed in by anyone — free software zealot or corporate lawyer. ;)

Running rtorrent as a daemon

A long time ago, I suggested rtorrent was something like an “rtorrent daemon.” That’s still true, of course — I don’t know of any torrent client that runs lighter and has the same range of controls as rtorrent.

I never really tried to set it up as a true daemon though, until I saw this thread on the Arch Linux forums, and its corresponding wiki page. It might not sound like it’s worth the effort, but it’s kind of nice to run the entire system in the background, unattended and preconfigured, and just drop torrents and run.

Mimicking the same concept in Crux was fairly easy; I needed to add a user called rtorrent, set up the proper subdirectories and then configure rtorrent’s rc file as I liked. The script shown in the thread and on the wiki needed scraped down a little bit, to where it’s really just a simple series of start and stop commands. (Oh, and the daemon needs either screen or dtach, depending on which you prefer.)

I don’t know if I’d go through the work of setting this up every time I wanted to install rtorrent, but I can see where this would be useful on a remote machine, or on a machine that sits by itself and does nothing but download. Oh wait, that was my original point, wasn’t it? :mrgreen:

More observations on the effects of environment on antique hardware

I live in a part of Japan that will see a sharp jump in humidity in the next few weeks, as we enter a rainy season. Already the ambient moisture levels, on days that are still relatively cool, are noticeable.

And one of the ways I notice it through that misbehaving power switch on my 100Mhz laptop, the one that will randomly pulse at times, cracking a wicked on-off-on-off power current through the whole machine, and making my hair stand on end in fear.

It’s nothing new, I anticipate and prepare for the problem, but I have noticed that in the past week or two, it has become more and more common. As are the random system restarts, which of course delay my progress in terms of 10-minute blocks, while the system restarts, does a file check, then restarts again, and so forth.

So only a week or two after mentioning that I use it more or less as my primary machine, I have moved everything off of it, and given it a two- to three-month hiatus in the closet, while I wait for cooler and drier weather. I don’t have an explanation, in mechanical terms, for why humidity would cause the switch to falter more often (I have absolutely zero training in the electrical arts). But I’m not prepared to work an antique within a hair’s breadth of its life, just to prove it can be done. A machine that has survived 13 years with relatively little damage doesn’t deserve to be whipped to death by a Linux zealot ignoring hardware eccentricities.

Also from the “misbehaving hardware” department, that Atheros wireless card‘s bizarre noise floor errors have irritated me long enough, and forced enough reboots of the Thinkpad, to prompt me to yank it from its socket. It has likewise been relegated to the closet, but this one with teeth clenched, and with an overhand motion. :evil:

But in every problem, a solution, I tell myself. The ancient Linksys WPC11 v3 b-wireless card that was my connection to the world on the Pentium is now in the Thinkpad, with a recompiled kernel and no irritating noise messages that eventually kill my network connection and force me to reboot. Ah, silence.

Aside from that, things are still more or less status quo. Sending the Pentium on a vacation clears a nifty chunk of my desk, which is a welcome side effect. Who knows though, maybe something “new” will fill that space soon? That seems to be my pattern. … :|

Howto: Patch and set up screen-vs

A wiser person than me once said you have to listen to what people want, and give it to them. Ordinarily I’m enough of a curmudgeon to ignore that, but in this case, it’s probably true. I attracted a little attention with that commercial for screen and the vertical split patch, and a few people asked for more detail. And I’m willing to oblige.

Two caveats. First and foremost, I am not a screen expert. screen is one of those programs I hold in high esteem because it is exceptionally customizable, especially at very low levels, and I haven’t used it enough to tackle all the intricacies and finer details. screen is great stuff though, particularly if you enjoy (?!) living life at the terminal line. Which I do, these days. :twisted:

Second: You will want proper framebuffer support for your system. I only mention that because I happen to use a distro that requires you to include framebuffer support, and if you don’t do it right, you’ll end up with gigantamo letters and an 80×60 screen, and won’t be happy with me. It’s also worth mentioning because in a day and age when nonstandard screen dimensions are … standard, nobody wants a 1024×768 screen smeared to fit 1280×800. In that case, I strongly recommend checking out Ali Gunduz’s note about pursuing unusual framebuffer dimensions.

All right, enough with the preliminaries. The first thing we want to do is patch screen to include the vertical split. Patching is terrifyingly easy stuff, but I’m going to do it the roundabout way, just to prove my point.

The rumors are true, Ubuntu 9.04 has the split patch in place already, it’s just that the commands are a little different from the “pure” patch. Ubuntunuts use the pipe symbol to split a screen vertically, while the vanilla version uses a capital V. Which command you use is immaterial really, since screen allows you to customize your keybindings without ever leaving the comfort of your home. Isn’t life wonderful?

Arch users have the luxury of the screen-vs PKGBUILD at their command, and so can build a version of their own design, with minimal effort. I would never dream of suggesting to a Crux user how to patch a file; Crux users inhale code as a morning ritual, and will only scoff at my pitiful efforts to enlighten them on how to patch things.

All the same I enjoy messing with stuff, so I’ll patch it in Ubuntu. First, let’s go crazy.

sudo -i

Now we can handle some of the more complicated issues without working around sudo all the time. Yes, I know, I just committed a cardinal sin in Ubuntu … sue me. If it’s that big a deal for you, don’t do it. But all the cool kids are doing it. And if you did it, you’d be really cool too. …

Next, once you’ve succumbed to peer pressure, rip out the screen that is installed. screen and screen-profiles are part of ubuntu-desktop (which is to say, a default installation). At a terminal (and if you fear the terminal, the irony is beyond me). …

aptitude remove --purge -y screen

Next let’s get screen’s source in place, along with its dependencies. apt-get is your friend here.

apt-get build-dep screen -y

If you haven’t installed it already, build-essential (which is to say, the compilation tools) will be dragged in too. Now a small dependency that may or may not give you issues later. …

apt-get install libncurses5-dev -y

I also use checkinstall, when I visit Ubuntu.

apt-get install checkinstall -y

Let’s add the source for screen. I prefer the pure, unadulterated version.

wget http://fresh.t-systems-sfr.com/unix/src/misc/screen-4.0.3.tar.gz

That’s just one mirror; there are lots of places you can download it from. Now decompress it.

tar zxvf screen-4.0.3.tar.gz

You should have a folder called screen-4.0.3 there now. Change into it. Now we go from crazy to barbaric: Download the patch.

wget http://vsp4sdl.yuggoth.org/wrp_vertical_split_0.3_4.0.2.diff.bz2

Yes, I know it says 4.0.2. It works for both versions. Now bunzip it.

bunzip2 wrp_vertical_split_0.3_4.0.2.diff.bz2

Now comes the incredibly difficult, exceptionally nerve-wracking part.

patch -Np1 < wrp_vertical_split_0.3_4.0.2.diff

Tough, wasn’t it? Now let’s configure.

./configure --prefix=/usr

Customize that if you like. Check ./configure --help | less for some ideas. Now make.

make

And we’re one step shy of being done.

checkinstall

Say what you like about checkinstall; I have no opinion of it one way or another, except that it makes a nice package that I can pusharound for a few months. Now let’s check our work.

exit
screen

And you should get the introductory message from screen. Press a key to get beyond it. Communicate directly with screen by pressing CTRL+A, then press the question mark (?). You should see a happy help screen. With any luck, on the right is the capital V, with the vertical split command. Finished.

Okay, so now it’s in place, and we corrupted an otherwise pristine installation of ubuntu-desktop by ripping out screen and replacing it with an aftermarket part. There goes our warranty. Now let’s get it set up in such a fashion that it’s worth bragging about at work.

And this is the part where you can go really wild. Like I mentioned, one of the beautiful things about screen is that you can modify it to your heart’s delight, and no one will complain. Here’s a way to start.

hardstatus alwayslastline "%-w[%n %t]%+w%=%C %a"

shelltitle ''
startup_message off
vbell off
blankerprg cmatrix -ab -u2
idle 300 blanker

screen -t centerim 0 centerim
screen -t alpine 1 alpine
screen -t vimwiki 9 vim

Paste that into a file called .screenrc in your home directory, and restart screen. What’s it do? Well, from here and there on the Internets, I collected a few settings I like, personally. The hardstatus line sets the bottommost line of the screen as a kind of panel, with the active application selected, and a clock in the bottom right corner. The number of options you have at your disposal there is mind-boggling, check screen’s man pages for more codes.

The shelltitle variable allows you to preset the name of new screen sessions to … whatever, and I usually prefer just a blank. Otherwise, the hardstatus line will show “bash”, if I remember right.

startup_message controls whether or not the startup message is displayed. As you might have guessed. :roll:

vbell is the visual bell, which I turn off, mostly because the entire screen flashes in reverse, which is rather like being hit squarely in the center of your forehead with a ball-peen hammer. I don’t recommend that.

blankerprg and the idle command I mentioned here; I strongly recommend cmatrix in that role, or perhaps cacafire, if you’re so inclined. Be aware that libcaca in some distros requires some of X’s baggage, which I only mention if you’re a purist like me, and you’re running free of anything from Xorg, et al.

The remaining commands spawn processes and add titles to the windows, as they are begun. The last one in the list will be the window you see when screen is done starting, so if you like to start a music player or check your e-mail first of all, put it last.

Aside from what you see there, you can dig up about a bijillion other settings and commands, all of which will customize screen to the nth degree. Experiment, and report back. I love new ideas.

So what’s left? Well, the fun part really. You’re probably wondering how screen behaves and how to get a third of the screen partitioned off, like I did in the photo. It’s easy really, if you can think about the layout at all.

Every time you split a window, screen evenly divides the space to accommodate. But if you subtract a window, depending on its place in the stack, the released area is reallocated one way or another, but not evenly. That means you can work in thirds or quarters of your screen at one time, simply by adding (with CTRL+A CTRL+S or CTRL+A CTRL+V), then subtracting (with CTRL+A CTRL+X) the appropriate portion. Remember that you can bounce between “windows” with CTRL+A TAB; the cursor shows which “window” you’re in.

It might take a little practice to predict how screen will arrange things. But, if you split the screen first horizontally, then split the bottom one vertically in half, then bounce back to the top and split it vertically three times, then X-out one of the leftmost “windows,” you can run mplayer (thank goodness for the -really-quiet option :shock: ) and come up with something like this.

It also means applications that work well in single lines or restricted spaces have an excellent role in the grand scheme of things. You can arrange one slender bit of a window at the top or bottom, run a network monitor there alongside a system profile or a chat box, or e-mail client or … oh good grief. You figure it out. (I dig images and pictures of wacky arrangements, by the way. If you get one you’re proud of, by all means share.)

Anyway, that’s about all I have at the moment. This little essay is skeletal at best, considering the potential screen has, and the fun of the vertical and horizontal splits. More information is out there; tell us what you find. :D

Quit X! screen-vs is more fun!

screen-vs is what I’ve come to call screen with the vertical split patch applied, for no real reason other than that’s what the PKGBUILD is called in AUR, and I adopted the name when I drafted my own port for Crux. screen with that patch is more fun than a bag of cats, and the things you can do with it along with a little framebuffer love are amazing.

Here’s an example, a sidebar screenshot from a day or two ago you might remember. …

If you are uninitiated, that’s mocp running across the top of the screen, with mc down the side on the left, and htop and iftop on the right. That’s more or less a normal screen setup these days, when I am not demanding that the Thinkpad do something unusual.

As an example of “unusual,” when I scrape Jamendo for worthwhile jazz albums, I usually split the screen like this.

The benefit in that is having mc at the top as a file manager, so I can unzip and dump files into the folders I choose, or jettison them altogether if they suck. On the top right is iftop, watching my bandwidth and so forth, while the bulk of the screen is dedicated to elinks, which is rather like an expectorant for the Internet. Clears out the gunk, and leaves you with the important parts.

But best of all, for the naysayers in the crowd, the ones who will cling desperately to X because it’s somehow the “only” answer to proper image display. …

That, friends, is mplayer on the top left, running a DVD rip while alsamixer is available on the right. At the bottom, iftop on the right (I was transferring a file between machines when I snapped that image) and at left, of course, htop watching the system profile.

And what a system profile it is. A 550MHz machine maxed out at 192Mb of PC100, a machine that was a thrift-shop special a year and a half ago, a machine that most people would probably give away rather than have to look at another day, a machine with only 4MB of video memory and an 800×600 screen … and it’s doing all that on about 5 percent of its processor power and around 31MB of memory.

That’s the best endorsement I can offer for handing X its pink slip. Who needs all of the trappings and dead weight that come with X — let alone a full honking desktop environment like Ubuntu’s Gnome — when you can get all these things for almost nothing?

Trust me. Start over from scratch. Tear out all the crud and take a look at how you can do all the same things with far less baggage. You’ll thank me later. … :twisted:

But … why?

In my (relatively) short time as a Linux user, I have heard some mighty odd reasons for not adopting a penguin. But Number Three on this list quite possibly takes the cake for me.

All points of rhetoric aside, and all points of style aside, I have a difficult time understanding why — and by that I mean why — it would be necessary for anyone to refresh their desktop “5-6 times” immediately after startup … in any operating system.

Perhaps this is a cultural issue — I have heard of more bizarre rituals applied to technology — or perhaps there is some sort of Windows behavior that I don’t recall that requires right-clicking and refreshing multiple times before getting to work. Or maybe it’s just an icon or screen artifact issue, as discussed here.

But for the life of me, I can’t figure out what makes it necessary in Windows and as a result precludes someone from using Ubuntu. I’ve never lived in India, but I’m also pretty sure I never had to refresh the desktop several times — or for that matter once, usually — when starting Windows.

Please, enlighten me. Otherwise, I think that reason for not using Ubuntu might actually belong in this thread.

P.S.: Just for the record, I went to work and tried it on a dual core Dell laptop running XP. I refreshed the desktop four or five times and guess what? Nothing happened. But who knows? Maybe there’s a difference between the Windows sold in Japan and the Windows sold in India. …

Fixing alpine’s TCP timeouts

I’ve mentioned that I use alpine almost exclusively as a means of communicating around the world; mutt might be the darling of the Linux geek world, but alpine is what I prefer. It does, on the other hand, have a few annoying aspects.

The biggest one is a little difficult to explain, partly because I’m not sure why it does this. I have three or four e-mail accounts, all with GMail (yes, I know, it’s not wise), and I tend to bounce between them, depending on the situation. The “problem” occurs in that (I think) GMail allows a connection to drop when a different account is opened.

That is not a big deal; I expect as much, but alpine seems to be a little unhappy with that. Rather than just allowing an e-mail account to close, alpine gets paranoid and has a minute-long panic attack as it tries to continue to communicate with that particular account.

And so there is a 60-second hang while alpine counts out the seconds allotted to a timeout, then gives me an opportunity to break the connection. If I don’t see the offer in the five seconds it appears on the screen, I have to wait another 22 seconds for the next one to appear. And so on, and so on, until the final timeout and alpine just gives up.

None of that would really be a problem, except with three accounts open, you need to triple the amount of time it takes to acknowledge the account is closed, and regain control of alpine. So at the minimum, three minutes, at the maximum … well, however long it takes you to notice the prompt and instruct alpine to close the account.

I was willing to live with this because screen shows a visual prompt when a warning bell sounds in alpine, and if I am alert, I can jump to the other screen and kick alpine, before going back to whatever I was doing.

So, if all that explanation makes sense, the good news is that I found the “hidden” settings that cut that delay down to a matter of seconds, instead of upwards of three minutes. According to this page, setting the TCP Read Warning Timeout and the TCP Query Timeout to their minimum values cuts that lag to a smidgin.

Which I can vouch for. Now, instead of waiting a full minute for a prompt that allows me to regain control of alpine, I only have to wait 5 seconds. If I miss it, there’s another one in another 5 seconds. No longer do I have to tap my nails on the tabletop, waiting to continue typing an e-mail.

It’s possible that I’ve only found a workaround, or that there is a better and correct way to solve this problem. As it is though, this turns a rather annoying mode of behavior into a very slim blip on the irritation scale. I’m satisfied with that.

An apology, and an update

I have to apologize up front for the silence that occurred over the last few days; I have some real-life issues that needed attention between Thursday and today, and unfortunately they ate up most of my free time.

And I hate to say it, but it’s likely to happen again, off and on, until July or so. It’s nothing bad, it’s just another facet of life that needs a little more focus as summer begins. The visible effect will be a wider gap between updates. I’ll do what I can to ameliorate that, but I have my doubts.

In the meantime, I have one sort of “confession” that needs aired. I have been using my 100MHz machine again, as the primary machine in the house, for almost as long as it has been since I realized I was living without X. Once the awful truth was out, that I had abandoned the relative jumble that was the standard graphical desktop for Linux, I reconsidered the fact that really, I was just using a 550MHz machine to do the same things I did back in February, for a week or so.

And with the exception of some sort of framebuffer image display, which this machine can’t do because it lacks the “contemporary” VESA 2.0 extensions (I believe that’s the proper terminology for it), the software is the same, the distro is the same, the end result is the same — just at 1/5th of the speed of my next fastest computer.

Of course there are the hardware quirks. And the occasionally irritating lag while one thing or another does what it’s supposed to do. And the miraculous ability to run alpine, centerim, mc, htop, calcurse, elinks, myman, screen, hnb, vim and a even a few more applications, all at the same time and all on less than 7MB of memory. How it all fits in there, I don’t know.

But I don’t do it to impress anyone; I do it because it makes sense and because it’s the obvious machine for the job. The simplest solution is usually the best solution, and for the tasks of blogging, keeping a calendar, keeping a desktop wiki, holding a to-do list, chatting, e-mailing, playing Pac-Man, playing FreeCell and so on, any more power spent is really just … wasted.

So as it stands now, my “main” reliable machine is the 100MHz laptop. Sound and video are the domain of the 550MHz Thinkpad, which has a beautiful display anyway and can play movies against the framebuffer without any sweat at all. Both are running Crux. And the 1GHz machine is the guinea pig, bouncing between distros sometimes at a rate of two or three a day.

When there’s time for that, of course. ;)

Next Page »


Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 144 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,164,314 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 144 other followers