Archive for the ‘my stuff’ Category

600 Club

July 27, 2011

It’s not much of a milestone considering the pace I was on when this blog started a few years ago, but here’s 601. Many thanks for the hundreds of hits that this blog continues to get each month even when it’s dormant.

Advertisements

Fun with Precompiled Binaries (Or, Why I Recompile So Many Things)

July 27, 2011

I often note that I find things in binary packages that irritate me. Sometimes it’s too much nonsense compiled in so that installation of a small utility requires massive dependencies to install. This means not just a lot of extra stuff taking up hard drive space, it means more packages that get updated and other inconveniences.

Sometimes I also notice little things that make me go hmmm. Today I was playing around with mocp, a curses-based server-client music program. There’s not yet a package for *el6 so I compiled it myself. I thought I’d hit up all the right things so that it would stream and play all common music codecs. Everything seemed fine with mp3, ogg-vorbis, and even an ASX stream. Then I tried an AAC stream and found I had more work to do.

No big deal. I searched to find out what I was missing. I found a suggestion that I should build it –without-aac (overriding the internal AAC decoder) so that AAC would be handled by the ffmpeg plugin. I tried that and it didn’t work.

So I decided to double check my ffmpeg version, which was installed from rpmforge. While it had faad and faac support enabled, I found something else that seemed a bit weird.

I know, I know. It’ll still work on other CPUs but it’s optimized for Intel Atom. Why? I’m not using this on my dual thread netbook, it’s on a dual core laptop. It could’ve (should’ve?) been compiled with -mtune=generic.

It’s stuff like this that drives me nuts and makes me start recompiling things or install something that I can optimize for my own use if the packaging (indiscriminately!) includes optimizations that suit particular hardware rather than generic. I thought that was the idea of pre-packaging binaries: so they could be used by a wide variety of common users.

For what it’s worth, the spec says:

Description: FFmpeg is a very fast video and audio converter. It can also grab
           : from a live audio/video source.
           : The command line interface is designed to be intuitive, in the
           : sense that ffmpeg tries to figure out all the parameters, when
           : possible. You have usually to give only the target bitrate you
           : want. FFmpeg can also convert from any sample rate to any other,
           : and resize video on the fly with a high quality polyphase filter.
           :
           : Available rpmbuild rebuild options :
           : --without : lame vorbis theora faad faac gsm xvid x264 a52dec
           : altivec

So it has faad/faac enabled. Should’ve worked, no?

I checked version information against what I have on my older laptop running Sabayon (with dwm). No extra c flags noted in the ffmpeg -version output but I’ll double-check that tomorrow:

ffmpeg version 0.7.1, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun 30 2011 12:51:22 with gcc 4.5.2
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib \
  --mandir=/usr/share/man --enable-shared --cc=i686-pc-linux-gnu-gcc

I still didn’t get AAC working on m *el6 laptop with the ffmpeg-devel package from rpmforge, or even when disabling it and building against the -devel packages for faad/faac. I’ll mess with it again tomorrow.

By the way, with all the -devel packages installed and all the compiling I end up doing, I wonder why I don’t just install something that has the relevant headers (Slackware) or that I can optimize and set up the right way — my way — from the start (Gentoo). Days like this, I wonder if the multi-year support of the EL clones is really all it’s cracked up to be. In fairness, though, we’re talking about a third-party repository and not stuff in the base which seems to be put together with more care and diligence. Maybe my lesson is to build my own packages for things not provided in the CentOS/SL repositories; that would solve not only this kind of issue but conflicts when a third-party repository has a more recent version number of something provided in the base.

Update 20110723 – CentOS 6, Sabayon, Slackware, NetBSD, Etc.

July 23, 2011

Long time no see, haters. Since my last update earlier this year, I’ve been pretty busy. Usual stuff: family, work, and sports injuries.

I have a shiny new Lenovo laptop. One of the reasons I chose this one is because I was able to get a list of the hardware and checked it against lists of supported devices. It’s all supported very well under Linux and the BSDs (Net, Open) I looked at.

First thing I did was reduce the very large NTFS partition someone formatted it with (I never have booted this into Windows 7) so that it’s actually quite small. Then I installed a release candidate for Scientific Linux 6 on it, as that was the first available RHEL6 clone. I’ve since changed that over to CentOS 6 using a net install. And since I have no interest in booting the pre-installed OS, I changed my grub menu.lst to no wait, no options, just load that one in a freaking hurry.

