Karmic Koala and sound on the HP DV6105us

I attended the Karmic Koala release party at the kwartzlab and had the opportunity to upgrade my laptop from the local repository.

Everything went well except for the sound on the laptop. Thankfully the alphas, betas and RC periods are for people to find these issues and provide workarounds :D.

My card is identified by lspci as

00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)

The problems were:
- Sound didn't work
- Sound made a crackling sound.

Both were very easy to fix once I found the answers:

To make the sound work
It seems that something from the previous version was causing trouble.

http://ubuntuforums.org/showpost.php?p=7811407&postcount=10

The solution is to delete ~/.pulse and restart pulseaudio
rm -r ~/.pulse
killall pulseaudio

To stop the crackling (clicking) sound
http://swiss.ubuntuforums.org/showpost.php?p=8099760&postcount=12

Those clicks are caused by the power saving option introduced in karmic. The solution is to comment the powersaving line in /etc/modprobe.d/alsa-base.conf

The line I commented out is
options snd-hda-intel power_save=10 power_save_controller=N

Showing your OpenOffice Impress presentations online

I've been using Impress for some time to create presentations but I used to upload them as odp files when I wanted to share them with the world (in case the world came to see them).

That is, until I "discovered" that exporting them to flash was a piece of cake.

  1. Open your presentation in Impress
  2. From the main menu select "File | Export"
  3. On the Export window select "Macromedia Flash (SWF)"

After that all that's left is

Upload the presentation to a website or file sharing site and reference it from a web page using the following HTML code:

<EMBED SRC="<uri for the flash file>" TYPE="application/x-shockwave-flash" NAME="Object1" ALIGN="LEFT" WIDTH="400" HEIGHT="378" ></EMBED>

For example:

<EMBED SRC="../MyPresentation.swf" TYPE="application/x-shockwave-flash" NAME="Object1" ALIGN="LEFT" WIDTH="400" HEIGHT="378" ></EMBED>

Software Freedom Day

Yesterday I was fortunate to participate in the Software Freedom Day organized by the working centre in Kitchener.

There I had the opportunity to give three presentations.

I'm posting them here in case anyone is interested in looking at them, modifying or using them at other events.

What are we celebrating
In this presentation I walked through some of the current rights and freedoms regarding digital content. The ones we currently have and give for granted as well as some of the existing artificial barriers to enjoy those rights.

Don't be afraid of the command line
The main purpose of this presentation is to make users feel more comfortable reading and understanding commands provided by other people as well as using the command line more effectivelly.

Linux for Windows users
This presentation shows some of the core differences between Windows and Linux which, when not well understood, become "annoyances" and entry barriers for adoption.

This presentation is not meant to bash Windows in any way or to glorify Linux, but an (hopefully) objective and practical comparison.

File Attachments

Attachment Size
Linux4WindowsUsers.odp 106.27 KB
LinuxCommandLine.odp 100.75 KB
WhatAreWeCelebrating.odp 92.48 KB

Submission to copyright consultation

The deadline to make a submission to the Canadian Copyright consultations is September 13.
Richard pointed out a guide with astroturfing instructions: http://faircopy.ca/participate/.

This is the main consultation site: http://copyright.econsultation.ca/

This is my uninformed, blathering submission. It is less well-informed than an article published in the Waterloo Record. If I can make a submission, so can you!

Note that I believe that making a submission is worthwhile even if there is a federal election and the bill dies. The last round of backlash probably contributed to this consultation.

First of all, thank you for holding public consultations on copyright
reform. One of the more frustrating aspects of the previous copyright
bill was that it was drafted with no input from the general public,
despite copyright supposedly being an instrument for the common public
good.

I care about many aspects of copyright and its reform. As a systems
administrator I use open source software every day, and I have a
strong interest in keeping the open source movement healthy. In
addition I have been involved with teaching university courses, which
is one area that is impacted heavily by the copyright debate. Finally,
I am a citizen and a member of my culture, and I have deep concerns
that bad copyright rules are robbing us of our cultural history and
threatening our cultural future.

Fair and consistent copyright
-----------------------------

First of all, I would like to state that I believe in the principle of
taking only that which is freely given. If a copyright holder --
whether a software company, an individual, or a media company --
asserts that their material should not be copied without compensation,
then they should be free to do so. Furthermore I have few problems if
the law imposes penalties on people who steal that work, PROVIDED
that:
- The laws are clear
- The laws are enforced consistently
- The penalties are proportionate to the infringement
- The laws are governed by the same rules that every other law is,
including the presumption of innocence

As far as I can tell, few of these conditions hold either here or in
the United States. I am particularly upset with the way that media
and software companies assert that piracy is wrong on the one hand,
and take a "nudge, nudge, wink, wink" approach to illegal copying on
the other.

Microsoft's approach to Windows is educational here. On the one hand
Microsoft decries piracy and puts into place all kinds of noxious
licencing to prevent it. And yet, people still download and use
Windows illegally. If Microsoft really wanted to prevent this piracy,
they could -- but they don't, because if the only people who used
Windows were those who had legal licences to do so, Microsoft's share
of the operating system market (and its corresponding share of our
attention) would fall considerably. Furthermore, whenever Microsoft
does make noises to assert its copyright, the public outcry over its
draconian actions causes it to retreat. At the end of the day, illegal
sharing of Windows unfairly subsidizes Microsoft. That is not to pick
on Microsoft too much. The same policy holds for all software creators
who require licence keys and registration for their software.

