Archive for the Category "linux"

So I was having a problem with my external USB hard drive lately.  The USB connectors on this LG laptop are a bit shady so things get disconnected if you bump them and this would happen with my hard drive.. The problem being that if the Hard drive was disconnected like this and not properlyy unmounted that it wouldn’t come back up 50% of the time when I plugged it back in.

It would show up when I run fdisk -l and in dmesg but when I try to mount the drive it would return with the error ’special device does not exist’.  The only way I could get it back online was to reboot the machine, until now! :)

I tried installed usbmount and pmount but neither fixed the problem.

After some research I discovered the MAKEDEV command.  So what I tried was to run MAKEDEV from inside of /dev/ and it would give me an error: “.udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.”

So I went on and looked into /dev/.udev/ and found a /failed/ directory which had a blocked file in there referring to the hard drive that wasn’t mounting.  For some reason I ran the MAKEDEV [device] command here and VIOLA, it worked.  Apparently it just needs to be run in a directory that doesn’t have a .udev subdirectory in it

So for me the command was MAKEDEV /dev/sdd and it created sdd1 through sdd10.  Not sure what the other ones are for but I was able to mount sdd1 properly and access my hard drive.  I mean this is a pretty backwards work around but I can access my hard drive without rebooting, so I’m good to go!

So to sum it up, if you have a device that isn’t mounting properly but you can see the device with #sudo fdisk -l then:

  1. try creating a temporary directory for your new mount points
  2. Then run MAKEDEV [device] inside of that directory.  So if the partition your trying to mount is say /dev/sda1 then you’ll want to run MAKEDEV /dev/sda and hopefully that gives you access without needing to reboot.

So today was the last straw with Evolution. It is just too buggy and too unstable of an email platform for me to use anymore so I began the dreaded migration of 1.1 GB of emails to a different client. Thanks to the awesome walkthrough below it turned out to be a lot less painful than I had imagined.

If you are using Evolution and are getting fed up of the little bugs and instabilities here and there then check out the article below on how to switch to Thunderbird:

http://maketecheasier.com/how-to-migrate-from-evolution-to-thunderbird-in-ubuntu-intrepid/2008/12/04

A quick highlight :

Migrate local mail from Evolution

First, we will migrate the Evolution mails that are stored locally in your hard disk.

Open up two Nautilus windows (if you like, you can open two tabs instead of two windows). Press Ctrl + H to reveal the hidden folders. In one window, navigate to the .mozilla-thunderbird folder. You should see a folder with name similar to i7bqvbzk.default. Click on that folder, followed by Mail and Local Folders. You should see some files like Inbox, Trash, Unsent Message etc.

thunderbird-folder

In the second window, navigate to .evolution -> mail -> local folder. Similarly, you will find files such as Inbox, Outbox, Sent, Trash etc.

evolution-folder

Now copy the five files Inbox, Outbox, Drafts, Templates, Sent from the Evolution folder to the Thunderbird folder. If it prompts you whether to replace the existing files, click Replace All.