As usual, I found some nits to pick about how certain other things were configured and I had to make some changes to get simple things to work. This goes for software as well as hardware.

First the hardware side of it. I thought the inkjet printer I keep in my room was supported out of the box despite noticing the printer would “eat” up paper upon finishing the job — not fully ejecting it before pulling it back in to the printer. It was only the past few days, though, I realized there was more wrong than met the eye. I needed to make some quick scans and xsane reported back I had no scanner. Hmmm. I checked it via scanimage and it was detected. I also double-checked the drivers and saw that the sane backends for hp and usb were there. I decided to see if the hplip site had a newer RPM than is available in any of the repositories I’ve enabled. I entered the relevant information and downloaded an up-to-date RPM with new drivers. Installing it required removing old RPMs. Then I had to set some permissions so I could use the scanner without escalating my privileges to root. The new hplip RPM also resulted in better printing and no more “eating” paper.

There was a variety of software I installed from the normal as well as third-party repositories. Most of it has been without any trouble — only a couple things from a more bleeding edge repository (EPEL) have conflicted with packages from others. Some of the configuration issues have been simple and straightforward. I’m coming around to accepting pulseaudio, especially as it makes some things easier. My Bluetooth headphones work fine and are able to remotely control playlists in totem. Haven’t tried yet in rhythmbox but mplayer (from rpmforge) needs remuco to work.

Even though I’d be exaggerating to call RHEL6 or its clones bleeding edge, it’s still new enough that repositories lack certain packages that I wanted to install. One solution (other than “wait”):

sudo yum groupinstall 'Development Tools'

I’ve recompiled things that bugged me as well as things that were either unavailable or that I wanted to update. I wanted liferea so I had to compile it myself. Dittos sylpheed (NOT claws) and mew (emacs e-mail client). I also wanted an update of org-mode for emacs, but I’ve also played around with compiling other emacsen. This morning, I decided to try sxemacs.

I wasn’t impressed with the clunky xaw widgetry, let alone the faces available on my laptop (trust me, terminus looked only a little better), and I decided against installing GTK1 headers just to see if that would look any better. Not even some minor color changes helped. I usually run emacs from console anyway because it’s easier to run it in screen and then shell in and out, locally or remotely, as needed. The faces (fonts) bother  me a lot more than the widgets — it’s not about the aesthetics as much as if I can clearly see what the hell I’m doing.

I’m going to try this for a while and see how much work it’ll take to get it working the way I use GNU emacs. Just remembered I forgot to change EDITOR=emacsclient to EDITOR=gnuclient. Also, this (last line!) has to go in the init.el to keep from opening a new sxemacs GUI instance:

