Category: Computers


Jag har nyligen köpt en HTC Desire och är tokigt nöjd (skriver från den nu). Det finns dock två anmärkningsvärda skavanker med androidplattformen idag. Det första är att vi i Sverige inte har tillgång till att köpa applikationer genom Android Market. Den andra skavanken är att det bara går att installera Apps på interna minnet och inte på det utbytbara microSD-kortet. (den här begränsningen kan man ta sig runt genom att roota telefonen, men det bryter ofta garantin)

I det här inlägget vill jag tipsa om ett sätt att komma åt möjligheten att köpa Apps. BetalApps går att komma åt direkt i telefonen genom att roota och installera MarketEnabler, som lurar Market att du är tysk. Dock finns det många skäl att inte roota så här är en länk till en bra guide till att komma åt Betalapps genom datorn och sedan föra över.

Om ni kör Linux och får ”insufficient permissions for device” när ni installerar genom usb-kabel:

kör då
su (sudo -i på ubuntu)
cd android-sdk-linux-linux/tools
./adb kill-server
./adb start-server
./adb devices
exit

./adb install

In this post I will describe how to install an additional operating system right into your current one, by using the free and open-source VirtualBox to install a Virtual Machine. In the end, you will have Windows 7 installed on your computer, residing in a window (or fullscreen of course) like any other application inside your operating system (be it Windows, Linux or Mac). Assuming you have a Windows 7 DVD or have otherwise aquired it, of course. Some parts will apply even if you choose to install a different OS.

What is it good for?

  • It allows you to try out operating systems, or even betas of them without running a risk of making your computer unusable.
  • Access applications that may not be available on your main operating system (Host).
  • You’re free to experiment with the virtual machine (guest), your host system is always safe.
  • If the guest crashes, the computer won’t have to reboot.
  • Running two OSes simultaneously is pretty cool.

Just to clarify, the Host is the Operating System you already have and use. The Guest is the OS you’re going to install inside a virtual machine inside your host. The Guest is sometimes referred to as the Virtual Machine (VM).

0. Acquire a copy of the OS you wish to install.

This could either be a physical Windows/Linux CD/DVD or an ISO image (.iso file ending). Many Operating Systems are supported – you could even install an early version of Google’s Chrome OS, or the smartphone OS Android. However, Mac OS X isn’t supported – on the other hand that would likely be illegal anyway. If you don’t have an OS available for installation, you could simply grab Ubuntu here (follow step 1).

1. Install VirtualBox

  1. Go to the VirtualBox Downloads page.
  2. Download VirtualBox for your current OS.
  3. Install it like you usually install applications for your platform. You should be able to figure it out.
  4. Launch it.

2. Setting up a New Virtual Machine

At this point, you will have a window resembling the below image.

VirtualBox initial screen

Your window will look similar to this now. However, your list will be empty and your OS probably has a different theme.

Go ahead and click New. A new, smaller window will pop up. Clicking next will bring us to:

Make sure to pick the OS you’re going to install (Windows 7 if you’re following in my steps). Click Next.

Now it’s time to decide how much of your RAM (memory) you will dedicate to Windows 7 when it’s running. 1GB (1024MB) is stated as the system requirement by Microsoft, but even 512MB works. You can change this later if you want. I will take 1GB (however, that only left me 1GB for my host OS, not brilliant for my multitasking nature.). When you have decided, click Next.

The Guest OS (Windows 7) needs somewhere to store itself. This time, you’ll want to Create a new hard disk. A new window will pop up. Click Next.

Even though Fixed-size storage probably is slightly faster, I would recommend Dynamically expanding storage. That way, the size will grow when needed. About 6GB after your installation of Windows 7. Once you have clicked Next, you will be asked what you want its maximum size to be. Don’t be afraid to set it high, it still won’t claim more storage than it needs. A 40 GB cap isn’t an unreasonable amount, perhaps you should set it higher if you want to install a lot of applications. But you will be able to share folders/partitions to your Guest OS, which we will go through further down.

Now we've set up a Virtual Machine! Time to cram an OS in.

3. Install the Operating System.

Now it’s time to put that CD/DVD into the computer, or remember what folder that .iso is in.

You will have a new Virtual Machine entry in VirtualBox. Select it and press Start.

A scary window will present itself. It basically tells you that your mouse and keyboard will be stuck inside the Virtual Machine until you press Right Ctrl. There will be more of these windows. Next, the First Run Wizard will pop up. It will help you install an OS by letting you select the install disc:

Locate the installation disc and click Next. Then click Next yet again at the summary.

Now the Virtual Machine will boot up, much like any computer (except for a few more pop-ups, you’ll be acquainted with them soon enough). It will boot from the installation media you chose, and let you install the OS as normal, a section I won’t cover here. If you feel very uncomfortable with the OS installation process, there are plenty of tutorials on the web that covers it better than I would! But it’s simple, and you have nothing to fear.

Now complete the installation. This is going to take a great deal of time, so do something else. You could try my beta-stage Tower Defense-game.

4. Install Guest Additions

Before you think you’re all done, there is one more thing you’re likely to want to do.  You should install Guest Additions because of:

  • Mouse pointer integration – VirtualBox won’t need to Capture your mouse any more, which will let you switch between host and guest far more smoothly.
  • Support for 3D-acceleration and DirectX/OpenGL. [experimental]
  • You will be able to resize the Guest to an arbritrary resolution, just like you would any other window by dragging in the corner.
  • You will be able to share folders from your host to the guest. The Windows guest will even be able to access ext3/4 partitions on your linux host.
  • Better performance

Basically a near-seamless integration between host and guest! Lovely! I find VirtualBox a cumbersome experience without it.

The VirtualBox Manual states that we will need to boot Windows up in Safe Mode to fully install the Guest Additions, otherwise Windows won’t let us replace some system .dll’s – leaving us without Direct3D acceleration. There is some controversy around this, however; some people say that safe mode is not required, but let us take the sure way:

  1. First, I will advise you to unmount the installation media first (otherwise you might end up in the CD’s Advanced Boot Screen, which is not what you want!). To unmount, click the little CD-icon in the bottom of the Virtual Machine window and uncheck.
  2. Boot up in safe mode. Start the VM (guest) and Press F8 repeatedly until you get to the Windows Advanced Boot Screen. You might need several attempts.

    Pick Safe Mode

  3. Click the Devices menu at the top of the VM window, and choose Install Guest Additions. If it doesn’t autostart, go to Computer and double-click the Guest Additions CD. A standard Windows install wizard will pop up. Just click next through it (and accept and read any pop-ups), but don’t forget to check Direct3D support if you want it!
  4. Reboot the VM when it’s done.

Windows 7 on the left, and Kubuntu 9.10 to the right. Lovely!

5. Setting up a Shared Folder

A shared folder will allow you to access all your documents, photos and other files on your computer, through the Guest.

  1. Shut down your Virtual Machine.
  2. Select it in the VM list in VirtualBox, and click Settings
  3. Choose Shared Folders:
  4. Click the + [Folder] icon in the upper right corner.
  5. Select which folder you wish to share. This could be C:\ if you use a Windows host, name it, and click OK:
  6. Click OK again and start the Virtual Machine.
  7. Once Windows 7 is booted, open up Computer, right-click Network and choose Map Network Drive:
  8. Now type in \\vboxsvr\<folder name>, and make sure Reconnect at logon is checked. Click Finish.
  9. Now you know how to gain access to all files on your host!

Another way of doing step 8:

  1. Open up Run (Windows key + R)
  2. Type in cmd and press Enter.
  3. A console window will pop up. Type in net use x: \\vboxsvr\<folder name>

Summary

You now have Windows 7 installed inside your host! From here, you can install the programs you need in your Guest. Although, game support appears quite flawed – but some games work and you may be lucky! I haven’t tested gaming thorougly.

You may also want to play around with the VM settings. You could optimize or make sure 3D/2D hardware acceleration is enabled. I won’t guide you other than saying that foo, bar and foo2 should be disabled in your Windows Guest. (update coming when I have looked up what they’re called)

If anyone is interested, here are the specifications for my computer:  Kubuntu 9.10 32-bit, 2GB RAM (although I upgraded to 4GB while authoring this tutorial), 3GHz AMD Dual-Core, Nvidia 8800GTS 640MB. VirtualBox version 3.1

Game project added to Sourceforge

After a month of stagnation on my Tower Defense game, I implemented some cool stuff yesterday and today. Mainly a makeshift main menu and flashy animated text messages popping up.

Just a moment ago I started a Sourceforge.net project for it. Pretty neat! I appreciate that Sourceforge supports bazaar version control, and I do not yet know if I will discontinue the launchpad branch or keep it updated. Keeping it updated would be no big deal if I only bothered to write a proper ‘bzr push’ alias for both Sourceforge and Launchpad.

