Category Archives: Linux

Samsung Galaxy SII doesn’t mount under Linux

unable to mount samsung_android: error initialising camera -1 unspecified error

Screenshot of the error message

Unable to mount SAMSUNG_Android

Error initialising camera: -1 Unspecified error

So this is the error message I get when plugging my Samsung Galaxy S2 into the USB port on my Linux boxen, all running Linux Mint Maya running the MATE desktop (Ubuntu 12.04). 

PTP_transfer_enable The answer is, of course, you need to enable PTP transfers, rather than MTP transfers.  MTP transfers work great for Windows or Mac, but not Linux.  On your phone, drag down the Notifications screen, then under “Ongoing” you’ll find something about “other USB options”.  Select that and you can pick the PTP transfer.

Per the notes on how to take a screenshot on a different phone, I took a screenshot of the final screen. Getting the screenshot onto my computer, that was a whole world of hurt.  Settings | More Settings | USB utilities | USB mass storage needs to be turned on, otherwise the file browsing from Linux shows only the directory structure, no files whatsoever.

Of course, Cathy’s HTC Desire, it Just Works.

Where did I take that photo?

I couldn’t find anyone extracting out the geolocation geotagging EXIF data from their photographs so they could pull it up on something like Google Maps.  There are stand-alone programs with embedded maps, but the bits and bobs lying around on the average system ought to be enough to just generate a URL to a mapping website.  The following bash script echoes the  URL that geolocates your JPEG.  Because my camera doesn’t emit it, I couldn’t be bothered dealing with the seconds part of a location, but I did detect that you don’t have a camera the same as mine.  Drop a line if you’ve used this and fixed it.

# emit a hyperlink to google maps for the location of a photograph
declare Seconds=""
Seconds=`exif -m --ifd=GPS --tag=0x02 $1 | grep -oP "[\d|\d\.]+$"`
if (( $Seconds=='0' ))
  Seconds=`exif -m --ifd=GPS --tag=0x04 $1 | grep -oP "[\d|\d\.]+$"`
if (( $Seconds!='0' ))
  echo "Script does not support seconds being specified"
echo -n ""
declare NorthSouth=`exif -m --ifd=GPS --tag=0x01 $1`
if [ "$NorthSouth" == "S" ] 
  echo -n "-"
echo -n `exif -m --ifd=GPS --tag=0x02 $1 | grep -oP "^[\d|\d\.]+"`
echo -n "%20"
echo -n `exif -m --ifd=GPS --tag=0x02 $1 | grep -oP "(?<= )[\d|\d\.]+,"`
declare EastWest=`exif -m --ifd=GPS --tag=0x03 $1`
if [ "$EastWest" == "W" ]
  echo -n "-"
echo -n `exif -m --ifd=GPS --tag=0x04 $1 | grep -oP "^[\d|\d\.]+"`
echo -n "%20"
echo -n `exif -m --ifd=GPS --tag=0x04 $1 | grep -oP "(?<= )[\d|\d\.]+(?=,)"`

Low spec notebooks can’t handle large amounts of RAM

Cathy and I are seeing increasing contention for the grunty computer in the house not dedicated to playing computer games. It’s used for a combination of recreational programming, web surfing and media encoding tasks. We decided to acquire a second, and after comparing the costs decided that the premium for laptop portability wasn’t too great (about $100; in fact that seems to be about the price of the OS we were forced to buy with the hardware). In out usage profile, “grunty” isn’t defined by CPU, but responsiveness which really comes down to how often an arm has to venture out across a spinning sheet of rust. Unfortunately, bottom-end systems (i3 class CPUs) can’t handle our base-level RAM requirement of 16Gb, so yet again a portable computer is the most powerful thing in the house – the new system’s specs are:

Processor: AMD Quad-Core Processor A6-5200 (2.0GHz, 2MB L2 Cache)

25W of power consumption right there. Existing grunty computer pegs its CPU for about ten hours a year, in sustained encoding runs. We weren’t CPU bound, and yet the only way to get that RAM in an i3 lappy was to spend an extra $100 on a Toshiba with worse specs – so we got a quad core.

Memory: 4GB DDR3 1600MHz (max support 16GB)

That 4GB came straight out and was replaced by the most RAM that could be stuffed in there. Existing grunty machine had 8Gb and was paging a lot. Why are web browsers so memory hungry? This upgrade cost $160.

