Thursday, November 29, 2012

Desktop Linux needs anti-virus like a fish needs a bicycle



You don't need an anti-virus program on Linux: I've said it before, but Don't Surf in the Nude started because of an interest in internet security, so I can't resist trying out anti-virus programs in Linux.

I noticed today that Comodo has produced a Linux anti-virus program with real-time scanning. Files are checked as they are accessed or created- for example as they are downloaded from the Internet.

I couldn't resist trying it out. They've created the Windows AV experience on Linux, but like crime in multi-storey car parks, it's wrong on so many levels.

When you install the package, you're faced with a long User License Agreement in the Terminal. If, like me, you're tempted to scroll through the I-agree-to-sell-my-soul-to-the-devil script by pressing enter, you find you've accepted and the installation program is running.

Run the installation script as requested and you see various kernel modules installed. As I found out later, they are not removed by uninstalling the package.

After downloading the 100MB of virus definitions, the Windows AV experience is complete. A lengthy scan of system files (Linux AVs usually only scan user space) found no viruses.

Real-time scanning works: I tried downloading the Eicar test virus only for Comodo to warm me that it was a virus.

This is actually a very well made bicycle, but that doesn't alter the fact that fish don't need bicycles. Why? Because I'm not downloading suspect files form the internet and trying to install them. The thing is to make this switch to being an aquatic craniate rather than buying a bicycle because you think you still have limbs.

Now to try and remove those kernel modules.

Wednesday, November 28, 2012

Memory test

When GUI applications fail to respond, one suspect is memory failure. If buttons are unresponsive it could be that the application is trying to run in bad memory. This is something that can happen on old or new hardware. The laptop I'm writing this on had to have its memory replaced when new. The engineer call out probably wiped out the profit margin for the sale. In fact the company went bankrupt soon after, so maybe my machine tipped them over the edge...

I came across it again recently on an old machine. An application GUI was failing to respond. The machine was dual booted with an old version of Ubuntu, with Memtest86+ as a boot option, so I gave it a go.


Memteast86+ is also available as a bootable CD image. The thing to remember is that the program will make multiple passes (i.e. run forever) if allowed. One pass was enough to reveal that something was wrong with this computer.

Luckily it was the smaller of the computer's 1G and 512MB memory cards that had failed, and pulling that out fixed the memory problem, 1G being enough for XP.

Monday, November 26, 2012

Skype on Wheezy

Just as Empathy got round to supporting MSN video chat, Microsoft ditches Messenger for Skype. The latest Skype version for Linux is supposed to be quite good, so I'm trying it out.

Support for the latest video libraries is not present, so my webcam won't work for me in Skype without this command:
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype
An issue I've come across before with Flash.

The fairest mirror of them all?

I've been trying out http.debian.net, which chooses the best debian mirror for downloading packages. It seems to do a good job in avoiding mirrors that are temporarily down.

Monday, November 12, 2012

Freeing up memory on my Android phone

I've noticed on my Android phone (an Alcatel 990) that if I try to install too many apps, I get a message about the phone being low on internal memory.

I also noticed that if I update the system apps the memory warning appears constantly. I'd guessed that this was because the phone is storing the update and the original version- it's possible to uninstall updates for system apps.

I rooted the phone recently, and decided to see if I could free up some memory. The first thing I did was to delete some apps that are installed by the service provider but which I never use. Alcatel has a partition for system apps called /cutspack/apps (in addition to /system/apps), and it was simply a case of deleting the unwanted apps from there. (Android Forums.)

My guess about updates to system apps was confirmed when I found that updates are stored as user apps in data/apps while the original app remains in /cutspack/apps. bongizmo.com has the answer:
Q: Can I move system apps such as Gmail, Google Maps to SD card on a rooted phone?

A: Thanks to Dominique Tardif for this tip: “You have first to uninstall any updates to the system apps in question. Second, using a rooted file manager, delete the original apk from /system/app (android keeps the system app apart from the updates, the latter being at /data/apps). Once this is done, reboot and reinstall the app from the market. It will be installed as a user app and as such will be movable to the sd card. As an example, my gmail, facebook, maps etc. are all on my sd card now.” 
Having updated a few apps this way, I was surprised to find that I was getting the low on memory warning again. I managed to install partitions info lite,  and noticed that it was the /data partition that was almost full- there was plenty of room in /system and /cutspack.

But why was /data so full? The updated apps weren't there. I noticed that /data contained a huge folder called dalvik-cache. Android Forums said it was safe to delete, so I did. Free space in /data went from 10MB to 60MB. Dalvik-cache is a cache of optimised files, and I reckoned there were files in there for application I no longer had that were taking up space.

