Monday, December 31, 2012

Leafpad is a good default editor for Slackware 14.0, including for raspberry pi

The basic graphical text editor, mousepad, has recently been removed from Slackware in favor of gvim. Personally, that is not my favorite editor. I found that mousepad was actually a derivative of leafpad-- so why not use that instead? A slackbuild is available for Slackware 14.0 here. Also, of note, the same slackbuild works without modification to compile the same source for ARM architecture. The resulting package is compiled and installed using the standard drill. For example, after compiling the package directly on the raspberry pi device, install the package:

# installpkg /tmp/leafpad-0.8.18.1-arm-1_SBo.tgz

The package works natively, but the raspberry pi architecture is a bit challenged by running a full blown X. A leaner alternative is to revert to X-applications forwarded over ssh. To do that configure your ssh server to allow X-apps to be forwarded. In the file, /etc/ssh/sshd_config modify one line:

X11Forwarding yes

Then restart the daemon:

# /etc/rc.d/rc.sshd restart

You can now login from a remote host, and start leafpad:

$ ssh -Y doug@192.168.1.100

doug@rp-1:~$ leafpad &

This will allow you to edit remote files on the remote computer, the raspberry pi in this instance.

Here is a somewhat fudged screenshot.

Thursday, August 16, 2012

dm-live updated to Slackware -current (v14 release pending)

Slackware 14's release is almost finished. PV marked the latest set of changes as RC2. I looked at my startup environment to see what changes were necessary to prepare to match the next release. Almost all of the packages were updated and module-init-tools was removed in favor of kmod. The busybox toolset that is used for a lot of commands was upgraded, with a few minor additions (lsof, setserial, udhcpc6). Here is the version info:
BusyBox v1.20.1 (2012-07-17 17:49:41 CDT) multi-call binary.
Copyright (C) 1998-2011 Erik Andersen, Rob Landley, Denys Vlasenko
Here is my list of packages, omitting the kernel, kernel modules, and kernel firmware:
  • slackware/a/aaa_base-14.0-i486-4.txz
  • slackware/a/aaa_elflibs-14.0-i486-3.txz
  • slackware/a/aaa_terminfo-5.8-i486-1.txz
  • slackware/a/bash-4.2.037-i486-1.txz
  • slackware/a/bzip2-1.0.6-i486-1.txz
  • slackware/a/coreutils-8.18-i486-1.txz
  • slackware/a/cpio-2.11-i486-1.txz
  • slackware/a/cryptsetup-1.4.3-i486-1.txz
  • slackware/a/devs-2.3.1-noarch-25.txz
  • slackware/a/dialog-1.1_20100428-i486-2.txz
  • slackware/a/e2fsprogs-1.42.4-i486-1.txz
  • slackware/a/elvis-2.2_0-i486-2.txz
  • slackware/a/etc-13.013-i486-2.txz
  • slackware/a/findutils-4.4.2-i486-1.txz
  • slackware/a/glibc-solibs-2.15-i486-4.txz
  • slackware/a/grep-2.13-i486-2.txz
  • slackware/a/gzip-1.5-i486-1.txz
  • slackware/a/kmod-9-i486-3.txz
  • slackware/a/lvm2-2.02.96-i486-4.txz
  • slackware/a/mdadm-3.2.5-i486-1.txz
  • slackware/a/mkinitrd-1.4.7-i486-4.txz
  • slackware/a/pkgtools-14.0-noarch-1.tgz
  • slackware/a/procps-3.2.8-i486-3.txz
  • slackware/a/sed-4.2.1-i486-1.txz
  • slackware/a/tar-1.26-i486-1.tgz
  • slackware/a/udev-182-i486-3.txz
  • slackware/a/util-linux-2.21.2-i486-5.txz
  • slackware/a/which-2.20-i486-1.txz
  • slackware/a/xfsprogs-3.1.8-i486-1.txz
  • slackware/a/xz-5.0.4-i486-1.tgz
  • slackware/l/readline-5.2-i486-4.txz
  • slackware/n/gnupg-1.4.12-i486-1.txz
  • slackware/n/libgcrypt-1.5.0-i486-1.txz
  • slackware/n/libgpg-error-1.10-i486-1.txz
