Archive for the ‘mksh’ Category

A Sync Script for MTP Device

July 29, 2009

I’m less concerned about managing albums on my Samsung S3 from within Linux than I am “changing” content like podcasts, images, shopping and to-do lists, etc. This is no problem at all in Windows because MTP is perfectly supported under it.

The S3 has a file structure which separates “datacasts” from other audio content. I’d been using a quick little script that would copy every ogg, mp3, and/or wma file in the current directory (specifically, ~/podcasts) to my S3’s Datacasts directory. It was fine for doing that, but I wanted it to do a little more than that so I could use one directory as a “sync” folder for more file types. Then I could move all content I want to that folder, run one script, and my podcasts would go to Datacasts, text files would go to Texts, and pics would go to Pictures; as I’ve written before, the device isn’t fine-tuned enough to automatically put each kind of file in an appropriate directory so I wanted my script to assure everything goes exactly where I want it. Otherwise I’d have to go to the “File manager” directory and trace through it to other folders to find my content. This way I know exactly where everything is.

One important thing to note about libmtp and mtp-tools (mtp-examples in Fedora) is that directories are referred by their ID numbers rather than their names. It’s easy to get the directory ID numbers for these using the mtp-folders command. For example, I used the following to get the “Pictures” directory:

% mtp-folders | grep -i pictures

This reported back the folder “Pictures” with an ID number 32776. Other MTP devices will likely have different ID numbers for different things so double check your own device before using the following script.

Once I had the relevant directory numbers, I could set up a few functions to send files to them through a case command for each file type I want to manage. Here’s the current version of my move_podcasts.sh script:

#!/bin/sh
# lucky13linux.wordpress.com - Wed Jul 29 14:33:14 CDT 2009

# moves files from PWD to MTP device via mtp-sendfile
# and deletes the file from PWD. Use this for podcasts,
# text files, and images rather than for music kept
# on the system. 

# mtp-folders for my Samsung S3
# 32773 = Datacasts
# 32774 = Texts
# 32776 = Pictures

function move_podcast_files  {
	mtp-sendfile $SYNC_THIS_FILE 32773
	echo "removing $SYNC_THIS_FILE from $PWD..."
	rm $SYNC_THIS_FILE
}

function move_text_files  {
	mtp-sendfile $SYNC_THIS_FILE 32774
	echo "removing $SYNC_THIS_FILE from $PWD..."
	rm $SYNC_THIS_FILE
}

function move_image_files  {
	mtp-sendfile $SYNC_THIS_FILE 32776
	echo "removing $SYNC_THIS_FILE from $PWD..."
	rm $SYNC_THIS_FILE
}

for SYNC_THIS_FILE in *
do
	case $SYNC_THIS_FILE in
		*.mp3)	move_podcast_files                                 ;;
		*.ogg)	move_podcast_files                                 ;;
		*.wma)	move_podcast_files                                 ;;
		*.txt)	move_text_files                                    ;;
		*.TXT)	move_text_files                                    ;;
		*.jpg)	move_image_files                                   ;;
		*.jpeg)	move_image_files		                   ;;
		*.JPG)	move_image_files		                   ;;
		*) echo "are you sure $SYNC_THIS_FILE goes to MTP device?" ;;
	esac
done

Nothing fancy, and someone will no doubt have a better solution (feel free to opine) or suggest moving some of the repetitive commands in each function to the for loop. It’s a work in progress and works the way I want. Caveats and additional points:

  • I use mksh and edited this to /bin/sh; change to suit your needs if /bin/sh doesn’t link to your preferred shell. EDIT (sorry!): That includes possibly having to edit the functions if your shell (e. g., CSH or TCSH?) uses C/POSIX functionname () {…} semantics rather than function functionname {…}.
  • Add or remove file types based on your own needs. I convert all my images to jpg for convenience.
  • I used single entries for each file type because I may end up adding more to the functions, e. g., adding custom id tags to mp3 and/or oggs (can’t add tags to wma in Linux as far as I know).
  • I haven’t bothered putting videos on my S3 even though it’s capable. I don’t even know if/how I can convert to the format Samsung requires videos be in to play on their devices. RTFM.
  • Delete the rm/echo commands in the functions if you want to keep local copies.
  • In my cheap original script for ogg, mp3, wma, I used ‘for FILETYPE in *.{ogg,wma,mp3}’ which resulted in error messages if one or more weren’t in the directory.
  • I’ll most likely add POD_SYNC_DIR so I can run the script from any directory or from a dynamic directory (dmenu or ion3’s F3 menu) which reads from $PATH. No big deal because I tend to wget files directly to ~/podcasts and always have a terminal open. Whatever.