(require 'gnuserv)
(gnuserv-start)
(setq gnuserv-frame (selected-frame))

Sheesh! Recompiled –without-x. Much better, too, after removing background color (transparent terminal over black wallpaper).

Now the fun of getting my other emacs stuff to work correctly with this.

I also converted my previous laptop over to CentOS 6. I did a minimal net installation, installed xfce from EPEL, and then added some of my own packages (including dwm and jwm because I decided I don’t care for xfce). My ridiculous Acer Aspire One is still running SL6 and still having issues with the fucking Atheros wireless card. When it starts to flake out on me, I pop in a zyd-based USB wireless adapter. Voila. I should blacklist the module for the Atheros card but, honestly, the AA1 has been such a pain in the ass that I seldom use it. I recently updated XP (30-something packages!) after not even booting it for like half a year and suffered some USB-related issues as a result. The good news is under the RHEL6 clones, all the other AA1’s hardware — including both internal card readers — work properly, without having to boot one side with a card inserted.

Okay. The headline mentions other distros and NetBSD. I’m considering some changes on the other laptop because a lot of stuff I’ve compiled for it would be just as easy from scratch instead of using source RPMs or new source. I tried to get a measure of how many packages are installed by default on a minimal install of various distros. I figure RHEL clones will have the most, followed by Debian, and on the other side of the scale will be Slackware and Gentoo (I haven’t used Sabayon before but I like the option of using a binary or portage depending on my tastes — this is why I’m also considering a BSD and pkgsrc).

There are certain distros I’ve taken off my radar list despite having a fondness for them. As I now use laptops, netbooks, and other portable devices — including portable USB storage — about 90% of the time, encryption is very important to me; one of my parents’ was a victim of identity theft in the past couple years and I was already a bit paranoid about what kind of information could be found in plaintext on my computers. On all my computers, I like the option of installing to, or easily setting up, one encrypted LVM which includes at the very least my /home, /var, /etc, and swap. I used to think it was adequate to encrypt just /home and swap but I’ve changed my mind after auditing “identifying” information available elsewhere on an unencrypted system. For example, plaintext wifi passwords in /etc/wpa_supplicant/wpa_supplicant.conf (or elsewhere on a “non-standard” system) or stuff stored in /tmp. I also think it’s not enough that the “core” of the operating system be protected from threats, such as over the Internet; the biggest vulnerabilities usually stem from applications and user choices, and you can’t reboot those problems away — they’ll still be there if (or because) /home and /usr/local are RW, not read-only. When storage is measured in GB and TB and speedy multi-core processors, it’s harder for me to choose to run my OS in some “embedded” style.

Still on my TODO list is my post about what I use instead of OpenOffice.org. Also, I’ll try to write a post about the minimal install I did with more specifics (need to edit my gnote version of it — wish I could import that into this without reformatting) in the near future. As usual, no promises on time lines.

Update 20110221

February 21, 2011

Okay, it’s been a long time since I was able to update this blog. My trial period of running SL/CentOS 5.5 on my other laptops was brief. I reinstalled Debian and updated to Squeeze. I continue to use SL 5.5 on my Aspire One. And XP but I use it so seldom that updating often takes over an hour.

I’ve acquired more hardware the past six months, including a freaking iPod. Yes, I know, but I inherited it. I still hate Apple because their products are overpriced and mediocre-performing (or worse). The good news is it’s better supported under Linux than my dodgy MTP-based Samsung S3 (which I still prefer). I use it mainly for spoken word podcasts since the sound quality — ahem — doesn’t need to be so good for those.

I grabbed the live image for Scientific Linux 6rc1 last week when it was released. I ran some preliminary tests on my Aspire One to test its wireless card with a more modern kernel. I was surprised Saturday afternoon to go over 12 hours uptime. The card finally did crash and I was unable to scan again, but that was after 25 hours and under circumstances I figured would result in loss of wireless. How did I know? Because that’s happened occasionally while using 5.5. The problem seems to happen when moving large volumes of data through SSH or running extremely long SSH sessions. This has been off-putting to say the least. I’m not inclined to change for the sake of change — 5.x will continue receiving support for quite some time so there’s no rush. I may install SL6rc1 on my main laptop, though, and aid in testing (at least its card has never crashed like that Atheros card continues to do on occasion).

I’ll post a separate entry about this test later to give impressions of the changes between 5.5/6 as well note other problems I encountered.

Update 20100808 – More dwm, Search Engine Hits

August 8, 2010

Just a quick post before I go running. I decided I wanted dwm on my primary laptop as well as the Aspire One. Actually, I already had it installed (Debian Lenny). I ran into a couple issues that made me decide I had to compile it. First, the default package is labeled as something of a “trial” for users — something I agree with since it seems to use a mostly default configuration (with nine desktops and keybindings). Second, some of the default keybindings get in the way of using the meta/alt key. In my case, the worst conflict in keybindings came while using emacs: the status bar is toggled in the default configuration with M-b, which is the default emacs binding for backing up one word (IOW, something I’d rather not give up).

Since I can narrow my desktops down to a handful and want to use a key that won’t get in my way while using oft-used programs, I decided to compile it myself. My tweaks so far are to use the Windows-logo key as the MODKEY (#define MODKEY Mod4Mask), monocle view (no splitting) as my default view, and to arrange my desktops in a more sensible arrangement for my needs: emacs on one desktop, terminals on another, browser on another, and one where I can open retarded applications which require multiple windows — GIMP, Skype, xsane — on another. I’ll probably mess with colors and other settings later. I also need to recompile for the improved keybindings in SL on the Aspire One (update: done — screenshot is from Aspire One instead of primary laptop).

I also got around to looking at some search engine hit terms this morning (and it’s not even 5am here…).

That first one deserves some attention. If you’re logging in to a shell at a specific runlevel (e. g., 3) where it’s set up for a console login or if you haven’t installed a display manager like gdm or xdm with a login, you’ll usually start your window manager with the startx command. This command reads from a file called either .xinitrc or .xession in your home directory. That file is basically a shell script in which each command (such as “xsetroot -solid black”) needs to be set apart with an ampersand (&) until the last line which is typically the exec command for your window manager.

For example, here’s a basic .xsession (or .xinitrc) for starting dwm:

xset b 100 100 20 &
xsetroot -solid black &
xrdb -merge ~/.Xdefaults &
exec dwm

You probably don’t need all of these commands and will need others. The first is where I usually set my default system beep. The second sets the background with solid black (if you’re using jwm and it was compiled with image libraries, you can set the background via your .jwmrc — you can also execute the commands above via jwm’s StartupCommand tags in .jwmrc). The third reads my own Xdefaults with settings for things like terminal colors, dpi (e. g., font size rendering), and other behaviors of X-related applications. Finally, the window manager is executed (no ampersand on this line). You’d use the start-up command for whatever you’re running (e. g., jwm, startxfce4, etc.) — read the docs if you’re not sure.

I realize whomever hit here looking for that information has probably moved on to another site, but I often see return traffic with identical search engine hits so maybe this will help that person. Or someone else.

Update 20100801: Back to Some Old Habits

August 1, 2010

I got fed up with NetworkManager in Scientific Linux. Around the house and around town it’s been okay — it’s been a pain in the ass with a gnome-keyring password after login via gdm if I log out and back in — but there have been a couple other encrypted networks it balked at associating with altogether (visiting family, etc.). Anyway, it’s no longer installed. I’m just using wpa_supplicant, which is a bit convoluted to set up in RHEL clones.

The first thing to do is generate a wpa_supplicant.conf, which is easy enough. After that, chkconfig needs to be run to add wpa_supplicant to whichever runlevels it’s desired. Then files in /etc/sysconfig need to be edited. First, wpa_supplicant needs to be set with the appropriate driver and interface in the appropriate form for wpa_supplicant. That means no space between “-Dwext” and “-iwlan0” or whatever driver and interface you need. Next is the ifcfg-device file so it knows to use WPA (WPA=yes). I set mine to start on boot (ONBOOT=yes).

I got everything working by the second try. Scientific Linux has a lengthy boot time compared to Debian and especially compared to Tiny Core, and waiting for the network to come up only adds to the anticipation.

Next was a more difficult decision because I’ve grown a bit more fond of Gnome than I used to be. It’s still a lot more overhead than I need, especially considering how I use my netbook. I decided to compile jwm since I couldn’t find it in the SL repositories or in the dag repo. I copied over .jwmrc and other files. Once I had it set up to my satisfaction, I had some fun.

It took a few minutes to get rid of all that stuff.

Notice the difference in the screenshots? The first was taken with gnome-screenshot, which wasn’t around to take the second (imagemagick import does the trick).

Next to go will probably be OpenOffice.org, which was updated to 3.x with the release of SL 5.5. I’m doing mostly LaTeX lately and doing that — and seemingly everything else — in emacs. I have a draft I started the other day about all that which I hope to finish soon.

Updated AA1 Page – SL Content

May 7, 2010

I’ve been updating my Aspire One page as I’ve had time the past couple days to reflect that it’s running Scientific Linux. I now have separate sections on installation, configuration, hardware, software, etc. I’ll probably make a few more additions/edits shortly to clean it up and also to elaborate on a few things like reconfiguring services.

The page is now much more SL-specific than it is for the AA1 (aside from the hardware list).

Addressing More Search Engine Hit Topics

May 7, 2010

I continue to get frequent traffic relating to Damn Small Linux. Some of the more common search engine hits are like this one this morning:

damn small linux dead?

The answer to that is, “Yes.” If John Andrews is doing any work on it, he’s not been very open about it in the DSL forums. In fact, his last message about DSL’s future was in December of 2008. I also haven’t seen any posts about new extensions, updates, anything.

I also get lots of hits about ext4 support in DSL. As I wrote back on April 18th, DSL had limited filesystem support in its base and even via extensions. I don’t know if ext4 can even be supported with a 2.4 kernel.

Which brings up another area of DSL-related hits here. There seems to be some interest in a 2.6 version of DSL. That’s funny because there was a 2.6 side project called DSL-N. As it hasn’t been updated in years, either, consider it dead.

Anyone desiring “updated” DSL would do well to consider TinyCore, which is developed by Robert Shingledecker, who was responsible for most of the innovations and development that made DSL popular, and a very talented team he’s assembled. Its philosophy is a bit more radical due to its modularity than  DSL but anyone who ever got into DSL should find the transition easy.

Finally, I have good news for people ending up here looking for information about Scientific Linux 5.5. I saw yesterday that it’s out of beta and the mirrors now have release candidate 1. I can’t speculate when it’ll hit release and it should be a few days later if you want a SL55 live CD image. CentOS 5.5 should be out soon, too; Karanbir Singh’s latest update was, “We are working up to a release in the next few days.”

Update 20100501 – SL54 on AA1, Etc.

May 1, 2010

I’m going to try to post something this weekend I’ve been working on for a couple weeks now. It’s somewhat related to some of the stuff I posted earlier this week about a certain site’s review of a certain distro, but different. It’s ironic in a way because I’ve been re-evaluating my hardware and operating systems again (I’ve actually had time for that the past couple weeks) and have been investigating a few things. That included my own posts last weekend about Scientific Linux on my Aspire One see if there was a chance that a more stable approach to things (specifically ath5k timeouts) might mean I can again run Linux on my netbook.

I installed SL54 live (Gnome) last night on my Aspire One. It went on a smaller partition I’d set aside for {Tiny,Micro}Core, which I’d pretty much stopped booting into on the Aspire One since I was plagued by ath5k timeouts. I had no issues last weekend during my various tests, which included leaving the thing running for lengthy periods of time (previous experience indicated timeouts would occur within six hours), bombarding it with traffic including HD streams (which it handled well even running off USB), and testing how proximity to various routers would affect wifi performance. The only thing holding me back was awaiting a road map for release of SL 5.5; I decided to not wait. The pending release of RHEL (and CentOS and SL and so on) 6 plays no role in my decision — I’ve downloaded the public beta and may install it on something, but probably not the netbook (I have an uneasy feeling about the changes to the networking stack between 5 and 6 given all the trouble I’ve had with more recent kernel versions). The fact that SL 5 will benefit from updates until at least 2012 means I don’t have to worry about updating to a major release just for the hell of it.

The installation went smoothly. I already had appropriate partitions set up (the live CD installs on one partition, so others can be added manually later) so it was a matter of letting the installer do its work. It correctly installed GRUB (I was going to not install it since it was already installed but I had no intention of using TinyCore on the AA1 so it seemed more logical to let SL control GRUB and menu.lst since it would change with updated kernels, etc.); I was impressed that the installer running off USB allowed me to choose which drive GRUB would be installed (unlike other installers which only installed to sda even if that was the USB stick due to boot order). Then I set up my user account (and deleted the default sluser account and group), added myself to wheel and added that group to sudoers via visudo, and updated the system. I recall over fifty updates. Then I adjusted services and applications to suit my needs.

I still have some work to do with it yet, and I still have to decide if I’m adding a separate /home partition. It’s there if I want or need it, but it’s currently being used as an encrypted partition under Windows. For the time being I won’t need to worry about storage because I’ll be using it to shell in to other computers hosting my files (that also mitigates any need to edit a 21.x-compatible .emacs or compile the latest stable release since I can shell in and use what I have on another machine). And browsing, etc.

More soon. Maybe. I have some work plus some other things to take care of this weekend. Hopefully I’ll get to finish that post I mentioned above.

Fixed and Opened “My DSL Pages”

April 19, 2010

I’ve taken care of one of the things that’s been on my to-do list for way too long by fixing and making “My DSL Pages” public. It had been set on private due to a number of issues with the page. Some of the older content from my previous host’s demise remains broken, but I think I now have each page linked correctly on that one.

Some of the content is related more generically towards JWM and other things which go beyond the narrow focus of DSL so at least it still has some use and life after DSL’s untimely demise. Many of those pages continue to receive hits on a frequent basis both from search engines and from links at the DSL forums; I guess it’s being put to use (whether it’s good or not is probably very subjective).