Posts Tagged linux

Windows 7 vs. Ubuntu 10.04

A few years ago, I was simultaneously running machines with OS X, Windows XP, and Linux.  After giving up PC gaming and my Macbook started aging, I switched to Linux exclusively, since it had nearly everything I needed for school/work.  I did however, keep a Windows XP partition on my laptop for PowerPoint presentations since I find Open Office to be seriously lacking.  Using Linux almost exclusively worked pretty well for the last couple years and I managed never to have touched Windows Vista.

Since the release of Windows 7, I’ve heard plenty of good reviews about this latest Windows version and I decided to give it a try.  A month ago, I installed it on my MSI netbook so I could travel lightweight and give a paper presentation using PowerPoint.  Shortly thereafter, Ubuntu released its latest version into the wild and after using both Windows and Linux for about a month, I’ve been able to come up with some strong and weak points on both.  Some of my comments apply to Windows and Linux in general and not just to these latest versions or distributions.

Windows 7

Pros

  • A solid UI.  I’m a real fan of the Aero theme, system fonts, and improved start menu.  The taskbar really takes the cake by using icons and clustering multiple instances of the same program.  Hovering over the taskbar gives a cool preview of each open window.
  • Fast.  My netbook with Windows 7 feels just as responsive as it did when it ran Linux.  Boot times are a little slower, however.
  • Robustness.  I had no difficulty with the Windows 7 install on my netbook and Microsoft even provides a Windows 7 CD to USB image utility for netbooks.  Unlike my Ubuntu experience, there aren’t any weird hacks to go through in order to get your display or wireless connection working correctly following a fresh install.  Furthermore, I haven’t encountered any system crashes and Windows seems to keep any malfunctioning program from taking down the whole system.
  • Good hardware support.  I plug in a camera and it’s automatically recognized and drivers are installed from the internet.  I plug in an external monitor or projector and the correct model is detected and my desktop is extended on to it with the correct resolution.  It’s great for presentations since there isn’t much fiddling with the projector or Control Panel settings to get everything looking good.
  • Software availability.  Everything has a Windows version, even most open source software.  I find that most developers put more effort into Windows versions since that’s what most people are running.  For example, I’ve had fewer crashes and slowdowns with the Windows versions of Firefox and Skype.  The Windows version of Skype is also much more polished than its Linux counterpart.  Furthermore, many software programs are only available on Windows.  MS Office, despite its incredible price tag, is still far superior to Open Office, and of course, only runs on Windows.
  • Games.  Most of the latest AAA titles are available for Windows, a few might be available for Mac, and I’ve heard of only one or two released right off the bat for Linux.  If you’re into PC gaming, Windows is the only way to go.

Cons

  • Lack of a centralized software repository.  This makes it a real pain to download and  install software since I have to go to a separate website for each program I want to install, find the download page, and click through a bunch of installation dialogs.  Even worse is that nearly every Windows program I install runs a background process on startup that constantly checks for updates and bogs down my system.  Also because of this lack of a centralized repository, programs inconsistently install themselves in many different places.
  • Difficult to configure system settings.  The Control Panel is a real maze of links, buttons, and dialogs which are dumbed down at the highest level and utterly confusing once I drill down into specific settings.  Some settings can’t even be accessed with the Control Panel: for example, I still find myself using msconfig.exe to remove unwanted startup items.
  • Windows Update is still very intrusive.  A large number of updates require me to reboot and will display a nag timer forcing me to do so.  I really don’t like the OS to get in the way and nag at me.  Some of the system updates take quite awhile to install and can bring my system to a crawl.
  • Libraries.  This feature, which wasn’t in XP, is similar to Unix symlinks.  A library clusters together files and folders from several locations in the filesystem, making it unclear where the files are really located.  I would prefer that all my music, movies, or PowerPoint slideshows be stored in a single location in the directory structure such that I can easily back everything up or find something via Windows Explorer.  Windows seems to want you to not have any knowledge about its directory structure and instead rely on searches and libraries.
  • Developer Tools.  This is the exception to the software availability and quality rule.  I’ve been using Eclipse for Linux and Windows and it works well enough on both platforms with plugins for Subversion and LaTeX editing.  However, other tools such as a basic text editor, LaTeX compiler, and command line tools such as make are either lacking or nonexistent.  I find it much easier to work with the command line than a GUI when creating plots with Gnuplot and documents with LaTeX.  I can quickly switch from one thing to the next without clicking through a whole pile of menus and dialogs.

Ubuntu 10.04

