Text

Tuesday, May 02, 2006

ssh-keygen

Ever since discovering ssh-keygen, I've loved it to bits. Moving about machines became so much simpler. And ever since I've used ssh-keygen, I've had a blank "passphrase". For some reason I decided to enter a passphrase today. Guess what? You can login to the other machines by entering your passphrase. But it doesn't remember that event on subsequent use of the key! I thought it would be like sudo. So doing a repository update of my project directories meant that I had to enter my password for each project. Trouble... troublesome! I'm not going to work anymore! It's like having two passwords and you have to enter at least one of them. I don't get it, what's the point of having a passphrase then? What's the point of the ssh-keygen'erated then?

That's right... There's no point to it if you haven't yet heard of ssh-agent and ssh-add; which can be found at the bottom of ssh-keygen's man-page under the "SEE ALSO" section! These two utilities help manage your keys to avoid the problem I just described before. To use ssh-agent, first put your shell under the management of ssh-agent running the command: "ssh-agent bash" (this starts a new bash shell). Next tell ssh-agent about your key by running the command: "ssh-add". This defaults to $HOME/.ssh/id_something file. If you chose a different file name, just tell ssh-add where to find it. When adding the key, ssh-add will ask you for your... PASSPHRASE! After this you should be able to use the key without entering the PASSPHRASE for that shell session.

Sunday, April 16, 2006

How to get mplayer working on Ubuntu 5.10

  1. Add "multiverse" into your repository of packages.
    1. Edit "/etc/apt/sources.list"
    2. At the line that starts with "deb http://au.archive.ubuntu.com/ubuntu breezy", make sure this is followed by the following: "universe main restricted multiverse". So the line should read as: "deb http://au.archive.ubuntu.com/ubuntu breezy universe main restricted multiverse".
      • Note: if you didn't have "universe" in your original line, congrats! You now have access to a much wider range of applications!
    3. Run the following to update your repository: "sudo apt-get update".
  2. Next, determine which mplayer you need.
    1. Run "apt-cache search mplayer" to give you a list of mplayer packages.
    2. The packages of interest I got were:
      1. mplayer-386 - The Ultimate Movie Player For Linux
      2. mplayer-586 - The Ultimate Movie Player For Linux
      3. mplayer-custom - The Ultimate Movie Player For Linux
      4. mplayer-k6 - The Ultimate Movie Player For Linux
      5. mplayer-nogui - The Ultimate Movie Player For Linux
    3. For each you can use "apt-cache show" to read its description. The description ends with a note saying which CPUs the particular package is for. For my case, I chose "mplayer-k6" as I am running a Duron.
      • If you cannot find a package that is specifically built for your CPU, use "mplayer-386".
  3. Install your selected mplayer package. Assuming my case: mplayer-k6. We will also install "mplayer-fonts" for fun.
    1. Run the command "apt-get install mplayer-k6 mplayer-fonts"
  4. Test on a mpg/avi file. Assuming we have the file "~/pom.avi". Note: "pom" not "porn".
    1. Run the command "mplayer ~/pom.avi"
    2. While it's running, press "f" for fullscreen.
      1. Gah! No full screen?
  5. Edit the file "~/.mplayer/config". I'm not sure if the "~/.mplayer" directory is created on install or on the first time you run mplayer. That's the reason for the "testing" step. :) Put the following in:


    # Specify default video driver (see -vo help for a list).
    vo=xv,sdl,x11

    # Specify default audio driver (see -ao help for a list).
    ao=alsa,oss,sdl,esd,arts

    # Drop frames to preserve audio/video sync.
    framedrop = yes

    # get a default OSD font from fontconfig
    fontconfig = yes
    font = "Sans"
    subfont-text-scale = 3

  6. Now rerun the earlier test and see if "f" for fullscreen works.
  7. Now try a WMV file.
    1. Get one from http://www.wimp.com. Just stop the browser from trying to load the video and use the "download" link to get the file.
    2. Assuming you downloaded "whatever.wmv" on to your Desktop, run "mplayer ~/Desktop/whatever.wmv".
    3. You'll probably have mplayer crash like mine did.
    4. Kill it by opening another terminal and running "pkill mplayer".
  8. Get CODECs for mplayer.
    1. Goto "http://www.mplayerhq.hu/design7/dload.html"
    2. Download "essential codecs package"
    3. Untar its contents. Assuming the file you downloaded is "essential-20050412.tar.bz2.tar" and your command promt is in the directory containing that file, run the command "tar jxvf essential-20050412.tar.bz2.tar"
    4. Enter the directory: "cd essential-20050412"
    5. Read the README file: "cat README" to determine where to copy the codecs. The file says that for prebuilt codecs, this is "/usr/lib/codecs". If that doesn't work, try "/usr/lib/win32", and maybe "/usr/local/lib/win32".
      • You need to use "sudo" when making /renaming those directories.
      • You also need to run mplayer from outside of the directory containing all the codecs. As I found out, my first test worked only because mplayer found the codec it needed in its working directory.


