Monday, August 22, 2011

Lubuntu Update

Banshee, Jack, ALSA

I played with Audacity a little bit, and quickly found out that I liked DeaDBeef much better, and it wasn't like I was that excited about DeaDBeef.  I went looking for alternatives and quickly found Amorak and Banshee.  They both looked nice, and I think Amorak looked slightly better, but since Lubuntu is still largely Gnome based, I didn't want to have even more library files running around then I already did, so I tried Banshee.  Now I had played videos and movies on the laptop with no setup required on all the Linux installations that I had done so far, and was sort of taking this as a given.  However, when I started up banshee after apt-get'ing it, no sound happened.  I then ran it from the command line to see the error and it was complaining about jackd server not being found.  So then I apt-get jackd, and still nothing.  I look and no jackd process is started, so I run it as root.  Still nothing.  Then I run it as my own user.  Bingo, it worked.  Then I realize that when jackd is running, no other program (audacity, media player, etc) can seem to use the sound card.  This is dumb.  I don't need a realtime, audio capture driver like jack is claiming to be.  I just want something that will allow me to listen to music, skype, watch a movie, watch youtube all at overlapping times.

After some searching I realize that Banshee is tied to gstreamer as a way to abstract the output layer.  I also realize that by default everything else was using ALSA to stream and that there was a gstreamer-alsa plugin.  To get that I did:

sudo apt-get install gnome-media gstreamer0.10-alsa

The gnome-media package is needed so you can run gstreamer-properties to select ALSA as the Default Output Plugin.  Once installed and this program run, Banshee worked fine as well as every other media program even at the same time.  I then removed all traces of jack from my system.


Banshee seems nice, although it is a touch unstable.  It resembles iTunes a lot, and even finds the album artwork like newer versions of iTunes do.  It also comes with importers for other music programs which I'm sure many people will find invaluable.  It's unfortunate that Apple had to be so anti-competitive and prevent 3rd party programs from accessing iTunes libraries in iTunes 7, as this would have been very convenient in our house.  With Apple moving towards an online store in Lion, I find it very possible that my largely Apple household could move towards Linux, something that I would not have bet even 6 months ago.


Removing some clutter I managed to accumulate:

sudo apt-get remove ubuntuone-client abiword gnumeric

Also, if you need to run programs on Lubuntu at startup, you can put them here:


I think I'm pretty set up at this point.  I'll probably try Bodhi when it moves to 12.04 to compare newer Enlightenment updates.  Lubuntu seems to meet my needs however and so I'll really try and get settled for a while to get a good feel for it.

Sunday, August 21, 2011

Xubuntu ..... no ..... Lubuntu

Xubuntu/Lubuntu Install

I downloaded and burned a Xubuntu 11.04 64 bit CD as well as a Lubuntu 11.04 64 bit CD on Friday, all prepared to try out the two Ubuntu variants.  I put in the Xubuntu CD and selected the "Try out" option, and then nothing happened.  Weird.  After verifying the CD was good I tried again, and nothing.  I then went into and edited the Grub boot options and replaced the "quiet splash" with "nosplash".  The last line I saw before my MacBook Pro locked up was:

fb: conflicting fb hw usage nouveaufb vs. EFI VGA - removing generic driver

This comment indicates that this happens and the thread has the solution once the system is installed.  However, I was using a LiveCD, and am not sure how to add a modprobe blacklist at run time to a read only os.  My fix was to add the "nomodeset" kernel option which allowed me to get through the installation of Xubuntu finally.  You can do this by pressing 'e' under grub and going to the end of the line where the kernel is specified and after all the other options adding "nomodeset" (without the quotes) to the file.  After you have it there, you should be able to press F10 to boot the updated setup.

At this point I thought I was set!  But alas, upon reboot, nothing I did could get it to run correctly.  Left alone, the same fb error would occur.  Setting nomodeset or adding the fb to the black list both allowed it to continue but then get stuck in a very weird "loop detected in script" error (that I didn't write down and now don't remember the details on).  At this point I was getting frustrated, and figured I'd jump from Xubuntu 64 to Lubuntu 32 since they were both 11.04 based, just changing the default desktop was probably not going to fix the error I had.  So I burned a 3rd CD with Lubuntu 32 and started again.

