Tagged: gnu/linux

Pet Peeve – Thumbs.db

Having moved from Windows XP to GNU/Linux, the trail of Thumbs.db files left behind in my home directory is really annoying. It reminds me of Windows and the files aren’t hidden on a unix filesystem. Here is a command I used to rid myself of this reminder (posted here mostly to help me remember it):

find ~ -name Thumbs.db -print0 | xargs -0 rm

And stay out! ;)

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Post a Comment

Gutsy Upgrade – XGL Problems

A message from Typesofsoftware.com

Lots of your computer software could probably be replaced with free and open source software, which has grown in popularity. You can find music playing software for example for almost any operating system, as well as free CD burning software if you’ll be listening on the road.


I’ve begun the process of upgrading the many Ubuntu installations I manage to the recently released Gutsy Gibbon. The first upgrade was flawless, though it took a long time as the servers were pretty busy. The second installation was going fine until there was a freaking power outage in my house. Not even an outage, just a flash… not enough to turn off all the computers or reset all the clocks in the house, but it took a few out, upgrade-in-progress computer included. I wasn’t able to boot with the latest kernel, but using an older one the system was back up and running and a ‘sudo dpkg –configure -a’ completed the upgrade process without any problems!

However, machine number 3 (my laptop hard drive, currently booting on my desktop via a USB external case since my laptop is in the shop) didn’t go so well. There were some scary errors during the upgrade. A segmentation fault caused one of the packages to fail upon which a great many packages depended. Packages like adduser, passwd, cupsys, bash… Surprisingly though, the update manager survived it all!

But Gutsy Gibbon was crawling. Absolutely crawling, considering I’m running with 2.0 GB of RAM and a 3.0 GHz dual core processor (it was flying in Feisty). ‘top’ showed that the culprit was XGL, and even after disabling desktop effects there was no change.

I was quite worried at first, I didn’t want to have to do a fresh install. But I found this post in the forums with a quick fix!

touch ~/.config/xserver-xgl/disable

By disabling XGL, my computer was back to its former glory. I don’t fully understand what the problem was, but either way I don’t appear to need XGL at all (I’m still using desktop effects) for my Intel graphics card.

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Comments (1)

Software patents from a musician’s perspective

A GNU/Linux patent lawsuit has been filed against Red Hat/Novell, marking the first patent suit against the operating system.

If you dig through the slashdot link, you’ll see that there was a lawsuit filed against Apple a few months ago on the same patent, that the patent is a bit vague and that there is evidence of prior art.

Lots of other people with more knowledge about the legal issues involving have been posting about this. Mark Shuttleworth, of Ubuntu fame, responds to recent Microsoft fear mongering about GNU/Linux patent suits by pointing out that Microsoft itself is also a victim of the current patent system. I don’t feel that I have the knowledge or feel the need to make any specific commentary, but I would like to share my view on software patents in general, for whatever its worth.

