Pages

Monday, April 25, 2011

Replace a Key on a Sony Vaio Laptop

The shift key popped off the keyboard on my laptop. Don't ask. It's a Sony Vaio VPCS111FM with a chiclet-style keyboard.

Putting it back on wasn't hard, it just took a little while to figure out.

After the key came off, I had a hole in the keyboard that looked like this.


And the key and a U-shaped pin that came flying off when the key went.


The underside of the key has two tiny clamps at the top: one for holding the pin and one for attaching the key to a bracket on the keyboard.  The top set of brackets is for the pin.



The pin just snaps into the upper set of clamps.


On the keyboard, theres are two upside-down-U-shaped brackets that you have to slide the legs of the pin into.



There's also a plastic bracket that I've lifted up with a screwdriver here.  It has two pins sticking out from the top that snap into the bracket clamps on the key.


You have to slide the legs of the pin into the brackets on the side, then snap the bracket clamps on the key onto the pins sticking out from the bracket.

I slid the pin into the holes, then slid the top of the key down into the hole in the keyboard so that the bracket clamps were just behind the pins on the bracket.  Then I used a small screwdriver to push the pins into the clamps until they clicked.  It's a very quiet click.


The picture shows how I had it positioned.  Didn't have enough hands to snap a picture while using the screwdriver to push the bracket pins into the clamps.  It's pretty straightforward though.  Just move the key and the bracket so the pins are right between the arms of the clamp, then push the pin in.

After that, just lower the bottom of the key and push down so that the bottom snaps into place.  Should be good until the next time you drop your computer.

Monday, March 14, 2011

Setting mailto: in Chrome and Ubuntu

I must have had an extension that made Gmail the mailto: app in Chrome. Mailto: is what automatically opens up a new email message when you click on an email address, helpfully inserting the address as the recipient.  After cleaning out some extensions I didn't think I used, mailto: stopped working.

No problem. Ubuntu has a convenient way to make mailto: work. It's called Desktop Webmail.

Applications > Internet > Desktop Webmail

That gets you a dropdown menu from which you can pick the webmail you use, like Gmail, Yahoo, etc.

Check Gmail (or whichever service you use) and clicking on an email link will open your mail service to a new message addressed to the address you clicked.

I'd show you a picture of the dropdown menu, but I can't. Below the dropdown menu there was a cryptic checkbox labelled simply "Ask again." I didn't know what it meant, but assumed it had something to do with asking which webmail service I wanted to use each time I clicked on an email address. I unchecked the box.

Now when I go to Applications > Internet > Desktop Webmail it opens Gmail instead of opening the menu. Apparently "Ask again" meant giving me the option of changing my default webmail service. Oh well.

Incidentally, if you don't see Desktop Webmail among your applications, you can install it from the repository or with:
sudo apt-get install desktop-webmail

Monday, February 28, 2011

dEATH TO cAPS lOCK

The first thing I ever heard about Google's new keyboard was it's lack of a Caps Lock button. My response was instant and visceral. Years, wait, no, it’s decades, of inchoate anger and frustration suddenly came into focus. It hit me LIKE A TON OF BRICKS: I hate caps lock.

I do. I really do.

The caps lock button is a nearly useless imposition in almost exactly the wrong place on a keyboard.

Think about it. How often do you have to, or even want to, type something in all caps. And even when you’ve wanted to, did you really, after some reflection and hindsight, really want to. Or was it a juvenile outburst that ultimately detracted from what what you were trying to say. Like crying during a confrontation with your boss, or insulting someone’s mother during an argument (that’s not in any way related to the person’s mother).

Without the caps lock button, you would have had to hold down one of the shift buttons while typing each letter. That’s awkward. Appropriately awkward. Awkward enough that it forces you to think about the appropriateness of capitalizing every letter.

In this case, eliminating caps lock is like storing a rifle unloaded. Or counting to ten before replying.

And even if you could come up with a reason for having a caps lock button, why would it be right between two important and useful buttons like Shift and Tab; right where my little finger can tap it when I'm trying to capitalize a single letter (which serves a useful purpose) or tabbing (to indent or move to a different box in a form). How many times have I screwed up a log in because I accidentally hit caps lock and, as a result, typed my (hidden) password with lowercase and uppercase reversed.