Pros

  • A centralized software repository.  This is the main reason I like Debian and its variants so much. “apt-get install” will give me any program I want and provide automatic updates.  Removal is just as easy.
  • Fast boot times.  On my 3 year old laptop, Ubuntu is up and running in 30 seconds or less from the moment I hit the power button.
  • Easy to configure and control.  Adjusting a system setting is easily performed from a GUI tool or from the command line.  Configurations are stored in well documented text files as opposed to the nasty Windows Registry.  It’s really easy to track down where a program’s install directory is located and tweak something.
  • A customizable UI.  The sheer number of themes available is astounding, with Compiz providing some really cool desktop visual effects that rivals anything Windows has to offer.
  • Enthusiastic user base (support).  I’ve found that tons other Linux enthusiasts are more than willing to help with problems on message boards and websites.  For things I’ve had trouble with, a quick google search or message board post will return tons of answers with other people who had the exact same problem and had already solved it.  With Windows issues, answers seem a lot more difficult to come by and the user base isn’t nearly as friendly.
  • Developer Tools.  Just about everything under the sun is readily available for developers in Linux, including a plethora of compilers, text editors, and command line tools.  Working from the command line makes things a snap compared to painstakingly navigating through different dialogs and menus.

Cons

  • New software versions take time to be added to the repository.  For example, Firefox 3.6 has been out for months but was only recently included in the 10.04 Lucid Lynx release.  Prior to that, I had to compile and install Firefox 3.6 from source.
  • Installation headaches still persist.  With every Ubuntu release, something doesn’t work post-install.  With 10.04, it was my video drivers.  During the upgrade process from 9.10, the installer whined about my video drivers and supposedly aborted the install.  Upon rebooting my computer, however, it was clear that the install had not aborted and my display was completely messed up.  After rebooting again, Ubuntu downloaded and installed the required video drivers automatically.  Also, Ubuntu now tries on boot to mount a remote drive in my /etc/fstab for which I don’t have a saved key, halting the boot process until I manually override the mounting process.
  • Software quality and robustness.  Productivity software, such as Open Office, isn’t nearly as capable or as featureful as Microsoft Office.  I’ve had trouble with Flash causing browser crashes and other programs crashing all on their own which run stably in Windows.  I’ve had a heck of a time figuring out why some fonts are rendered terribly and look blurry in some programs, among other things.  More effort should be placed on creating polished products in order for open source software to really take off.
  • Lacking hardware support.  This goes with the above bullet: I plug in an external monitor or projector and I still have to fidget with resolutions and positioning to get everything to work.  Suspending to disk often borks the external monitor configuration and then I have to do it all over again.

In all, I can’t say that either the latest Windows or Linux versions are better.  Windows provides a more robust and polished solution, while Linux gives more power and control to its users.  I find Linux to be a better choice for development, but Windows is the clear winner for gaming.  Both Windows 7 and Ubuntu 10.04 run reasonably fast — Windows 7 does quite well on my netbook, but Ubuntu clearly takes the cake with boot times.  Until open source software takes quality up a notch and Windows provides a better development environment, I’ll probably be dual booting, running virtual machines, or using multiple computers with both operating systems.

, , , , , , , ,

No Comments

Low Level Serial Control in TinyOS

It’s been awhile since my last TinyOS post, but a new project required me to return to programming motes.  In this case, we needed to send ASCII characters over the serial port to the PC, bypassing the default TinyOS serial stack.

The TinyOS serial stack is designed to work with Active Messages so that packets received over the radio can be easily forwarded on to the PC.  To that end, the high-level serial and radio components provide the same interfaces.  The TinyOS serial stack has layers for packet formatting, error checking, and a read/write buffer.  However, for our project, we wanted to simplify the PC side so we didn’t have to use the TinyOS JNI libraries to receive TinyOS Active Message packets.  A simple program to read ASCII characters over the serial connection would suffice for our purposes — Minicom does this quite well and is easily installed on Ubuntu Linux and can be configured to read from attached USB devices.

The goal was to produce a TinyOS component that provided a command for transmitting ASCII character strings over the serial connection to a PC.  The  implementation is very similar to the Pulse Oximeter code I wrote for Atmel-based devices, however this time I targeted MSP430-based devices, such as the TelosB or Tmote Sky.  The implementation uses the Msp430Uart1C component for accessing the serial connection. This component provides the UartByte or UartStream interfaces for reading and writing and the Resource interface for gaining control of the UART. Msp430Uart1C also provides the Msp430UartConfigure interface for setting the baud rate.

The control flow for writing a character string is as follows: First, request the UART resource. Second, when the resource has been granted, call UartStream.send() to transmit the string. Lastly, when UartStream.sendDone() is signaled, signal the higher level application that the character string has been sent or an error message if something went wrong. In my SerialAscii module, I have the following command to send a character string:

  command error_t SerialAscii.sendAscii(char *str)
  {
    bufferLength = strlen(str);
    if(bufferLength > BUFFER_SIZE)
      return FAIL;
    memcpy(strBuffer,str,bufferLength);  // copy string into a buffer
    call Resource.request(); // request access to the UART
    return SUCCESS;
  }