I did notice a difference between the 10.04 install of Bodhi and the 11.04 install of both [X|L]ubuntu: that Bodhi did not try and install grub in addition to the rEFIt firmware.  So now for this new version, I have to go through the rEFIt screen and the grub screen, or sometimes only grub which seems to mean that grub is trying to install itself over rEFIt.  Since grub doesn't boot from CD easily (see here for a way), I don't really want grub being there at all and find it kind of annoying.

Anyway on to the Lubuntu install.  I had no issues with the display this time, it just worked.  I'm pretty sure this is 64/32 difference and not a Xubuntu/Lubuntu difference, but since I have the Lubuntu 64 CD, I'll try it later.  The install itself behaved the same way as the Xubuntu install (although I notice Lubuntu installs Chromium while Xubuntu installs Firefox).  Upon reboot, however, everything just worked.

Getting settled

The first thing I did was remove abiword and gnumeric and install libreoffice, emacs and smbnetfs.  After looking around last time, smbnetfs looks like a much better approach to handling Samba mounts then smbclient/smbfs nonsense is.  It allows individual users to do there own mounting/unmounting and have their own set of shares, and best of all, only one explicit mount command has to be run, and from that point on viewing various shares on different computers/workgroups is a breeze.  No need to muck around with /etc/fstab or anything else.  Also, no need to have a heavyweight file manager like nautilus just so you can have an easy time of Samba.

To get smbnetfs up and running under Ubuntu/Debian you do the following:

sudo apt-get install smbnetfs

Setup a mount point like /mnt/samba or /media/samba that everyone can write to

sudo mkdir /mnt/samba
sudo chmod 777 /mnt/samba

Get your configure file from the default one:

mkdir ~/.smb
cp /etc/smbnetfs.conf ~/.smb
touch ~/.smb/smbnetfs.auth
chmod 600 ~/.smb/smbnetfs.*

You can add lines for different shares containing the username and password info to the smbnetfs.auth file you just created, an example one like the following:


I did this and then ran the following:

mount /mnt/samba

I got all of this from this link, and it all seemed to work, but upon running the mount command I got the error:

/root/.smb directory does not exist, using defaults in /etc/samba.  

Since the whole point was not to run as root this made no sense.  I tried out making root a user of smbnetfs as well and this did allow me to view all of my shares, but it was still not visible to regular users and I didn't want to run it like that.  After googling around, I eventually saw someone call:

smbnetfs /mnt/samba

This worked!  It was that easy.  I had to call smbnetfs directly and not allow mount to try and call it indirectly.  Hopefully others who encounter this problem see this.  Once up and working, smbnetfs was a dream.  I'm so glad I looked around more before grudgingly installing nautilus/nautilus-share to handle this.

Comparison of LXDE and Enlightenment

After playing around with LXDE for a while, I'm starting to get a feel for their differences.  Enlightenment is much prettier and has better effects, but also seems a lot less stable.  They both use very little memory and CPU when running, which is great.  However, when running Wine under both several times using different apps, the Enlightenment windowing system seemed to lose all responsiveness until I closed the Wine program.  Under LXDE, everything was responsive.  I've had at least 10-15 instances of E17 either telling me it SEGV'd or not allowing me to change windows, neither of which has happened under LXDE.  I haven't played with LXDE enough to have an equal comparison but right now it seems a choice between beauty and stability.

Saturday, August 20, 2011

Bodhi Update

GCC 4.6 and Bodhi

