Migrating windows to virtualbox

August 16, 2009 by · Leave a Comment
Filed under: Linux, Ubuntu, Windows 

I finally got rid of the last windows computer in our home. My laptop had a backup installation of Windows XP just in case I realized I had either forgotten something on that partition, or I realized I had some need I had forgotten. This partition has now been moved to virtualbox on my workstation via the http://www.virtualbox.org/wiki/Migrate_Windows how-to.

Also, my wifes laptop running Windows Vista stopped working (again), and she had finally had enough of the problems that Windows installation has caused so she asked me to remove Windows Vista and install Ubuntu 9.04. The harddrive was also copied over to the workstation and I tried the same how-to as above, but it didn’t work properly unfortunately, so I winded up just moving the harddrive inside my old Windows XP installation.

Once this is done, I’m planning to reduce the size of the harddrives. This is 220gig data at the moment, so it could be a good thing. I will try http://forums.virtualbox.org/viewtopic.php?p=572#p572 and see how it goes. Once that is done, I’m almost 100% free of all the problems we’ve had with Windows. The only windows I have left is the backups for emergencies.

Syncing strategies

May 3, 2009 by · 2 Comments
Filed under: Communications, Linux, Phone, Windows 

Another problem has (mostly) been solved for me it seems. I’ve had quite a lot of problems the last few months with calendars and email and contacts being out of sync between workplaces and my private computers/cellphones etc. The problem has been that I’ve gotten a new contract and hence am relocated to another workplace. My employer has a stupid (ok, maybe not so stupid, but annoying me nonetheless) policy of not allowing any e-mail to internal addresses be forwarded or fetched from external networks. At the same time, my contracting has put a heavy load on the calendar and all of a sudden I understand everyones problems with syncing e-mail/contacts/calendars etc… it’s really a must.

Anyways, in short, I started out with 4 calendars (workplace1, workplace2, home1, home2(laptop) and cellphone) needing sync, and using Microsoft Exchange weirdo protocols was not an option (I’m not using Windows or Outlook at home anymore). This has later been extended to sync contacts and my two instances of thunderbird (not yet finished). So, in short:

  1. Workplace1 = Windows Vista with bluetooth
  2. Workplace2 = Microsoft Exchange server with limited access.
  3. Home1 = Ubuntu with thunderbird
  4. Home2 = Old Laptop, Windows XP with thunderbird, will likely migrate to Linux soon as well since I barely use it anymore due to the OS on it.
  5. Cellphone = LG KC910 with bluetooth and wifi.

First off, finding a sync strategy wasn’t easy. First, decide on where your “central repository” is, or rather which will be your main device. My current solution relies on cellphone (LG KC910) being the central repository since it’s the only common gadget at all locations. connection at workplace1 is directly over bluetooth to the KC910 using the LG sync application. The application is absolutely horrible, but it does it’s job (barely). Unfortunately LG relies on a proprietary bluetooth protocol for syncing so I have yet to find any decent replacement applications.

My big problem was finding a working solution at home, and I think I finally found it in Funambol (https://www.forge.funambol.org/DomainHome.html) which is a SyncML server. Basically, I got a server on my local network running Funambol, when I get home, connect to the local wifi, and sync with funambol (See http://www.mobyko.com/phoneinfo/lg/renoirkc910Info.do, a bit down for instructions). The funambol server then acts as a “central repository” when I’m at home containing all calendars etc. Thunderbird sessions on Home1 and Home2 uses the funambol addon (https://addons.mozilla.org/en-US/thunderbird/addon/8616) to sync with the funambol server.

WARNING! So far I dont trust funambol to run on the public internet, for one part it seems to be sending passwords in cleartext, as well as data. I’d love to figure out a way to get it all encrypted using SSL/https, but I’m a complete newbie to Tomcat (base plattform for funambol) as well as java. As far as possible, try to use a closed/encrypted network for this unless you get https running imho.

A second note on Funambol is that I had some really funny Timezone problems when setting it up, all devices run the correct timezones, but for some reason my calendars winded up being winded 2 hours into the future at home, I got it fixed by setting all timezones in funambol for all devices manually, and then disabling the timezone handling in funambol… don’t ask me why it fixed it etc, I hate working with timezones 😉 .

All that said, I really think SyncML was a big saviour for me in the end, but I had a hard time finding a single word on it or anyone really recommending it. Bluetooth just needs to be …. well, better support, and everyone needs to agree on standards. Everyone (companies) seems to be running around doing their own thing, which means Linux has very good basic bluetooth support, but none of the higher layer stuff since it’s badly implemented or proprietary.

Inproductive productivity

For a while I’ve been stuck in slow speed mode again, not really doing great work, just being on average. It feels weird. Don’t really get much done, but I have on the other hand had a great deal of time to test some “new” technologies, well, new as in only 10-15 years old I guess :-). I’ll get back to that later. Also, I’ve begun a new contract at “a big company”.