Only these packages from the startup environment based on version 13.37 were not upgraded:
  • slackware/a/aaa_terminfo-5.8-i486-1.txz
  • slackware/a/bzip2-1.0.6-i486-1.txz
  • slackware/a/cpio-2.11-i486-1.txz
  • slackware/a/devs-2.3.1-noarch-25.txz
  • slackware/a/dialog-1.1_20100428-i486-2.txz
  • slackware/a/elvis-2.2_0-i486-2.txz
  • slackware/a/findutils-4.4.2-i486-1.txz
  • slackware/a/procps-3.2.8-i486-3.txz
  • slackware/a/sed-4.2.1-i486-1.txz
  • slackware/a/tar-1.26-i486-1.tgz
  • slackware/a/which-2.20-i486-1.txz
  • slackware/l/readline-5.2-i486-4.txz
The 34 listed packages use approximately 89 MB of RAM when expanded. The gzipped kernel modules use 43 MB and the kernel firmware uses 12 MB for a total of approximately 144 MB. For practical purposes, a machine with 256 MB is the least amount that could be used to successfully load the startup environment. A couple of small optimizations could reduce the required space slightly (1. compress /usr/share/locale, remove redundant copy of busybox in mkinitrd - or remove the package).

I have been using this as part of my working day-to-day setup for over a year now. It's a good rescue and all purpose startup environment. That includes booting to an encrypted root filesystem, booting to root filesystem on external USB, or the combination: encrypted root filesystem on external USB device. USB flash memory devices are now hitting the 32 GB level at affordable prices. I've noticed some performance issues on the larger flash disks that are not present on external magnetic USB drives. Another problem have been several glitches introduced with changes to the Linux kernel itself in the past year. The glitches manifest differently on different hardware. I am using kernel version 3.2.26 on an Intel Atom CPU powered netbook, and that combination has had the fewest glitches. I will probably update to PV's 3.2.27 kernel soon and try to use lzma compressed modules to see if any slight gains in free space can be made. That said, the gains are extremely marginal on today's hardware because I don't use computers with less than 256MB anymore. Also, the gains are transient because the environment is discarded when the startup environment gives control to the actual root filesystem.

Update: 2012-08-18: PV's kernel for 3.2.27 has a significantly larger firmware footprint than what I had been using. It jumps to 45M from 12M. I did some simple comparisons to look for differences. I found a direct overlap of 8M and the rest different. These are the biggest directories in the firmware packaged by PV:

6.5M ./ti-connectivity
4.8M ./bnx2x
2.2M ./libertas
1.6M ./brcm
2.2M ./ueagle-atm
1.5M ./bnx2

Saturday, April 28, 2012

Cut Slackware some slack...

This recent Slashdot headline noted there was some recent downtime at Slackware.com, .. Slackware, like a lot of free software / open source coding projects, relies a lot on unpaid volunteers. What is unique about Slackware is that it is very much the vision of one man, Patrick Volkerding. He coordinates every new release with a small team of developers worldwide, including Robby Workman and Eric Hamleers. Workman, I believe, does a lot of work on the website, Slackbuilds.org, while Hamleers is a long time developer who is the person most responsible for porting the Slackware to 64-bit Intel processors, and now is working on an important port to the ARM architecture. That will be very important going forward as cellular sized devices continue to displace the personal PC as the platform of choice. The Raspberry Pi devices could change the world! Slackware, as the oldest Linux distribution still being actively maintained and used, is going to be a part of that. As far as lags in development, from my own experience, most of the recent snags have been due to component pieces of the gnu/linux platform being deficient, notably pieces of X and the kernel itself. The shift towards different graphical paradigms caused some disruption, too. Look to those issues before blaming Patrick Volkerding.

Oh, one other thing, allow me to point out one fact about Slackware's perceived lack of popularity. Why does it appear to shine less brightly than the newer, and perceived rising stars of the Linux world? Well, for one thing, it does have a learning curve. That means it can be off-putting to some. However, once it is mastered, it provides the basis for a lean, mean, fighting machine! It is deployed in quantity by people in the know. For example, at some of the linux conferences I have attended, a few devout followers from certain industries, governments, etc. where stability is a primary asset have stated it is their primary go-to tool. And for what it's worth, those agencies may not desire to have their deployments counted.

Saturday, March 17, 2012

Herbert Vetoes HB363, the Anti-Sex Ed Bill!