I was recently reading a transcript of a speech [here's a similar transcript] given by Richard Stallman on software patents. To me, the most compelling argument against software patents is based on the fact that software involves combining mathematical objects, rather than physical objects.

“The result is that software is really different from other fields, because when we are working with mathematical stuff, designing something is far, far easier. The result is that we regularly make systems which are much, much larger… we are in a system where one product involves many, many ideas that could be patented already.”

This is contrasted to the “one product, one patent” notion which corresponds to physical objects. Software developers don’t have to push atoms, but chemists, for example, do. So with pharmaceuticals, when a given chemical formula is patented, the patent only ever covers one product. Software is on the opposite end of the spectrum, where a single program can intersect with many patents.

To take the example of music, patenting an instrument would be more like patenting a drug – a physical object. A patent for a violin (if it were a new invention) would cover attributes like the number of strings, the dimensions, etc. However, patenting software is much, much more like patenting chord sequences or melodies. Chord sequences and melodies are immaterial, mathematical (in a sense) objects, like the ideas contained within software patents. Any single song contains many different chord sequences, melodies and harmonies which have probably been used many, many times before. But since songwriting does not involve music atoms, it’s much easier to create something that is very, very complex and as a result, is the combination of tens or hundreds of smaller ideas. Just like writing software.

Chord sequences are the fundamental building blocks of music, just as algorithms are to computer science. You study music theory and learn that certain chord sequences and cadences can be used to evoke certain emotions or have a certain musical effect, in the same way that algorithms that yield a certain result or have a certain effect on the input. To grant patents for chord sequences or algorithms is to deny musicians and programmers the ability to use fundamental theoretical ideas in their respective fields.

That argument resonated the most with me (pun intended). To me, it is patently obvious (sorry, I’ll stop) that things like melodies and chord sequences should not be patented. As a result, other similar mathematical ideas (ie. algorithms, software features), should also not be patented. Patents may be effective when one patent corresponds with one invention, like when you are dealing with material things. Its efficacy is questionable at best when dealing with algorithms or chord sequences.

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Post a Comment

HOWTO: Ubuntu 7.04 with an HP 6515b [Updated: 11.04]

Update: Somewhere in between 10.04 LTS and 11.04, there was a regression which was preventing both GNOME or Unity from appearing when logging in under 11.04, unless I selected ‘no effects’ options.

This helped me to at least get the Ubuntu Classic option working:
sudo apt-get install fglrx
sudo /etc/init.d/gdm restart


Unfortunately, this is the second new HP laptop which has given me hardware problems in GNU/Linux over the past few months. However, this time the culprit is AMD/ATI and their restricted drivers. Thankfully, they’ve announced plans to open things up, but until that’s been handled, tutorials like this will be necessary to get a system up and running.

I found a tutorial which helped me get the xserver up and running in no time.

Now, the model I had to setup is the AMD sempron as opposed to the AMD Turion. I used the Feisty alternative install CD to wipe Vista clean off of it, and followed these steps upon first boot to the command line to get the xserver up and running.

Update the repository information.
sudo apt-get update

Install the xorg driver
sudo apt-get install xorg-driver-fglrx
sudo depmod -a
sudo aticonfig --intitial

Then, restart your xserver and it should be working.
sudo /etc/init.d/gdm restart

The other outstanding issues noted in the tutorial above are the wireless, fingerprint reader, an APIC error and the suspend function.

I tried followed the steps used to configure the wireless, and though the commands seemed to work fine, I couldn’t really tell if the wireless was working (it didn’t seem to be, but I didn’t spent a lot of time). Also, there are issues with that solution and the latest kernel. Quite frankly, if I really need wireless I’d happily purchase a card that has GNU/Linux drivers available.

Regarding the fingerprint reader, for me that’s mainly a “who cares”, but if anyone knows how to set it up in Ubuntu I might be interested in trying it out.

APIC error? *sigh* I don’t even know where to start. The laptop runs fine though, but it does take a very long time to start up (much, much longer than any other Ubuntu laptop I’ve used). I wonder if that’s related to this issue, as the error does appear during startup?

I tested the suspend function on the laptop and it worked first try, no setup required. That’s a bit of a solution to the long startup time, albeit more of a workaround than a solution.

At any rate, getting the xserver up and running was the most important accomplish and the reason I wanted to blog about this. One you’ve got that up and running, you’ve got a functional machine, even if there are a few other things to work out.

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Post a Comment

Get GNU/Linux

Here’s a great website I stumbled across for people interested in learning more about the GNU/Linux operating system. They’re pretty honest too, including sections like “What’s Better in Windows” in their articles.

This website is run by a non-profit organization, GNU/Linux Matters, to promote GNU/Linux amongst everyday users. We believe in a widespread use of free software – as part of a truly free society; and wanted to say how useful and fun Linux is.

http://www.getgnulinux.org/

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Post a Comment

Moving Firefox/Thunderbird Profiles

This example will involve moving a profile from Windows XP to Ubuntu 7.04, but the basic idea can be used to move profiles around in many other scenarios.

Step 1: Find Your Files

In Windows XP, look in:
Firefox: C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles
Thunderbird: C:\Documents and Settings\<username>\Application Data\Thunderbird\Profiles

You should find a sufficiently cryptic folder (e.g. “b455b37.default”). You can check inside to see if it has the data you want (ie. bookmarks.html for Firefox, a Mail subfolder for Thunderbird, etc.). That’s your profile folder, the one you’ll need to copy in step two.

Step 2: Copy Your Files

In Ubuntu:
Firefox: ~/.mozilla/firefox/Profiles/
Thunderbird:: ~/.mozilla-thunderbird/

There are two options: (1) replace the contents of the existing profile directory with the contents of the profile directory from your Windows machine; (2) delete the existing profile directory and copy your entire profile directory from Windows in its stead.

The easiest way to copy files is probably to use a USB key, but it doesn’t really matter.

Step 3: Profiles.ini

If you chose option (1) above, then you need to edit ‘profiles.ini’ to update the path to your profile (since the directory name has changed). You’ll need to open up ‘profiles.ini’ in a text editor.

Firefox:
gedit ~/.mozilla/firefox/profiles.ini

Thunderbird:
gedit ~/.mozilla-thunderbird/profiles.ini

(If you’re copying to Windows, just use Notepad to edit the file.)

Inside profiles.ini, you’ll need to update the ‘Path’ to reflect the new name of your profile directory:

[Profile0]
Name=default
IsRelative=1
Path=<path-to-new-profile>

Save the file, open the application and check to make sure your data is there. That’s it!

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Comments (1)

Goodbye Windows

I can now officially say I’m running a single-boot GNU/Linux machine. I wiped my Windows XP partition today – good riddance!

delete-windows

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Comments (2)

Ubuntu Canadian Team

Ubuntu Canada Logo

Look what I found:

“We will be hosting an Ubuntu Toronto User Group Meeting on… 25 July, 2007 6:30 PM… held at the linuxcaffe…”

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Post a Comment

Palm Tungsten T5, Treo 650 with Ubuntu 7.04

I have had some real difficulty trying to get my Palm Pilot to work in GNU/Linux (Ubuntu, Dapper and Feisty, to be more precise), and I was preparing a post to outline the solution I had pieced together, only to find a much simpler and much more elegant solution. I’ll share the simple solution first because, hopefully, if you’re trying to set up a Palm device in GNU/Linux, you won’t have to read any further than that. But I’ll also include my lengthy solution, in case you aren’t lucky enough to benefit from the simple way out.

The Simple Solution

I’ve been syncing with jpilot so far, as I haven’t had as much luck with gnome-pilot (it hangs and crashes when trying to sync tasks from my T5 – believe it has to do with the ‘/usr/share/gnome-pilot/devices.xml’ file). Also, I find that Evolution doesn’t really mesh as well with the palm (in terms of categories and that sort of thing).

sudo apt-get install jpilot

Open the application, and go File->Preferences, and then to the “Settings” tab. Set the Serial Port option to “usb:” (without the quotes).

Thanks to MoebusNet for his post on the Ubuntu Forums.

That’s it. This worked for my Palm Tungsten T5 and a Palm Treo 650. It works better than the udev rules because the /dev/pilot default involved some weird timing issues, regarding when you press the sync button in jpilot and on your device. With this setting, just hit the sync button and jpilot, and follow it with the sync button on your device, and that should do the trick!

However, the one remaining and fairly substantial problem I’m having is that jpilot is truncating my notes! I had this problem on the Palm Desktop in windows when I switched from a Visor to a T5, but I was just able to update my version of Palm Desktop. Does anyone know how to handle this in JPilot? I’ve tried the memo32 conduit with no luck as I’m no running pedit32… any help would be appreciated!

Long, Painful, Old Solution
My main reference was a post in the Ubuntu Forums from October 2005, which is why I’m putting myself through the psychological trauma of recounting my experience, since the solution seems to have been slightly different in Feisty than it was in Breezy (and actually not too bad in the end).

1. Get the scoop on your device

I found the command line route very difficult here. I had no success with the suggested command ‘udevinfo -p /dev/ttyUSB0 -a’ (or with ttyUSB1) either… I actually had to change the path to something long and ridiculous to get the device info from the command line. So, I highly recommend using Ubuntu’s device manager.

System -> Administration -> Device Manager – Press the hotsync button, and your device should appear in the list.

2. Creating udev rules (the ‘/dev/pilot’ part)

This was the final magic combination that I will never, ever edit again. Ever. Lest I ruin the magic.

/etc/udev/rules.d/10-custom.rules
# Palm Tungsten T5
BUS=="usb", SYSFS{serial}=="<my-serial-number>", KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", NAME="pilot", MODE="0666"

3. Loading the visor module

Run this command to see if the visor module is already running in the kernel:
lsmod | grep visor

Here’s the output on my machine when I run that command with the visor module loaded:
visor 20364 2
usbserial 32488 5 visor
usbcore 134280 8 visor,usbserial,usbhid,usb_storage,libusual,ehci_hcd,uhci_hcd

If you don’t see any output, then the module isn’t loaded. You’ll want to load it by running this command:
sudo modprobe visor

Or you may actually have to at a new line with the text “visor” (without the quotes) to the file ‘/etc/modules’ in order to get this module to load on boot.

sudo gedit /etc/modules

Now you should be able to sync, though this method doesn’t seem to work reliable (it might have to do with the fact that I haven’t added visor to /etc/modules myself).

Happy Palm Piloting in Linux! (hopefully)

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Comments (4)

Ubuntu 7.04 Feisty Fawn with an HP Compaq 6710b

My brother just got a brand new laptop – an HP Compaq 6710b. The chipset is brand new, and unfortunately, even newer than Feisty. Feisty was released in April, and the chipset first hit the market in May I believe. The result? No Xserver. We tried the unstable Gutsy live CD with the same results too.

But fear not, there is a solution! We spent hours scouring forums and such, and it turned out to be a lot simpler than we had originally feared. One user spent four days trying to solve the issue, and eventually compiled his own custom kernel.. but there’s a much simpler solution!

1. Install Ubuntu 7.04 using the alternate CD (text mode)

Download the Ubuntu 7.04 Alternate Install CD image here and burn the image to disk.

NOTE: Make sure you check the box for the alternate CD! You’ll need it for the text-based installer. Notice the box underneath the download button: “Check here if you need the alternate desktop CD. This CD does not include the Live CD, instead it uses a text-based installer.”

Then, (re)boot your machine with the alternate CD in the drive. (NOTE: Make sure the boot priority is set so that it boots from the optical disk before the hard drive.) Follow the instructions for the text based install, and then you’ll be prompted to remove the disk and restart once it’s finished.

This is where the xserver error appears. Queue tears.

2. Upgrade to the latest kernel

Now you’ve got Ubuntu 7.04 installed, but all you get is the command line. The first step is to upgrade to the latest kernel, which is in the Feisty repos and supports the Mobile™ Intel® 965GM Express Chipset. Here’s how to upgrade:

sudo apt-get update
sudo apt-get install linux-image-2.6.20-16-generic

NOTE: For some reason, apt-get was looking for the packages in the cdrom drive sometimes… I realized that it was included at the top of /etc/apt/sources.list, so I just commented it out.. not sure if you’ll encounter this or not though.

Restart your machine:
sudo shutdown -r 0
When you boot up again (you should still get the Xserver error), you can double-check to make sure you’re running the latest kernel with this command:
uname -r
It should print “2.6.20-16-generic”.

3. Reconfigure xserver-xorg

In order to get your xserver working, you’ll need to reconfigure. I ended up playing around with many different configurations without much luck, but it was selecting the ‘i810′ driver which ultimately led to a success for me.

It would be a good idea to backup your xorg.conf file first, just in case you want to go back to the default configuration (though the wizard should create a backup for you – ‘/etc/X11/xorg.conf.200707012006′ for example):
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

To start the text-based wizard, run this command:
sudo dpkg-reconfigure xserver-xorg
This will guide you through pages and pages of options and update your /etc/X11/xorg.conf file for you. I accepted all of the existing options (just kept pressing enter for the most part), except for the first, which I changed from ‘vesa’ to ‘i810′.

Edit: i810 is deprecated, so it’s best to go with the replacement package ‘intel’ than the unsupported ‘i810′. First, you need to install the intel driver:
sudo apt-get install xserver-xorg-video-intel

Then, when you reconfigure xserver-org, select ‘intel’ instead of ‘i810′, as I’d originally described above.

To restart your xserver, I believe you can just restart your xserver with “sudo /etc/init.d/gdm restart”, however, to be safe, I just rebooted the machine as it didn’t take much longer anyways (‘sudo shutdown -r 0′).



Hopefully that works! There are still several other issues though apparently with this laptop right now, which should hopefully be solved over the next few months as drivers for this chipset become more widely available and are included in popular distributions like Ubuntu.

Other issues:

  • marcusherou reported a bug report involving his audio not working – our audio is working fine though
  • some people are having trouble with a blurry screen after getting xserver working – I didn’t find it terribly noticeable myself *shrugs* EDIT: my brother eventually noticed banding issues and managed to figure out a fix – I’ve appended his instructions to the bottom of the post
  • Stay away from any compiz/beryl/openGL 3D acceleration right now, because it seems to crash the system – we can definitely confirm this… =\
  • We can’t seem to get the cdrom drive to mount… The LiveCD didn’t seemed to work in the CD/DVD Drive (we had to run from a USB optical drive to get as far as the xserver error), yet we ran the install from the internal drive with no issues. Now it says “Unable to mount the selected volume… mount: special device /dev/hda does not exist” Haven’t spent any time investigating this yet EDIT: “sudo modprobe piix” fixed this issue – thanks david! Though, he had to add it to /etc/modules in order to get the module to load on boot: “sudo gedit /etc/modules” and add a line at the bottom with the word ‘piix’

Hopefully these issues will be resolved later this year as the drivers make there way into various distributions. For now, we’ve got a workable setup on this laptop and a bit of patience and a desire to learn, so we’re sticking with it. I wouldn’t recommend a machine like this for a non-technical user, but it’s workable for someone willing to get their hands a bit dirty.

A big thanks goes out to marcusherou for giving us some guidance in configuring xserver-xorg!




Banding Fix
(( Jared says:

I followed the instructions href=”http://ubuntuforums.org/showthread.php?t=494943″>here telling me where to put the file that dealt with the gamma, and I installed the package. Then I backed up my xorg.conf, and replaced it with his xorg.conf there. His xorg.conf messed up my keyboard layout and mouse speed. Before editing with his xorg.conf I tried using my old one with the new drivers, and I also tried copying and pasted the keyboard section and synaptics touch pad section from my own xorg.conf. All of those attempts ended up in X crashing.

Here are the sections from xorg.conf that I edited, if I didn’t put a “<---" and some words beside it, I didn't touch it.

Keyboard Section in xorg.conf:

Section “InputDevice”
Identifier “Keyboard0″
Driver “kbd”
Option “CoreKeyboard”
Option “XkbRules” “xorg”
Option “XkbModel” “pc105″
Option “XkbLayout” “us” <--- I edited this line, it used to say "it" instead of "us"
Option "XkbOptions" "lv3:ralt_switch"
EndSection

Mouse Section in xorg.conf:

Section "InputDevice"
Identifier "Touchpad0"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "SHMConfig" "on"
# Option "HorizScrollDelta" "5"
# Option "VertScrollDelta" "5"
# Option "HorizTwoFingerScroll" "true" <--- This one and the one underneath were already commented out, the rest I commented out myself
# Option "VertTwoFingerScroll" "true"
# Option "LockedDrags" "false"
# Option "EdgeMotionUseAlways" "true"
# Option "EdgeMotionMinSpeed" "1"
# Option "EdgeMotionMaxSpeed" "5"
# Option "EmulateMidButtonTime" "100"
Option "MinSpeed" "0.1" <--- This I guess is the minimum speed of the mouse, it was set to 0.5 before
Option "MaxSpeed" "0.3" <--- This would be the max speed, it was set to 1.0 before
Option "AccelFactor" "0.1"
EndSection

After that, it worked.

))

Creative Commons Attribution-Share Alike 2.5 Canada Permalink | Comments (18)
Creative Commons Attribution-ShareAlike 2.5 Canada
This work by Blaise Alleyne is licensed under a Creative Commons Attribution-ShareAlike 2.5 Canada.