This is my first time at a really giant hunk of a company, the biggest I’ve seen before was circa 500 people in all, and it moved slower (the beaurocracy) than this in all honesty. This BigCompany is quite interesting to me. Started off with almost 4 weeks of introductions, courses, and so forth. They have a dedicated TEAM of CM’s, that alone is just… wow :-P. I’ve just been put up to speed and started working a little before this weekend so I might be a bit premature, but I like it so far. The weird part is, things happen, but not as I’m used to it. I’m used to 13+hour days and frentic coding/hacking to get things to happen, everyone here eschews away with their 8 hour days — only working overtime at very special occasions — yet slowly things get done, new functionality gets added and so forth.

Another thing that kind of amazes me — and worries me to some extent — is the kind of planning that is done. I’m used to small scale projects with workpackages or task based development, where no workpackage should ever take more than 4-5 days to implement. This place uses a workpackage development structure where each package takes up to 6-7 weeks for 6-10 people to implement. We’ll see how it works out — at least their “stand-up meetings” works :-).

All that being said, I had the time to write quite a bit of python which is a first, then I’ve looked into d-bus architecture which is also a first, and I also looked into Bluetooth and how to use it — some test applications running, fetching services and graphically displaying info about all units it finds etc. The complexity of Bluetooth is rather saddening imho, it’s a horrible protocolstack to work with in some senses, even though I was really impressed by how much python does for you.

I’ve been unused to the whole concept of python before this, and just a tad sceptical. Mainly because of all the problems with version matching that you always wind up having to do, to make anything work properly (try getting scons, trac and wamp, and some more tools working on a win32 machine some day for some fun).

Anyways, I always figured there has to be an upside, and there really is — python is hackfriendly 🙂 . In less than 3-4 hours I went from writing my first simple helloworld to having a scratch written class based graphical (tkinter) interface implementing some very fundamental bluetooth commands. In my world, thats not bad at all ;).

I’ve also had time to learn a lot of new tools at work. I’ll comment on those some other day as I havent seen much other comments on some of them (some is imho very expensive crap with a nice wrappings, while some are completely awesome). Sidenote, I simply adore the systems we are working on 4 xeon with 4cores and 64 gig ram.

I’ll get back later :-).

Work? What work?

January 27, 2009 by · 1 Comment
Filed under: Configuration Management, Linux 

So, just a brief update. I’ve recently (a few months back *cough*) taken over our Linux “education” group at work, and it’s interesting. The sad part is, we mostly only see people who already knows what Linux is as we’re working internally in a world where most people are rather Computer savvy as it is. It’s given me a few new viewing angles though, and I’ll get back to that at a later point.

Currently working on some Trac guidelines for our Change Management process as well. Working from home today to actually get something done with it, as most of the days I wind up getting too many disturbing calls, talks and discussions to be very efficient. Our first two tries at making a decent workflow winded up a bit messy, and I think we really must get this down properly this time.

There are some other things I react on, and want to fix, for example, as it looks now, every single project sets up their own bugtracking/ticketsystem, and every project uses a different system (trac, mantis, clearcase, dimensions, etc). Preferably, this should be centralized in some fashion, and if possible I’d love to get a bit more homogenized environment. As it is, I try to tell people “look, here’s a system for handling your day to day tasks, use it!”. First time, the workflow got overly complex, second shot was also overly complex, and people where put off by all the choices and steps to take. This problem mainly stems from project/change management criterion.