This was a big surprise, given that Gail Ruzika had invested so much lobbying effort to get the bill passed. The Eagle Forum (also known as the anti-sex league) must be crying in their Cheerios this morning.

It was refreshing Herbert stood up for the majority's view, and didn't pander to the ultra-right. Too bad, he didn't show the same courage last year. He should have vetoed the bill designating an official firearm, the 45 caliber long-slide, last year.

Wednesday, March 7, 2012

On Point: Interview with special effects artist Douglas Trumball

Interview with Douglas Trumball, who created special effects for 2001, Silent Running, Close Encounters, The Tree of Life, etc. Download audio.

NPR: Fukushima Anniversary Discussions

Monday's On Point was a very interesting discussion. There is a real possibility that Japan will mothball all of its nuclear power because the risk the industry poses to all of Japan had been previously underestimated. Download audio.

Likewise, last Tuesday's Fresh Air. Download audio. This is an interview with Dan Edge, the producer of a Frontline documentary about the disaster.

Wednesday, February 1, 2012

On Point Discussion: New web privacy policies at Facebook and Google

Today's On Point discusses how both Facebook and Google are changing their privacy policies. They discuss the pros and cons of these changes and completely new offerings. New to the Google mix is the Android phone penetration, which enables phone providers and Google to gather geographic and on-the-spot information.

Download mp3 audio

Audio split into 4 parts:

1.
2.
3.
4.

Fresh Air: Baratunde Thurston

This was an interesting episode of Fresh Air, an interview with Baratunde Thurston.

Download mp3 audio

Here is the audio split into 4 parts.

1.
2.
3.
4.

Saturday, January 28, 2012

Strip audio track from a video file using mplayer

Let's say there is a large file encoded into mp4 and the audio is what is of most interest. Because I am not very familiar with mplayer/mencoder/sox this was a problem in the sort of hard category. First, I tried using mencoder, but I think some frame synchronization data is included in the stream and causes a metronome-like ticking. I tried using mplayer instead, and finally found the right sequence with some googling and trial and error. I'll save my work here for future reference.

Command line sequence to strip audio from an mp4 using an intermediate named fifo buffer
$ mkfifo fifo.wav
$ mplayer -quiet t.mp4 -ao pcm:fast:file=fifo.wav -vc dummy -vo null -channels 2 &
$ cat fifo.wav | sox -t raw -r 44100 -e signed -b 16 -c 2 - -t ogg audio.ogg
$ rm fifo.wav

For my test file, the resulting ogg file was about 5% as big as the mp4 file that includes the video. YMMV

Also, in fooling around with sox, I stumbled upon this misc information. I think this may be equivalent to the "play" command:

$ sox audio.ogg -d

Wednesday, January 25, 2012

This American Life: Planet Money Team on Euro Crisis

This episode was mostly about the Greek aspect of the European Debt Crisis. Here is the audio split into 5 parts.

1.
2.
3.
4.
5.

Wednesday, January 18, 2012

On Point Discussion : SOPA/PIPA

This was a very interesting and timely discussion.

Direct to mp3 download.

Broken into 4 x 12 minute segments:

1.
2.
3.
4.

I liked the comment about the buggy-whip manufacturers. They content providers could lock down their content if they wanted to do it. They're asking everyone else to change to accommodate their outdated business model.

Reddit Goes Black to Protest SOPA/PIPA

Reddit is down to protest SOPA/PIPA. Wikipedia is also down. As an experiment, let's see if I can still write something from memory and without fact checking. ;)

Of course, if wikipedia were up and running, I could have simply linked to their article on the subject. I am sure that their crowd-sourced article is infinitely better than what I've pieced together here. Write your congressman to stop introducing breakage into the internet.


  • Tit: The internet perceives censorship as damage and routes around it.

  • Tat: SOPA would break DNS at the TLD level