I copy the string into a buffer to keep the application from modifying it before being transmitted. When the resource request is granted, I transmit the string:

  event void Resource.granted()
  {
    error_t result = call UartStream.send(strBuffer,bufferLength);
    if(result == FAIL)
      post sendDoneFailTask();  // return failure message to the user if something bad happened
  }

Lastly, when the string is sent, I release the resource and signal the higher level application:

  async event void UartStream.sendDone(uint8_t *buf, uint16_t len, error_t error)
  {
    // call Resource.release() in each of these tasks
    if(error == SUCCESS)
      post sendDoneSuccessTask(); // signal SerialAscii.sendAsciiDone(SUCCESS);
    else
      post sendDoneFailTask(); // signal SerialAscii.sendAsciiDone(FAIL);
  }

I’ve made my code available here. Let me know if you find any bugs or have any comments or suggestions.

, , , , ,

No Comments

Freedom or Stability?

Windows and Mac users can download and install the newest Firefox version with a couple of mouse clicks.  With Ubuntu Linux, however, no Firefox 3.6 is available in the Canonical package repository.  Even worse, none of the developers plan to add any new Firefox versions to the repository until the next Ubuntu release.  So, I attempted to install precompiled versions from the Mozilla website and the Ubuntu Firefox development build repository, but both installs really messed up the fonts, making them blurry and hard to read.

I tried desperately to fix the fonts, summoning the help of the Ubuntu forums.  I tried editing font rendering settings in my local .fonts.conf.  I deleted the font cache and reconfigured fontconfig.  I tried adjusting a font quality parameter in Firefox’s about:config. For some forums posters, these solutions worked.  For me, nothing seemed to help.  Finally, I was able to get Firefox 3.6 installed with normal fonts by downloading and compiling the source code and installing the binaries compiled on my own system.

I’m not the only one who is frustrated by this.  This was probably the first time I’ve resorted to compiling a third party application from source since first using Ubuntu and Debian in 2006.  Normally, it’s just apt-get install whatever program you want.  The package manager automatically updates everything and keeps out of my way, rarely nagging to reboot unless the kernel was updated.  The package repository was one of the main reasons I switched to Linux in the first place: an easy, single step way to install anything and keep it up to date.  No hunting for a download website somewhere on the internet or clicking through a bunch of dialogs in an install wizard.

With such lag before new third party applications get added to the Ubuntu software repository, plenty argue that Linux isn’t ready for the mainstream.  I agree completely.  Most people will have to go through similar steps as I to get many of the latest third party applications installed, and it can be a real pain.  However, in Linux, I am free (as in speech) to customize or rewrite any part of the operating system and share my changes with others.  It also gives me a free (as in beer), top notch development environment for my work.  The problem is that such freedom comes at a cost: tinkering to get everything to work correctly.  Every time I’ve upgraded to the latest Ubuntu version, something doesn’t work and has to be fixed.  In another example, I recently installed the netbook remix version on my netbook and was rewarded by a flickering screen, which was fixed with a BIOS update.

Mainstream users just don’t want to be faced with flickering screens and BIOS updates, they want something that just works.  Consequently, they are willing to give up some of that freedom (as in speech and beer) to have a device that boots normally and doesn’t have font rendering issues when they install the latest version of a program.  Such users are better off with an Apple, and indeed Apple charges them a price in terms of money and control.

The iPad has launched a storm of controversy over its lack of user control.  Essentially, the device is a large iPhone, except there is no phone.  All applications must be purchased from the Apple-controlled App Store.  The real question is: do  mainstream users really need fine-grained control over their devices?  One comment on a Slashdot post really makes an interesting argument:

What has choice done? It’s given us the chaos of spam, malware, worms etc…  The average consumer should get a locked down device such as what Apple are proposing, a limited device with a closed market. And you do realise this is really no different to a games console.  Full blown computers should be reserved for those of us who know how to manage them responsibly…Computers as they are today are simply too complex and difficult to manage for the average consumer, so you either give them something simple or you take the management out of their hands.

Combined with the “Linux is not for mainstream” argument, this really makes the case that perhaps devices that work well but allow little user freedom may be the best for most people.  Most of the time, it’s the best choice for me.  I’ve got a phone, media player, GPS device, and others that I want to just work and perform a very specific function.  In these cases, I would rather they perform their jobs reliably than be extensively customizable.  However, I do think that the option to exercise greater control should be there for those who want it, no matter how few.  In the case of PCs, I’ll take that option, stick to Linux, and keep compiling from source when I have to.

, , , , , , , ,

No Comments

Removing Ubuntu annoyances

Here are a few Ubuntu 9.04 annoyances that I finally got around to addressing:

Constant “routine” disk checks on boot