The same situation holds for media and music companies. When they
enforce their copyright they are (rightly or wrongly) seen as
harsh and uncaring. But they have a vested interest in making sure
that people like me pay attention to their music and movies. If I turn
my attention to material released under Creative Commons licences
instead, they lose my attention and my business. So it is in their
interest to make sure that some piracy occurs, if only so those who
never would have paid money for their product continue to keep that
product in their awareness.

Making matters worse is that the penalties around copyright are so
ambiguous. The previous copyright bill specified some penalties, but
those penalties were both disporportionate to the cost of the
infringement and certain to be enforced inconsistently.

This does not even get into grey areas like the CD levy that
simultaneously attempted to compensate copyright holders while keeping
filesharing illegal. Although (from what I understand) a court later
made these rules consistent, the original intention of this levy tried
to have it both ways, profiting from filesharing while keeping it
illegal. This is the kind of mixed-up motivation that confuses
everybody. Although many CD-Rs do not hold shared music, I can agree
to a levy that allows filesharing. I can also get behind removing the
levy and keeping filesharing illegal. I cannot support proposals that
try to have it both ways.

I disagree strongly with the presumption of guilt that pervades the
copyright debate. The CD levy is one such assertion of guilt -- we pay
the levy whether we use those CDs to share files or not. Takedown
notices are another such presumption of guilt -- one that provides an
easy mechanism against the freedom of speech. But perhaps the
presumption of guilt I object to most is the criminalization of
reverse engineering.

Remix culture
-------------

As should be apparent from the previous section, my approach to
copyright is not the same as that of "remix culture". Having said
that, I see where this culture is coming from and I sympathise with
their views.

There is an inherent unfairness in the way copyrighted materials
(especially those from larger companies) are used. On the one hand, we
are bombarded with copyrighted corporate culture in the form of
advertisements, radio singles, video games and blockbuster movies. The
media companies want us to consume this culture and keep it forefront
in our minds. They want us to feel nostalgia about their products, and
sure enough we have incorporated their symbols and products into our
culture. But even as they bombard us with advertisements and
promotions (without compensating us for using up our attention spans)
they prevent us from using their products -- the symbols of our
culture -- in our communications and our art. We are allowed to rent
the Transformers movie as many times as we pay for it, but if we build
upon that culture by using a Transformers product in a music video or
remix, then we are in trouble.

Again, I think copyright holders cannot have it both ways. If they
meet their goals of turning their products into our culture, then
it seems unfair when we use that culture in our discourse and when we
build upon it. Having said that, I do not know of an effective,
consistent way to address this issue with copyright legislation. My
long term hope is that we turn to media and culture that is free of
such restrictions on our free expression, but that hope is faint.

A similar situation exists for the use of copyrighted materials in
education. Again, I believe that copyright holders cannot have it both
ways. By using copyrighted materials in the classroom our teachers are
treating that material as cultural material that should be stuffed
into the brains of impressionable students. To have that culture
snatched away from copyright holders is unfair.

As a former sessional lecturer, I can make one strong assertion in
this area: the compromise that the former Bill C-61 made in this area
is hideous. The idea of destroying all course materials after a course
has completed is ridiculous: instructors build upon and modify
previously-delivered content all the time, so asking those instructors
to destroy all their past work is counterproductive to the way that
they develop courses. It also serves as a great disservice to
students.

Digital locks
-------------

Bill C-61 would have made it effectively illegal to distribute
software that broke so-called "digital locks", which in effect were
any attempt by copyright holders to obfuscate their content. The Linux
world has had to deal with this nonsense in the realm of DVD playback
for years. The "digital lock" for DVDs is easy to decode, but
releasing this code scares Linux distributors so much that they refuse
to include this software in their distributions. That means that a
simple task like playing a DVD on Linux becomes stupidly difficult.

There are a lot of aspects of this situation that bother me. Primary
among them is the idea that developing alternative playback systems
for DVDs (or music files, or e-books, or encrypted shares, or anything
else) should be illegal. It is difficult to express how deeply this
idea is against the public interest. It effectively gives the media
distributors exclusive monopolies over the way their content is used,
which precludes competitors from innovating new technologies that use
that content. For example, Personal Video Recorder technology is
hugely popular with consumers, but I question whether they would have
been developed by cable networks independently of TiVo.

In a world where digital locks exist, it would be standard practice
for cable companies to put "digital locks" (however weak) on their
content, and an upstart company like TiVo would have a much more
difficult time competing in the market, because it would have to ask
permission of the media companies before implementing its product.

This principle applies to all kinds of goods and services, not just
TiVo. One of the hot trends in the Internet realm is "mashing up"
services from different providers in interesting ways. The digital
lock sections of Bill C-61 stifle such creativity.

I believe that rights to content should be independent of the way that
content is played back. If a person purchases or rents a DVD, that
person should be allowed to play that DVD on their Linux computer, on
their video iPod, as an audio-only stream on their MP3 player, or any
other way they wish. Not only would all of these forms of playback
have been illegal under the previous Bill C-61, but distributing the
tools to permit those alternative playback mechanisms would have been
illegal. In my mind, this is unambiguously wrong. There should be a
strong distinction between possessing and distributing tools that
could potentially be used to infringe copyright, and actually
committing those infringements. The tool should not be illegal. The
act should be.