Sure keyboards include a little LED to let you know that you've accidentally hit the caps lock button, but that's like building the Eiffel Tower so that you can put a red light on top of it so airplanes don't hit it.

No caps lock is an ingenious innovation. Sure it's nice to invent something new, but to accomplish something new by getting rid of something old, omnipresent and useless is a triumph of imagination. It's like Sherlock Holmes hearing the silence of the dog that didn't bark.

Not everybody is enthusiastic about living without caps lock. I listened to a Slate podcast with people complaining about it.

“We need capital letters,” one person said, as if Google were trying to ban capital letters altogether. I don’t believe that’s Google’s (note the G) intent or the effect of it’s action.

Want proof? I’m writing this on CR-48, using the very keyboard onto which Google ingeniusly eliminated caps lock. Note the capital letters at the beginning of sentences.

Capitalization can survive without caps lock. (Whether it can survive Twitter, instant messages, and Generation Y is a different issue).

Wednesday, February 16, 2011

It's all in a uname, if you use ` and not '

If you want know which Linux kernel you're running, you can just type "uname - r" (without the quotes) into the terminal -- we've been through that before.

You can also use uname to insert your kernel version into another command.  For instance, if you want to install the linux headers (which have to be the right ones for your kernel) you could use:
sudo apt-get install linux-headers-2.6.35-26-generic
Assuming that's the kernel you're running.

Unless you know the version off the top of your head, you can save yourself a step by putting uname into the command, as in:
sudo apt-get install linux-headers-`uname -r`
Seems simple, huh?  But there's a catch: those aren't single quotation marks surrounding uname -r.  They're backticks.