My latest and greatest (yeah yeah) workflow should alleviate some of these problems by making some of the choices less visible to normal users. Ie, we have one task management system and a problem and change management system baked into one, but normal users (programmers) only use the task management system, while the project manager, tech project manager and CM also have the ability to handle problems and changes in separate workflows.

We’re also adding the ability to have supertickets, where a single problem report can contain several tasks. This is a pseudo development so far, as we’re not actually adding the whole deal right now, we’re just adding the idea of it, not bounds checking or views/reports of it. Basically, every ticket can have a superticket (we add a numeric field to the ticket), which can point to another ticket, which is the “parent” ticket. This makes it possible to handle a large and complex bug in several smaller tickets. Anyways, the idea is there, but it’s not fully implemented. If our management likes it, and the others like it, we could implement it for future usage. I’m worried it’s too complex however. At the same time, one complex system might be better than 6 alltogether different systems as it allows for longer time to learn? Kind of like… well, unix for example. Once you find ls, its a darn good bit faster than having to click your way through a whole heap of paths to find the specified file list.

At the same time, both me and PM are a bit tired of Trac’s shortcomings, maybe change to Mantis for example? My general thought to this however is, we need to stick it out i’m afraid… one more system will just make the normal user less interested in the new tool and hence taking even longer to learn. As it is, people use it at a bare minimum cause they dont know it, give them time to learn it properly, and they might come to like it. Comments on this line of thinking?

For now, tata. Back to writing.

Christmas ending

January 4, 2009 by · Leave a Comment
Filed under: Hardware, Linux 

So, christmas and new years holidays is coming to an end. A long and arduous autumn/winter at work has ended, and an equally joyful christmas holiday is ending. This has been the year of working for my part, and the experience has been incredible. In all honesty, I’ve never had the opportunity to work in such a stimulating environment as I have the last few months, and I’m very happy for it.

Me and the girlfriend had the bad habit of buying an Xbox 360 for ourselfs this christmas, which made us realize we have a really small tv, so within 5 days we bought a new one. Then, we realized how bad speakers we have, so we winded up buying a set of bose speakers and new spdif cables within 2-3 days as well. This in turn, and the fact that I finally had some spare time, lead to me spending a lot of time finally getting the HTPC configured and working.

The entire HTPC is worth mentioning since I’ve put it together from parts, and installed/configured everything on my own. My opinion is that mythtv and ubuntu (mythbuntu) has come a long way as a platform for end users, but they still have a long way to go I’m afraid. My biggest annoyance is still the same it was 12 years ago unfortunately, and I think it’s to some extent become even worse over time. Graphics and Sound drivers…

I personally have fairly new nvidia card which I want 3d graphics on, and all the hardware accelerations etc, in other words I’m stuck with the nvidia drivers. You would think it would be easy with the proprietary hardware drivers stuff in Ubuntu, but it’s not. It’s actually worse than some years ago when I last handled these setups, then all you had to do was compile and install drivers in the correct kernel modules directory. Now you have to fight with umpteenth other installers which crashes and overwrites eachothers and so forth, and then when you do an update, all of a sudden you overwrite your working drivers with nonworking versions and you’re stuck trying to figure out just what happened. Also, the choice of good graphics cards has become smaller imho. If you want something powerful, you’re stuck with nvidia or ati. Both drivers are completely horrible to get working. I’m hoping the rumours I’ve heard lately will turn true here, and we’ll finally see better support for open source software from both companies, at least if they could make a single decent installer for the proprietary drivers in the common Linux distributions.

And my final gripe, which isn’t so large as the other ones, the sound drivers. Sound was absolutely horrible back in the days with OSS, whatever soundcard I tried to install, I winded up with either having to run the trial OSS drivers, or choosing between no sound and buying the OSS drivers. This has become much better happily. It’s still not working flawlessly as I just found out (SPDIF took a few hours to get working, and I still haven’t gotten 5.1 output to work correctly over SPDIF).