I found the Ubuntu 10.04 gcc-4.6 packages that we use at work, but they are all 64 bit binaries, and as of this moment, Bodhi only supports 32 bit packages.  I asked on the Bodhi support forums how I should go about installing gcc-4.6 on Bodhi since I couldn't find any PPA (personal package archive) that had 32 bit versions of these packages.  Jeff Hoogland (founder of Bodhi) was very helpful and grabbed the required libraries (taken from Oneiric I think) and put them in the testing branch of Bodhi.  Unfortunately, the libstc++-dev package relied on Oneiric's newer version of libc6.  This required rebuilding it from source.  He was nice enough to offer to do that himself, but he was not successful.  I also tried to do it, but building from source required other libraries that I couldn't seem to install and it started to feel like a 10 headed hydra.  Although rolling distributions are nice, this exposes the downside of them, because while most packages will upgrade easily, some, especially packages that developers need like compiler and standard library upgrades might not be so easily accomplished.

Enlightenment Stability

After using Bodhi for a week, I have noticed that Enlightenment (seemingly) locks up on me much more often than Gnome does under my Ubuntu 10.04 desktop at work.  Sometimes I get the F1/F2 SEGV window allowing me to reboot Enlightenment, which usually works.  Sometimes Midori seems to lock up, which seems to prevent me from doing anything in E.  I have to go to another terminal to kill Midori and everything is good again.  Also, when running Wine, everything else seems to be completely locked up, and switching between programs does not seem possible.  I don't have much experience using Wine, so I'm going to have to run it under a vanilla Ubuntu 10.04 and see if there are any differences.


Bodhi seems nice, and I might even come back to it (especially if it gets 64 bit support and they jump to Ubuntu 12.04).  But now I think I am going to install Xubuntu and try that out.  I've realized that I need to try out other distributions to get a better perspective on issues that I have.

Sunday, August 14, 2011

One time around the Bodhi Tree

Background of Bodhi Linux

So bodhi is a Pali/Sanskrit work that loosely translates to "enlightenment".  They seem to make heavy reference to this lineage in their artwork and as well as their naming.  For example, they have two recommended software sets:
Nikhila (meaning entire/all in Hindi) - their full featured software collection
Pratibha (meaning light in Hindi) - their lightweight software collection

Bodhi Linux itself is very new (first release, 1.0.0, was out March 2011).  Version 1.0.0 was based off of Ubuntu 10.04LTS as was their update 1.1.0, which was released in May, but with the 2.6.39 kernel and Midori 0.3.6.  According to their website, they are targeting only the LTS (long term support) Ubuntu versions, which come out every 2 years.  They will have quarterly updates to keep their software fresh in between.  I don't have much interest in bleeding edge, but 2 year release cycles are a bit much.  I haven't even gotten anywhere yet and I'm already questioning my decision.

Getting Boot Camp Access

I'm installing this on a 15" MacBook Pro (Intel Core 2 Duo, ~ 4 years old).  It's been a long time since I have used Linux on anything other than a desktop for work, and since this is my personal laptop that I'm also going to be doing work on, I need to make sure that both work and play will be supported.  But before anything else happens, I need a boot loader.  All Googling points to one choice: rEFIt.  Installing it is very simple, like all things Mac, just download and run.  I reboot, and .... nothing.  Weird.  I install it again, and reboot, and .... nothing.  I look on their troubleshooting section and I see that you have to restart twice.  Interesting, and now it works.... great! 

Live CD Boot

I downloaded what I thought was the 1.1.0 install CD from their website and ran it from the rEFIt menu.  I don't get an install screen, I get a Live CD?  Ok, well I'm here, and it's not bad to try the Live CD out for a little bit.  It lets me play with what kind of theme I want the desktop to have.  These range from netbook style (think big and clunky so a touchscreen will work), to very basic, to a composite choice, where all of the eye candy is turned on.  I try several of them, but figure I'll go with the composite one, since I partly came for the eye candy.

The first thing I notice is that there is a wireless widget.  I select my network and put in the settings (had to look them up again, since I totally forgot), and it works.  Great!  I then open a terminal and realize that I don't really like eye candy as my "artsy" terminal has low contrast as well as being largely transparent.   Edit->Preferences, Set Foreground white, Background black, with no transparency, and aaahhh, I can see again.