If you look closely, you'll see that they're ` and not '.  The backtick (aka grave accent) is often on the same key as the tilde (~) just under Esc on the upper left of the keyboard.

Stop that!

Sometimes it seems easier to start something from the command line than to stop it.  Ping, for instance.

To stop whatever you're running in the terminal, type:

Ctrl+c

That's it.

If the issue happens to be ping, you can do it preemptively, by limiting the number of pings.  Just use this command:

ping -c [number of pings you want]
as in:
ping -c 7 www.google.com

Friday, December 03, 2010

Getting HTML code to show up in Blogger

If you want to write something in a blog that happens to be HTML code, you can get it to show up by using alternatives to characters.

In the last post, I was trying to write /<microSD>/ as part of an explanation.  What I posted was just //.  It's because Blogger and the browser interpreted the < > as html code and didn't show it as text.

Why's it showing up here?  Because I didn't actually insert a <.   What I put in is "& l t ; " and "& g t" (without the spaces and quotation marks).  Blogger replaces that set of characters with < and  >.

The alternates are Unicode Alternatives for special characters in HTML.  That link has a long list of them and explains where and how they work.

Really simple directions for making Rockbox playlists

If you're starting to use Rockbox, start with playlists.

Rockbox treats everything it's playing as part of a playlist. If you put a bunch of songs into a folder, then start to play one of them, Rockbox automatically puts all of the songs in that folder into a playlist. You won't necessarily know it unless you decide to save it as a playlist.

This post is about creating playlists using your computer.  You can also create playlists using just your player and Rockbox, but that's a separate discussion.

What's a playlist?
A playlist is really just a list of songs. What makes it into a playlist is that there's a file path connected with each song on the list. When Rockbox reads the next song on the playlist, it uses the file path to find the song. Rockbox knows it's a playlist because of the file name extension: .m3u or .m3u8.

Incidentally, Rockbox creates playlists using .m3u8 as the extension. Most computer-based music managers seem to use .m3u. Rockbox recognizes either one.

A playlist file will look like:
playlist.m3u
or
playlist.m3u8.
The keys to making your playlists work are:
  • getting the file paths right so Rockbox can find the songs
  • getting the file extension right so Rockbox knows they're playlists
  • getting your playlists in the right folder so they show up in the Playlist Catalog

File Paths
First the file paths.   The file system Rockbox uses is just like the one on your computer.   It's identical if you use Linux.  If you use Windows, there's one significant difference: the Rockbox root directory (the base directly that every other folder and file is a part of) is called "/". That a forward slash without the quotation marks.

In Windows, the root directly is probably something like C:\ or G:\. In Rockbox, it's /.   Rockbox, like Linux, uses a forward slash instead of a backslash, but I've read that it understands both.  Haven't tested that though -- I always use a forward slash.

Rockbox Folders
On my Sansa Fuze, with a micro SD card in it, I have two root folders:
  • /
  • /<microSD>/
My songs are in these two folders:

  • /<microSD>/MUSIC/
  • /MUSIC/

    My songs names look like this:
    • 01 - Suzie Q.mp3
    • 01 - Sympathy For the Devil.mp3
    for no particular reason other than it's convenient for the way I store them on my computer. I use this file structure:
    /Music/"Band"/"Album"/"Track Number" - "Title".mp3
    This isn't significant; you can name your songs anything you want.  If I'd designed it with the portable player in mind, I might have left off the track number for simplicity.

    A playlist looks like this:
    /<microSD>/MUSIC/01 - Suzie Q.mp3
    /<microSD>/MUSIC/01 - Sympathy For the Devil.mp3
    /<microSD>/MUSIC/01 - The Red Rooster.mp3
    /MUSIC/1 - I Can't Be Satisfied.mp3
    /MUSIC/01 - I'm A Man.mp3
    The songs that begin with "/MUSIC/" are on the players' internal storage in the "MUSIC" folder. The songs that begin with "//MUSIC/ are on the micro SD disk in the "MUSIC" folder.

    To show up in the Rockbox Playlist Catalog, playlists have to be in the playlist folder:

    /Playlists/
    So the name for the example playlist could be:
    Blues.m3u
    and the complete file name (the one you'd use as the file path in a playlist) would be
    /Playlists/Blues.m3u
    Creating a Playlist
    To create a playlist on your computer, you can use a text editor.  Just a simple text editor is easiest.  You can use a word processor like OpenOffice Writer or Microsoft Word, but you have to save it as a text file.  If you save it as the regular .odt or .doc file it will have a lot of formatting information that will confuse Rockbox.

    For me, it's easiest to make a list of the songs first, then add the file paths.  So I start by typing just the file names:

    01 - Suzie Q.mp3
    01 - Sympathy For the Devil.mp3
    01 - The Red Rooster.mp3
    1 - I Can't Be Satisfied.mp3 
    01 - I'm A Man.mp3

    Once that's done I add the paths using copy and paste.  If the first song is in /<microSD>/MUSIC/, I type that in, copy it, and paste it in front of all the songs that are on the microSD card.

    Then I do the same for the songs /MUSIC/.

    Then I save the playlist as playlistname.m3u8 into the /Playlists folder.

    Incidentally, for some reason when I create a playlist using Rockbox itself, the default is for Rockbox to save it in the root directory.  That means it doesn't show up in the Playlist Catalog.  To create it in the /Playlist folder, you have to add /Playlist to the beginning of the name.  That's a real pain when you're using Rockbox's internal keypad.

    It's probably just a setting I have to adjust somewhere, but I haven't figured it out yet.

    Absolute and Relative File Paths
    You can use two different kinds of file paths in Rockbox: Absolute and Relative.

    File paths are just like directions. If you ask someone where the nearest coffee shop is, he can give you directions two ways. One is relative: "go two blocks ahead, then turn left." The other is absolute: "it's on the corner of 3rd and Pine St."

    For the relative directions, you obviously have to know where you are. The wouldn't work in a newspaper ad, for instance.

    File paths in playlists are the same way. The file path for a song can be absolute, meaning it starts with a root directory, or it can be relative, meaning it starts from the directory where the playlist is stored.

    Since the Rockbox Playlist Catalog only lists playlists in the /Playlists directory, it's fairly easy to use either kind of file path. I find it easier to stick with absolute.

    I've read that Rockbox tries to make file paths work even if there missed up. If it doesn't find the song using the filepath on the playlist, it will lop off directories until it finds it. So, for instance, if you the song is in /MUSIC/song.mp3, but you wrote the file path as /NEW/MUSIC/song.mp3, Rockbox would discover that there's no /NEW/ and move on to /MUSIC/.

    I haven't actually tested that, but Rockbox has played a few songs from file paths I messed up.