These are critical areas of an OS (you expect sound and graphics to “work out of the box” these days, not having to screw around with settings/drivers/installers as soon as you deviate by a single micron from the specifications.

On top of this, I had some more serious issues with my iMON PAD remote, once again after reinstalling the system. That I can live with, but it’s a serious annoyance. For some reason, the configurations shipped with mythbuntu had a bunch of codes that where off by a few numbers every here and there, and then there was a lot of buttons not connected between lirc to mplayer and mythtv.

Apart from this, I’m very happy with the setup by now. The basic functionality is there, but it’s made for tweaking and having fun, so there’s still a lot of things I’m interested in doing on it :-).

By now, I’m mainly waiting for work to start again, I feel rested, I’ve gotten to fiddle with some hardware and software, and I got new energy for the new year. I just need to try and get working on my webpage and stuff like that a little bit more so I can finally finish it. Like all IT projects, it’s running very late ;-).

Mednafen configuration for Logitech Precision

October 29, 2008 by · Leave a Comment
Filed under: Linux, Ubuntu 

As I’ve already stated partially, I got an HTPC at home running MythTV on ubuntu. One of the things I’ve wanted to do for a long time was to get some games running on it. Supertuxkart was simple and was installed in less than 3-4 minutes once I understood the basics of the MythGames plugin (typing with a on-screen keyboard and a remote control is slow).

Anyways, I did have some problems getting a NES emulator, or any emulator at all as a matter of fact, running on it, and I also had some problems getting input from the right devices to them properly. I finally decided on mednafen as it seemed the easiest to understand.

Let’s understand the structure. NES and other games are usually downloaded in some image file. Mednafen is installed as a binary. MythGames needs to know about the binary used to launch a NES image, and where the NES images are located. I downloaded mednafen using apt-get install mednafen. Secondly, MythGames needs to know where you will put the images, personally I put them in /var/games/nes/. This is entered into the mythtv configuration using the Setup -> Game Settings -> Game Players. Choose New Game Player and enter

Player name: mednafen (for example)
Type: Other
command: mednafen -nes.stretch 1 -fs 1 -vdriver 0 %s
Rom Path: /var/games/nes

Having a keyboard around when doing this is prefered, using the on-screen keyboard takes ages.

Once this is done, go to Setup -> Game Settings -> Scan for games. This will scan the /var/games/nes directory for all images and add them to the list. To start a game, go to Games. Then get into the “All Games” -> “mednafen” and you should find all the games from /var/games/nes there.

Click one, and the game should hopefully start. The first time mednafen is run, it creates a directory ~/.mednafen/ containing a basic configuration. The following is an example to get my Logitech Precision gamepad running with it:

nes.input.port1.gamepad.a joystick 42190af389429475 00000002
nes.input.port1.gamepad.rapid_a joystick 42190af389429475 00000003
nes.input.port1.gamepad.b joystick 42190af389429475 00000000
nes.input.port1.gamepad.rapid_b joystick 42190af389429475 00000001
nes.input.port1.gamepad.select joystick 42190af389429475 00000008
nes.input.port1.gamepad.start joystick 42190af389429475 00000009
nes.input.port1.gamepad.up joystick 42190af389429475 0000c001
nes.input.port1.gamepad.down joystick 42190af389429475 00008001
nes.input.port1.gamepad.left joystick 42190af389429475 0000c000
nes.input.port1.gamepad.right joystick 42190af389429475 00008000

nes.input.port2.gamepad.a joystick 42190af389429476 00000002
nes.input.port2.gamepad.rapid_a joystick 42190af389429476 00000003
nes.input.port2.gamepad.b joystick 42190af389429476 00000000
nes.input.port2.gamepad.rapid_b joystick 42190af389429476 00000001
nes.input.port2.gamepad.select joystick 42190af389429476 00000008
nes.input.port2.gamepad.start joystick 42190af389429476 00000009
nes.input.port2.gamepad.up joystick 42190af389429476 0000c001
nes.input.port2.gamepad.down joystick 42190af389429476 00008001
nes.input.port2.gamepad.left joystick 42190af389429476 0000c000
nes.input.port2.gamepad.right joystick 42190af389429476 00008000