Ubuntu 9.04 is lauded by critics for its improved boot times, and in most cases my machines running it boot to the login screen in less than 45 seconds.  This is a solid improvement and it’s supposed to be under 10 seconds by the release of 10.04.  The improved boot time in 9.04 is great: when I turn my computer on, I want to use it, not wait for an hour while the hard drive clicks and groans and the mouse cursor spins endlessly.  It’s all well and good except that about every tenth boot takes forever thanks to an annoying disk checking routine.  Are drive failures really that common that my drive has to be picked over by a fine-toothed comb every week?  If so, a new storage technology is desperately needed.  In the past 20 years or so, I’ve only had one memorable drive failure.

So, to fix the irritating disk checks on boot:

sudo tune2fs -c 0 /dev/s
da1

-c specifies the rate at which your disk is checked on boot and /dev/sda1 is your boot partition.

PC Speaker

Aside from the Caps Lock key, the PC speaker is an extremely annoying and useless “feature” of nearly every PC.  Depending on your configuration, quite a few things can cause the PC speaker to beep, such as hitting backspace in a console when you haven’t typed anything.  For some reason, when I shut down the computer using the Gnome shut down menu, I get several beeps from the PC speaker.  This appears to be a bug.  The best solution appears to be preventing the PC speaker module from loading at all.   Create a blacklist file in /etc/modprobe.d called blacklist-custom.conf:

sudo gedit /etc/modprobe.d/blacklist-custom.conf

Then, add the following line to blacklist-custom.conf, save the file, and exit:

blacklist pcspkr

This will cause the “pcspkr” module not to load on boot. You can unload the module without rebooting by running the following in a terminal window:

sudo modprobe -r pcspkr

Update Manager Pop-under

Update nags are one of the worst “features” of many current operating systems. On Windows XP, I am spammed by a torrent of nag balloons forcing me to install updates and restart when the installation is complete. In OS X, a similar update manager jumps out at me in the dock until I deal with it. Until 9.04, Ubuntu had it right. In previous versions of Ubuntu, a small notification balloon would appear once and go away when new updates were available to install. I could either click on it to install the updates, or ignore it if I was in the middle of something. Now, what happens is about ten minutes after turning on my computer, which is right about the time I really get to working on something, the whole system grinds to a halt with the hard drive going nuts. Then, the Update Manager window opens underneath all the windows I have running, blinking and nagging at me to install whatever it found.

To go back to the original notification window functionality, run the following in a terminal window:

gconftool -s --type bool /apps/update-notifier/auto_launch false

Force Shutdown

When I click the “Shut Down” button to turn off my computer, I want it to turn off.  No exceptions.  Instead, if Firefox takes its merry time to save its session or something is running in the background (mounted drive through nfs or samba that won’t unmount), I get a nice “x is not responding.  Logout anyway?” prompt.  I don’t care if something isn’t responding: kill everything and shut down.  To force shutdowns, edit your menu.lst:

sudo gedit /boot/grub/menu.lst

Scroll down and add “acpi=force noapic” to the kernel line of the default boot option:

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid f9d46e73-4aae-4203-ad97-93df87196054
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=... ro quiet splash acpi=force noapic
initrd /boot/initrd.img-2.6.28-11-generic
quiet

, , , ,

No Comments

Rising from the failure of bad business models

Newspapers are suffering from declining readership and decreased revenue from classified ads.  Media companies are furious about revenue loss due to the outbreak of free online services such as Hulu.  ISPs are complaining that they can’t make money with monthly fees for unlimited internet access.  All of these industries are stuck in the past and must now face the reality of today.

Newspapers

Since several newspapers have folded, executives in this industry are now hocking paywalls as the solution to their revenue problem.  The real question here is to ask why newspapers are failing.  The rise of free and instantaneous internet news has driven down the number of subscribers.  Furthermore, online marketplaces such as Craigslist, and to a lesser extent, social networking sites, have siphoned off classified ad revenue.  As I see it, the current system will only get worse.  As newspapers are driven farther into the red by those switching to the internet, more and more quality journalists will be laid off.  With neither solid writers nor the funding for interesting and comprehensive stories, the quality of newspapers will degrade at a quickening pace, fueling their demise.  Is there a solution to keep the local paper afloat?  I think so.  National and international news is readily available everywhere on the internet: Reuters, AP, MSNBC, and CNN all provide coverage in this area.  Newspapers should focus on something that only they can do best: local coverage.  The local coverage for The Virginian Pilot is terrible.  The staff has been drastically reduced and the paper thinned.  The sports section writes about the Redskins as if they were a home team, while plenty of local minor league, college, and high school games are ignored.  If newspapers were to drop national coverage entirely and focus solely on local news, business, and sports, they could bring themselves back into the game.  There are plenty of stories to tell about what is going in any local area and plenty of people willing to hear about them, but these stories are displaced by some far away event that is already well covered on the internet.  I admire the Virginia Gazette for following this approach.  I have no doubt that paid subscriptions would rise if newspapers focused on improving local coverage.

