Friday, 18 June 2010

Getting gadgets to work with linux

So I'm not at stage 2 of replacing windows on my gaming machine. So far the games I play are working very well using crossover games from codeweavers. The next step is get my tomtom, iPhone, iPod and Harmony remotes all working and syncing.

In a perfect world their would be native Liunx drivers for these products, but that does not seem to be the cause. The really anoying thing is that at least one of these devices is running Linux! So currently I'm evaulating VMWare. I will hopefully be able to install iTunes and all the other drivers under vista in VMWare running windows vista. So far the installation of VMWare has been pretty easy and I'm currently setting up vista to talk to my network (Samba PDC). The trick part was working out what product I actually wanted. The VMWare website lists all sorts of products, I'd suggest they create a table showing how they all differ.

VMWare does strike me as slighly overkill for what I want, and I would quite happily pay codeweavers or anyone the price VMWare will cost me to get all these things working in crossover office. I wonder how many other people think this too? If I'd not already had to by windows vista, I'd give them that money also. I guess the main problem is getting USB devices working under wine and keeping up to date with the latest versions of iTunes.

I'm also going to have to install outlook, and the only reason for this is that iTunes only really supports Outlook for syncing.

Saturday, 12 June 2010

Crossover games 9.0.0

My windows vista machine has recently developed a hard disc fault, their is a clicking noise and the machine keeps freezing. This machine is mainly used for playing games and syncing my iphone. I've got a new hard disc on order, but it occured to my I might not need to run windows on the machine any longer. Since stopping Neverwinter Nights development, I've been playing World of Warcraft (WoW) and Guild wars. I've notice that both of these run in crossover games now so though I'd give things ago.

So I've got crossover games 9.0.0 installed on my laptop, the laptop is less powerful than my windows machine so I won't be comparing performance. All I'm looking for is the games run correctly and they are playable.

First thing I need to do is install WoW, this is quite a painfull process as it's a huge game. It was painful on windows too. Rather than install from the CD's I though I'd use the Internet installer, so I downloaded it and used crossover games to install it. The install process then took 2 days....... 6GiG download. Wish I'd used the DVD now :-) Anyway, a couple of days later and it's all installed, but now it needs patching!!! This is really anoying thing about wow, you think it would just have installed the latest version. So anther day and a half later and it's patched to the latest version.

I can now run wow and see the initial screen. Crossover games has added a icon to my KDE desktop and start menu which is great. I now try to log into my WoW account, it's at this point things go really wrong. Turns out I downloaded the wrong version. I have the enUS and not the enGB, so I can't log into my account. This means another 4 days of downloading...........

Ok time to try something different, I move the Wow install on my hard disc and mounted my windows machines hard disc via samba. I now copy the installed version on their to the place where crossover games installed things before. There is a config file at the path "World of Warcraft\WTF\Config.Config.WTF". With the help of a crossover games WoW page I edit the settings in their to add the following:

SET SoundOutputSystem "1"
SET SoundBufferSize "232"
SET gxApi "opengl"
SET ffxDeath "1"
SET gxMultisampleQuality "0.000000"
SET gxFixLag "0"
SET fullAlpha "1"
SET lodDist "100.000000"
SET SmallCull "0.070000"
SET DistCull "500.000000"
SET farclip "477"
SET particleDensity "1.000000"
SET unitDrawDist "300.000000"
SET gxCursor "0" SET baseMip "1"
SET spellEffectLevel "0"
SET weatherDensity "0"
SET pixelShaders "0"
SET ffxGlow "0"

After all of this, I fired up WoW again and successfully logged in. I've been playing the game most of the day and it's all working really well. It's a little sluggish in places, like for example when it displays a tool tip. That is probably down to my laptop been a bit underpowered. All in all, crossover games is really impressive.

I think I'm going to be checking out VMWare next for running iTunes and iPhone syncing. If that works I'll be able to ditch windows for Linux.

Wednesday, 9 June 2010

Scanners in Opensuse 11.2 (64 Bit)

For a while now I've been attempting on and off to get my flatbed scanner working in OpenSuSE versions. I've tried most versions from 11.0 to 11.2, but I always ran in to the same problem. The problem is that Yast tells me it will work on a 32Bit version of OpenSuSE, but not a 64 Bit version. I've got a "Epson Perfection 4490 Photo" flatbed scanner that I'm connecting via USB.