Next I play around with Midori for a while.  Seems nice, although I immediately miss chrome or firefox w/omnibar single address line goodness.  I think all browsers need to support this, even if they don't make it default.  It just feels right.  I poke around in the preferences and settings and realize that Ubuntu might be a porker, but it does have a coherent layout for system preferences.  Enlightenment leaves something to be desired in this department.  I run top and validate my initial purpose: the memory footprint on this puppy is tiny (~80 mb of E/X).  Alright ease of use is great and all, but I'm sure I can figure it out, and hey, the wireless, and video card just worked, so I'm already ahead.

I do have to point out here that when I was running the composite theme, I got a complaint that OpenGL was not supported by my video card.  I'll delve into this later once everything's installed.

Actual Install
So eventually I find a button right in the middle of the bottom panel that is for "Installing Bodhi".  So the LiveCD is an install CD, nice.  I partition my drive by deleting with windows partition and replacing it with the new Linux partition.  I then run the install, and it's really fast (the iso was only 400 mb) compared to Ubuntu.  I restart and it's up and running.

I next venture over to YouTube, with no Flash.  I click on the get Flash option which sends me over to Adobe's website.  It detects Linux, and lets me choose which type of file to download (Yum, .tar.gz, .rpm, APT for Ubuntu 10.04+).  Well this is basically Ubuntu 10.04, so I think I'm in luck.  I click on it and I get:

 Unknown channel: 'lucid-partner'

Ok, maybe this isn't so easy.  Actually bothering to look at the installation instructions indicates that I need to run:

sudo apt-get update

And then install Flash by clicking here.   Ok, after restarting Midori I now have YouTube working (with sound).  Life is good again.  Just to get things up and running for basic code editing, I run:

sudo apt-get install subversion cvs gdb

Now I need to get emacs, but I'm not sure exactly which package.  I open up synaptic through the Bodhi menu->Applications->Preferences->Synaptic.  Shouldn't synaptic be in System Tools?  Anyway, I opened up synaptic after entering my master password, and find, well, yeah, the package is named emacs (although in my defense I thought it was called emacs23 and their does appear to be that package as well).  Note that packages with an Ubuntu icon has Canonical's guarantee that they will provide updates until April 2013.  Emacs has this icon, so I'll be golden if the Emacs devs find a critical need for a first person shooter (psychoanalysis and tetris are already in there).  Anyway, I realize that I need an Office Suite and sorry guys, but Light Office (Abiword, Gnumeric, and Inkscape) is not going to cut it.  LibreOffice you big tub of lard (I mean that in the nicest possible way), mosey on over here.  The "Install Now" button on Bodhi's webpage worked as it should, and so now I have used synaptic, apt-get command line, and clicking from Midori to get software.  Not too bad.

I got Octave (open source Matlab clone)  and Wine (from scratch Windows compatibility library and environment to run Windows programs directly) from Synaptic while I was there.  I hadn't really used Wine too much, I just wanted to see how well it worked with games.  I installed Hearts of Iron II using Wine (which took forever, copy a large number of small bmp files is not Wine's forte).  I noticed during the install that no other window was responding.  I'm not sure whether this was a Wine or an Enlightenment issue, but it was there.   When I went to close the installer after it was done, nothing seemed to respond.  I got an enlightenment crash menu (F1 to recover, F2 to exit).  I clicked the recover button, since the mouse was still responsive, and enlightenment appeared to reboot.  I then tried to run the game by:

wine ~/.wine/drive_c/Program\ Files/Paradox\ Interactive/Doomsday/HoI2.exe

 This failed with some weird error.  I eventually realized that the Wine install added an icon to Applications->Other->Doomsday.  This icon started the game up and it worked better than Parallels did under Mac.


Next I had to fix my keyboard settings.  An apple keyboard with two command keys and only one Alt key does not work so well in a Linux world.

Relevant tips for keyboard/mouse config are found here:

Tuning Ubuntu On A Mac
Reassigning Ctrl,Alt Keys