I rebooted the phone and it took a very long tome to boot. I was beginning to suspect I'd bricked the phone, but in the end it booted up. Free space was down to 50MB as the Dalvik-Cache had been regenerated with the necessary files.

With lots of free space on the system partition, but limited space on the user partition, I wondered if it was possible to install apps that won't be moved to the SD card to the system partitions: indeed it is. addictivetips has the answer- in essence to cut and past the app. I haven't noticed any problems with permissions.

A word of caution: delete or move the wrong system file and the phone could become unbootable. Follow these instructions at your own risk.




Saturday, November 10, 2012

Add book cover in Aldiko

I love Aldiko. I read all of the Sherlock Holmes stories on it this summer on my mobile phone. Bump the text size up a bit and it's perfectly readable.

Today I tried to change the covers of some of the books in my collection, something I've done before, but I couldn't remember how to do it.

I finally figured out how I'd done it. This time I'm writing it down so I can remember.


Download a cover image. In Aldiko, long press on a book on the bookshelf. Select Details, long press and release on the book image in the pane that appears. Select Gallery, go to Downloads and choose the cover image. Select or crop as necessary.

Using the file browser to find the image didn't seem to work for me, although it may have been a glitch.

Thursday, November 8, 2012

SuperOneClick in VirtualBox on Linux

My Android phone is out of warranty, so I thought I'd try rooting it. There are a few apps on it that I never use, and wanted to get rid of. SuperOneClick seems to be the easiest way to do it. It automates a process of hacking the phone that is also possible to do manually in Linux, as cYpherpunK describes. However, as I've recently installed Windows XP on VirtualBox, I decided to give SuperOneClick a go.

I couldn't get the program to work until today, when I noticed this error message at one point:

error: protocol fault (status 55 6e 61 62?!)

A post in the XDA Developers' forum gave me the answer: disabling USB 2 in VirtualBox settings allows SuperOneClick to work.



My phone (an Alcatel 990) seems to store apps in an unusual location, but I was able to remove the unwanted apps by deleting them in a root browser- I used Root Browser Lite.

I'm also trying out an ad-blocker app called AdAway which requires root. Blame the floating ads that making reading and navigating web pages so difficult, and are so difficult to avoid clicking by accident on a small screen.

Tuesday, November 6, 2012

Trying out Systemd

I've been trying out Systemd after seeing a post on the Crunchbang forum which suggested it might lead to faster boot and shutdown times. I haven't noticed any dramatic improvement.

Systemd is available in the Debian Testing repository. Getting it working requires editing the file /etc/default/grub and editing one line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd"

Followed by:

# update-grub

As described in the Debian Wiki.

The H Open has a good article on Systemd.

Point-and- click Windows games on Linux

My daughter has been playing Putt Putt saves the Zoo, an old point-and-click Windows game, on Debian Wheezy. It's running in ScummVM, an efficient if inelegantly named way to, well, run point-and-click games on Linux.

System Restore on XP using Linux

I was given a laptop to try and fix: it wouldn't boot into Last Known Good or Safe Mode. What to try? A Blue Screen Of Death flashed up for a half second before the computer rebooted: fortunately one of the boot options was to disable automatic reboot so I could read the error message: the registry cannot load the hive.

A web search told me the registry files were corrupted, and I needed the system disks to repair an OEM install, but the laptop owner didn't have them.

I booted the laptop with a CrunchBang live USB, and with Google's help, found the location of the registry files. I wondered whether it would be possible to manually move over some working registry files from a System Restore point, but couldn't work out which ones I'd need. I had a hunch that somebody might know how to do it, and Google told me they did.

ICompute has a description of how to do it. Basically by taking _REGISTRY_MACHINE_SYSTEM and _REGISTRY_MACHINE_SOFTWARE from one of the _restore*** folders in System Volume Information and replacing the system and software files in the windows\system32\config folder.

The Ubunti forum has a post on this too, detailing some other registry files that can be restored in this way, but the method above worked for me.

The computer booted telling me I should do a file consistency check, which I accepted- after which XP booted normally. I ran Chkdsk and it found bad sectors on the old software registry file- not surprising as the the laptop had a failing power supply.

After that it was just a case of tracking down a virus causing constant hard disk access (thanks DrWeb CureIT!) and a long-overdue, and in fact very long defrag.

Ah, the joys of Windows: System Restore that doesn't work when you need it, BSODs that disappear after a micro second, 30% fragmentation on a half-full disk, and elusive viruses hiding in temp files!