Finally, mtp-tools (mtp-examples in Fedora) has the mtp-delfile command which is a bit clumsy. To remove files, I tend to delete them directly from the S3 after I listen or use gphotofs (fuse) to mount the device and delete or copy back files I want to keep. In fact, I highly recommend using gphotofs or other applications utilizing libgphoto2 for copying files from a MTP device back to a computer. Unfortunately, libgphoto2 doesn’t copy/move files and directories from computer to device or else it would be ideal, but it’s for cameras rather than media devices. Maybe the libgphoto people and libmtp people can do more collaboration and maybe even merge their projects for better all-around support of cameras and media players using PTP/MTP.

UPDATE 2009-07-29 20:01 CDT: Version 2 of the above script now does rudimentary logging which, when I’m finished, will maintain a list of the file ID numbers to (hopefully) ease removal of files without using the other utilities mentioned in the last paragraph.

crunchbang ratmenu and other menu ideas

July 13, 2009

If you look through some of my ratpoison-related posts you’ll find a ratmen tutorial. IIRC, one of the screenshots showed ratmen opened in oroborus, a window manager which (like ratpoison) has no menu of its own. Both ratmen and ratmenu (there’s so little difference between them that they may as well be interchangeable) are window manager agnostic; you can bind one menu or however many you see fit.

Most window managers will let you change or add keybindings. I showed several bindings in a screenshot yesterday (I have a lot more now) for various ratmenus that I can launch in jwm just as easily as in ratpoison. I have one with image-related apps, another for multimedia, another for office. That makes it easy to quickly launch things based on minimal keystrokes.

Reminder: each menu is an executable shell script. Put it in your path or call it in your binding from where you keep it. You can type ratmenu at a command prompt to see what variables you can configure. It outputs the first arg as a description in the menu and executes the second arg if selected.

You can install ratmenu/ratmen from your repository or compile it (just need X headers, IIRC).