Short version for a Duron CPU, and codec directory "/usr/lib/win32"


sudo emacs /etc/apt/sources.list
# add "multiverse"
sudo apt-get update
sudo apt-get install mplayer-k6 mplayer-font
if [ ! -f ~/.mplayer/config ]; then mplayer; fi
emacs ~/.mplayer/config
# add the text below

# START TEXT ############################

# Specify default video driver (see -vo help for a list).
vo=xv,sdl,x11

# Specify default audio driver (see -ao help for a list).
ao=alsa,oss,sdl,esd,arts

# Drop frames to preserve audio/video sync.
framedrop = yes

# get a default OSD font from fontconfig
fontconfig = yes
font = "Sans"
subfont-text-scale = 3

# END TEXT ##############################

wget http://www1.mplayerhq.hu/MPlayer/releases/codecs/essential-20050412.tar.bz2
tar jxvf essential-20050412.tar.bz2
sudo mkdir /usr/lib/win32
sudo cp essential-20050412/* /usr/lib/win32/.

Saturday, January 28, 2006

Summer Bug Swarm

I got home from work last week and saw these little bugs at the front of the main entrance of our apartment.



On closer inspection, some of them looked like they were mating.



I thought that was funny until the next night. They little buggers had spawned into a swarm and it was freaky man! I drove home that night at about mid-night and could not believe my eyes! Imagine this, driving home and your eye catches a glimsp of a dark patch on the ground. What the!



The next morning, those the swarm looked for the shade. Those left in the sun died.



Ah... the shade.



My neighbour's car provided shade all through the weekend.

Tuesday, January 24, 2006

WoW on Wine on Linux

One way to run Windows applications in Linux is to use Wine.  This is not an emulator (so says http://www.winehq.com/site/myths ). Anyway, I was checking out the status of running World of Warcraft using Wine.

On this page (http://appdb.winehq.org/ ), they have a list of "Gold" applications.  These are "Applications which install and run virtually flawless on a out-of-the-box Wine installation".  And WoW is on the top of the Gold List!  Yeah.  Let's learn more about this by clicking
on the "World of Warcraft 1.3.0" link on the left.

That would take you to this page ( http://appdb.winehq.org/appview.php?versionId=2581) where it lists more details about running WoW over Wine. ...

Description

This is World Of Warcraft 1.2.x US and Europe

Wine compatibility
Note: Always run in opengl mode. (-opengl flag for WoW.exe)

What works
All seems to work, except the selection of things in the universe. The
infamous mouse selection bug... :(

What Doesn't
The mouse can not select things.

What wasn't tested
A lot, because can not select things with the mouse

.... ah ha ha ha ha!  What doesn't work?  Mouse cannot select things.  What wasn't tested?  A lot, because can not select things with the mouse!  Ha ha ha!  And WoW in on the Gold List?!!?  What a bunch of jokers!

Friday, January 20, 2006

Dead Duck on Campus

Heading to Calypso for coffee (Purple Pickle was closed), I took the scenic route via the stepping stones behind the Sports Hall. I notice a flock of ducks on the oval (which was closed); more like a herd actually. Their numbers caused me to start thinking about the fact that I've never seen one of them dead! Amused, I trained my eyes at the surrounding bushes as I continued my walk. It wasn't long till I spotted what seemed like a dead duck! It had a white strip on its wing, so I thought maybe it was a magpie. But on closer inspection, it had a duck head. There it laid, belly up on one of the rocks beside the stepping stones. Its chest was ripped open such that you could see its spine (or some kind of bone). Obviously the result of an attack. Hmm... what animal attacks ducks? Cats? Dogs? No idea. But its my first Dead Duck sighting in The Australian National University!

Sunday, January 15, 2006

Dialup...

After weeks of unlimited broadband Internet access in Singapore, dialup (in Canberra) is so slow slow slow! And there's some "kernel_task" associated with the "Internet Connect" application on "dial-up" mode that uses up all the CPU cycles. This really sucks! :(

Friday, January 13, 2006

Google Earth

I found out yesterday that Google Earth is now available for Macs. Excitedly, I downloaded the .dmg image and installed Google Earth. Despite all the disclaimers about how computers older than two years or four years may not be able to run Google Earth, my iBook which is about one year now cannot run Google Earth!!! The Mac version of Google Earth is built for OS X 10.4 Tiger! Chey! Hmm... this meant that my iBook was outdated the moment 10.4 came to market. Which was about two weeks after I took delivery of my machine! Argh!

Nevertheless, I installed Google Earth on our media PC in the "AVA-room". Google Earth on a large projector and screen setup is absolutely fantastic! So is World of Warcraft! I managed to find our old and current homes in Singapore and the three points just about forms an equilateral triangle! How cool is that? Very cool.

Panning across the globe to Canberra, I found my crappy and depressing rental Canberra apartment. Then my brother came in and we twirled the globe again to Vancouver where I see, for the first time, the fantastic apartment block he lives in; right by the water front! This just makes the Hackett apartment look like shit. Got to move out! I've got to move out!