You are currently browsing the category archive for the ‘Linux’ category.

It just occurred to me that Compiz and Cellwriter don’t play nicely together by default. If you’re having problems, open up ccsm (compiz-config-settings-manager) or install it if you don’t have it (it’s sudo apt-get install ccsm or yum install ccsm as I recall), then search for “glib” in the filter, and make sure that your window now looks like this:

Screenshot-CompizConfig Settings ManagerRestart Compiz, and your handwriting recognition should now be working just fine :)

EDIT: This only worked for me once. I’m now just reverting back to Metacity when I’m in tablet mode. Has anyone figured this out? (of my tens of readers :P )

Great title, I know.

If there’s something that needs to be done whenever you wake your computer from suspend, hibernate, or just before it suspends/hibernates, you can do it without too much difficulty if you know how to script.

The Madwifi driver for my Thinkpad’s wireless card doesn’t like to be suspended and I always had to reset it every time I awoke my computer. Annoying! So from several sources I have found that putting a script in /usr/lib/pm-utils/sleep.d/ would let me do this. However, they have to adhere to certain guidelines. First of all, you define what the script handles for each change (sleep/wake) in a single script. A bare Bash script that does this is as follows:


#!/bin/bash
case $1 in
    hibernate)
        ;;
    suspend)
        ;;
    thaw)
        ;;
    resume)
        ;;
    *)  echo "ERROR: called incorrectly."
        ;;
esac

This is pretty simple. Now just call whatever you need in the corresponding parts (thaw means wake from hibernation).
My wireless script (I didn’t bother with hibernation because I never use it) looks like this:


#!/bin/bash
case $1 in
    hibernate)
        ;;
    suspend)
	if [ -n "$(lsmod | grep ath_pci)" ]; then modprobe -r ath_pci; fi
        ;;
    thaw)
        ;;
    resume)
	if [ -z "$(lsmod | grep ath5k)" ]; then modprobe ath_pci; fi
        ;;
    *)  echo "ERROR: used incorrectly."
        ;;
esac

It checks to see if I’m using ath5k (which I do sometimes), and if I’m not loads/unloads ath_pci as necessary. Works like a charm.
Now there are two more steps. You have to save the file as ##something to tell pm-suspend when to call the script. The higher the number, the earlier the script will be called, so if your script depends on things being set up, it generally needs to be fairly low. I wanted mine to run before 55NetworkManager but after 75modules, so I named the file 57athpci.

Finally, set the file as executable by running chmod +x filename (so in my case chmod +x 57athpci). You’re all set.

I know this works in Fedora, and also ArchLinux (my tutorial is modified and personalized from their tutorial); any feedback on other distributions would be nice. (Especially Ubuntu).

I’ve heard that most people don’t have a problem with this, but I did. I have an AR5212 in my Thinkpad, and while ath5k works, it drops connections randomly, especially when the connection strength isn’t great to begin with.

This began to get very frustrating, so I slogged through a forum thread at FedoraForum.org. Despite being called lazy on multiple occasions (because someone is temperamental and I tend to overlook useful information if it’s not pointed out as being critical), I managed to get madwifi installed.

Madwifi must be recompiled every time the kernel updates. This is fine, as I tend to re-try ath5k each time the kernel updates as it seems to work better (better signal strength and comes back more reliably after I suspend the computer) besides the connection thing.

Anyhow, if you are having the same problem as me, this is the important stuff from the thread:

  1. Download THIS SNAPSHOT OF MADWIFI because the others do not compile in F11.
  2. As root,  yum -y install gcc gcc-c++ make kernel-devel
  3. Untar the snapshot, compile it with “make” and install it with “make install” as root.
  4. As root, do “rmmod ath5k && modprobe ath_pci” to enable madwifi. NetworkManager will disconnect and reconnect shortly.
  5. If you want to keep this, add “blacklist ath5k” to the end of  /etc/modprobe.d/blacklist.conf (again, as root)

I’m starting a new project. What is JORSnix, you ask? It’s Linux for Tablet PCs. Windows has the monopoly on Tablet PCs, and that sucks, because besides that, Linux is wonderful for students. And so are tablets.

For those of you who don’t follow my blog, I own a Lenovo X61 Tablet. It’s my pride and joy, and I take it everywhere. It weighs under four pounds, has excellent battery life (or.. well.. used to..), and of course it’s also a tablet, so I can take notes in class on it.

So what is JORSnix going to be? It’s going to be based on Ubuntu, and loosely modelled around their release schedule. If they do something that screws up tablet support for a release, we’ll notify our users and skip it.

In short: we’re going to make it easy for you to use your tablet efficiently with Linux. That’s the goal, anyway.