There is a source release of version 0.4 available. Binary releases for Windows will pop up soon (I am pretty sure I know how to do it properly!)[Update: Windows version available]. Please note that the game is not balanced at all and not near complete. Consider it alpha-stage.  However, it allows for an initial impression and I would be grateful for any feedback! A more rounded-up release is planned for next week

Towerdefense Mind Map

Via @justinvincent I found Mindmeister – a supercool mind mapping collaboration tool!

This suits me perfectly for the game project I mentioned in my last post.

It supports embedding, too! Unfortunately, WordPress.com refuses to accept the HTML-code for it  – but embedding looks like this (proof-of-concept on my own testing-server). The direct link for the mind map I’m making for the game project can be found here. Really neat tool!

In fact, I like it so much that I feel prepared to pay for premium once I turn 18. I haven’t looked into the difference of Free and Premium though, and I haven’t seen the price tag either, so I’m assuming it’s realistic.

Riding out the storm.

I just had to copy-paste this. Awesome blog-entry (original) @ The Pirate Bay (in these sad times):

Riding out the storm

We have, ourselves, full confidence that if all do their duty, if nothing is neglected, and if the best arrangements are made, as they are being made, we shall prove ourselves once more able to defend our Internets, to ride out the storm of war, and to outlive the menace of tyranny, if necessary for years, if necessary alone.

Even though large parts of Internets and many old and famous trackers have fallen or may fall into the grip of the Ifpi and all the odious apparatus of MPAA rule, we shall not flag or fail. We shall go on to the end, we shall fight in France, we shall fight on the ef-nets and darknets, we shall fight with growing confidence and growing strength in the air, we shall defend our Internets, whatever the cost may be, we shall fight on the beaches, we shall fight on the baywords.org, we shall fight on the /. and on the digg, we shall fight in the courts; we shall never surrender, and if, which I do not for a moment believe, the Internets or a large part of it were subjugated and starving, then our Empire beyond the seas, armed and guarded by the Anon Fleet, would carry on the struggle, until, in Cerf’s good time, the New World, with all its power and might, steps forth to the rescue and the liberation of the old.

Signed;

The Pirate Bay Crew – Always when needed.

If you don’t know what this is about, take a look here.

While I’m at it, I will take the chance to express my disgust at this recent court ruling in Sweden that forced TPB’s ISPs ISP to block access to TPB (it’s back up again though, through another route). Much is at stake here.

”Okay, fine, it’s back up again anyway” – So? For how long? TPB isn’t the only target here. The problem is that this essentially makes the mailman responsible for the contents of mail, and opens up for pretty much any attack on infrastructure and censorship in general. I can’t really believe this is happening, but it is. It is time to raise our fists and put our feet down. Raise awareness!

Mere Conduit! Don’t shoot the mailman!

En sak har bekymrat mig ända sedan jag blev medlem i Piratpartiet för snart två år sen. Det är vår politiks inverkan på fri mjukvara och öppen källkod. Fri mjukvara är ett väldigt viktigt koncept för mig, och jag släpper själv mina program under ”copyleft”-licensen GNU GPL som tvingar förädlare att ge sina användare samma rättigheter som denne själv fick.

Nåväl, Stallman (lite av en idol för mig)  har rätt nyligen skrivit om hur Piratpartiets upphovsrättspolitik slår slint på Fri Mjukvara. Läs! Jag är rätt säker på att biten om EULA‘s  inte gäller i Sverige, hur som helst är pp emot sådana EULA’s.

Huvudproblemet är att, efter 5 år och upphovsrättsskyddet slutat gälla, skulle utvecklare av stängd/proprietär mjukvara kunna använda sig av GPL-källkod, medans utvecklarna av fri mjukvara inte kan göra motsvarande eftersom man inte har tillgång till källkoden. Det skiftet i maktbalansen mellan stängd och öppen källkod gillar jag inte alls, även om jag givetvis tar den smällen lyckligt till förmån för summan av Piratpartiets politik. Jag tror att många piratpartister delar det med mig, men skulle säkert sova litet litet bättre om denna problematik gick att lösa. Vidare tror jag att vi förlorar en del sympatisörer på grund av detta, vilket förstås är synd – men ingen kris då vi redan har väldigt många tekniska sympatisörer.