Storage: 500GB (5400RPM) Hard Drive

This came straight out before the machine was even powered up once. It was replaced by a Plextor M5-Pro 128GB SSD; this unit was selected for its fast random write speed, and the common-for-all-SSDs 0.1ms seek time. Back in the day (about ten years ago) I advocated that when building a machine, you should get drives with the fastest seek times and screw everything else, plus all the RAM you could afford – to use as disk cache. How little things change. This upgrade cost $129.

After Linux Mint 12.04 Maya (LTS) was installed (consuming 6Gb) there was 110Gb free on the replacement device. Paging has been disabled due to the SSD write limitations, and tmpfs is used for various directories to further minimise our impact on the longevity of the drive.

Graphics Card: Onboard (Integrated)

The contention for the memory bus is troubling, but at least there’s no extra juice being sucked down to power a fancy-pants GPU. This is not a gaming machine, 2D acceleration is useful, 3D not.

Operating System: Windows 8 64 Bit

That went with the rotating media. We’re going to see if we can boot a desktop machine off of it and still have the OS believe everything is okay. The laptop didn’t like the new OS, saying “Selected boot image did not Authenticate. Press Enter to Continue”, but the solution was to disable Secure Boot.

Screen: 15.6-inch diagonal HD BrightView LED-backlit Display (1366×768)

It took some fiddling for Cathy to figure out how to dim the damn thing under Mint. Turned out the answer was to install the proprietary AMD drivers.

Audio: Dual Speakers Stereo DTS Sound+

If you’re using a laptop for A/V reproduction, you’re doing it wrong.

Connectivity: Gigabit LAN (RJ-45 connector), 802.11b/g/n WLAN, Bluetooth

The Toshiba only had 100Mb, in this day and age! The Ralink wireless adapator wasn’t picked up automatically by the installer, so Cathy got down and followed the instructions off AskUbuntu

Built-In Devices: 1x USB 2.0, 2x USB 3.0, HDMI, RJ45 Ethernet, Headphone-out/microphone-in combo jack, SD/SDHC/SDxC Card reader

USB3 was important in picking the unit, as I’ve seem just how much faster it is. HDMI is necessary for twin-monitor development; MSY had a 21.5″ Full HD IPS on sale for $118.

Webcam: HP TrueVision HD Webcam with integrated dual array digital microphone

I’d just paint over it, but there’s a chance that we’ll have a use for videoconferencing. It stays, but it better mind it’s Ps and Qs or else it’s black electrical tape for it.

Optical Drive: DVD Burner

Yeah, like that’s ever getting used.

Weight: 2.33 Kg

I’m more used to computers that weigh 1Kg, not two and a half.

Dimensions: 56cm (L) x 13cm (W) x 34.5cm (D)

This thing has a widescreen display, it’s freaky big compared by my 10” netbook.

Other observations: the keyboard sucks balls, with the trackpad positioned such that you physically can’t touch-type on it because doing so places your palms on the trackpad, moving the mouse and screwing up your input (I think this is happening because gestures have been turned on; they might find themselves getting turned off again). For some messed up reason they’ve included a numeric keypad, so touch-typing is doubly hard – again with the palms. This thing’s going to find itself plugged into a USB hub with a real keyboard and mouse quite a lot I think.

Anyways, the HP Pavilion 15-E001AU was purchased from MLN for the low, low price of $500. Total system cost was $907, and at the end we had a 4GB lappy stick and a 500GB lappy drive laying around.

CPU pegged at 100% while downloading video under Ubuntu?

totem-video-thumbnailer at fault?

Close Nautilus, the file-system browser that you’ve got open on the directory where the files are being downloaded. It file is constantly getting pinged as having been updated, and so it’s getting thumbnailed over and over again, to no end.

Note your download speeds may improve after this fix.

Google Chrome on Linux: slow, memory hog

I’ve run the Google Chrome on Linux beta since it first become available, and my impression is: slow. I might be unusual, in that I typically have dozens and dozens of tabs open, and that may break Chrome’s model of shoving each page into its own process, and this PC has “only” a gig of RAM, but it’s slower than FireFox for the same task. Things were a lot worse before I loaded AdBlock and FlashBlock for Chrome. Now my CPU isn’t pegged at 100%.

Embedded JavaScript is affected by this performance hit, so that particular tools that I have help do my stuff, well, don’t anymore.