Basically there is a lookup table between keycodes generated by the physical keyboard and conceptual symbols such as "Ctrl_L".  The program xmodmap allows a user to modify this table.  I decided to map the Apple/Command keys to Alt and what Linux calls the Command keys (Super Keys), I mapped to the original Alt key.  I still have no idea what the Super key modifier does in Linux, but I don't really care either.  I created the following xmodmap file and put it in ~/.Xmodmap:

! Swap Alt and Cmd keys.
keycode 37 =    Control_L
keycode 133 =   Alt_L Meta_L
keycode 134 =   Alt_R Meta_R
keycode 64 =    Super_L
keycode 104 =   Control_R Multi_key
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add    Shift   = Shift_L Shift_R
add    Lock    = Caps_Lock
add    Control = Control_L Control_R
add    Mod1    = Alt_L Alt_R
add    Mod2    = Num_Lock
add    Mod4    = Super_L
add    Mod5    = Mode_switch

Running this using xmodmap ~/.Xmodmap worked fine.  I then tried to add this command to my .xinitrc and nothing happened.  I realized that xinitrc is only for when calling startx directly not going through a display manager (which most distros have, in Bodhi it is lxdm).  So I tried .xsession and still nothing.  I then went and looked at what lxdm was doing (by looking in /etc/lxdm/Xsession, and then because this is Ubuntu based, looking in /etc/X11/xinit/xinitrc).  Based on the xinitrc, per user customization is done in the .xsessionrc file.  Moving my .xsession to .xsessionrc and rebooting makes it work.

Next I had to fix the very annoying touchpad tap while I'm typing problem.  Basically, I want it off while I'm typing so my cursor doesn't keep on moving around the screen randomly.  Good news there's a fix for that:

Disable Touchpad While You're Typing

To test for yourself, run:

syndaemon -i 2 -t -d

This will turn off touchpad tapping for up to two seconds after typing.  This will only last until you reboot/restart X.  To make it permanent, add it to your startup file.  (I added it to ~/.xsessionrc, just like the keyboard remapping).

Network Mounts

Now the nice thing about Ubuntu, bloated though it is, is that everything you need is either built in, or almost automatically added.  Nautilus and remote shares transparently working come to mind in this.  Now Bodhi doesn't come with a lot of libraries, and in trying to stay true to this, I resisted downloading nautilus and nautilus-share.  They are there if you want them however.  (Bodhi seems to come with something called Nautilus Elementary, not really sure what this is though).  I went to synaptic to install samba.  Note that if you don't need to run a samba server, all you need to install is the smbclient and smbfs.

I ran:

smbclient -L other-computer -U user-name  # password at prompt

And I see my shares.

 Now I try and do:

sudo smbmount //other-computer/share-name /mnt/lan/share-name -o user=WORKGROUP/user-name%password 

This fails with the error: Could not resolve address for other-computer: Name or service not known.  This is weird because the smbclient sees it, but smbmount fails.

I can get it to mount by replacing the computer name "other-computer" with the IP address of that computer on the network.

sudo smbmount //192.168.X.X/share-name /mnt/lan/share-name -o user=WORKGROUP/user-name%password

This works, but I don't like it very much (and also has nothing to do with Bodhi Linux).

Video Codecs 

I wanted to try out watching videos, so I installed totem and vlc.  Some videos wouldn't play out of the box, and unlike Ubuntu, mplayer did not find what codecs I needed and ask me if I wanted them installed.  I really like this feature and it should be included.  This plugin finder might be located in a package that I didn't know to download.  If so, having an "install now" for a fully featured video player capable of downloading new codecs is a must for Bodhi.  To solve it right now, I went to synaptic and searched codecs.  I installed w32codecs and non-free-codecs.  This fixed the problems for the movies I tried.

Graphics Engine

To get back to the graphics problem I was having where OpenGL support for my card was not available, I did a little searching in Enlightenment's menus.  To find the graphics engine Enlightenment is currently using is a fun exercise in Settings Navigation (It is not in Settings->All->Advanced->Engine, instead, find it in Settings->All->System->Elementary Configuration->More->Rendering).  Here my was running Software x11.  However, there were two other available engines Fb and OpenGL x11.  I selected OpenGL x11 and clicked "Use Engine".  I'm not sure if that did anything, and Googling it did not seem to give me much insight.  I'll delve into this more later.