Good stories would be worth paying for.  However, as newspapers continue to crash and burn, the quality of their stories has suffered and the demand has gone down along with it.  Nobody wants to pay for a newspaper article that could have been written by a blogger on the internet.  Newspapers complain that their demise would lead to the end of investigative journalism and educating the public on current events.  They argue that no blogger has the resources to provide the quality and detail of coverage that newspaper journalists provide.  This may have been true in the past, but is no longer.  Again, reinforcement of local coverage would really help turn things around.

Online Media

This reality shock extends from newspapers to media corporations of all kinds.  Those in the TV and movie industries are upset at the rise of freely available internet media, ranging from cable and broadcast content on Hulu, to user content on YouTube, and to plain old bootlegging.  The CEO of Sony Pictures, Michael Lynton, complains that “nothing good has come from the internet,” and that “anyone can have whatever they want at any given time.”  Lynton goes on to argue that the internet should have rules as well as “guardrails” to keep people following these rules.  Whose rules should the people of the internet follow, you might ask?  Lynton’s rules.

As the old phrase goes, “I can’t change the direction of the wind, but I can adjust the sails.”  Lynton has it backwards: Sony should adapt to the reality of the current world, not the other way around.  He argues that his company is trying to make money, and thus, people should pay for the content his company produces.  Wrong.  For any rational individual, it should be: “I want quality content, therefore I am willing to pay for it.”  Nobody will pay someone for a piece of junk just because the seller wants to make money.  If someone produces something that is subpar, nobody is going to be willing to pay for it, and if they want it at all it will probably be bootlegged.  Like newspapers, TV, cable, and other media companies put profit first and quality products second.  If this were reversed, I imagine things would change.  TV shows should be kept in production based on reviews, not based on viewership, which is really an ad revenue metric.  Sequels to movies shouldn’t just be made because the previous installment was profitable.  I can think of no unplanned movie sequel that was as good or better than the original.  Furthermore, consumers should be given more options to purchase content.  For example, all previous episodes of any currently airing series should be available for purchase instead of just the last n, as is done with Hulu.  As with newspapers, an emphasis on quality and availability would more than likely support the media industry in the age of the internet.

Internet Connectivity

As bandwidth usage has increased due to increased consumption of online media sites, ISPs feel they’ve got to get their piece of the pie.  Recently, Time Warner experimented with tiered internet pricing.  This is a step backwards to the days of dial up where nearly everyone paid by the hour.  Fortunately, enough people complained that Time Warner reverted to the current unlimited monthly scheme.  While tiered pricing has been held off for now with respect to wired broadband, it’s a mess when it comes to wireless.  As it stands, a cell phone owner is charged separate fees for telephone usage, text messaging, and wireless data, and all three use pricing tiers.  Cellular telephone billing is the most convoluted of the three, with bizarre rules on who and when you can call with or without incurring some kind of penalty.  Text messages are by far the most profitable:  receiving 160 bytes costs around twenty cents — this works out to $1.5 million per gigabyte — that’s only for the size of a compressed HD movie!  With the advent of data plans, many cell users dream of circumventing weird telephone talk rules and expensive text messaging by purchasing an unlimited data plan.  A data plan could replace text messaging with instant messaging and telephone calls with Skype, but Apple is struggling to change the direction of the wind by restricting Skype use to areas of WiFi connectivity.

The role of the ISP is changing and providers are doing their best to prevent this change.  As landline telephones have been replaced by cell phones, landline internet will be marginalized with respect to mobile internet.  As the PC market has shifted from desktops to laptops over the past ten years, the next ten years will see a shift to small mobile devices.  The role of the internet will have increasing importance on cell phones, ultimately replacing cell telephone and text messaging.  ISPs do not want this, instead restricting the type of phones you can buy and the applications you run on them.  Google’s Android is a step in the right direction, and with more effort it won’t be long before an enthusiast can piece together a phone from custom hardware, install an embedded version of Linux, and connect to the internet from anywhere using software of his choice or creation.  Of course, no traditional-minded ISP would let anyone connect to their cell network with a custom-built phone, a custom OS, running custom software.  But the future will most likely be an internet of ad hoc wireless networks, making use of such custom mobile solutions.  Driven by the desire for constant connectivity and mobility, users will connect to their family, friends, and coworkers with one or two hops (and bypassing ISPs).  A significant portion of the internet could be accessed in this fashion, requesting data held by peers and forwarding it back to a user over multiple hops.  Using technologies with high bandwidth and long range, such as WiMax, a mobile ad hoc network would even be feasible in less populated areas.   Some of each user’s bandwith would be reserved for forwarding others’ requests and responses.  Data could be routed to peers with the least load (shameless plug for the paper I’m presenting at WASA 2009.)

