Categories
Computers

EEE Framebuffer

The other day I was debugging my awesome configuration and I zooted it. I had missed a comma in a table and the Lua stuff puked on me and awesome stopped working. So I went and dropped into a tty console to fix the problem.

Except my tty console was blank!

I tried all 6 of them and they were all blank. I was able to fix the configuration problem using other means, but I resolved to investigate where my tty consoles had gone.

Categories
Computers

Debian EEE Touchpad and udev

My touchpad stopped working the other day on the EEE. I had’t the faintest clue as to why. The kernel had updated to 2.6.32-trunk and I knew that wasn’t the cause. When that update happened, I specifically tested the touchpad to make sure the synaptics driver was recognized.

Luckily, there is the DebianEEEWiki.

I remembered that the Xserver had indeed been updated, but at the time I didn’t note any of the details. So I checked on the version that’s running and sure enough its 1.7. So apparently the new and improved way is to use udev.

Well, I entered the the example file, with my own modifications of course, and still didn’t get any love. So I shutdown X and restarted it. Still nothing. I restarted udev, even though I know it’s unnecessary, and still nothing. Finally I shut things down and went to bed. Trouble shooting while dealing with a concussion is not a good combination.

Tonight I fired it up and the touchpad is working fine. Don’t know what service or daemon needed to be restarted, but apparently the reboot got it. Back to normal EEE use. At least I don’t have to muck with it any further.

Categories
Computers

Almost There

The process of completing the upgrade of the computer is mostly tedious. I’ll note here that I whiffed a little in my archiving the configuration from the old server. I should have just grabbed all of /var since that’s where the user crontab files are kept, among other useful things. That’s not a huge loss, but it fits in with the general theme of tedium.

Categories
Computers

That was FUN

The new computer mobo is an M4A785-M from Asus. It got lots of good reviews. I outfitted it with 4G RAM and an AMD Phenom X4 9750. My upgrade procedure ended up being theorietically straightforward- preserve as much of my config as possible in the my home folder and then just do a net install from a USB drive. I used rsync to archive all of root, etc, usr/local, and var/lib.

Categories
Computers

Memory Problem

I started getting things together for the big upgrade last night. Put the heatsink on the CPU, unpacked the power supply, copied configuration files to the my home directory. I’ve put together a Debian network install image on a USB stick as well. I even tried doing a test, with seemingly mixed results.

Categories
Computers Programming Python

Pythonic Code

I came up with another nice little piece of python code to solve a problem while working on my blog client.

Categories
Computers

Question About Scheduling Posts

Alright, I’m going to write this down in the hopes that someone stumbles across this stuff with some kind of explanation.

I’ve been working on support for scheduling posts in my blog client. I thought I had something working- I used it to schedule 2 posts for the minute before and then right at midnight on New Years. Subsequent attempts to use the scheduling did not work. So I started searching for more details on what the date/time format needed to look like.

Categories
Computers

Double Bollucks

One of the pitfalls of ordering ordering components for a PC is it’s easy to confuse what is necessary versus what is delivered. I imagine if I did this more I’d have a better eye for that sort of thing- a mental checklist.

So naturally my motherboard and friends arrived today only for me to realize that I’m missing a rather important part.

The heatsink.

No building anything yet.

UPDATE: Triple Bollucks! My current power supply isn’t up to snuff either.

Categories
Computers

Bollucks

Truth be told, I wasn’t entirely disappointed the other day when my desktop computer failed. I knew my data was OK so I wasn’t worried about that. I’ve always used hand-me-down computers and the thought that I finally had just cause to get myself some technologically up-to-date hardware was exciting for me.

I had been looking around and had kind of determined that changing motherboards and hardware was not a terribly difficult thing on a Linux system. Basically, it came down to making sure that the proper kernel was present on the harddrive and that the bootloader could find that kernel. Given that the current system is functional enough for me to install packages, I was confident I could make the transition relatively painless.

Certainly less so that for a Windows box.

Categories
Computers

Wow, Just… Wow

Well, my computer started running again today. I couldn’t believe it. When I had finally given up on it the other day, I figured the next time I’d get a chance to see a run prompt was after I’d installed a new motherboard.