Last night I need to do some scanning and felt it was time to have another go and getting it working. Yast gave the same error message, so I though I'd check out the Epson website for drivers. First of their UK site was completly broken :-(, but their US site was working fine. I was surprised to find that their was drivers for Linux on their site!! How things have changed these days :-)

It turns out that the driver is a link to another site http://avasys.jp/eng/. This site seems todo quite a few drivers for Linux, amongst them are 64 Bit drivers for and instructions for my scanner. They also seem to have the source code on the site. It's quite possible that the OpenSuSE driver support for scanners could be improved by this.

Sunday, 21 March 2010

iFolder 3.8

For quite a while now I've been looking for something that allows me to sync folders on my Linux (OpenSuSE) laptop with my server. I quite like the way that windows provides roaming profiles. This allows a user to share a home area with multiple machines. The real advance of roaming profiles is that they can be disconnected from the network and then sync backup when reconnected to the network. This is great for laptops. Another big advantage for me is that all the windows machines store a copy of their files on my central samba server. This means I can perform a backup from one central location.

The problem with Microsoft romaing profiles is they only sync on login/logout. First of, I hardly ever log out of my windows desktop machine. I just lock the screen, and second it takes ages to sync changes. I dread having to reboot my windows machine.

So I've been looking for something that would allow a roaming profile type system on Linux. I've tried a few different options over the last few years (unison, csync, rsync) but none them have really been what I was after. So the last week or so, I've been giving iFolder ago. First of I have to say, the server setup was pretty painful. Even though it's sponsored by Novell, the setup took most the last week to get working. In the end I deleted all the ifolder rpm's and deleted any left over files, then reinstalled it. This time the setup process worked, so I'm still sure exactly what was broken.

iFolder consists of a Linux server and client applications that run on MacOS, Linux and windows. Their is also a web client. As soon as I realised this I saw that iFolder has a lot of potential. As well has using it on Linux, it should be possible to use it on windows. So far I've only used it on my Linux laptop, but if that works well I'll probably try it on windows aswell.

The server is written in C# and runs within apache. This means that anywere I can access my web server, I can access the iFolders. This is really great. It means I could sync my folders whilst saying at a hotel with wireless for example (Though my internet upload speed sucks a bit to much for this). The syncing also happens all the time and not just on login/logout. This works much better with the way I work. The web client is also pretty good, this allows me to access my files from work for example. Probably also means I can look at files on my iPhone to some degree.

The downsides of iFolder that I've found so far is that their is no headless command line client. This would have been very useful for on the server it's self. I could have then exported that folder via samba. The client on Linux is also a gnome application which does not fit very well with my KDE desktop. I notice that the client is written in C# which makes me wonder if their are KDE bindings for C#. If so I could probably convert it to run on KDE.

So far I've sync two folders, one (10Gig and 300Meg). The largest one worked fine, but the smaller one is complaining of conflicts. Their should be no conflicts so I suspect it does not like the filenames these files use. That could be a problem as I don't want to be limited by file name. However it does make sense if windows is supported as well. The client pops up a notification balloon when conflicts are found. It's then possible to output the conflict resolve window and fix any problems.

So far I've feeling pretty positive about iFolder. The client does not quite fit with the desktop, it offers a lot of nice features and works pretty well once the server is setup. Going to take a little longer trial before I final decide that it's a winner and put to rest my looking for a Linux roaming profile solution.

Sunday, 14 March 2010

Multiple sounds devices in OpenSuSE 11.2

My dell studio laptop has two sounds devices. Both of them are are Intel devices, one of them is the normal laptop stereo output, the other is the HDMI out. I've been having the problem that ALSA/Pulseaudio apps don't output any sound. I did manage to convince KDE to output sound but telling it go strait to the sound card, however that is less than perfect as I'd rather it went to pulse audio.

After digging into this for a while I discovered that the problem was the dual sounds cards. Alsa and PluseAudio need to know that the stereo output is the default. This can be fixed in YaST by configuring the cards in the correct order (the default one first). This article gave me the info.

At some point I'd like to be able to output digital audio so I will probably need to find a way of switching also/pulseadio between the two devices.

Thursday, 11 March 2010

Linux backup

For a little while now, I've been backup in my server to a removable hard disc. This has worked pretty well till a couple of months ago when I inserted the backup drive into the server (the drive is in a caddy). This caused the computer to switch off! and their was a nasty burning smell. I feared that I'd fried the computer, but it turned out to be the hard disc.