We plan on packaging a lightweight system with Gnome (maybe one of the *box WMs later), Xournal, CellWriter, EasyStroke, and wacom-tools. We’ll make all of the buttons work and make your laptop usable in Tablet Mode without a keyboard.

But for now, we’re just going to support Lenovo X61 Tablets because that’s all we have, but hopefully it will work on other tablets with little tweaking. Both HP and Fujitsu use similar Wacom backends, so if I don’t do anything too Lenovo-specific, it’ll be OK. Anyway. This is the birth of something good. If you read this and you’re willing to test, especially if you have a different tablet than me, please, please contact me.

Linux has many different communities, some better than others. The Ubuntu Forums’ biggest problem is the blind leading the blind, with plenty of people who know just enough to get you into trouble helping other folks, but at least they are mostly friendly.

But this isn’t true of every community. The “expert distributions” are full of dickheads and weirdos, and it’s a big turnoff to a lot of us “advanced users.” I’ll hit three that I’ve used, and strayed from.

Gentoo:

Glogo-smallFirst, Gentoo, because I used Gentoo for about a year. Besides the fact that compiling your own system is inefficient and makes little sense (no, it’s really not any faster), the community is full of douchebags. I knew one of these folks personally, and he thought he knew a lot more than he did. If you asked him for help, ever, he’d tell you to learn to use Google. I know how to use Google, you ass.

The problem with this sentiment is that yes, I can spend hours poring over man pages looking for what I want to know, but if you know how to do it, it’ll take you five seconds to tell me. Not to mention that Portage is the shittiest package manager I’ve ever seen. Portage isn’t even a package manager, it’s a file structure, make, and tar. Mostly, it doesn’t do any dependency checks besides installations.

Let’s say I install Firefox, and Firefox depends on GTK. So Portage pulls in Firefox and GTK when you install Firefox, but then if you decide to uninstall GTK, it doesn’t warn you or anything that Firefox still needs it. Sure, this isn’t a big problem when you have two packages, but if you do a file install that requires a hundred packages, and for some reason one gets removed, then software will mysteriously stop working. And tracking down the problem takes fraking Sherlock Holmes. So what did I do, to keep Gentoo running for a year? I stopped updating, and I never removed anything.

Fuck. That.

Archlinux:

Archlinux-official-fullcolourNext is Archlinux. I didn’t use Archlinux for long, probably only for a day or two. Archlinux has many of the same problems as Gentoo. I went into #archlinux and asked a simple question that would have taken me awhile to find in the man pages, but that I knew had a one-command answer. About four people told me to RTFM and one told me the information. That’s a 4:1 douchebag to person ratio. I’d rather use Mac.

Not to mention that when I asked about PulseAudio, which I have always had good luck with, and instead of helping me fix it, I got told to just use ALSA because Pulse sucks. I didn’t ask what I should use, I asked how to use Pulse. I like Pulse. So I ripped it off the hard drive fast enough that I can’t complainabout how Pacman doesn’t properly handle the rolling releases and how shit breaks all the time because of that. Which is what I’ve been told. But I don’t know if that’s true or not.

Sidux:

Sidux-logoThe most recent one is Sidux. With Sidux, I have managed to tread softly with the community, but they aren’t the friendliest folks. They have a tendency to give you canned responses via the bot in #sidux, if you don’t show that you’ve already been working on the problem on your own for several hours. But mostly I want to complain about the package managers. They must be asleep at the switch. You have to enable the testing repository to install fucking GIMP, because simply typing apt-get install gimp breaks apt-get, because one of it was compiled with a testing version of one of its dependencies, so you can’t get it without getting the testing one. What. the fuck. And it’s not easy to tell which dependency is having a problem, and since this happens to me every few packages, I’m just done with the entire distribution. I can’t use a distribution with a broken package manager.

And I don’t know about Debian, but I’ve heard that the Debian crowd is just as elitist as Sidux, and Gentoo, and Archlinux. You do not dare suggest that something with their precious distribution could be improved, or you get flamed and hated. And this is why they all suck. No criticism means no improvement.

So good riddance. I’ll go back to one of my “newbie distributions,” where I don’t have to spend half my time fixing my computer and getting flamed. Thanks.

This is my desktop; You can see the similarities to my laptop. Similar Conky, both running Openbox. The panel is different though. Maybe more info later, but just a relatively uninformative screenshot for now.
siduxshot

Just wanted to post a screenshot.  New distro, beautiful desktop. Actually laptop. But you know. There will be screenshots of Sidux too. More of them, because my Crunchbang install is near-default.
Crunchbang