There are a number of strange things about this failure. First, all of the segfaults prior to the problem. Second, I must have attempted to reboot about a dozen times without success. It couldn’t even find the various mount points so the times that I got a prompt, I could only peform basic shell commands like ‘ls’ or ‘cd’. Real fancy stuff like ‘cp’ was completely unavailable. There was also the strange CMOS error that occurred one time.

Categories
Computers

Linux Printing Sucks

Unfortunately, there really is no way to state it otherwise. It sucks. Not to be confused with “It doesnt’ work” because it most certainly does. It sucks because the level of effort required to make it work is rather high. For a newbie, printer problems are essentially a right-of-passage. The more experienced one becomes with Linux administration, the more annoying printer problems become.

I’m not sure if it’s because of all the moving parts that are required to make it work or if the design philosophy behind ‘nix systems just sold everyone short in the case of printing. Hell, it could be something else entirely. The fact remains that Microsoft, much as I’m loathe to admit it, does it better.

The only positive thing I can say is, at least with modern distros, it’s lightyears ahead of where it was when I first started dabbling in Linux. Back then I opted not to have a printer. Nowadays, at least I can setup a printer to work on the system. Getting it to work as a print server takes more effort. Much more. But I can do it. Back then, not so much.

Alright, whine done. Back to the CUPS, hplip, ppd salt mines.

Categories
Computers

Adventures in Debugging

Naturally, after claiming I could upload images embedded in a post using blogtool, I tried to use it this morning to publish the post with the pictures of the yard and it puked. One of the errors was minor and easily fixable. The bigger problem was a cryptic message related to the XMLRPC API function metaWeblog.newMediaObject. The error message read “junk in document element:…”

Categories
Computers

Blogtool

I’ve now brought blogtool along far enough that I thought it would be worth taking stock of it so that I can figure out where next to go with it.

Blogtool is a command line blog client. It has no gui. Having been writing to the blog for a couple of months now, I can say that the whole GUI thing is overblown when it comes to posting. At least in my case. The vast majority of my posts are text, every now and again I’ll throw some pictures into the post. Either way, I came to feel that the GUI was not strictly necessary for client purposes. I felt a simple text file with some blog settings info in it would suffice. Having used what I have running, I’d say I was correct.

Categories
Computers

Quick Thoughts on Python

I’m writing the blog client in python. I had spent some time learning Perl a while back and I liked it. Unfortunately, I didn’t have anything to keep me working at it and I forgot a lot of the syntax. For Perl, in particular, that’s a killer. Some of the code that I go back and look at is real difficult to figure out. My only saving grace is that I never got to a point of proficiency with the Perl idioms, so I don’t have any super dense code to decode.

I had tinkered with python and liked it. It seemed to be a better implementation of a programming language than Perl. In particular, the language syntax itself is compact, making it easy to put together useful programs quickly. The ability to have quick success with a programming language can’t be understated. Further, the more powerful and useful forms of the language are accessible without all kinds of little idiosyncracies or exceptions (funny characters, unusual punctuation, those sorts of things).

I’m not particularly qualified to assess the language to any great degree, so I won’t waste the time. The topic has been given adequate attention by more accomplished programmers than I. For me, the bottom line is it’s possible to write useful, maintainable, programs quickly in python. Further, if my blog client is any indicator, it seems to scale well when used in larger programs.

For posterity’s sake, I thought I’d put the first “pythonic” idiom I concocted myself. It actually did exactly what I wanted it to the first time I coded it:

n = max(map(lambda x: len(self.__ast[x]), self.__ast.keys()))

It sure beat ‘for’ loops and ‘if’ statements. The only help I’ll offer is that ‘__ast’ is a dict of lists. Actually, that’s probably all the help needed.

Categories
Computers

First blogtools.py Post

If the program works, then this is my first published post using a python program I’m working on and, for now, call blogtools. Now that I’ve been posting for awhile, I’ve got a decent idea for what I need in a blog client- not that much. The fact is that I don’t do a lot of fancy visual stuff ’round these parts. Every now and again, I include a piece of code, or a quote, and use some “pre” tags to do that. Even more infrequently, I put some pictures in a post.