command.exit joystick 42190af389429475 00000006&joystick 42190af389429475 00000007
command.exit joystick 42190af389429476 00000006&joystick 42190af389429476 00000007

Unfortunately, the above changes around a bit from device to device and atm i’m not even sure the i’d will survive from disconnect/connect of the gamepads.

The proper way of doing this is to:

1. Start a game.
2. Press Alt+Shift+1
3. Push the correct buttons asked for on screen to do specified command. (First time you push a button adds it to the command, second time you push the same button marks it “final” for the command sequence. Peculiar, I know. So, to make the game use button 2 and 3 in conjunction to be button A, you’d first press button 2 once, then button 3 twice.
4. hit esc on the keyboard to leave mednafen. The config should now be saved.

I haven’t found a way to create the “command.exit” commands yet. I’ll have to work some more on that.

Linux iMON pad remote controller with lirc

September 11, 2008 by · 2 Comments
Filed under: Hardware, Linux 

Introduction
In short, the SoundGraph iMON PAD that came with my SilverStone LC20 doesn’t work very well with the default ubuntu 8.04 installation. I’ve previously discussed how to get the VFD running, and am now turning my attention to the remote control and how to get it decently working in mythtv with lirc.

Let’s start by looking at the following image:
In short, red files are “main steps” which the “packets” flow from the remote control, and finally reaching lircd where they are converted from a binary stream into something intelligeble (with the help of the lircrc file, which specifies names for the different hex codes).

blue boxes are configuration files, green boxes are “users” of lircrc — ie, they will connect to lircd and receive all the updates from lircd as needed. Finally, magenta boxes are different things needed to build to get stuff running.

Installation
Everything will work out of the (ubuntu 8.04) box more or less, except for the big blobby nice mousepad on the remote control. That one is a mouse — sort of — and doesn’t work at all for me, your mileage may vary however (ie, it didn’t work for me, it might change fast)

Install Xorg, mythtv, mplayer, linux-kernel sources (needed later) and lirc via apt-get or your prefered frontend. Configure the packages, start xorg and make mythtvfrontend start from the .xinitrc if you so wish, and then start via the startx script, or rather make it start up as you feel most comfortable with. I’m an old fart and I like my startx.

Once all this is set up, all things should work, except the remote control, as already said. Most buttons will work, but not the big blobby knob (a.k.a. mousepad).

HACK
Well, it’s time to hack the horrible hack I guess. Download lirc-0.8.3 from www.lirc.org. Also, download the pad2keys patch from http://brakemeier.de/electronics/vdr/lirc-imon.html.

1. Unpack the lirc package.
2. Patch the lirc package with the pad2keys patch (it will most likely fail with some chunks, just look at the patch, and add the code manually, are you a hacker or not?!).
3. Configure and make the lirc package. Don’t install it.
4. run uname -r, note your kernel version (2.6.24-19-server for example).
5. run “locate lirc_imon.ko” (have you updated your locate database? man updatedb, hint hint). If there are more than one in the list showing up, find the one in /lib/modules//blah blah.
6. Copy lirc-0.8.3/drivers/lirc_imon/lirc_imon.ko to the file you found in step 5, and replace the old one.
7. Either reboot, or if you know how to rmmod lirc_imon.ko and modprobe the new one. This might fail if you followed my previous post on islcd=0 etc, if you did, remove that line again.

Don’t forget to edit your lircd.conf with the new IR codes from the brakemeyer.de webpage. Set PAD key’s to good values, such as this:

Up 0x690281B7
Right 0x688A81B7
Down 0x688291B7
Left 0x6A8281B7

Finally add them to your lircrc in a good way, such as this:

begin
prog = mythtv
button = Up
config = Up
delay = 2
repeat = 1
end

begin
prog = mythtv
button = Down
config = Down
delay = 2
repeat = 1
end

begin
prog = mythtv
button = Left
config = Left
delay = 2
repeat = 1
end

begin
prog = mythtv
button = Right
config = Right
delay = 2
repeat = 1
end

So, you’re now a hacker of immense proportions. Celebrate with some mead and grow a beard like the rest of the hackers ;-).