The internet of the future will be mobile and more dynamic, but there is still a place for the ISP.  Unavoidably, there will be connectivity gaps and bottlenecks in an ad hoc wireless network, and a landline ISP will take care of this.  Also, most data will still be stored in fixed, physical locations with landline connections.  Internet users will still have to pay monthly fees to a service provider to handle gaps in coverage, but no longer will there be separate charges for landline phone, internet, TV, cell phone, text messaging, and data.  It will all be data, and it will be a big relief from the obtuse system that is in place today.

Conclusion

Those who are stuck in the system of the past are hindering the development of the future.  Today’s leaders must understand it is they that must adapt to the changing world.  The world cannot and will not shift to accomodate those who wish the world to adapt to them.  Viable business models for the internet exist and more are developing, even those with a “free” component.  Continuing adoption of a less than optimal strategy will only lead to a poor outcome for those that refuse to adapt.

, , , , , , , ,

No Comments

Video Playback Flicker in Ubuntu

I’ve noticed some people have stumbled here looking for how to solve Ubuntu video flickering issues. While I still haven’t figured out how to use both outputs of my dualhead ATI card without flicker, I do know how to fix video playback flickering.

I use VLC as my default media player. During an Ubuntu upgrade (I think it was 8.04 to 8.10), video playback in VLC started flickering.

In VLC, go to Tools->Preferences and click the Video button. Change output to X11 video output. This fixed the problem for me. There may be some way to change the output system-wide if you use other players, but I’ve had no reason to do this. Also, I don’t think I’ve had any issues with Internet Flash videos.

, , , , ,

No Comments

Ubuntu 9.04: Rough Upgrade

I recently upgraded from 8.10 to 9.04 on my desktop machine, and so far, it’s been a mess.  This was not the painless upgrade from 7.10 to 8.04 or from 8.04 to 8.10.  So far:

1. ATI/AMD is no longer providing drivers for my X1900XTX video card, so I’m using the free drivers.  The problem is that I can’t use two monitors without the mouse flickering like crazy and some strange window focusing problem where an unfocused window “jumps out” at me occasionally and then reverts to normal.  Disabling compiz and visual effects didn’t solve this.  Only when I disable the second monitor do the flickering and focusing issues go away.  I’m still messing with this one to try and find a solution, but there isn’t anyone else on the internet that’s complained about this.  I find it funny that people switch to Linux so they can run older hardware, but without driver support, that can’t happen.  The free drivers work well, but only if you’ve got one monitor.

2.  Something hosed my ability to play MP3s with Amarok. From this thread, I learned that running the following solved the problem:
sudo apt-get install phonon-backend-xine

3.  Flash stopped working in Firefox.  Any page with Flash would crash Firefox.  This can be solved by uninstalling and reinstalling Flash:
sudo aptitude remove flashplugin-nonfree flashplugin-installer
sudo apt-get install flashplugin-nonfree

4.  My Eclipse installation randomly crashes.  Also, the splash screen never goes away after starting up.  I’m in the process of reinstalling Eclipse to see if this does anything. Edit: reinstalling appears to have fixed the crashing and splash screen issues.

This hasn’t been an enjoyable experience so far — I was under the opinion that Linux is reaching maturity, especially Ubuntu, but this is definitely not the case.  The problems I’m experiencing seem to be a step backward from the last upgrade cycle.  As I just mentioned, the ability to run fast on older hardware is a huge enticement to switch to Linux, and if my three year old desktop can’t handle it, there’s a lot more work to be done.  I’m certainly not going to buy a new video card that’s worth much more than the rest of the computer.

, , , , , , , ,

No Comments

Linux and SSH Filesystem permissions

I find the SSH Filesystem to be a huge help when working with several computers at the same time.  I access my department’s storage as well as my network hard drive from anywhere.  Until today, sometimes I was unable to overwrite or delete files mounted by sshfs.  I realized that this was because by default, an sshfs mounted filesystem retains the userid and groupid of the remote owner.  So, if I have userid and groupid 1000 on my local filesystem but userid 1024 and groupid 2048 on the remote filesystem, I may have trouble writing stuff on the remote filesystem.  Linux sees that the userid and groupid are not my own, so I’m in trouble if the file I want to write to doesn’t allow others to write.

Looking here and here I found that you can mount a remote filesystem as a particular local user and/or group.  I modified my /etc/fstab accordingly so that all users of the “fuse” group can correctly mount my remote filesystem:

sshfs#username@remotehost:/remotedir /path/to/mountpoint fuse user,noauto 0 0

You can also specify a user or group id by replacing user with uid=xxxx,gid=xxxx.

, , , , , ,

No Comments

Ubiquitous Computing: The Nag Factor and Bad Design Decisions