Most annoyingly, it seems, although I haven’t confirmed it, that the back button causes a page reload: it doesn’t come out of the cache. Or the slowness could make it look that way. But how long can it possibly take to render a page anyway?

On the upside, it hasn’t crashed, and I would have expected FireFox to mysteriously die without any explanation by now (a sign that Firefox is going to die soon is that tab-swaps/page loads become very slow, indicating a similar root cause which I’m guessing is memory exhaustion). Firefox has always done the mysterious death thing, and I was hoping that upgrading to 3.5 would fix things, but no dice.

I’m trying to decide whether it’s preferable to have my browser snappy, but occasionally fall in a big pile and get back up again, or a laggard that rolls with the punches. Perhaps I’ll split my browsing between them simultaneously; vital stuff on Chrome and throw-away stuff on FF, but that’s going to be a bit tough on my brain.

Well, it turns out that Chrome is a memory hog. I bought another gig of RAM, and wouldn’t you know it, the PC is flying. My suspicions were tripped when all of the RAM was in use, most of the paging file and the little orange disk activity light was slowly burning a hole in the wall on the other side of the room.

Chrome for Linux now in Beta

Chrome for Linux now in Beta, which I’m sure is all over the place, but go here: to fetch.

You can’t change spell-check languages. But it seems to crash less than Firefox, so I’m switching. I’ll give you a yell when I figure out why this was a bad idea

Misc stuff

Guitar Hero/Rock Band compatibility: For those looking at the options for Guitar Hero and Rock Band (insert grumble about RB2 not yet being available in Australia), check Joystiq’s instrument compatibility chart to see which instruments work with which games.

OpenID: Ooh, this I like: Jeff Atwood on how to use your own URL for your OpenID.

Unix quick reference: Here

Home Improvements – Here endeth the lesson

For the story so far see Part 1 and Part 2. If you’re totally bored, then please don’t read on… this is the longest post yet!

So I got my Linksys NSLU2 home. I thought I’d fire it up and make sure it worked. There’d be nothing more frustrating than flashing it with the Linux OS, find it doesn’t work and then wonder whether the issue is with the new Firmware or the actual hardware.

Plugged it in, fired it up, plugged in and formatted a blank external drive I dug out of the cupboard. All good so far! I can’t plug in a disk with anything on it because the LinkSys requires disks to be formatted with EXT3.

Hmmm… what’s this… a firmware upgrade to the NSLU2 that allows it to read NTFS! That’d make the device usable until I get my head around the Linux options!

Loaded up the upgrade, all went smoothly. Plugged in my external hard drive to see if it works. Get “Drive not formatted” message in the NSLU2 admin screen, so it must not support NTFS after all. Oh well. Plugged the external drive back into my desktop PC.

“This disk is not formatted. Do you want to format it now? Yes/No”




An entire disk’s worth of data… gone. Video from when the kids were little, lots of photos… gone. I know what you’re all thinking… why wasn’t this data backed up? I have two responses to this. 1) It’s not that easy to back up a 14GB video file. 2) Part of the reason I was setting up this solution is to make automated backups more accessible!

Some have said that I shouldn’t have trusted the device with my data, but in my defence, it’s a shrink wrapped consumer device that’s designed to have drives plugged in to it. If I can’t trust this device with my data, I don’t have much use for it!

I kicked off a File Recovery scan and went to bed very sad.

In the morning, the file recovery had found a bunch of deleted files, but none of the files that were not deleted at the time of the corruption! I tried loading the drive up in a couple of EXT3 file viewers, but they couldn’t read the drive either.

I’d pretty much given up hope of getting my data back.

Then my neighbour nonchalantly suggests I try a partition table repair tool. I load one up and run it. It tells me “The partition table on the disk is incorrect. Would you like to fix it?” I click “Yes”. Bang. All my data is back!!!

Yay! Waves of relief! Not to mention proof that the Linksys had screwed up the disk. The partition table was written for an EXT3 disk, even though it was still formatted in NTFS.

Yesterday I took the Linksys back to Harris Technology and threw it at them as hard as I could. Actually I didn’t and they were incredibly helpful, giving me a full refund without any hassle.