If you have used any subfolders in your Evolution, you should see a folder with a .sbd extension (such as #evolution.sbd). In your Thunderbird folder, create a similar folder with the same name. Back to your Evolution folder, copy and paste all the files in the subfolder that don’t have a file extension to the Thunderbird subfolder.

That’s it. Restart your Thunderbird. You should see all your Evolution mails imported over.

So for the past two days I have had this problem in Evolution, my email client, where ‘m’ was the new shortcut for add attachment.. Not Ctrl+M but just M.  So everytime M was pretty it would stop what I was typing and open up the add attachment dialogue box, obviously making it impossible to write an email with any word containing the letter m in it.  I couldn’t figure out for the life of me how to change the shortcut keys for these sorts of things but today I just randomly stumbled upon it and thought I would share.

What you do is with a new email open go into the insert menu (alt+i) and use the arrow keys to highlight(but don’t press enter) then with the command select press your hotkey combination.  Or in my case I simply press the ‘m’ key with add attachment selected and then it bound m to that action.

It’s an awesome way to handle shortcuts but there is a distinct lack of documentation on it so hopefully this article will find its way onto some google searches of people with a similar dilema.

Category: linux  | One Comment

So after having the edge of my hand touch my touchpad and mess up an email for the upteenth time today I went around and did some research to see if there was a quick shortcut key or something I could press to turn the bloody thing off and then on again when I was done typing.  Well let me tell you I found something so much better!  There’s a command in shell that will automatically disable the touchpad if you’ve been typing for a set amount of time and then turn it back on automatically when you’re done..  Genius!  Genius I say!!  But what is this command you ask?  How do you enable it to save yourself endless frustration?  Well I’m glad you asked because I was just about to explain it:

The program is syndaemon and it can be enabled in shell by typing: syndaemon -i 3 -d

Where

  • -i parameter defines number of seconds to wait after keyboard is used – ( 3 seconds suites me. )
  • -d  parameter is used for running syndaemon in background mode ( as a daemon ).

If above command throws some error then you are using other than 9.04 release. To get it working type in terminal,

wget http://people.ubuntuwire.com/~fujitsu/syndaemon
chmod +x syndaemon
sudo mv syndaemon /usr/bin/
syndaemon -i 3 -d

Again type the syndaemon command in terminal, it shouldn`t give any error messages.

Above command has to be executed each time machine is rebooted. To execute above command automatically we can create a tiny bash script and add it to startup items.

1. Create a new file somewhere ( My BSD habits puts files like this in /usr/local/etc/rc.d/ but that’s just me ) and copy paste following into it.

#!/bin/bash
syndaemon -i 2.5 -d

2. To add above script to startup items, go to System > Preferences > Startup Applicaitons >  Add. In new  pop-up box name it something meaningful and type in the path and command.. After that click “Add”.

There you go, done like dinner :)    Enjoy not having the hell of your cursor selecting 2 paragraphs of text and typing over it before you know what’s going on!

YouTube Preview Image

The tracking on this thing looks really impressive(“Sub-milimeter accuracy”).  To take the Wii Experience, but better, and put it on the power of the PS3 is enticing to say the least.

YouTube Preview Image

And M$ wouldn’t be outdone by Sony and is also jumping on the Nintendo Bandwagon.  Now what we really should be excited is to see, maybe not this year, what Nintendo is doing to improve it’s system so that it can stay ahead of the competition as they look to enter into a domain and market created by Nintendo.

So I’ve been going through a real LOTR kick lately.  After finishing watching the Extended version Trilogy again, I then went through all 6 DVD’s of the Making of and now I’m going through the Cast Commentary of each film.  I suppose watching all of this and immersing myself in the Film project has given me an immense appreciation for the incredible effort that went into this film, I would say more so than any other films in human history.  I say this because I feel that this could be directly responsible for how I feel about LOTRO.

After finishing the films again I was left with an incredible desire to explore this world in much more detail and on my terms.  A testement to the amazingness of our times that now that option is available to me.  My problem however is that I wanted to explore a world as rich as the one created in the films(visually) or as captivating as the world created in the books.  Perhaps this was an unfair expectation in Turbine but upon entering Middle Earth in Lord of the Rings Online I was immensly dissapointed, and my guess is that many other players also are.

Visual: When you watch the films there is absolutely no mistaking that the world of cinema has never seen works that match the visual authenticity and sophistication of LOTR.  Not strictly from a CG perspective but speaking of the set designs, the blacksmiths working around the clock, the seamstresses, the miniatures, etc etc.  Everything for these films shattered records previously thought to be impressive.   This is something Turbine should have taken into account when they decided to create Middle Earth for the masses to explore, clearly they aren’t expected to match the quality of the film, however I would expect them to take the same fervor in attention to detail and groundbreaking effects relative to other online games.  They however did not.  The infinite small details that make the story in the book come to life, and those of the films that suspend all disbelief are no where at all to be found in the game.  With the expectations that the films set for this the gameworld seems bland and vanilla no matter where you are looking.   It is simply another generic online game that looks no better and in many cases worse than many others.

Gameplay: Again absolutely nothing ground breaking here.. The quests are incredibly tedious for the first 10 levels with ZERO hook to get you interested in the story.  The very very beginning introduction starts off with you defending a courtyard, which is a step in the right direction, however after that it is simply one rat quest after another, interspered with fedex quests here or there.  There is an epic quest storyline that goes on but has zero compelling features in it and the fact that the hero you are following is so much weaker than yourself makes it even more insulting.

You can start off as any of the main characters in the story: Dwarf, Elf, Human or Hobbit however there is no major major differences between them.  By this I mean they share 90% of the same classes throughout, so each race serves mainly an aesthetic purpose which can be good in a way as it allows you to play your favorite class and explore the hobbit world or the elves but there is no real compelling reason to choose one over the other or any reason to feel special about being an elf as there is a human of the same class out there that is identical to you without the pointy ears.

There are some slightly innovative mechanics for combat but really nothing to write home about.

Lastly, once you get your first character above lvl 10 you are able to do ‘monster play’ which allows you to start a lvl 60 evil character(orc, spider, worg etc etc).  This could prove interesting as it opens the whole world up on the other side so I’ll give them that.

Price: There doing something right here.  You can sign up for a 10 day free trial and convert it for 9.99 / month.  No box fee which is nice to see.  However compare this to a game like Requiem, which is 100% free, looks much better visually and has more exciting and developed gameplay from the start and that 9.99 still seems overpriced.

At the end of the day it seems all too clear that either Turbine bit off far more than they could chew, or their main intention here was to cash in on the immense success of the brand – wanting to take as little risk as possible due to the fact that almost anything they produced would be gobbled up by hordes of rabid fans.   Consequentially what they ended up producing was a product that visually can’t compare to it’s competion let alone attempt to step into the massive shoes that Peter Jackson created for the brand, and gameplay wise has nothing unique to appeal to players over any of the other games offered out there.  This strikes me as a major disservice to the Brand in general, once you know what went into writing the books and then the insanity that went into creating arguable some of the greatest films ever made.  Perhaps Turbine was doing the big corporate thing and playing it safe or perhaps they bit off more than they could chew, either way I see them in a slightly tarnished light because of this project.

In a world with so many high quality free mmo’s being produced these days(Requeim, Shaiya, Last Chaos to name a few) if you want to step into this arena and charge people money for a monthly subscription you had damn well be able to justify it on all fronts… LOTRO does so on none, which saddens me to no end.  Someone please call Bethesda to fix this mess!

So after running into this problem suddently and for no ‘apparent’ reason(although it became apparent later) I noticed the complete lack of real support docs online in regards to the ALSA underrun problem.  Hopefully I can rememdy this a little bit and help some people out.

Last week I noticed skype audio was getting really choppy, it was the equivalent of seeing the conversation through a strobe light.  Odd I thought but didn’t pay it too much heed, that was until the end of the week when the audio simply stopped all together and skype refused to close down normally.  I would have to manually kill the process in terminal after the sound cut out.  This problem was exclusive to skype, which made it even more frustrating as I could have youtube and/or music playing in exaile while skype was screwing the pooch.

It occured to me today that something indeed had been changed recently right before this problem started and that was me fiddling with pulse’s daemon.conf and enabling real-time scheduling.  I can’t remember what for but this was part of the problem.  In fact there is even a mention in pulseaudio’s man page in regards to the possibility of real-time scheduling causing problems which I’ll quote here:

Alternatively,  if the risk of locking up the machine is considered too
big to enable real-time scheduling,  high-priority  scheduling  can  be
enabled  instead  (i.e.  negative  nice  level). This can be enabled by
passing –high-priority (see above) when starting  PulseAudio  and  may
also  be  enabled  with  the approriate option in daemon.conf. Negative
nice levels can only be enabled when  the  appropriate  resource  limit

RLIMIT_NICE  is  set  (see setrlimit(2) for more information), possibly
configured in /etc/security/limits.conf. A resource limit of 31 (corre‐
sponding with nice level -11) is recommended.

At this point I got a little excited as the solution seemed within reach.  I hashed out real-time schedule and implemented high-priority scheduling, restarted pulseaudio and loaded up skype.  It started fine but when I made a test call I was once again plagued by ALSA underruns.

They key here was to adjust the nice level.  I incrementally went down from -11 all the way to 3 (as in plus 3 not -3), restarted pulseaudio, loaded skype and viola!  Problem solved.  The nice level might be different for you so maybe experiment with that a little bit.

Summary:

  • edit ~/.pulse/daemon.conf (or /etc/pulse/daemon.conf if you run as system)
  • Hash out realtime-scheduling and realtime-priority
  • Unhash high-priority and nice-level
  • set nice level to 3 (not -3 or -11 for that matter)

Update:  Bah, I am still seeing these under runs.  The severity of them has gone down as skype doesn’t completely cut out now and lock up but I am getting audio cutting in and out every 2-3 seconds when making a call via skypeout.

Searching around the skype forums I found this and this actually seems to have done the trick completely:

Edit your ~/.asoundrc file

# Part I directly from ALSA Dmix Wiki

pcm.skype {
type dmix
ipc_key 1024
slave {
pcm “hw:0,0″
period_time 0
period_size 1024
buffer_size 8192
#format “S32_LE”
#periods 128
rate 44100
}
}

pcm.dsp0 {
type plug
slave.pcm “skype”
}

# This following device can fool some applications into using pulseaudio
pcm.dsp1 {
type plug
slave.pcm “pulse”
}

ctl.mixer0 {
type hw
card 0
}

pcm.pulse { type pulse }
ctl.pulse { type pulse }
pcm.!default {
type pulse
}

ctl.!default {
type pulse
}