So an honest appraisal is that all I really need is a text editor for writing a post and a way to get the post to the blog. Well, we’ve got xmlrpc for the latter. For the former, if there’s one thing that Linux accels at, it is providing ways to write text files: vim, emacs, nano, ed to name a few.

Categories
Computers

Obfuscated C

When I started learning to program in C, I was fortunate enough to stumble across a gem of a book called “Expert C Programming: Deep C Secrets.” It has a picture of a selakant on the cover. The author has a great sense of humor, but most importantly it has all kinds of good tips for beginner C programmers looking to improve their knowledge.

In one particular chapter, he talks about the IOCCC. The first piece of code he writes about is the following was the winning entry from 1987 by David Korn:

main() { printf(&unix["\021%six\012\0"], (unix)["have"] + "fun" - 0x60); }

I actually compiled and ran it at the time and it prints the word “unix.” I was never able to figure out how the whole thing worked out though. Time passed and I forgot about it.

Well, not entirely. Today, while working on a piece of code, I finally thought to google the thing today. Lo and behold, there is an explanation for how it works. If you’re curious, here it is.

Categories
Computers

BloGTK2- Follow-up

I posted a review about a month ago on BlogGTK2. I thought I’d add a couple of things since I’ve been using it for about a month now. Mainly, it’s crash prone. One scenario is writing a new post, posting and then attempting to start another post. This sequence will crash the program every time. This bug can be worked around by opening multiple windows prior to doing anything else. I use this trick in order to cross post between my two blogs.

Also, attempting to access the “Extended” or “Preview” tabs in the post editor causes the program to crash on my system. Kind of a bummer. The “Preview” feature isn’t really necessary so it doesn’t bug me. I work around the “Extended” crash by entering the HTML for extended entries manually in the “Main” tab.

Other than those stability issues, I don’t have any additional complaints. I’m still using it to post from my EEE and it works, within bounds I’ve outlined that is. I do wish there was better way for placing pictures in the posts, perhaps that will be added.

At any rate, it’s still better than the alternatives I’ve looked at. I won’t be leaving it behind any time soon.

Categories
Computers

Awesome Popup Run Prompt

With a little help from the obvious library for awesome, I’ve replaced the stock run prompt in awesome with a popup run prompt. The popup is nice for no other reason than it’s easier to see the command being entered since it doesn’t conflict with task list and the tag list.

The popup is actually pretty straight forward to work. Simply create a wibox with a prompt widget in it and initialize the visibility to false. Then, on whatever keystroke, switch the visibility to true and use a callback function to hide it on completion.

I’ve also leveraged the prompt so that I can launch uzbl at a certain url or with a search. Also, while uzbl is running I can use the popup to change the url.

The slickest thing about the prompt; however, is that you can specify a history file for each prompt use. Now I have a history that I can scroll through when I launch the prompt. The same technique works for search strings as well. Awesome.

Categories
Computers

Awesome 3.4

Given my last post related to upgrading awesome to the 3.4 version, I figure it’s only fair to give credit where it’s due. I subscribed to the user mailing list hoping for some help. I got it.

Quick … kudos to the mailing list guys.

The documentation is, unfortunately, lacking in this area. However, when creating a progressbar widget, which is all the my battery indicator is, the widget itself has a default layout of leftright. This setting is not overridden by the wibox setting it is placed in. To change it, specify a “layout” arg when creating the progressbar widget. Like so:

pb = awful.widget.progressbar({ layout = awful.widget.layout.horizontal.rightleft, … })

Now the widget is located where I want it in the wibox.

Also, when trying to attach mouse buttons to the progressbar widet, you have to access the buttons method through the widget as follows:

pb.widget.buttons(awful.util.table.join(awful.button…

So there you have it. Thanks to the mailing list for helping me out with this stuff.

Categories
Computers

Not-So Awesome Update

Awesome 3.4 is available now so I decided to go through the update process once again. Aside from the change from the 2.3 version to the 3.x version (you know, where the config file became a program) this was the worst experience of the bunch. Actually, thinking about it- this upgrade was really the worst hands down. At least changing to the 3.x branch came with the excuse of having to learn a programming language.