So back to the drawing board. Now that I realise how precious that data is to me, I’m going to have to get a proper, RAID based network drive solution. More money :( I’ll probably go for a Thecus N2100.

Lesson the First
Imagine losing all your data that is not backed up. How do you feel about that?

Lesson the Second
No, really. Losing it. Right now. Seriously, how do you feel about that?

Weigh your reaction to the above questions against the cost of getting dedicated backup.

Here endeth the lesson.

Update: I was talking to Josh last night and he said it wasn’t clear that I hadn’t installed the funky open source firmware on the LinkSys box yet. It was running the latest official firmware release. I probably also didn’t emphasize enough that I wouldn’t recommend anyone buying one of these pieces of junk

Home Improvements – Part 2

I’ve purchased my Linksys NSLU2 :)

Now I want to make some modifications. The issue is that there are a number of different firmware options to choose from.

My requirements:
- Serve files for media (Basic functionality for all firmware)
- Read from FAT32 formatted external drives (isn’t provided by the base firmware!! The device requires all disks to be formatted!)
- Bittorent client
- Subversion server

Based on this comparison of different firmware options I’m going to have to look at a full linux based OS. Unfortunately I’ve never used Linux, so trying to get it to work on a small memory/slow processor device is going to be a steep learning curve.

Stay tuned for the next exciting episode.

Home Improvements

I’ve annexed a room at my house to be my ‘den’. First order of business is getting some entertainment in there.


  • Watch DVDs
  • Watch other media from my computer
  • Reasonably inexpensive

My current solutions contains the following components:

  • Xbox running XBMC as a games/media streaming console (just purchased from Global Consoles)
  • Some sort of network storage so I don’t need to have my PC running constantly.

The network storage decision is narrowing down. I considered solutions such as the Thecus N1200. I dismissed this as being overpriced and probably overkill for my needs.

My current front runner is a Linksys NSLU2. It doesn’t have any internal disks, but has two USB ports to plug in external drives. The real beauty of the device (affectionately known as the ‘slug’ by fanboyz) is that there is an open source Linux based operating system that can be installed to it. This adds lots of extra functionality like all sorts of servers (print, bittorrent, iTunes, media/photos). I was even thinking I could install svn on it and it can be my source control repository.

I’ll let you know how my plans proceed. Any advice/comments would be very welcome!

Keeping your PC pure and fast with virtualisation

A couple of weeks ago Josh posted about virtualising your overloaded, slow, not-rebuilt-for-years PC, and keeping it on standby within a new build in case you need anything on it.

How about the idea of keeping that new build clean — putting on only your most frequently used, essential applications, with everything else going onto a virtual PC?

For me, that would mean Office, Firefox, my usual web-building stuff (Photopaint, UltraEdit, Filezilla), Nero, and one or two others, such as perhaps Trillian. I’d draw a line under them, and anything else not worthy of a permanent spot in my Windows setup would be virtualised, possibly in various separate virtual PCs, setup for different roles: one for Visual Studio, one for trying out freebie apps from mags, a Linux setup for LAMP development, one for stupid software that insists on running as Administrator, etc, etc.

Windows 98 under Virtual PCWhat to use for the virtual machines? There’s a few different options.

The freebie Virtual Server will only support Windows NT 4 and above, and only server OS’s, which to my mind would unnecessarily weigh down your virtual machines with more than they need. (Linux as a guest OS seems to be coming.)

Another option is the free VMWare Server, which will host a wider range of guest OSs.

The non-free Virtual PC will host just about any x86 operating system. If you don’t want to try the 45 day free trial, it’ll set you back A$215 or so, or it’s available via MSDN Universal.

A problem would be performance, of course. It’s not like emulating a 2Mhz 6502 under BeebEm. But then, hopefully it’s not as bad as what I’ve seen on my brother-in-law’s PowerPC Mac trying to run x86 AutoCad in Windows 2000.

Nonetheless games and other performance-intensive apps may not perform well under virtualisation, especially if they require particular hardware. And yet they would benefit the most, as they often have installers that wreak havoc on Windows setups, chucking weird-arse DLLs everywhere. As the “Virtual PC Guy” is fond of telling us, a lot of the older games run okay, but newer ones might be a problem.

Maybe the only solution there is to put them on a completely separate computer, or move up to Intel’s latest chips which have better support for virtualisation.

Or give the whole thing up and resign yourself to a slow computer with rebuilds every year or two.

I think I’ll try Win98 with a couple of recent-ish games (say, Midtown Madness 1 and 2) and see how it goes.