In case, you haven't heard about reddit, here is my summary of what it is. Reddit is one of the most popular and innovative sites on the internet. It is ranked within the top 75 websites in the world, as estimated by total traffic; it is ranked within the Alexa top 125. Recently, Reddit released some of their traffic statistics that showed 2 billion page views in one month. That's fine and good, but what is it? It is a website that is designed to provide news aggregation to appropriate sub-communities within their total audience. They have the seemingly simple goal of matching the topic being discussed with an appropriate news consumer. This isn't a new idea- not by any measure. TV news (remember TV news?) was originally categorized into segments for basic news, weather, and sports. Newspapers (remember newsprint?) have always had a lot of sections: local, national, editorial, comics, classifieds, etc. The concept is the same, only Reddit takes this concept to its ultimate limit. There are literally tens of thousands of categories with content provided and driven by a matching community. Most reddit communities, or subreddits, are small. However, the most popular have over 1 million subscribers! Popular subreddits are r/pics, r/funny, r/todayilearned, r/askreddit, r/iama, r/explainitlikeimfive. There are a lot of technical subreddits, too: r/linux, r/buildapc, r/opensource, etc. The content on most of these subreddits is lightly moderated. That means users will mostly decide what will be popular and what is relevant. A story rises and falls based on popularity. Users really vote for good stories, moving them up in the massive stack of past stories. Also, bad stories get voted down, and they sink deeper into the accumulated pile. If a story becomes popular at the subreddit level it can be promoted to the main page and receive wide coverage from the vast overall audience. The method seems to work. Even stories with very obscure content can receive coverage, simply by catching the interest of a critical mass of the community. That is my view from 10,000 feet. I really could've used wikipedia to check my facts!

Here is a recent screenshot showing the SaltLakeCity subreddit:
.

Because Reddit is doing a lot of things right, and providing a lot of innovation it is the heir-apparent to earlier web pioneers that showed the potential and versatility of on demand news sites. Slashdot is the grandfather of all of these sites. Reddit added features and flexibility and it's hard to see it losing out to anyone else. The government is trying to interject itself into this space. Reddit would be affected to the point that they've said they'd close their doors. Amazingly, reddit keeps their website running with only ten or eleven employees. If SOPA/PIPA pass, then bye-bye reddit!

Here is a taste of what the law could lead to, no more reddit:

.

What about reddit has made it popular?


  • Empowers users to build and manage their own content

  • Easy and powerful user interface to format text, embed graphics, and link to other sites in a totally immersed web environment

  • heir-apparent to earlier news aggregation sites (slashdot, digg)
  • heir-apparent to usenet classification-type system. subreddits match closely with newsgroups in usenet. For example, comp.os.linux.misc matches up with discussions at r/linux and r/opensource.

  • Dynamic rendering of the site on a per user basis. Rendering is determined based on several factors including user subscription and group access control lists. I am guessing that these requirements must place significant demand on their Amazon based servers that are used to provide the site to its 1 million plus simultaneous users. As users know, the site sometimes struggles with delivering content 100% of the time.


Sites like reddit are at the forefront of innovation. Empowering users means giving people what they want. That can be as simple as providing the news they want. It also can be used in creative ways, ways never imagined by their creators. Social media and technology were at the heart of the Arab Spring uprisings. The people demanded their governments give them what they want, or get out of the way.

Monday, January 16, 2012

Minor Update to My Live USB

I have been using a live USB based system, off and on, for the last few months. I am impressed with how well it actually works! There have been a few glitches on my hardware, and have switched to the bleeding edge linux kernel, v3.2.1. I've also upgraded to Firefox 9. It moves a few toolbars around by default, but they can be swapped back to look more like v.3.6.x. The root filesystem is prepopulated with an almost full base install of Slackware 13.37, with a few updates beyond, including the kernel. A few useful packages are also installed including the evince document viewer, and some browser plugins. The space used from the outset is about 3.9G.

Here is a screenshot of the live USB running, with the firefox about box appended:
1.

The system is running in true live mode- all changes to the system are stored in RAM only. A persistent mode is also available. The system's root filesystem is using the same layout as discussed previously on an 8G flash drive.

edit: Here are the steps I use to finalize the boot of a pristine Slackware install in live mode.


  • login as root

  • run pkgtool, select the slackware scripts to run again. Select the relevant choices.

  • add a non-root user using adduser

  • add the above non-root user to the sudoers list, using visudo

  • setup wifi connection parameters, if applicable, using wicd-curses, or similar

  • login as non-root user and begin customizing user environment as desired


    • set screensaver; I dislike the default selection, random screensaver

    • customize xfce's main toolbar

    • start firefox to initialize user directory, .mozilla

    • install adobe flash

    • install other plugins: greasemonkey, reddit enhancement suite




Update 2012-02-02: There were a lot of slackware patches in the recent official slackware changelog. Here is a screenshot showing Firefox 10.

2.