The computer security world learned this lesson a long time ago. Tools
that can potentially be used to break into computers and computer
networks are not only freely available, but are actually developed and
maintained by computer security experts. Why? First of all, such tools
can be used by computer administrators to test the vulnerability of
their networks to attack. But just as importantly, such tools can be
used in ways that have nothing to do with crime, such as monitoring
internal network resources. Although the situation with copyright is
not exactly the same, I see some strong parallels -- technology that
allows independent playback is the same technology that allows
format-shifting, which is the same technology that allows people to
copy files for general use. Just because there is one bad use for this
technology does not mean it should be illegal.

This problem is going to crop up in many different technologies,
including those that don't exist whenever this bill is put into law.
Right now there is an issue of taking DRMed e-books and playing
them back on Braille terminals. Anybody who rents or purchases an
e-book should be able to access that content however they wish, but
in many cases this will become illegal with digital locks enforcement.

Another aspect of this topic concerns rental vs ownership. Some
companies attempt to say that because we rent or lease a work instead
of purchasing it outright, we have no rights to shift the format of
that work or play it back using our own players. This is wrong
reasoning, and the copyright bill should reflect this.

Finally, I would like to bring up another lesson the computer security
world has learned the hard way: obscurity is not security. One big
problem with the digital lock clauses of the previous bill was that
digital locks did not need to be strong to be supported by the full
weight of the law. DVD encryption is weak, but under the law it is
just as illegal to decrypt a DVD as it would be to break a file
encrypted with worthwhile technologies such as AES. This encourages
sloppy encryption, which is both bad and unneccessary. It is bad
because poor encryption promotes a false sense of security. It is
unnecessary because copyright itself should be sufficient assertion
under the law that material may or may not be copied, regardless of
the degree to which it is encrypted. Just as it equally illegal for me
to steal a bike from your porch whether or not that bike is locked,
protection under copyright should be independent of the encryption
applied. Because copyright holders disappear and official decryption
sources become unavailable (as was the case in Microsoft's
"PlaysForSure" technology), the concept of encrypting data to protect
it from copyright theft is an excellent mechanism to deprive us of our
cultural heritage.

Copyright length
----------------

Although I believe in the principle of strong copyright, I also
believe in the principle of a strong public domain. The length of
copyright terms have been extended again and again, which is not only
against the original principles of copyright but also destructive to
our cultural heritage.

The scuttlebutt is that media companies like Disney are behind endless
copyright extension, and the gallows-humour joke is that anything
produced after Mickey Mouse made his first appearance will never fall
into the public domain. This is tragic. I have no problem with Disney
maintaining control of its copyright on Mickey Mouse indefinitely. I
have huge problems with all of the other copyrighted material that is
being forgotten and lost forever because it cannot enter the public
domain.

For example, some time ago I started hunting down the works of a
author named Bernard Wolfe. As far as I know all of his titles are
out of print, and there is little chance that his estate will
republish them. And yet, his works are excellent and deserve to be
remembered. If copyright keeps getting extended, his work will never
enter the public domain and can therefore never be archived by
organizations such as Project Gutenberg.

I was able to access Wolfe's novels because they were archived in my
university library. However, there are many other popular culture and
ephemeral materials that university libraries do not purchase. That
popular culture value is of enormous value because it provides
insights into our culture that are not contained anywhere else.
Unfortunately, a lot of that culture could be lost unneccessarily.

The frustrating aspect of this is that it is trivial to fix. I expect
it is against WIPO protocol, but it is not hard to think of
copyright systems that work a lot better:

0. Upon creation, the expression of a work enters copyright. This
copyright could last ten years.

1. Copyright could be renewed indefinitely. The copyright owner would
have to produce a copy of the work, an intent to register, a means of
contact, and potentially a small fee. This copyright could be renewed
as early as a year before the ten year period is up.

2. Copyright can be assigned in wills and by contract.

3. If copyright is not renewed by the copyright owner ten years after
the last renewal, it enters the public domain.

Such a scheme would protect the interests of companies like Disney --
so long as a lawyer remembers to renew the copyright every nine years,
Mickey Mouse will remain Disney property forever. Meanwhile, those who
don't care about their copyrighted material any more (because they
died, because their work has no commerical potential, or because they
have forgotten about the work) will let the copyright lapse. They will
still be able to use their works, but they will not be able to do so
indefinitely.

Before database technology and the Internet, such a scheme may have
been difficult to administer. These days it would be relatively cheap
an easy -- no harder than renewing a domain name. Anybody who would
like to licence the work can do so by looking in the copyright
database for contact information. Because first rights to the
copyright always lie with the copyright holder and there is a safety
margin when renewing, we can avoid sniping. People and organizations
could let their copyright lapse quickly, or preserve their copyright
to hand down through the generations. We would have to keep the cost
of copyright renewal cheap, but we could legislate that.

I am sure there are flaws with this approach, but they are not
obvious ones. Certainly I see such a system being much more effective
at balancing the desires of copyright holders with the public good
much more effectively than the current system.

I have seen similar approaches proposed many times. Although
considerably different than the current system, I would strongly
encourage the Canadian government to put such a scheme into law and
fight for it on the international stage.

Conclusion
----------

Thank you for taking the time to consider this submission. There is a
lot more that can be said about copyright, but this submission is long
enough. My intention was to articulate my position and to highlight a
few areas that I feel have gone neglected in this discussion. I hope I
managed to achieve this goal.

Streetposts

After much research and investigation, I have started in earnest on my streetposts project. I think I'm going to use net beans. I started to make a database today in OpenOfficeBase. I setup the structure of all of the tables according to google's specification, and set the primary keys. I made all of the tables using the names supplied by the google transit api.