In this first example, I’m using a mostly-complete menu taken from crunchbang’s openbox menu. I took out the scrot screenshot entries (those are already set on a keybinding) and added a couple words to distinguish things from each other (for example, some of the config entries were set up as separate nested menus lacking in description beyond “edit configuration”). References to man pages and the like in that region of the menu are for the preceding term. I set the fg/bg colors. NOTE that I use my preferred shell (mksh, the official shell of lucky13) rather than /bin/sh which is usually a link to some bloatware called bash (just change it to /bin/sh or /bin/bash or whatever you need; edit: in Ubuntu/#! it’s a link to dash).

#!/bin/mksh
# crunchbang ratmenu - Mon Jul 13 17:30:19 CDT 2009
# https://lucky13linux.wordpress.com

ratmenu -bg grey33 -fg grey66 -align center \
"Run Program" "gmrun" \
"Terminal" "terminator" \
"Web Browser" "firefox" \
"File Manager" "pcmanfm" \
"Text Editor" "gedit" \
"Media Player" "vlc" \
"Firefox" "firefox" \
"Claws Mail" "claws-mail" \
"Liferea Feed Reader" "liferea" \
"gPodder Podcast Catcher" "gpodder" \
"gFTP Client" "gftp" \
"Transmission BitTorrent Client" "transmission" \
"Skype" "skype" \
"XChat IRC Client" "xchat" \
"Gwibber Microblogging Client" "gwibber" \
"Pidgin IM" "pidgin" \
"Network Tools" "gnome-nettool" \
"GIMP" "gimp" \
"Inkscape" "inkscape" \
"GPicView Image Viewer" "gpicview" \
"Colour Picker" "gcolor2" \
"Agave Palette Designer" "agave" \
"Specimen Font Previewer" "gnome-specimen" \
"FontyPython" "fontypython" \
"Xsane Image Scanner" "xsane" \
"Colour Lovers" "firefox http://www.colourlovers.com/" \
"Color Hunter" "firefox http://colorhunter.com/" \
"Vector Magic" "firefox http://vectormagic.stanford.edu/" \
"FavIcon from Pics" "firefox http://www.htmlkit.com/services/favicon/" \
"AbiWord Word Processor" "abiword" \
"Gnumeric Spreadsheet" "gnumeric" \
"Calculator" "gnome-calculator" \
"Dictionary" "gnome-dictionary" \
"Evince PDF Viewer" "evince" \
"VLC Media Player" "vlc" \
"Rhythmbox Music Player" "rhythmbox" \
"Audacity Audio Editor" "audacity" \
"PiTiVi Video Editor" "pitivi" \
"Kino Video Editor" "kino" \
"Create Screencast" "gtk-recordMyDesktop" \
"Cheese Webcam App" "cheese" \
"Sound Juicer CD Extractor" "sound-juicer" \
"Sound Recorder" "gnome-sound-recorder" \
"Sound Converter" "soundconverter" \
"WinFF Video Converter" "winff" \
"Volume Control" "gnome-volume-control" \
"Vim - Text Editor" "terminator --command=vim" \
"Midnight Commander - File Manager" "terminator --command=mc" \
"rtorrent - Bit Torrent Client" "terminator --command=rtorrent" \
"newsbeuter - Feed Reader" "terminator --command='newsbeuter -r'" \
"elinks - Web Browser" "terminator --command=elinks" \
"MUTT - Email Client" "terminator --command=mutt" \
"irssi - IRC Client" "terminator --command=irssi" \
"naim - Chat Client" "terminator --command=naim" \
"htop - System Monitor" "terminator --command=htop" \
"Vim" "terminator --command='man vim'" \
"Midnight Commander" "terminator --command='man mc'" \
"rtorrent" "terminator --command='man rtorrent'" \
"MoC" "terminator --command='man mocp'" \
"newsbeuter" "terminator --command='man newsbeuter'" \
"elinks" "terminator --command='man elinks'" \
"MUTT" "terminator --command='man mutt'" \
"irssi" "terminator --command='man irssi'" \
"naim" "terminator --command='man naim'" \
"htop" "terminator --command='man htop'" \
"Evince PDF Viewer" "evince" \
"xCHM HTML Help Viewer" "xchm" \
"gedit" "gedit" \
"Leafpad" "leafpad" \
"Vim" "terminator --command=vim" \
"gVim" "gvim" \
"Pyroom" "pyroom" \
"Xfburn CD/DVD Writer" "xfburn" \
"Gnome Calculator" "gnome-calculator" \
"Gnome Dictionary" "gnome-dictionary" \
"OSMO Personal Organizer" "osmo" \
"PCMan File Manager" "pcmanfm" \
"PCMan File Manager (root)" "gksudo pcmanfm" \
"Terminator" "terminator" \
"Xterm" "xterm" \
"File Roller" "file-roller" \
"File Roller (root)" "gksudo file-roller" \
"Xpad - sticky notes" "xpad" \
"World Clock" "gworldclock" \
"Edit .conkyrc" "gedit ~/.conkyrc" \
"Restart Conky" "conkywonky" \
"man page" "terminator --command='man conky'" \
"Wiki Page" "firefox http://crunchbanglinux.org/wiki/conky" \
"Edit start-up script" "gedit ~/.config/dMenu/dMenu-bind.sh" \
"man page" "terminator --command='man dMenu'" \
"Edit gmrun config file" "gedit ~/.gmrunrc" \
"man page" "terminator --command='man gmrun'" \
"Edit terminator config file" "gedit ~/.config/terminator/config" \
"man page" "terminator --command='man terminator_config'" \
"Edit tint2 onfig file" "gedit ~/.config/tint2/tint2rc" \
"man page" "terminator --command='man tint2'" \
"Online Help" "firefox http://code.google.com/p/tint2/wiki/Welcome" \
"lx User Interface Settings" "lxappearance" \
"Screensaver and  Power Management" "gnome-screensaver-preferences" \
"Choose Wallpaper" "nitrogen ~/images/wallpapers/" \
"System Update" "system-update" \
"Disk Partitioner" "gksudo gparted" \
"Adjust with lxrandr" "lxrandr" \
"Adjust with grandr" "grandr" \
"man xrandr" "terminator --command='man xrandr'" \
"Edit Default Applications" "terminator --command='sudo update-alternatives --all'" \
"Login setup (GDM)" "gksudo gdmsetup" \
"Network Admin" "network-admin" \
"Package Manager" "gksudo synaptic" \
"Passwords and Encryption Keys" "seahorse" \
"Printer Settings" "system-config-printer" \
"Restricted Device Manager" "gksudo jockey-gtk" \
"Services/Daemons" "services-admin" \
"Shared Folders" "shares-admin" \
"System Monitor" "terminator --command=htop" \
"System Logs" "gnome-system-log" \
"Time/Date" "time-admin" \
"Users/Groups" "users-admin" \
"Lock Screen" "gnome-screensaver-command -l" \
"openbox Exit" "openbox-logout"

That’s a very big ratmenu, one I probably wouldn’t use myself. I only wanted to get more of the stuff out of it for both ratmenu and the jwmrc I’ll post shortly (maybe tomorrow — still need to edit the keybindings and set up a couple other things so jwm behaves similarly to #!’s openbox set up). It was easier to edit the whole thing than pick and choose the things I wanted (emacs and vim are way more powerful than gedit). I figured I may as well post it so anyone using a distro with a similar mix of applications can take advantage of it.

As I noted above, I like to break things down to have a bit more control over things. Here’s another example showing that a small menu can be launched from one keybinding to manage one particular application. This is my mocp menu which lets me control a lot of its functions without ever opening it up in a console (but I have two entries for that anyway).

#!/bin/mksh
# my mocp ratmenu

ratmenu -fg grey66 -bg grey33 -align center  \
"mocp in term" "aterm -T mocp -e mocp -T transparent-background" \
"next song" "mocp -f" \
"previous song" "mocp -r" \
"pause toggle" "mocp -G" \
"start playlist" "mocp -p" \
"start only daemon" "mocp -S" \
"stop" "mocp -x" \
"clear list/exit" "mocp -c" \
"alsamixer" "aterm -T mixer -e alsamixer"

Those aren’t in any particular order and this isn’t the only application for which this is possible. Look at the documentation for your favorite apps and see how much you can control from outside interfaces.

In the ratmen tutorial article, I had entries in my menus to open things open to various directories. Some of my ratmenus do that with things like image viewers opening to specific directories — such as one entry for screenshots, one for pics from camera, one for scans, etc. I’ll probably also set a couple ratmenus up like my “screen menus” found in my “More GNU screen Tweaks” article.

These are all things you don’t have to use ratmen(u) to accomplish. Just set things up to accomodate your own tastes and needs. After all, it’s your freaking computer. Go ahead, treat it like it is.

posted from weblogger.el
Linux 2.6.28-13-generic i686 (flaky ath5k wifi and all)
Mon Jul 13 18:11:42 CDT 2009

crunchbang – More JWM Screenshots

July 10, 2009

Here are a couple more screenshots. New shell is mksh. Added a few more entries to .jwmrc and also uncommented the Debian part of the default menu. I also moved the <Dock/> tag down so there’s not that big empty space between the applets and clock (compare this emacs shot to the next two).

emacs-pic-01

Remembered to get “free -mt” after a reboot.

jwm-shot-01

I also took the openbox keybindings out of the .conkyrc and added in the other mount points I want to see. I’ll probably set up something like xbindkeys so my keybindings are the same regardless of which window manager I use.

jwm-shot-02

That’s it. I have some reports to finish so I can call it a day. Tomorrow I’ll probably start pruning some of the things from my list last night and see what I can do to keep NetworkManager — or whatever alternative I can find — from associating with any other AP before it connects to mine. I also need to see if I can find out what the problem is with libmto and mtp-tools and my S3; it’s not being detected at all under #! right now.

Update 20090705 – services trimming, fluxbox tweaking, added xsel, dircolors, etc

July 5, 2009

I was going to install some ratpoison-friendly tools late (for me) last night but, as usual, they come with so much overhead that I decided against installing. These are things that work well regardless of window manager. I’d run into similar bloat issues back when I was using Debian on my old laptop — try to install something light and it comes with MBs of dependencies that aren’t needed unless you compile with every option. This is one of my biggest gripes against binary-based distros. For the convenience of not having to compile anything, you’re hostage to how others compile them for you.

This time the apps I wanted to add were xsel and xbindkeys; the dependencies in Fedora are guile and tcl/tk.

screenshot-20090704185238

Had to say no. I think I can add xsel without guile or tcl/tk — I’ll check and see in a bit. (Edit…) Okay, I’ve installed xsel because it has no dependencies I didn’t already have installed. I could live with guile but I’m not going to install even more languages like tcl just to use one small app. Fedora comes with enough as it is. Why not streamline everything and use perl, python, or lua only? I think I installed ruby when I installed mew. I wish everything in open source was more standardized and more attention was paid to reducing dependencies so you don’t have disparate libs for disparate apps like this.

I also spent a little time last night trimming down services that start up in my favored run level. I decided to start CUPS manually since a lot of the time I’m not connected to my main printer or near enough one of the available network printers to get my stuff. I also shut off the NFS-related (rpc) services, IPV6, and a few others.

This morning I started on something totally unimportant except to Linux “reviewers” (especially the ones at distrowatch), aesthetics. I wanted something a little less dark. This is it for now. Whatthefuckever.

screenshot-20090705071957

Of course, my terminal is still black and about 75% of what I do is in that (screen) so it doesn’t make much difference. I decided to alias ls to include dircolors in my mksh profile so I have a little more color there now. Not a big deal either way. Same information as before.

Since I added more stuff in my .xinitrc, it’s apples to oranges comparing initial RAM hits. At login, though, I’ve lost about 10 more MB. I know there are people who consider unused RAM a waste of resources, but I find it more wasteful to clog up RAM with things that won’t be used or which serve dubious purposes lacking any utilitarian value (including wobbling windows).

I still have more things to do with fluxbox configuration, especially adding more keybindings. It’s kind of awkward the way it’s set up now with some of the defaults. I also want to add more things to the menu to automate tasks.

That’ll all have to wait. I hadn’t planned on doing any of this last night or this morning. More during the week when (if) I find time.

Fedora 10 on AA1 Update: ratpoison and screen

June 22, 2009

Been setting up ratpoison and screen in Fedora 10 this morning since I can’t run yet. Now all my apps will open full screen when I open them in other window managers. Cool!

Here are some screenshots. First up, I ran into a bit of an issue using aterm for the first time ever. Maybe need to recompile? (UPDATE: Doh! No, it’s all good. I just checked my .Xresources and commented out the geometry line. Works now.)

aterm-FAIL-01

Another app I’ve found to be messed up is zile. I installed it yesterday and the replace-string mode isn’t there (neither are others like list-commands); M-x re[tab to complete] resulted in only one (recenter) match. No problem, I’m probably installing emacs (no X) anyway.

The terminal in these shots is xterm. The blue shit on the bottom of these shots is from the gdm theme. Yet another reason to skip that and use a proper console login.

Here’s a shot of “free -mt” (aliased) at fresh boot.  I don’t have resources trimmed yet nearly as much as I want. I can only imagine how bloated that default gdm theme is. One thing I keep noticing about default backgrounds and themes is that they’re not designed for the lowest common denominator — which really is a disservice to users of older, slower, less-able hardware whom Linux advocates have always targeted.

ratpoison-rocks-on-fedora

Hard to believe I had Gnome trimmed down to a similar level. Need to start with fewer services running! Also need to quit using Gnome apps to do little things like an Ubuntu user would; I love that message, though. Haven’t installed imagemagick yet.

Finally, here’s GNU screen in xterm in ratpoison after starting and running a bunch of other stuff.

screen-fedora-001

As you can see, I’m using mksh as my shell. I was going to install pdksh again but I saw the size of the binaries. Less bloated and more functional than bash either way. Guess I’m also kind of biased because of the BSD thing. Maybe I’ll try MirOS one of these days; not sure it would run on an AA1 (MirOS uses a no SMP kernel, Atom is multi-thread) or how much hardware support it would lack (does it have ath yet?).

Have a bit of mucking around with my wrapper and other scripts since aterm’s not working in ratpoison — using mplayer in terminal to playback audio and video since that’s a bit easier on the system than totem and everything else dressed up in GTK+. Not going to start compiling stuff yet even though I want either ratmen or dmenu; I haven’t even looked to see how headers are packaged in Fedora. I’ll probably set up a text-based menu (see Oct ’08 post “More GNU screen Tweaks”) instead before I do anything else.

UPDATE 06:16 US/Central – Installed emacs (nox) and removed zile. Already changed my scripts to use xterm so I’m probably removing aterm and libafterstep and whatever else was installed with it.

emacs-installed-01

Had to manually link emacs-22.3-nox to emacs. My mplayer wrapper also now opens PLS streams in screen.

Update: Debian Lenny on AA1 – Starting to Get Things to Work Right

June 14, 2009

I wrote last night that I’d either have some love or some hate for Debian on my AA1. Today I’m warming up a little bit to it.

It really helps to read as much information as possible before getting in too deep. Mea culpa. The Debian wiki has a nice page on Aspire One setup. The reason I couldn’t see any wireless signals, let alone connect to my own, is because of shortcomings in Lenny’s base kernel. I added debiankernel to my sources.list and installed a fresher kernel.

$ uname -mrs
Linux 2.6.29-bpo.2-686 i686

Now I’m up and running without this ethernet cable tethering me to my desk and I can stick it back in my server where it belongs. I’m posting from Iceweasel in Debian now.

I made another quick change in possible preparation for ditching Gnome and because I like it better. I installed wicd and due to alleged conflicts automagically removed network-manager{-gnome}. I may re-add those, though, because wicd wants to connect to “<hidden>” rather than my SSID. I’ll see if I can fix that first. I’m just happy I can see wireless signals everywhere again.

I’m not sure I’ll ditch Gnome. I measured free -mt at first boot — without any other reconfiguration to get a baseline — and using eth0 rather than wifi my use was 265 MB. I’m sure that’s changed now that I’ve mucked around and made a few changes like the new kernel and apps that start at boot, never mind the toll encrypted wireless puts on a system. I also noticed that Gnome’s not churning away with CPU cycles quite as much as I recalled. That’s probably what will be my make/break criterion since RAM use is a quarter as important with 1 GB than it was when I was running 256 MB. FWIW, with four tabs open in Iceweasel (including resource drainers like gmail and the web editor for this blog), one terminal, and totem open with an audio stream:

$ free -mt
              total       used       free     shared    buffers     cached
Mem:           999        528        470          0          8        263
-/+ buffers/cache:        256        743
Swap:         1427          0       1427
Total:        2427        528       1898

I think I can live with that. For a little while. Maybe.

Still dealing with a few residual issues. The most noticeable is that when rebooting with my new kernel I once again had to edit the menu in GRUB because it was overwritten with settings for a second drive. Not as pissed off about it as I was last night but it’s still annoying. I’ve manually edited menu.lst but I’ll have to see wherever the cached setting is so I don’t have to do this with any more changes or new kernels.

I’ll be apt-pinning unstable repositories so I can get the few bleeding edge versions of things I need. That includes OpenOffice.org 3.x. I don’t think 2.x will work with some of my 3.x calc files (e. g., will my charts break? what about some of my formulae and has Debian patched 2.x so it’s forward compatible with 3.x?) and I don’t care to have separate document versions for Linux and Windows if there are any issues. I won’t get around to posting the DSL Hard Drive Install Guide PDF today. I’ll get to it ASAP because I’m tired of looking at it and because I see I’m getting a lot of hits on that page now. I’ll correct the notice I placed on it in a bit.

I also haven’t tested much hardware — not since it took so freaking long to install and then not having wireless until this morning. I haven’t checked CPU freq scaling yet, nor have I checked suspend/hibernation./resume. Haven’t tried to use the card readers yet. Haven’t done anything with the sound until now (opened stream in totem); need to figure out why the Gnome volume applet moves to mute when adjusting the volume.

Need to adjust volume levels and see if I can record audio through the microphone. The cam works, no thanks to cheese. Had to manually tweak settings to get output. Here’s my first picture as I was greeted when opening cheese.

0001

That’s not on the cheese developers. Everything else is. I did find that cheese doesn’t work any better in Lenny than in Fedora 10; I did manage to get it set up to take a picture but the video is way too shitty to use. I’ll replace this useless package with something that should work better, like mencoder/mplayer.

Still have to set up printers, too. That should be no problem. I’ll see if MTP works well enough to use it; I’ll see if the FUSE mtp filesystem (mtpfs) is available in apt and maybe have better control over the device than I had in Fedora (could do basic file management but no directory-level management, e. g., pictures, text, datacasts, etc.). Need to add a lighter and more powerful shell (ksh/pdksh/mksh). Can get rid of a lot of stuff I’ll never use (inkscape, ekiga). Add stuff I’ll use (skype, flash, etc.). Etc.

When I get time, I think I’m going to compile an AA1-specific kernel. The Debian AA1 wiki page above has a link to one but it uses ext4 in lieu of ext3. Why do I feel like a Luddite for refusing to get on that bandwagon yet?

Unfortunately, I probably won’t have much time to do any of this today due to previous commitments like family and College World Series (hook’em!). I’ll have an update as soon as I get a chance.

Update: First Look Fedora 11 Live CD/USB, Misc Thoughts, cheese Sucks

June 10, 2009

Just a quick update before I get on a conference call. I’ve now booted both the Gnome and KDE versions of Fedora 11 Live from USB thanks to this unetbootin recommendation from scottro. That (old) thread at FedoraForum includes other helpful suggestions netbook users can try if they get bogged down with Fedora images. (Edit: I used unetbootin to successfully get a bootable USB stick with Fedora 11 from within Fedora 10; haven’t tried in Windows.)

Impressions? Well, the KDE version seems more stable than I recall from the prerelease image I ran a couple months back. I didn’t do much with it except look to see which apps it comes with — KOffice and other K-apps instead of OpenOffice. I then booted the Gnome version and it’s not too different from the Fedora 10 selections: AbiWord, evolution, cheese, totem, rhtythmbox, etc. That’s good because I don’t like radical changes. There’s still no hotplug support for the SD card reader (the one on the left side of the AA1 — haven’t tested the multi-card reader yet) unless you boot with a card inserted; I did see that the jmb* module loaded when I later inserted a card after (cardless) boot, it just doesn’t work yet. Beyond that, things seem to be working fairly well.

I was more inclined last night to run a KDE-based system over Gnome, but both are a bit more cumbersome and bloated than I really desire. It’s not so bad with a GB of RAM but I think people delude themselves that Linux is inherently better than Windows on low resource hardware — I think XP’s performance is still a lot better on this AA1 than Linux 2.6, especially with the chronic polling and shit that Gnome does (and KDE, too). That’s why I may go ahead and do a minimal install of something whether it’s Fedora or Debian or Slackware and then install more or less only what I want.

That last point, as it relates to default selections of software, reminds me of how many things I switched around in Fedora 10 on my AA1. I installed OpenOffice.org to replace AbiWord (because I use it at work and I needed Calc and Base as well), mplayer from rpmfusion in place of totem and cheese (see below), mksh (left bash installed in case any important scripts are full of bash-isms or call directly to /bin/bash), emelfm2 in place of whatever retarded file browser was the default, and a variety of small-ish apps I like to use. And bigger apps like Skype, which works very well now that the microphone is working.

This “cheese” webcam studio or booth thing fucking sucks. I read the FAQ and whatever else I could find to try and get it to record video without stuttering — or even minimal stuttering — but it was still so fucked up even with the smallest possible resolution I could set that I abandoned all hope for it. It basically freezes for a few seconds at the start of a capture and never really gets its shit completely together after that. Looks like the developers were more interested in useless shit like the nifty count down timer and “flash” thing that goes off (not to mention all the “effects”) than getting legitimate core features — like smooth video with properly synced audio — to work correctly. In a way, it’s typical of GNU/Gnome projects where people “major in minors” and the more important things never get finished or it’s a half-assed unfinished project that never fulfills its stated objective (see guile, which was supposed to take on TCL/TK but has languished in near obscurity behind other newer and more relevant languages).

Fortunately, there are things that work a lot better even at the higher resolutions the cam is capable of using. Here’s my alias for recording from the webcam using mplayer/mencoder.

alias record_stream='mencoder tv:// -tv \
driver=v4l2:width=320:height=240:device=/dev/video0:forceaudio:adevice=/dev/dsp \
-ovc lavc -oac twolame -lameopts cbr:br=64:mode=3 -o '

Change the encoders to suit what you have on your system. Type/tab complete the alias in a terminal and add a filename with format type (e. g., record_stream ~/Videos/today01.ogv) after record_stream and use ctrl-c to stop recording. Is it as fancy as something with buttons and can you see yourself? Nope (though it’s possible to run mencoder/mplayer so you can see what you’re recording). The captured video (and synced audio) is of much better quality than I was ever able to get from cheese.

(If you must see yourself before recording you can add an alias like “stream_test=’mplayer -tv driver=v4l2:fps=15 -vo xv tv://'” — you can also add whatever you need to listen to yourself if you need to test the sound, too, but that’s a system setting that you should set to work without constantly screwing around with it.)

I realize people drawn to Puppy and Ubuntu will throw up their hands and yell “WTF” at that, but script it through zenity or something if you think you need a fucking button to click just to do a simple task like capture video from your webcam. It’s easier my way. Really. And you can use whatever codecs you have installed — mpg, mp4, avi, mov, wmv, ogg, whatever.

Anyway, still not committing to Fedora 11 yet because there’s nothing in it that I don’t have working in 10 — just newer version numbers of the same stuff. The only reason I may install it sooner than later is because I want to reclaim space used in various other Linux partitions for one unified install, which kind of mitigates against installing from the live CD anyway because of the quirky requirement that / be ext4 and /boot be ext3, etc. Now that I’ve slept on it, I’m more convinced I want something a bit more conservative with a longer support cycle than Fedora offers. May have more time later to do something.

Still on my to-do list and coming soon: Updated DSL hard drive guide in PDF, even though DSL is pretty much dead. Could have it posted by the end of this weekend.

Gnome RAM Use, LXTerminal, Tiny Core 2.0, FLWM, and a Long Frigging Rant About It All

May 27, 2009

Rebooted into Gnome this morning after giving the latest Tiny Core release candidate I’d downloaded over the weekend a quick spin. I wanted a quick and dirty benchmark for where my AA1 is on a clean boot using Gnome so I can compare to other environments. This is with networking started along with a bit of stuff I could probably slim down a bit (e.  g., I could only start cupsd when I intend to print).

Screenshot-Terminal-start-gnome-f10-01

See, LXDE guys, this is how a terminal should behave; yours doesn’t work right. My shell is running as it’s intended to and I don’t have to force the terminal to read my profile settings to get my prompt or my aliases or any other settings I have (in my .mkshrc). Kind of stupid to have to set up a shell wrapper to invoke the LXTerminal to read ~/.profile (and from that .mkshrc) when it starts so I don’t falsely presume my aliases and other settings are loaded. My complaint last night (in the screenshot) wasn’t about the prompt, which serves as a marker or symptom that a particular file has been properly read, it’s about an application that ignores what should be considered a standard — read particular environment setting files (not just a fucking bashrc because not everyone uses bash) so the proper environment is available to the user. Does that make any sense?

Okay, now about my thoughts of the changes in Tiny Core 2.0. I’m not able to do much with it yet because I didn’t load the modules I need for the AA1 (not close enough to an ethernet cable to connect to the Internet). It’s what I expected: spartan. It’s like an empty canvas just waiting for the artist to express himself. Only instead of painting a few pieces of fruit or a barn or something, users get to add only what they want or need to it. No pretenses, no clutter, just what you need. Alas, people confuse desires with needs and vice versa.

I know there will be lots of bitching about FLWM. I saw some already last week at Distrowatch and also in the TCL forums — some of it was the drawa queen “you’re killing your distro” kind. I don’t know why that’s such a hard thing for users to accept since there are other window managers available in the repository and they’re not limited to what’s in the base. The window manager is only there to manage windows, not to be admired. If you want to admire your computer screen, turn it into a picture frame and don’t bother using applications. You can dress it all up however you want. Seriously, why should aesthetics be a show stopper?

Let’s contrast it with Moblin, which has all the sizzling sexy eye candy but has things that either don’t work yet or that crash over and over again. Every reviewer writes like he or she had multiple orgasms from using it despite the fact that it’s advertised as beta-level (haha, what an overstatement — try alpha) and buggy as hell. Reviews and feedback about stable little Tiny Core (and DSL before it) are filled with complaints that it’s not flashy enough compared to everything else out there. Okay, it may not be the fanciest distro but it doesn’t crash and repeatedly pester you with notices about them so you can decide if you want to e-mail the developers.

Robert and the Tiny Core team are putting out a rock-solid little distro. Why can’t that shine on its own without being all dressed up in Web 2.0 shite shine? Distros are about more than eye candy — at least they should be. What should count most is their efficiency and stability. Tiny Core has that. It’s not the easiest thing to set up and use, but once you get a few concepts down it’s easy to manage and won’t give you much grief because it’s stable.

I tried to help other DSL users who whined about the lack of sex appeal see how they could change JWM from “boring” to “fancy.” In one ear and out the other. As if DSL and Tiny Core are about window managers.

If FLWM is a deal breaker, you’re trying the wrong distro anyway so keep your thoughts to  yourself. Go back to Ubuntu and its sloppy Netbook Remix with the ever-crashing desktop menu. Or go ahead and use Moblin’s preview even though it’s not intended for production (and lives down to that!). Or use some other bloated piece of shit that looks fantastic and awesome and will make you cum all over yourself from the sensory overload. Just remember that there are more stable options available when you get tired of the system failing, breaking, or doing odd things because more concern was given to gussying it up than making it run right.

The irony: people now demand JWM back in the base. Wonder how many of them were complaining when JWM was made DSL’s default window manager over fluxbox.

Can’t please everyone. Can’t please some people at all.

LXDE in Fedora 10 on AA1

May 26, 2009

I just installed LXDE in Fedora 10. I didn’t think I’d like it, but after a little while poking around I think I do. Except I don’t like my panel on the bottom and I’m not crazy about how much stuff was installed as part of the package. I’ll live with it for now since Fedora 11 will be out next week. Haven’t decided if I’ll go with LXDE, Xfce, Gnome, or KDE. Or if I’ll try something else instead or just go in a different direction. Maybe a certain little distro that uses FLWM now? None of the above? Who knows. Depends how the rest of this week goes.

Here’s my obligatory screenshot. Wallpaper is about 43 kb. (Edit: Forgot to add that I hate the way the LXDE terminal totally ignores my ~/.profile for my shell, which is mksh. I shouldn’t have to run my .profile to get my own settings and my own PS1. This isn’t a problem in Xfce’s terminal, the Gnome terminal, Konsole, aterm, or anything else I’ve ever run. Edit2 – I never did get my .profile to read .mkshrc when logging in even though I set that up.)

wtf-lxde-002

I have a bigger post to add tomorrow about more stuff I now have working under Linux on the netbook. And, of course, some of my usual nasty gripes.

Edit: Oops @ the title. It should be Fedora 10.