So rather than replace the hard disc, I started to think about a better solution. The problem with removable hard discs is that you can't automate regular backups. This lead me to start thinking about NAS drives. A network storage device could sit on the network and be used to backup to on a regular basis. I have a central server in my house witch all the other desktops, media center's and laptops backup to. So this means only the server needs to be backed up. Because it's Linux I needed a NAS that supported things like rsync and NFS. It's also important that files copied from the server to retain their permissions and owner ship.

After speaking to friends and looking around the Internet I deiced on the Netgear ReadyNAS duo. This can take two hard discs, and has loads of features, including NFS and rsync. The device works well in Linux, Windows or OSX. The documentation does not really mention Linux.

Once connected network I powered it on and got a scare. The device was very loud. Turns out this is a not problem, as it settled down. In fact I've never heard it do that again. Its actually very quite. Next I followed the setup wizard you get when you access the admin interface for the first time. I then added a backup NFS share. The share was configured to be accessible only from the server and allow root to mount it.

Now I use the following script to perform backups. It's still a working in progress (let me know if you have suggestions for improvement). This performs a incremental backup to the mounted NFS share.
#! /usr/bin/perl

use File::Path;
use File::Copy;
use File::Temp;

my $BACKUP_DIR="/mounts/backup";
my $RSYNC_OPTIONS="-a --delete -v";
my $NUM_BACKUPS=4;
my @DIRS=("/usr/local/","/etc/","/srv/","/home/","/root/","/var/lib/samba/","/mnt/Films/Films/");

my $backupPrefix=$BACKUP_DIR."/backup.";

for ($count=$NUM_BACKUPS; $count>=1 ; $count--) {
if ($count==$NUM_BACKUPS) {
if ( -d $backupPrefix.$count ) {
print "Delete backup ".$backupPrefix.$count;
rmtree($backupPrefix.$count);
}
}
else {
my $previousDir=$backupPrefix.($count-1);
if ( -d $previousDir ) {
print "Moving backup ".$previousDir." to ".$backupPrefix.$count."\n";
move($previousDir,$backupPrefix.$count);
}
}
}

if ( -d $backupPrefix."1" ) {
print "Copying previous backup\n";
system("cp -al ".$backupPrefix."1/. ".$backupPrefix."0");
}

print "Backup up latest system changes\n";
foreach $dir (@DIRS) {
print "Backup up changes in ".$dir."\n";
mkpath($backupPrefix."0".$dir);
system("rsync ".$RSYNC_OPTIONS." ".$dir." ".$backupPrefix."0".$dir);
}

my $backupDataPath=$backupPrefix."0/backup-data";
if ( -d $backupDataPath ) {
rmtree($backupDataPath);
}

mkpath($backupDataPath);
system("rpm -qa > ".$backupDataPath."/packages.list");

Apple customer service

I've had my iphone just under a year now and other than it's lack of Linux support, I've been very happy with it.

This morning I notice that the battery was almost completely flat, so I plugged it into the charger. This is were the trouble started. For some reason the phone just went black and no amount of poking it would get it to turn back on. I tried all the suggested things on the web to do with resetting it, restoring it using i
iTunes, connecting to mains chargers. Nothing worked!

So I though I'd ring apple customer support, this was a pleasant change from customer support form other companies. I pretty much got strait though to a human and she took me though most the steps I'd already found of the web. She then emailed some stuff to try as well as confirming that my phone was still within it's 1 year hardware warranty.

The last thing she suggested was to arrange an appointment with the local apple store to have someone look at it. So since the phone was still not responding, this is what I did. You can arrange the appointment via the apple website, choose the time and leave a message. After that it was just a matter of poping down to the local apple store.

Once in the apple store, someone store me on time and took a look at the phone. They confirmed what I suspected and said the phone was faulty. Next they poped out the back of the shop and got me a new one. They activated it their and then so that I could use it and people could call me! The only thing left to do was go home, plug it into iTunes and restore my old phones backup onto the new one. This was pretty easy and worked without a hitch.

I have to say the whole experince was very present and quite surprising. I've had other broken phones in the past and it's usually been a lot more painful. Usally I've been without a phone for days. I can't think of any other phone that I could have got replaced the same day it broken. Thank you apple!