Yesterday, the guy from HP came back and delivered a monitor that seems to be in working order. Finally, after ordering the monitor in January I get replacement number three in March that doesn’t have any problems. But everything wasn’t in working order for long. This morning on the bike, my iPod ran out of batteries and shut down after about five minutes. I have a feeling its Nickel-Cadmium battery is about finished. It was a rough hour and it got me thinking.

As I see it, the ultimate goal in the computer science community is to provide systems that improve our lives without us even being aware of it. Stuff should just happen in the background that we don’t even know about to provide drastic improvements in general areas like productivity, entertainment, and communication. All the background noise should be filtered out by these hidden systems so that we only see things that are important to us. For now, it seems, nothing is being filtered out and we are subjected to an increasing amount of information, almost all of which we really don’t care about. For example, this morning I searched Google for “mp3 players” (as in the physical devices) and only got hits for software programs. Problems like this shouldn’t happen, and I shouldn’t have to type in some weird query to specifically exclude certain results from my search. Some serious work has to be done to limit the scope of what we see to only the things that matter, and do it in such a way that isn’t annoying. Basically, operating systems and software should just work and not require any hacks to get solutions we want.

The first issue that comes to mind is with today’s operating systems. Gigabytes of patches and updates are released each month and harass the living daylights out of the end users to install them. This is one of the best examples of the Nag Factor. An operating system should not endlessly nag the user about installing updates and allowing administrative privileges. Ideally, the user shouldn’t even be aware that he or she is using a computer at all. Updates should be automatic and occur in the background without the user even knowing. Nothing is more annoying than to be deep into writing a paper or watching a movie when up comes a nag balloon demanding that some updates be installed and the machine rebooted.

Windows is far and away the worst when it comes to the nag factor. I’m almost completely off Windows at this point, with the exception that I use a partition on my laptop for my USB TV tuner, which unfortunately doesn’t have Linux drivers. It seems every time I start up the machine, about five nag balloons pop up telling me what wireless network I’ve connected to. About once a week another torrent of nag balloons pop up telling me to install software updates. When I finally install the updates, Windows forcefully reboots my machine. Nothing, I mean absolutely nothing, should ever forcefully reboot your machine. It’s a complete disruption of anything resembling the mantra of ubiquitous computing. A professor I had for a software engineering class once told me that it takes about eight minutes for someone to become completely engaged in a task. When some moron at Microsoft thinks it’s a good time to make your machine reboot, that’s about five minutes of lost productivity due to the reboot, and another eight to get back to where you were. Even Bill Gates complains about the forced reboots in Windows. Since I’ve never used Vista, I’ve heard another annoying “feature” is the User Account Control system, which ceaselessly has you type in your administrative password for stuff as simple as connecting to a wireless network.

Next up is OS X. Two years ago, I started the shift away from Windows with a Macbook. My Windows desktop began rusting from disuse almost immediately. Unfortunately, OS X suffers from the update nag almost as badly as Windows. Nearly every update is hundreds of megabytes and requires a reboot. iTunes updates even require reboots — what were they thinking? And when you install the stuff, it takes forever. Sometimes on an OS X update, my machine has rebooted two or three times over about ten minutes before the login screen comes up again. The updates first make their way to you through the extremely aggravating dock icon jumping out at you. While the dock is a good feature, the jumping icons are not. I can’t describe how irritating it is to be doing something and have a dock icon start leaping out into the center of my vision, ceaselessly pushing my buttons until I deal with it. There is probably a way to disable the icon jumping, but I’ve moved on from OS X, so it doesn’t matter at this point. UAC is also present in OS X but the designers did a decent job of only prompting you when changing administrative settings or installing software.

For the past year, I’ve almost exclusively used Ubuntu Linux for all of my computing. Finally, a group of developers has the right idea. It works almost seamlessly. An operating system should do its best to get out of the way and let the user do what he or she wants. Ubuntu is really close to doing this. The package manager is excellent — you can install anything under the sun (for free) and it updates automatically. You can’t even do this with the Mac by default, unless you install something like DarwinPorts, and even that is a real hassle to set up. The downside is that since every program you install is controlled by the package manager, there are frequent updates that require your authorization to install. Nearly every day something has a patch, but the package manager does its best to be minimally invasive. Nag balloons are infrequent, and a small icon appears in the task bar indicating that an update is available. Reboots are almost never required except for things that affect the kernel and nothing is ever forced on you. For now, I’m extremely satisfied with my Linux experience and will probably not switch back to Windows or Mac unless some serious revamping occurs.