Yeah that’s right. I updated to Ubuntu 9.04. That’s kind of a lie, I actually moved to Crunchbang 9.04, but it’s all the same under the hood. The move to evdev-based devices is giving me a headache. You may have noticed that the pen works out of the box, but I need the eraser to be able to efficiently take notes in Xournal, and this took some work. First of all, let’s get middle-click scrolling working the new way.

Middle-click scrolling, this is a summary and repost of this blog.
Do this to create mouse-wheel.fdi:

sudo gedit /etc/hal/fdi/policy/mouse-wheel.fdi

Copy in this:

<match key="info.product" string="TPPS/2 IBM TrackPoint">
<merge key="input.x11_options.EmulateWheel" type="string">true</merge>
<merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
<merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
<merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
<merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match>


Now we’ll go ahead and set up your tablet.

sudo apt-get install wacom-tools
sudo gedit /etc/hal/fdi/policy/custom-wacom.fdi

And assuming you have an x61 Tablet like myself, copy this in:
Remember that this should work for anyone with a serial Wacom backend, but specifically Lenovo x61 and x200 Tablets

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">

 <device>
 <match key="input.x11_driver" contains="wacom">
 <match key="input.x11_options.Type" contains="stylus">
 </match>
 </match>
 <match key="input.x11_driver" contains="wacom">
 <match key="input.x11_options.Type" contains="eraser">
 </match>
 </match>
 <match key="input.x11_driver" contains="wacom">
 <match key="input.x11_options.Type" contains="cursor">
 <merge key="input.x11_options.Mode" type="string">Absolute</merge>
 </match>
 </device>

</deviceinfo>

If you have an x61 or x200 Tablet, you need to set up this script to run on boot written by Roger Critchlow Jr.

sudo gedit /etc/init.d/wacom

Copy the script into that file:

#!/bin/bash
# find any wacom devices
for udi in `hal-find-by-property --key input.x11_driver --string wacom`
do
type=`hal-get-property --udi $udi --key input.x11_options.Type`
# rewrite the names that the Xserver will use
hal-set-property --udi $udi --key info.product --string $type
case $type in
stylus|eraser)
# map stylus button 2 to mouse button 3
hal-set-property --udi $udi --key input.x11_options.Button2 --string 3
;;
esac
done

Set it executable.

sudo chmod +x /etc/init.d/wacom

Create symbolic links into the right places so that it starts at the right time:

sudo ln -s /etc/init.d/wacom /etc/rc5.d/S27wacom
sudo ln -s /etc/init.d/wacom /etc/rc4.d/S27wacom
sudo ln -s /etc/init.d/wacom /etc/rc3.d/S27wacom
sudo ln -s /etc/init.d/wacom /etc/rc2.d/S27wacom

Finally, you have to add one more line to another file:

NOTICE: This final step might be unnecessary. I’m not sure. Feedback would be wonderful.

sudo gedit /usr/share/hal/fdi/policy/20thirdparty/10-wacom.fdi

Find:

<match key="info.capabilities" contains="serial">

Under it, find:

<append key="wacom.types" type="strlist">eraser</append>

Add:

<append key="wacom.types" type="strlist">cursor</append>

And that’s it. All of the other settings are the same so this post should finish up the setup.

I made a few small typos on Day 1. Hopefully you smart folks figured them out/noticed them. I think they are fixed now. Also discovered a few places where WordPress replaced my straight quotes with curly quotes. Everything is copy-and-paste-able now. My apologies!

I’m going to do this in installments, I’ve decided, because there are a lot of little things and they sort of just come to me.

So this is episode 1:

Today we’re picking on Gnome. Gnome is of course the default desktop in Ubuntu and as such is the desktop environment most readibly recognized by newbies as “Linux,” and the first thing that they will experience. Gnome is pleasant to look at and easy to use. And that’s it.

What if you want to customize things beyond the (very limited) customization tools available?

You have to delve into the gconf-editor:

It's like the devs said "You know, I miss the Windows Registry"

It's like the devs said "You know, I miss the Windows Registry"

The gconf-editor is a clusterfuck of incomprehenisble options with very few descriptions and the only way anyone discovers anything new in the gconf-editor is through trial and error.

Things you have to do in the gconf-editor:

  1. Advanced keyboard shortcuts
  2. Deciding if the “Home,” “Trash,” and that sort of icons are displayed on your desktop
  3. God only knows what else because the program is horrid!

One of the worst “features” of Windows is the Registry, and the gconf-editor resembles it too much for my comfort. It’s here because the Gnome devs think users are too stupid to deal with having lots of settings, and that “power users” will be right at home in a piece of shit editor.

Great. So if I want to set a keyboard shortcut to do something uncommon, I have to find this?! What gives?!

So here’s the list so far of what has to go for Linux to overtake Windows:

  1. The gconf-editor in Gnome