Det vore superb att kunna lösa denna problematik och samtidigt nå ut till dessa sympatisörer, men det måste lösas på ett rimligt och begripligt sätt som inte gör att vi förlorar (för många) väljare. Sen är det självklart ett mål i sig och kanske viktigast att maximera kulturspridning, och det här ser jag som ett led i det. Men det är nog bra att inte kräva för mycket av datorprogram i förhållande till annan kultur eller vad man ska kalla det.

Stallmans förslag om ”källkodsdeponering” – att tvinga utvecklare att skicka källkoden till en tredje part som förvarar den tills ensamrätten löpt ut, för att sedan släppas till public domain tillsammans med den binära versionen av programmet (utan källkoden är det i praktiken omöjligt att förädla och bygga vidare på program) – är intressant. Det här kan man göra varianter på, t.ex. att det ska vara ett krav för att få sina 5 år av kommersiell ensamrätt alls. Frågan är om det tillräckligt rimligt? Eller finns  det bättre sätt?

Och frågan är om detta då även borde appliceras på musik och film, vilka också ofta kommer i format som är svåra (men inte lika?) att ändra. Men då blir det så himla komplicerat helt plötsligt.

Sen är jag övertygad om att Piratpartiets politik i slutändan har en stor positiv effekt på fri mjukvara, inte minst för att vi förespråkar att skolor och myndigheter ska använda öppen källkod istället för stängd då det är rimligt (vilket det oftast är) och alltid öppna format – förresten blev det allmänt känt för bara en stund sedan att Piratpartiet kommer ställa upp i lokala val! Lägg sedan till vårt krig mot mjukvarupatent. Men varför inte försöka få det så bra som möjligt?

Det finns en nyhets-forumstråd om Stallmans kritik här, samt en ideologi-forumstråd här där du är välkommen att diskutera ämnet om ni föredrar forum framför bloggosfär! Jag ser gärna en vild intern debatt om det här, för det har alltid känts som ett tomrum i Piratpartiets politik för mig, och det har också känts som att det inte har diskuterats tillräckligt.

När jag läste Johanna Nylanders ledare ”Microsoft hotar vår demokrati” i Expressen kände jag att jag höll med om vartenda ord. Jag kände också att det var dags att skriva någonting, då det är ett område jag tänkt på i några år nu.

Johanna lyckas verkligen med att förmedla samhällets fördelar med digital öppenhet, och riskerna med motsatsen. Teknikaliteter jag själv inte riktigt lyckats formulera, men då är ”thought-to-text”-biten inte en av mina starka sidor heller. Bloggandet kommer förhoppningsvis underlätta det för mig i framtiden. Kopplingen till offentlighetsprincipen är lika självklar som den är briljant:

Offentlighetsprincipen kommer inte att hålla sig vid liv, om den inte får bli digital. Grundprincipen inom offentlig förvaltning ska vara transparens och öppenhet.

De tekniska och organisationella fördelarna med öppen källkod, vilka blir fördelar för samhället då man pratar om den offentliga sektorn,  handlar främst om pålitlighet och stabilitet, möjlighet att kunna verifiera att programmet gör det som utlovas, flexibilitet och frihet, samt kostnaden. I ingen särskild ordning. Kanske speciellt den långsiktiga pålitligheten är väldigt förmånlig för samhället. Det här kan man läsa mer om t.ex. här (Engelska).

Glöm inte att spana in OpenGov.se förresten!

Grundprincipen inom offentlig förvaltning ska vara transparens och öppenhet.

You must see this!

Hardware issue solved, thriving in GNU/Linux.

You may have noticed that there’s been some time since I last posted, but I want to tell you that I have finally found the hardware problem that’s been plaguing me for 15 months; the original two RAM in this system were faulty. God,  I do wish I had tried properly without them when I bought another two memory sticks a year ago. But at the time it felt disproportionally bothersome simply  because the crashes caused were very irregular  – sometimes a whole week or more could pass between them, and at it’s worst four crashes within an hour.  Or, well – they were far more consistent in Linux – either froze or rebooted within a few minutes of logging in (same issue in both Gnome and KDE) – a thorn in my side I should have turned into an advantage long ago.

Now when I have disposed of the accursed, faulty memory sticks I can finally use Linux! 🙂 (and boot Vista again for the first time in many months) This is in fact posted from Kubuntu, and I have already fallen in love in this community-driven environment. I can feel that I have stepped beyond the point of no return; I will never again use Windows on my machine except for playing a game or so every odd week.

Blocks From Above!

Just want to highlight that I have recently made my Open Source tetris-clone Blocks From Above! available for the public. See the Blocks From Above! section of this blog for more details.