The nag factor isn’t present in operating systems alone. The devices that are beginning to make ubiquitous computing a reality are providing irritations of their own. Whenever I miss a call, get a voicemail, or receive a text message, my cell phone beeps and hums to no end until I touch the screen acknowledging its nags. I’ve had two phones, and they both did this. Neither has the option to turn it off. I can check manually to see if anything came in while I was away from my phone and would prefer to do so instead of being constantly annoyed. I’ve also noticed that late model cars now beep at you if you start the engine and have your seatbelt off. Apparently, this is mandated by the federal government, but it’s just another irritating nag. Some cars will nag at you after the mileage counter gets beyond a certain amount since your last service.

It isn’t just the nagging that’s a problem, though. Some poor design decisions really limit the usability of computing systems and ubiquitous computing devices. The worst of this is proprietary software and hardware, with Apple really standing out as the worst culprit. The iPod that’s starting to die on me has a proprietary USB jack to plug it into my computer. What makes me mad is that it didn’t come with a wall plug to charge it — I’ve got to use the proprietary adapter to charge it via USB or for over $40 for a wall adapter. Since I don’t need to sync my iPod every day and would like to be able to travel with it without bringing my computer, a wall plug would be great. Thanks to the wall plug adapter scam, I don’t think I’ll be getting another iPod if I can help it. Apple’s computers also make use of proprietary headphone jacks and video outputs such as mini-DVI and mini-DisplayPort. I had to fork over $20 to get a mini-DVI to DVI adapter so I could use an external monitor with my Macbook. Universal hardware standards would make ubiquitous computing much more of a reality, with devices seamlessly integrating with each other and providing minimal headaches to the end user.

With respect to proprietary software, the iPod/iTunes combination also takes the cake. When I first got my iPod, I was using Windows, and installed iTunes on Windows to keep my music and iPod in order. After I got my Mac, I tried plugging the iPod into the Mac and using the Mac to keep everything synced. Did this work? Of course not. iTunes on the Mac whined that my iPod was formatted for Windows and that it couldn’t write anything to it unless it was reformatted. I don’t see why the geniuses at Apple could have written some drivers so that the iPod’s file system could be accessed from any operating system. It all seems to be about control. Downloading songs from iTunes only allows you to have those songs installed on three machines simultaneously and you can only load them onto an iPod in a proprietary format.

Cell phones are another example of this walled garden approach. You not only pay for the access to a cell network, but you have to get a proprietary operating system running on a proprietary phone to go along with it. You can’t just build your own cell phone out of spare parts, install your own operating system, and expect to connect to Verizon’s network even if you’ve paid for it. Google’s Android seems to be a step forward to breaking down this situation by permitting custom applications, but there’s a long way to go. Without all this proprietary junk to get in the way, you could see some seriously interesting applications, such as P2P file sharing on cell networks, refinement of video and text messaging, and the eventual integration of portable gaming, media, and communication into one device (the iPhone still sucks). For now, I’ve got to carry around my laptop for web browsing and programming, my cell phone for telephone calls, my iPod for music, and my PSP for gaming. Oh, and maybe a watch to tell time.

Finally, coming back to my dying iPod, battery technology needs significant improvements in order to further the goals of ubiquitous computing. Reducing I/O and computational complexity on the software side can only help but so much. The typical Ni-Cd battery, regardless of the device, lasts about two to three years and only runs for a few hours under full load. This is crap. Until batteries last for a week under full load and hold a full charge for nearly ten years, we’re just going to be throwing away perfectly good equipment. My iPod, which is perfectly fine with the exception of the battery, could last an indefinite amount of time. It seems really wasteful to toss cell phones and other mobile devices every few years just because a battery died. Reduced reliance on proprietary hardware and software could help this problem as well, for parts could be easily interchanged or upgraded if new features become available.

If the tech industry would focus on reducing the nag factor and increasing the openness of design standards, the shift to ubiquitous computing could be faster and more seamless. Until then, we’ve got to deal with the endless OS nag balloons, proprietary devices, and terrible battery life.

, , , , , , , , , , , , , , , , , , , , ,

No Comments

When motelist doesn’t see your motes…

Since I’ve upgraded to TinyOS 2.1, motelist always reports “no devices found” for my Iris motes when they are plugged in to the interface board.  A search of the TinyOS mailing list showed that the motelist script may not be including the correct Product ID when looking for motes.  I was able to get the script to recognize the interface board by altering /usr/bin/motelist to include the product id “6010″ instead of the default “6001″:

grep { ($_->{UsbVendor}||"") eq "0403" && ($_->{UsbProduct}||"") eq "6010" }

The manufacturer, product ID and other information about USB devices can be found in /sys/bus/usb/devices and running dmesg can tell you the path of the stuff you just plugged in. For now, the script only prints out the path of the interface board but not the attached Iris mote. The path of the interface board is needed for installing TinyOS programs, but the path of the mote is needed to listen for data packets from the mote. So far, I haven’t found a way to get motelist to recognize the mote, but if I find it, I’ll post it.

, , , , , , ,

No Comments