I still have a bunch of development libraries that I have to install for work.  We are using g++4.6 to take advantage of the new C++0x code support.  We have Ubuntu 10.04 computers with gcc 4.6 on them, but I can't seem to find any gcc 4.6 packages for 10.04.  I'll wait until I get to work to figure out how it was installed.  This is the really important test to see if I can use this distribution.  Bodhi Linux's decision to only have Ubuntu LTS also means that for problems like these I can't easily upgrade my way out of them.


The system feels incredibly responsive.  Unlike Ubuntu, a full day of running different programs has not created a bloated X or Window Manager.  Midori is also amazingly compact in the memory department.  Taking up a small footprint, but being able to easily install and run all of the programs Ubuntu has seems like the best of both worlds.  If I had one recommendation for them, it would be to release a version for each .04 Ubuntu release.  For those that don't need to be up to date, they can use just the LTS releases.  Two years is a really long time in the Linux world.

Finding a Linux Distribution

I needed to install Linux on my laptop for work and was looking at various Linux distributions.  We use Ubuntu 10.04 and 11.04 at work and it's a bloated hog.  It has everything you could want but everything feels so slow, and the top screen just makes me depressed.  I figured I could take some time out and look at the various distros that are out there.

Fedora - I had used Fedora at my prior work and while I liked it when I used it, exposure to apt-get goodness cured me of that desire.  It also is a little too bleeding edge for me

Mandriva - We used to use this at my current work, and it was alright.  Consensus among developers led to our switch to Ubuntu, and I was a part of that consensus.  :D  I've always liked Gnome more than KDE, but KDE does have it's niceties.

Ubuntu - This was the tried and true choice.  Basically, I didn't like it, but I disliked everything else more.  But the Unity shell is atrocious and Gnome 3.0 doesn't seem any better.  Less can be more.

Xubuntu - Going into this process this is what I was thinking of using.  I know Xfce is lightweight and it's based off of Ubuntu so I will be largely compatible with work.

Linux Mint - Heard it was getting popular, but didn't know anything about it.  Figured I'd check it out.  (Mainly) based on Ubuntu and is desktop agnostic.  Might be interesting to be able to test drive a large number of different desktops

Bodhi Linux - Found this while looking at distribution lists.  Caught my eye because it had Enlightenment.  That was a blast from the past.  I remember looking at all the cool artwork that was going into Enlightenment when I was in high school ('96-'97 ish).  I could never get it to run very well back then, maybe I could try it out now.

Pinguy Linux - This looks like what Ubuntu should be.  Full featured, pleasant on the eyes, and with intelligent choices made throughout.  Only concern is it doesn't seem to lighten the footprint of Ubuntu any

Crunch Bang Linux -  Based on OpenBox which has a tiny footprint and claiming to provide a good amount of functionality, seems like an interesting distro to try out.

I listed both what distributions I've had experience with and which I was interested in trying.  The bottom line is that I needed to determine which of the Ubuntu derivatives I should try.  I could sit there and fully install and then test all of these choices, but that seems overwhelming and requires much more time than I have (also, I am lazy).  So I figured I'd leverage the hard work of other critics.  In evaluating my choices, I relied on these third party opinions:

Desktop Comparison Guide  (this guide goes over the memory and baseline CPU footprint of each desktop, which is a very cool experiment to see)

 7 Good Ubuntu Derivatives (so this is actually written by Jeff Hoogland, founder of Bodhi, so there might be some bias.  Of course Bodhi is not on the list, but is suggested in the 7th choice)

20 Ubuntu Derivatives You Should Know About (big list, although the top is laden with direct desktop variations of Ubuntu)

Time to make some choices 

So after some thought I have ordered my selection of distros in the following manner:

1. Bodhi
2. Xubuntu
3. Pinguy
4. Linux Mint
5. Crunch Bang

My plan is to get as far as I can with a choice, until I am happy with it, or I am not satisfied and need to start over and try again.