Ubuntu 8.04 lirc_imon VFD’s

September 10, 2008 by · Leave a Comment
Filed under: Hardware, Linux, Ubuntu 

I got a silverstone LC20 chassi with a built in iMON vacuum fluorescent display (VFD) and IR remote control. I recently upgraded to Ubuntu 8.04 from 7.10 — yes I know, I am a bit late, but generally you don’t have to deal with kinks like this one when that happens.

Ubuntu 7.10 -> 8.04 changed the behaviour of the lirc_imon module pretty little, yet radically. The old default was to treat all iMON driven screens as VFD’s, but it now defaults to treat all iMON modules as LCD modules instead.

This results in tons of errors being pumped out (10’s-100’s per second), like this one:

Sep 9 21:35:00 fs1 kernel: [ 71.481262] /var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c: lcd_write: invalid payload size: 32 (expecting 8)

Also, the VFD will not work. To make a long story short, to fix it, you need to tell the kernel module that the VFD is in fact a VFD and not a LCD, by giving the kernel module the option islcd=0. For example, in /etc/modprobe.d/options:

options lirc_imon islcd=0

I hope this helps anyone out there. I will soon try to have something together on getting the iMON PAD working properly. The basics was simple to get working, but the “mousepad” has been a general pain to get up and running properly.

Qt presentation tomorrow

September 8, 2008 by · Leave a Comment
Filed under: Development, Ubuntu 

So, I’m holding a brief Qt presentation on a demo i made a few weeks back. It’s pretty, and got a ton of stylesheets on it. Going down tomorrow at work. Hopefully people will be a little bit interested at least. It’s not that often I dare get my ass up there behind a podium, or speak up at all for that matter.

To be honest, I don’t know why really, I just hate being in front of people talking and possibly saying anything that might be wrong. Of course, there’s a reason why I’m doing the presentation, and not someone else. I’m the only one with any substantial experience at all of this subject, so why not basically.

Also, I’m feeling horribly stressed as of late. I started on a project last week, and it’s getting to me. Need to take a minute, sit down, and calm down.

Continuous integration and buildserver

So, I finally got around to trying out continuous integration and got a buildserver at home. Ok, not much use on any 1-man projects, but should be good enough for some testing at least. I’m currently using cruisecontrol for it, and so far so good. I’ve got a few points I sincerely react against, but I’ll get back to that a bit later.

For those not knowing what continuous integration is, I suggest reading the above link. Basically, when you run a project, you always run into some “final” integration problems. People have coded each on their own side, and you wind up having to “integrating” the code so that it all works as supposed. In the one extreme, you have everyone coding on their own tree from start to end, and then you finally have an integration session. In this shitty situation, you have no clue how long it will take. On the other extreme, you have “perfect” continuous integration, where every single line of code is tested and checked that it doesnt screw things up.

A buildserver such as cruisecontrol is an excellent tool for doing “good” continuous integration. What it does is as follows, it connects to your central code repository, checks for any changes. If there was changes, it downloads them, and then rebuilds the project(s). If you have done it properly, you also have a ton of tests that you can run on the project. This is then reported or output in several different ways. Did it fail, did it succeed, and so forth.

I might be able to convince my new project manager to use a cruisecontrol server for the project I am working on at the moment, and he sounds like he likes the idea. We just need to consider everything for this project, and I need to figure out just how it works and how to configure it etc etc etc =) . Either way, I think it will be interesting to find out more about this type of development, and to see if it actually changes the development in any large way.

Oh, yes, I currently got two things I need to figure out with cruisecontrol. If I got it right, it doesn’t support GNU Make. Not supporting make seems… well, to be honest, totally stupid. It’s been one of the biggest make systems for 20 years or more, so there’s bound to be like 500000+ projects out there already running Make. I know it’s an old system, but it works, and it’s there already.

The second thing, I’m not totally certain of this, but subversion support seems to be abysmal. I need to look more at it however to find out the lay of the land or something.

« Previous PageNext Page »