Microsoft has around 90% of the desktop market share, and this is important to note because frankly, they are doing something right. As a Linux user, and a believer in Free software, I think it’s important to see why they maintain the market dominance, even in the face of an abysmal failure like Vista.

Personally, I like Vista better than XP, but the numbers speak for themselves. Apple has taken most of Microsoft’s loss over the last year or two, and Linux and Apple share the roughly 12% of the market that Windows doesn’t hold, with a 3:1 ratio between Apple : Linux.

So why is this? Well, there’s a few things that Microsoft and Apple are certainly doing right that Linux is not.

First let’s look at what Apple has done recently to steal market share from Windows. The most obvious attacks are image, and these work to some extent. Obviously we have the “Get a Mac,” commercials and this is what they want you to see:

mac-pc-commercial

Gamers know just how ironic those commercials are.

And this works, to a large extent, especially with new college students. The MacBook’s sales are soaring and it’s for the same reason as Obama’s popularity: image. If you have a Mac, you’re a rebel. You’re cool. And you’re not supporting the evil Microsoft empire. However the ads are fraught with lies and the commercials have recently boiled down to the PC making a fool of himself and the Mac being a tool about it. And Microsoft has realized this and put out the “I’m a PC” commercials which capitalize on exactly this mistake that Apple has made.

But I digress. What it comes down to is usability, and price. Mac still hovers at 6%-7% market share for two reasons:

  1. Macs are expensive
  2. People are apprehensive to leave Windows in fear of compatibility and usability issues

Mac OS X works only on Mac computers, and Mac computers will cost you a pretty penny for all of their beautify industrial design and overpriced specs. I can’t tell you how many Thinkpads I’ve seen with an Apple sticker on them. People want to join the Mac cult but the Mac cult is expensive. The cheapest MacBook will run you $1000 and can’t even play modern games. For $1000 you can buy an EeePC and build a desktop that can play modern games. And then you have TWO COMPUTERS, each more useful than the MacBook.

Windows can run on any piece of crap computer you’ve scrapped together. Not so much Vista, but XP is what people love anyway. Windows is comfortable, Windows is familiar, and Windows isn’t going anywhere.

So why haven’t people flocked to Linux in the flailing of Vista and simply begrudgingly accepted Vista and bitched about it? This image that floats around the Internet sums it up pretty nicely:

It's about image.

It's about image.

Linux, even though it has matured and my computer-illiterate mother can use it to some degree (as much as she can use Windows, anyway) is still perceived as being “for geeks.” Admittedly, geeks love their Linux. Nothing is cooler than whipping open the terminal and cranking out some indecipherable gobbledegook and having your computer do something that you want it to do. I, for one, love the ability to ssh into my machine and blah blah blah blah blah. You get the idea.

So here’s the thing: Linux is for geeks. But it’s for everyone else, too. So what can Linux do?

The answer is Canonical. Canonical needs to develop a business plan, and advertise Linux. First of all, Linux is spreading almost purely by spread of mouth now. If Canonical offers support for Ubuntu — yes, paid support, and advertises it, we will see an uptick in adoption, and with it the number one thing missing from Linux: games! And yes! Games are missing! Yes I know about PPRacer and Tremulous and Urban Terror etc etc etc and they are fun but they are no substitute for Fallout 3 and Mirror’s Edge and the list goes on and on. Of course, we’d also see growth in vendor support, maybe Linux Photoshop and Linux SolidWorks. These are the stumbling blocks to Linux adoption, not Linux itself. If Linux is what people use at home, businesses will want to switch to keep employees comfortable, and software vendors like Adobe will be more than willing to recompile their software as a .deb.

The final point is that “familiar is better,” is a common feeling for Linux newbies. They want their Start button (or dock) and .exe “go to the site and download it” method. However, the answer is not “emulate Windows.” I’m looking at you, Linspire.

Linux is not cheap Windows. Linux has much more to offer than Windows, and does things differently. There is a “Linux mindset” specifically for installing software which is mind-blowingly amazing in Linux but a very difficult concept to grasp for new Windows/Mac users. Most of it is “it’s this simple?!”

There are stumbling blocks, and I’ll talk about them, probably in a post called “What Linux Does Wrong,” but the biggest issue, I believe, is image. We aren’t trying to copy Windows or Mac but provide a viable alternative. And on the desktop front, a boxed Ubuntu at Best Buy and a friendly instruction manual might be the first step down the long road to real desktop adoption.

Hell, even a $50 price tag might help because I’ve heard more than once from people unversed in Linux who dismiss it as “freeware,” because “if it’s free (as in beer) it can’t possibly be that good.” Come on Canonical, it’s time to sell support and make some money.