After, I was going field by field and setting up the sizes of the fields and entering descriptions (What is the maximum length for a description?), as well as input masks. when I had it all the way I wanted it for the first table. I clicked on the save table button, and the majority portion of my recent work was destroyed, or maybe all of it. So I entered it again, and the same thing happened when I hit save. This is really frustrating.

What is up with OoBase? :-( !

Living Well with Open Source handout

Living Well Using Open Source

Are you sick of cleaning viruses and spyware off your computer? Are you tired of nagware, time-limited trials, and sketchy download sites with lots of pop-up ads?

Would you like to use software in a way that suits your needs and avoids treating you like a criminal?

Does the cost of computing deter you from developing new skills and exploring new interests on the computer?

If so, you should know about open source software. It gives you access to a wide variety of applications that are cheap but work well. Here are a few examples.

  • Firefox lets you surf the web. (You may be using it already.)
  • OpenOffice.org is an office suite. PDFCreator lets you create PDF files from any application.
  • The GIMP lets you edit photos, and Inkscape can be used to create beautiful logos and graphics. Scribus lets you create brochures and newsletters, and can even typeset books.
  • Audacity is a sound editor. Tuxguitar lets you compose music.

This handout explains what open source software is, the pros and cons of using it, how to get started, and where to get more information.

What is Open Source Software?

Open source software are computer programs licenced so that you can legally use them and share them with others. In addition, you are allowed to study how the programs work and change them to better suit your needs.

Computer programs that are not open source are known as proprietary software.

Open source is also known as liberated software, software libre, free software, or by the acronyms OSS, FOSS or FLOSS. The terms "liberated" or "free" refer to the philosophy of "software freedom". By allowing people to use, improve and redistribute software freely, this philosophy aims to treat computer users less like consumers and more like participants. This is one reason open source software is available so cheaply.

Open Source Options

Software includes both applications (such as web browsers and word processors) and operating systems (such as Windows, Mac OS or Linux) that run on your computer. You might choose to install open source applications, open source operating systems, or both.

One option is to install open source software on a computer that already runs Windows. This is a good option if you already use a legal copy of Windows. Many good open source applications for Windows are collected in the OpenEducationDisc we are distributing today.

Another option is to install an open source operating system instead of Windows. One popular open source operating system is Linux (also known as GNU/Linux). Linux is often packaged together with applications into distributions. There are many different distributions available, but one of the most popular for desktop computers is called Ubuntu. Today we have the 8.04 release of Ubuntu available, also known as Hardy Heron.

Installing Linux can be a good option if you have a spare computer that needs software, if your current computer does not have a legal version of Windows on it, or if you are adventurous and will not aggravate the other people who also use your computer.

There is also lots of open source software available for Mac OS X and other operating systems. We are not distributing such software today, but feel free to contact us for resources.

Open Source Advantages

There are many reasons to consider using open source software. Here are some of them:

You can use open source software legally and at low cost. This is especially important because illegal software (especially illegal copies of Windows) do not qualify for security updates, leaving your computer more vulnerable to viruses, worms and other computer nasties.

Good quality open source projects take software security seriously. Ubuntu releases security updates for its software automatically and for free. Open source software -- in particular open source operating systems -- tends to be much less vulnerable to viruses and spyware than Windows. (Open source software does not eliminate security issues, however.)

Lots of open source software exists, including good-quality alternatives to many popular applications. Software for niche interests varies in quality but is often available. Depending on your interest there may already be a community of people who use and develop open source software for that need.

You can try different software packages cheaply, and uninstall them if you don't like them. Linux distributions like Ubuntu collect a wide variety of software into repositories, which makes discovering, installing and upgrading new software especially easy. (Interestingly, this is only possible because open source software can be repackaged and redistributed freely.)

With open source software, you usually get full versions of products -- not trial versions, ad-laden nagware urging you to upgrade to a paid product, or "home" versions with reduced functionality.

Open source software exists in a culture of sharing and collaboration. Users help each other with technical support. Open source software is freely given; you can use it without feeling slimy or dishonest. You can also copy installation discs and give them to others legally.

If you are interested in jobs in the computer industry, open source is invaluable because it gives you access to the same software tools that are used to power mail servers, webservers, supercomputers, and smart phones. Developing proficiency in these technologies can make you more employable without costing you a lot of money.

There are many opportunities to contribute to open source software, and you are encouraged to do so. You might support other users, write documentation, file bug reports, or contribute a plugin to make the software you use better. Contributing something back can do a lot to boost your self-esteem. Many projects also accept financial contributions.

Open Source Annoyances

Every decision has benefits and costs, and the decision to try open source software is no different. Here are some of the most common frustrations people encounter when using open source software, along with some ways people get around these issues.

Conversion between open source data files and their proprietary counterparts is not always perfect. For example, a resume created in OpenOffice.org might look different when opened in Microsoft Word. One option is to distribute documents in PDF format, which is easy to generate and looks the same everywhere.

You may find that open source software looks and behaves differently than proprietary alternatives you are used to. Sometimes features are missing or incomplete in the software, or you have to use the software in a different way to achieve the same result.

Getting help for open source software can be difficult. If your local computer shop (or the wizardly friend or relative you turn to with your questions) does not use or support open source software, you will need to look elsewhere for help.

  • Some online forums (such as the Linux Questions or Ubuntu Help forums) can offer good support. Mailing lists and forums devoted to specific applications also exist.

  • You can participate in a local user group like KWLUG, where people meet and discuss open source issues. The folks at Computer Recycling can also answer some of your questions.

None of these groups will do all your computer maintenance for you, but they can help you with specific questions and direct you to places where you can get additional help.

It can take additional work to get movies and music files to play under Linux (this tends to be easier in Windows). In some countries, open source software to play DVDs and MP3s is restricted or legally unclear, so Ubuntu and other distributions do not release such software officially.

Not all hardware is supported well in open source operating systems. For example, Linux support for printers, wireless cards and video cards can be spotty. It is best to check that your hardware is supported in Linux before attempting to install it. Sometimes you can cheaply replace components that do not work under Linux with others that do.

Open source exists in a "do it yourself" culture. If features don't exist in software that you are using, the program developers will often give you the options of waiting patiently, paying somebody to develop the features you want, or developing those features yourself. This attitude can be frustrating, especially to those of us who are less technologically-savvy. Sometimes a different open source project supports the feature you need. Sometimes there are ways to work around the limitation until the feature you need is implemented.

Like other software, many open source projects assume you have internet access when installing and using their products. It is certainly possible to install and use most of this software without internet access, but it can be tricky. This is especially true for Linux distributions, which break up applications into packages that depend on each other.

Because it is so easy and cheap to release open source software, the software quality varies dramatically. The health and quality of open source software depends on its support. Applications that are well-supported (by a strong community user base, a foundation or a corporation) tends to work better and be more featureful than software written by lone individuals in their spare time.

Resources

  • Computer Recycling will be holding

    Introduction to Linux workshops later this year. If you are interested, you can sign up at the booth or contact Charles.

  • As the name suggests, the Kitchener-Waterloo Linux Users Group (KWLUG) consists of people interested in Linux in particular and open source in general. The group runs monthly presentation meetings at the Working Centre, and hosts a lively e-mail discussion list. The group is free to join, and people of all skill and interest levels are welcome to participate in KWLUG activities. See for more information.

  • The Kitchener-Waterloo Internet Users Group (KWIUG) is a general-purpose education group that deals with a wide variety of topics relating to computers. They hold occasional meetings and also have a mailing list. See http://www.kwiug.org for more information.

  • The OpenDisc and OpenEducationDisc projects collect high-quality open source software for Windows. http://www.theopendisc.com

  • Ubuntu is a popular Linux distribution for desktop computers. See http://www.ubuntu.com for more information.

  • The Linux Questions forum at http://www.linuxquestions.org is a web forum which helps Linux users troubleshoot computer issues. It contains a lot of good information in its archives, and the members tend to be friendlier than on many other internet sites.

  • The Open Source Alternatives website http://www.osalt.com lists open source alternatives to common proprietary software products.

About This Document

This document was prepared for a day of workshops called "Living With Less Money" held on May 2, 2009.

The event was organized by The Working Centre in Kitchener, Ontario, Canada. Much of the content reflects the setup of the day (we distributed CDs of software) and local resources (such as KWLUG and KWIUG). However, this version of the document is "forked" from the original, and thus are mine and not the official views of the Working Centre.

This document is licenced such that you can customize and redistribute it for your own use. In doing so you will want to reflect the local resources in your own community.

This document's "source code" consists of a textfile formatted using Markdown syntax. http://daringfireball.net/projects/markdown/

Thanks to members of the kwlug-disc mailing list for their constructive criticism and suggestions for improvement. KWLUG members Khalid Baheyeldin, Darcy Casselman, Robert P.J. Day, Chris Frey, Adam Glauser, Oksana Goertzen, Bob Jonkman, John Kerr, Andrew Kohlsmith, Jason Locklin, Charles McColm, Lori Paniak, Kyle Spaans, Raul Suarez, Bill Switzer, John van Ostrand, Richard Weait all contributed to the discussion.

Thanks to Working Centre members Michael Bernhard, Paul Harvey, Sergiane Nascimento and Rodrigo Salinas for their edits and contributions.

License

Creative Commons License
Living Well with Open Source by Paul Nijjar is licensed under a Creative Commons Attribution 3.0 Unported License.

File Attachments

Attachment Size
opensource.txt 12.98 KB
opensource.html 14 KB

Improving XOrg pefromance for Intel video under Ubuntu 9.04 (Jaunty Jackalope)

When I upgraded from Linux Mint version 6 "Felicia" which is based on Ubuntu 8.10 to version 7 "Gloria" based on Ubuntu 9.04 my video performance started suffering badly. Worst of all, I couldn't watch videos using any of the applications installed vlc, miro, gmplayer, mythTV, Totem.

To see the kind of errors I was getting refer to my bug report

What worked for me was reverting the Jaunty Xorg intel driver to 2.4 as explained in this link

https://wiki.ubuntu.com/ReinhardTartler/X/RevertingIntelDriverTo2.4

Then I edited

xorg.conf adding the following to the "Device" section

Option "MigrationHeuristic" "greedy"
Option "AccelMethod" "xaa"

I don't know if changing gstreamer-properties Default output to "X Windows System (No Xv)" had any effect but it is working so I also left it.

Just in case you are wondering. Here is the result of "lspci -nn | grep VGA"
00:02.0 VGA compatible controller [0300]: Intel Corporation 82865G Integrated Graphics Controller [8086:2572] (rev 02)

So this solved it for me. I am no longer getting the error in Xorg.0.log and my video performance is better than before. MythTV, vlc and gmplayer work at full screen using a fraction of the CPU. Still some choppy video with Miro, and Totem is not displaying video but I am not getting the error.

If I have some time I will try moving up to 2.8 as explained here:
https://wiki.ubuntu.com/X/Troubleshooting/IntelPerformance

Undeleting FAT Files

I already had a post on undeleting files from an NTFS partition. But what if the partition is a FAT partition? Don't worry there are several solutions that will only require you to use a handful of commands.

IMPORTANT: Do not write anything or use the partition where the delete file is. That will increase your chances of getting your files back

I've used a couple of solutions. Both successfully but geared to two different situations:

The fist method is is PhotoRec

http://www.cgsecurity.org/wiki/PhotoRec

That one is kind of a brute force as it just looks for files ignoring the file directory or directory structure but it is dead easy to use. It's done wonders when undeleting files from USB memories and camera memories which were accidentally deleted by pressing the wrong button in the Camera.

The second method is using the fsck.vfat command

The second method is great for undeleting individual files keeping the original name

fsck.vfat -vru

e.g. to delete a file called "importantFile.txt" that was on my home folder which is on /dev/sda1

fsck.vfat -vru /home/rarsa/importantFile.txt /dev/sda1

I got this one from the following archive but I will repeat here in case that page is ever gone
http://lists.slug.org.au/archives/slug/2006/05/msg00002.html

Important!!!
You may want to play it safe. If you have another partition with enough space to create a partition image where to "play" and recover the files without touching the original you can do the following:

dd if=<originalPartition> of=/<somepath>/carddump bs=1024

First figure out the name of the partition where your deleted data is. You can do it in several ways, for example:
sudo fdisk -l
and then from the drive size you can "guess" which one is the partition

Or if the partition is currently mounted and you know the mount point name
df -h
Then match the mount point with the partition name.

e.g. To create on your home folder a partition image file named "carddump" of a camera memory which is identified as /dev/sdc1

dd if=/dev/sdc1 of=~/carddump bs=1024

After that, you can use that "carddump" file as if it was another drive, you can mount it, read it, recover files there:

fsck.vfat -vru /mycamdir/mydeletedfile.jpg ~/carddump

You will need to do this for each file. Of course, if you are handy enough you can create a script that automates this if you have multiple files to undelete

If you can't remember the names of the files, you can get a rough idea from looking at a hexdump of the fat table;

fsck.vfat -rv ~/carddump

gives me this:
First FAT starts at byte 512 (sector 1)
2 FATs, 16 bit entries
16384 bytes per FAT (= 32 sectors)

As the FAT directory is at the start you can browse it with:

hexdump -C ~/carddump | less

(note: filenames are missing the first letter and there is no "." between the
name and extension, you can assign any first letter to the filename)

Once you've finished undeleting;

mkdir ~/card
mount /home/rarsa/carddump ~/card -t vfat -o loop

Now you can navigate the "card" folder using your favourite file manager and copy the files somewhere else.

After you are done you can either delete the memory image or back it up in case you forgot to undelete something :D

ntfsundelete - Undeleting NTFS files

And Linux saves the day again.

My son installed an application but mistakenly he selected the data directory as the installation directory. When he realized it he decided to uninstall, but the full uninstall deleted everything from the folder. This is: the program and all his files.

The solution was very easy. I found that I had already installed the ntfsprogrs package. This package contains a pretty slick utility called ntfsundelete.

This utility allowed me to first list the files that I could recover and then recover them.

It has some very useful filters such as:

  • File name pattern matching: For example to search/undelete files *.mp3
  • Files modified since: Maybe you don't care about old deleted files just files modified since 5 months ago
  • Percentage recoverable: In some cases you want to salvage whatever you can, in some cases you only care if you can recover 90% or more, for example.
  • Files within a specific size range

In my case it was a breeze to use it.
I first unmounted the partition where the deleted files were

sudo umount /dev/sda2

I then executed the following to list which deleted mp3 files located in my /dev/sda2 device that were modified in the last 5 months were 100% recoverable:

sudo ntfsundelete /dev/sda2 -m '*.mp3' -p 100 -t 5m > deletedmp3.txt

That created a file called deletedmp3.txt with a list of files.

Once I reviewed the list I went on to undelete them and put the undeleted files on my external HDD on a folder called undeleted

sudo ntfsundelete /dev/sda2 -u -m '*.mp3' -p 100 -t 5m -d /media/externalExt3/undeleted

If you want to know how to fully use this utility just open a console and type
man ntfsundelete

Important things to consider

  • If you deleted using the file manager first check if your files are in the trash can, that's always the easiest way
  • As soon as you realize that you mistakenly deleted the files, don't write anything else to that partition. if possible unmount it right away
  • If you want to do it in a computer that does not have linux installed, you can always use a live CD distribution that includes the ntfsundelete utility

Setting up Linux on PS3 the way I like it

Here are thee instructions I followed to set up Linux on my PS3 the way I like.
These instructions are for my own benefit in case I need to do it again but they may help you setting up yours. Each section is independent (unless noted) So just go to the section that interests you

- Installing.
- Using Gnome instead of E17
- Configuring resolution on Sharp HDTV LC-32D62U
- Configuring additional software repositories
- Replacing Metacity with Openbox
- Installing Multimedia codecs
- Configuring VPN

Installing
I decided to go with Yellow Dog Linux (YDL)
Why?: It was the first distribution available and I got my PS3 right after it was released. It also seems to be the best supported.

To install just download it and follow the instructions from the official site:
http://us.fixstars.com/products/ydl/

Using Gnome instead of E17
Why?: E17 looks nice but it is still lacking specially when jumping from workspace to workspace. Besides I needed more configurability as you'll see in the next section.

In the log in screen click in the "Sessions" menu and select Gnome.
Enter your credentials and when asked select to change permanently

Configuring resolution on Sharp LC-32D62U
Why?: Two reasons. By default it is configured with overscanning and at 1080p on a 32" screen I can barely read the fonts when sitting in my sofa.

Solving the overscanning: I followed the instructions here http://www.yellowdog-board.com/viewtopic.php?t=3524
In my case, just edited /etc/yaboot.conf and edited the video parameter for 1080p fullscreen
video=ps3fb:mode:133 rhgb

Solving the small fonts: I tried setting the resolution to 720p to no avail so I decided to compromise finding a solution to my need in a different way. I changed the font size on the interface following this post http://www.linuxquestions.org/questions/linux-newbie-8/changing-font-si…

In my case, created a ~/.gtkrc-2.0 file with the following contents
style "user-font" {
font_name = "DejaVu Sans 20"
}
widget_class "*" style "user-font"
gtk-font-name="DejaVu Sans 20"

And a file ~/.mozilla/firefox/*.default/chrome/userChrome.css with the following contents
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
* {
font-size: 20pt !important
}

Install additional software repositories
Why?: To use the YDL repositories you have to subscribe (translation: pay). There are other repositories that provide even more software variety.

Follow the instructions for the YDL repositories and Fedora repository from http://news.softpedia.com/news/How-to-Enable-Video-Playback-in-Yellow-Dog-Linux-6-1-101664.shtml. Note: Do not do the steps for livna-stable or dribble!!

Follow the instructions for the bodega repositories from http://pleasantfiction.ipower.com/bodega/viewtopic.php?f=11&t=21

Replace Metacity with Openbox
Why? Sony allocated limited resources for GNU/Linux on the PS3. Running a lighter window manager makes the UI more responsive.

Open a terminal and execute the following to install Openbox components.
su -
yum install openbox openbox-themes obconf

Start OpenBox
openbox --replace

To change the session preferences to open openbox from now on, open the session preferences from the main menu:
System | Preferences | More Preferences | Sessions

Check "Automatically save changes to session"
Close Sessions properties window
Logout without closing the terminal
Login again
Close the terminal
Log out and log in again
Open the session properties again
System | Preferences | More Preferences | Sessions

Uncheck "Automatically save changes to session"

Setup video and audio playback
Why?: You may want to watch movies or listent to audio files while working on Linux on your PS3. Like most distributions, YDL comes without proprietary codecs as it is illegal in some countries to distribute them (but not to get them as an end user)

I followed the instructions from http://news.softpedia.com/news/How-to-Enable-Video-Playback-in-Yellow-Dog-Linux-6-1-101664.shtml

Note: The instructions regarding the repositories are a little bit outdated. Refer to the section "Install additional software repositories" above for notes on what repositories install. Other than that, the instructions work like a charm.

Configuring VPN
Why?: well, How cool is to connect to my office network sitting in my sofa, open a remote desktop connection to my office computer and work in a huge monitor!

Open a terminal and execute
su -
yum install vpnc

you can now execute it with
su -
vpnc

and entering your network parameters.

Setting up Vala - Trying a new programming language

Here I am, trying to learn a new programming language. Actually it feels more like getting to know the child of an old friend. Vala is a little bit like C but in a modern way and a lot like C# without having to install a huge runtime when you just want a "Hello world"

If you want to learn more just go to http://live.gnome.org/Vala

I am using Mint. An Ubuntu derivative so these instructions reflect that.

I'll first share my odyssey and then the instructions that actually worked.

Installing Vala is very easy as it is already in the repositories. After installation I was able to follow the tutorial..

After I installed vala I set up to try "valide" a vala specific IDE and that's when my problems started.

I got valide's SVN trunk version and tried to "configure" according to the README but I was missing two libraries
- GtkSourceView http://projects.gnome.org/gtksourceview/download.html
- The vala development libraries libvala-dev

I downloaded GtkSourceView from the official repository, compiled and installed according to the instructions.

I installed libvala-dev from the distro repository

Tried to "configure" valide again but failed complaining about libvala being an an older version.

Back to uninstall vala and libvala from the repositories.

Downloaded the latest vala release 0.5.6 and tried to "./configure". It complained about configure: error: flex not found but required so I downloaded other versions, same error. Well, apparently an undocumented dependency.

I installed flex from the repositories.
Back to configure vala: configure: error: bison not found but required. Another undocumented dependency
I installed bison from the repositories

Finally I was able to compile and install vala but when I tried to compile my "hello world" I got an error loading the libraries. I searched for a solution and found that vala must be configured with prefix=/usr.

After uninstall, configure and compiling it again, vala passed the test

I downloaded the tar.gz source for valide and tried to compile valide again. More problems.

I tried using different versions of vala until I finally found that the only version it worked with is vala 0.5.1!

After that, valide compiled... but when launching gave an error finding libraries. So, uninstall, distclean and reconfigure valide with prefix=/usr.

Finally! everything works! so here are the steps:

Install vala
1. Install vala dependencies
sudo apt-get install flex bison

2. Download vala 0.5.1 from the official site http://live.gnome.org/Vala/Release
3. Compile vala
tar -xvjf vala-0.5.1.tar.bz2
cd vala-0.5.1
./configure --prefix=/usr
make
sudo make install

Install GtkSourceView required by valide
4. Get GtkSourceView from the official site http://projects.gnome.org/gtksourceview/download.html
5. Compile GtkSourceView
tar -xvzf gtksourceview-2.4.2.tar.gz
cd gtksourceview-2.4.2
./configure
make
sudo make install

Install valide
6. Get valide from the official site http://www.valaide.org/doku.php
5. Compile valide
tar -xvzf valide-0.2.0.tar.gz
cd valide-0.2.0
cp gtk+-2.0.vapi.diff /usr/share/vala/vapi
cd /usr/share/vala/vapi
patch -p0 < gtk+-2.0.vapi.diff
(note, when asked for which file to patch enter gtk+-2.0.vapi)
rm gtk+-2.0.vapi.diff
cd $OLDPWD
./waf configure --prefix=/usr
./waf
sudo ./waf install

Set a static IP for WPA wireless network

1. Get the encrypted WPA wireless key
wpa_passphrase <network name> "<passphrase>"
e.g.
wpa_passphrase myNetwork "This is my passphrase"
You will get something like the following:
network={
ssid="myNetwork"
#psk="This is my passphrase"
psk=eca1d01a15186d5bea7548ba6b7fed6b032b3efd79791539ba8b8fffb1fdfa1c
}

Copy the text after psk=

2. Edit the interfaces configuration
sudo nano /etc/network/interfaces

(you can use any text editor you want)

Add the following to the file replacing
- <interface> with the proper interface, e.g. wlan0 or eth1,
- The IP addresses with the proper IP addresses for your network
- <network name> with the name of your network
- <encrypted psk key> with the key you got in the previous step
auto <interface>
iface <interface> inet static
address 192.168.1.99
gateway 192.168.1.1
dns-nameservers 192.168.1.1
netmask 255.255.255.0
wpa-driver wext
wpa-ssid blank
wpa-ap-scan 1
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk <encrypted psk key>

3. Disable the Network manager.
From the main menu select "System | preferences | Sessions" and remove the check mark for the network manager

4. Reboot

Remove the need to enter the keyring password every time I Login to Ubuntu / Mint

EDIT: No longer necessary as of Mint 9 Isadora as it already has the libraries and parameters to do this automatically.

1. Install pam-gnome-keyring
sudo apt-get install pam-gnome-keyring

2. Delete your default keyring
rm ~/.gnome2/keyring/default.keyring

3. Modify the GDM configuration and save it
sudo nano /etc/pam.d/gdm
add
auth optional pam_gnome_keyring.so
before
session optional pam_gnome_keyring.so auto_start

4. Reboot

Why and How I removed unecessary steps to loggin in to Mint/Ubuntu

Disclaimer: The actions described here are suitable for a Home desktop. I would not do the same to a laptop or public desktop.

I'm trying to convince my sons to use Linux instead of booting in Windows. They really dislike having to enter the userid and password then enter the keyring password. For now, they don't care about having their "own" desktop or custom configurations.

After the installation Ubuntu asks for my wireless network parameters and it saves the WPA key

In subsequent log ins the default behaviour of Ubuntu is the following:

- Ask for user ID and password
- Ask for the keyring password so the nm-applet can access the WPA key

I have no problem with those steps. The second one is anoying but I quickly forget about it and just do it naturally. This is the part that my sons dislike.

Note: Both of my desktop connect through wireless as I've been lazy running hidden cables all over my house.

My first step was to remove the anoyance of the keyring password.
Once I did that I realized that it was better to have a static IP. After all, these are desktops.
Finally I decided to set automatic log in.

Although I am using Mint in one box, Ubuntu Intrepid in another. Being it an Ubuntu derivative all the steps apply to both.

After those steps, my sons are using Linux more frequently. Weird, but true.

Note: Being these computers inside my home without normal access by any stranger, I decided to use the Automatic login feature of the log in manager. After all, everyone at home knew the userID and password and if a rober comes into my house a password won't stop him from taking the computer.

In the following posts I will explain each of the steps

Ogg Vorbis Theora -- Floss Fund Nominee

Mozilla is including support natively in Firefox with Version 3.1.
This means that when a user encounters a sound or video file on the
web, Firefox will automatically play it as the CODECS to do this are
built in.

This is a major step forward. In the past, in order to play files
created with Ogg or Theora, we would have to configure our browswers
to do so -- creating another step for the average user to go through
before it would be possible to enjoy multi-media content created with
free and open source software.

With the Mozilla browsers holding 20 percent of the browser market, and
with Ogg and Theora support built in, content providers such as television
networks, record companies, newspaper websites, and radio stations will
have greater incentive to create content in this format.

There are FLOSS supporters making the case for the open source CODECS.
Now it makes more sense to include content in this format and to publicise
the availability of it.

Ogg Vorbis and Theora enables the delivery of sound and video content on
the Internet to be truely free and democratic. Musicians and film makers
are no longer forced to use proprietary formats.

Internet Explorer is not the only browser that has built in
support for sound and video. Another brick in the wall is gone.

Please see the Play Ogg website at:

http://www.fsf.org/resources/formats/playogg

The Ogg website is at:

http://www.xiph.org/

(pnijjar: The donation page is http://www.xiph.org/donate . They take PayPal )

Yes I have been blogging

Hello

I have been blogging, but at another site. You may be interested in my latest blog entry which is a swipe at Bill 61 without mentioning Bill 61.

http://www.cookingwithlinux.com/blog/11

I would encourage everyone to speak out against the DRM aspects of this Bill.

This Bill may have been tabled before Summer Break so that we can make our thoughts known about it.

I also have a comment on the Globe and Mail website.

DRM is useless because most of us are spending money in different ways instead of records (CDs). Recent trips to the gas station alone has devoured a lot of discretionary spending dollars.

Cheers

John