Tuesday, February 25, 2014

Black screen while playing game on ZSNES in XBMC

A while back, I posted a guide for setting up ZSNES SNES emulator on a Linux XBMC setup.

I noticed that after 10-20 minutes, the screen would go black, but a keypress would bring it back. I don't really play that much, and I didn't find an immediate solution to the problem, so I just let it lie. I happened to stumble upon the answer the other day, here. It's a little out of date though, in that it uses xorg.conf, so I'm putting an updated version here.

The problem is apparently X going into sleep. I'm not really sure why this happens when the emulator is on top, but not when XBMC is, but there is a fairly easy way to solve it.

  1. Open a Terminal
  2. Create a new Xorg config file: /etc/X11/xorg.conf.d/30-xnosleep.conf
  3. Place the following text in it:
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection
  1. Save, reboot, and enjoy "The Legend of Zelda: A Link to the Past" without interruptions.
 

Tuesday, February 11, 2014

Wienerstänger

These cookies are small, sweet, simple and delicious. They work particularly well with coffee. Try to have to have just one... Go on, try it.

I'm using homemade raspberry jam for the filling, but that only because the pips always annoys me. Really, any store-bought raspberry jam will work. If you're like me and don't like the pips, making the jam is super easy. Take raspberries, almost as much sugar as berries (by weight) and some pectin, bring it to the boil in a pot, and let it cook on a slow boil for about 10 minutes. Pass through a sieve, pour into a sterilized jar (Just rinse the jar out with boiling water), and leave to cool in the fridge.

Wienerstänger





















Ingredients - Pastry
125g Butter
0,75 dl Sugar
1 Egg 
3,5 dl Flour
0,5 tsp Baking powder

Ingredients - Filling
Raspberry jam
1 dl Powdered sugar
0,8 tbsp Water


Whisk the sugar and room temperature butter until combined. Whisk in the egg. Mix the flour and baking powder, and add to the rest. Use your hands to bring it together into a soft dough.

Wrap the dough in plastic wrap, and leave to rest in the fridge for 30-60 minutes.

Cut the dough into 3 equal pieces, and shape them into balls. Roll them out into quite thin rolls, the same length as the over tray. Cover the oven tray with baking paper and place the rolls on the tray.

By pressing down with a finger, make an indentation along the length of the rolls, a sort of grove. Spread the raspberry jam into the indentation.

Bake in the middle of the oven, at 175°C, for 15 minutes. They'll seem quite soft, but don't worry, they'll firm up when they cool down.

After taking the cookies out of the oven, you need to wait a couple of minutes before spreading the frosting on top. You want them to cool a little, but not too much. Generally, the time it takes to make the frosting should be about right. To make the frosting, just whisk the powdered sugar and water together until there are no lumps. The frosting should be quite thick, but still runny. You might need to adjust the water/sugar ratio slightly.

Spread the frosting over the jam-covered part of the cookies. Wait another minute or to for the frosting to start to set. Cut the cookies, on an angle, about 1 inch wide. Place in the fridge for the frosting to set completely.



Rolls, the length of the tray
With the groove

Filled










Baked

Frosted

Cut



















Friday, February 7, 2014

CyanogenMod on Samsung Galaxy S III

I've been considering installing a custom ROM on my Samsung Galaxy S III for a while now. There are some advantages to leaving it as standard, for me the main reason was that I could sync the calendar and contacts with Outlook at work using Kies. That stopped working this week, and combined with the latest update, which made my phone even more laggy and greatly reduced my battery time, it made me decide to finally take the leap.

There is a huge number of custom ROMs available, the choice fell on CyanogenMod simply because it is one of the more well known and most used. I use this phone for work as well as home, so I wanted something at least fairly stable. This is also why I chose to go for version 10.2, which uses Android 4.3 Jelly Bean, rather than version 11 which uses Android 4.4 KitKat (which is still releasing nightly builds).

I've only used it for a day so far, but I'm quite happy with it. The 2 things that I wanted most to improve by installing CyanogenMod, battery life and speed, have surpassed my expectations. Battery life is hugely better, and there is no lag at all.Maybe I'll write up a more thorough review after using it for a while.

What is shown on the boot-screen after install

























So, here is how to install it. But before we begin, a couple of things to consider.
  • The standard renunciation of responsibility: I take no responsibility for anything that might happen as a result of your using this guide. By installing a custom ROM (like CyanogenMod) you will almost certainly be voiding your warranty. Also, there is a chance of bricking your phone when doing this (The phone will not work at all if this happens). I personally don't think the chances of bricking your phone are very large, as long as you follow the steps, but I take no responsibility if you do.
  • Make sure that the battery is fully charged before starting the procedure.
  • Copy any files that you want to be sure to keep from your phone to your computer before starting the procedure.
  • Any game progress, notes, etc will be lost, even if you reinstall the app afterwards.
  • I'm using Linux Mint 16 for the few steps that require a computer, if you are using Windows or Mac OS X, additional steps may be required to get the tools to work. 
  • CyanogenMod doesn't include Google apps by default, and yes, this includes the Play Store. Since you will probably want it (and because I do), I have included it in the steps below. If, for whatever reason, you do not want it, just ignore those steps.
  • I exported my contact to a vcf file before installing. As it turns out, the contacts app in CyanogenMod doesn't support this format for importing, so you might need to convert the file to vCard.
  • I used this entry from the CyanogenMod wiki as my main guide, it's a good idea to check in there, to see if there are updated versions of programs etc.

  1. Download the programs/files that you will need
    1. Heimdall, Used to transfer the recovery image to the phone. Choose the version corresponding to your OS. Even if Heimdall exists in your repositories, it is recommended to get it directly so that you are sure that it is the latest version.
    2. Koush's ClockworkMod Recovery, recovery image that allows you to flash the custom ROM.
    3. CyanogenMod, your new ROM. Choose the image you want, I went with  cm-10.2.0-i9300.zip, which is marked as "stable".
    4. Google apps, if you want Play Store, GMail etc.
  2. Install Heimdall on your PC.
  3. Connect your phone to your PC, and place the zip-files for CyanogenMod and Google apps on your SD-card.
  4. Switch off your phone, do not have it connected to the computer.
  5. On your phone, hold down the Volume down, Home, and Power buttons. It will start up in flash-mode. Accept the disclaimer, then connect the phone to your computer by USB.
  6. On your computer, rename your ClockworkMod recovery zip-file to "recovery.zip", open a Terminal and go to the directory where you have your ClockworkMod recovery zip-file. Give the following command: 
    1. sudo heimdall flash --RECOVERY recovery.img --no-reboot 
  7. Once the command has terminated and you're back to a command line on your computer, and your phone has a full blue progress indicator, unplug the USB, and pull the battery out from your phone.
    1. The reason for pulling the battery is that if the phone reboots at this point, the stock ROM can overwrite your new custom recovery.
  8. Put the battery back, and , hold down the Volume up, Home, and Power buttons. It will now start up in recovery-mode.It should clearly state that it is ClockworkMod Recovery, if it doesn't then the recovery image has probably been overwritten by the stock ROM, start again from step 4.
  9. Use the Volume up/down to navigate, and power button to select from the menu. You will probably want to select "Backup and restore", and perform a backup of your current ROM. This will allow you to go back to your stock ROM should you ever want to.
  10. Select "Wipe data/factory reset".
  11. Select "Install zip". The next selection depends on where you placed your file, internal or external sdcard. I used an external one (the one you insert next to the battery), so I chose "choose zip from /storage/sdcard1". Select the CyanogenMod zip-file and wait for it to finish installing.
  12. Go back the main menu and select "reboot system now".
  13. For installing Google apps, repeat steps 8 and 11.
  14. Start downloading apps and configuring you new phone!

Flash-mode, confirm to continue
Flash-mode, ready for new recovery image














ClockworkMod recovery mode



Wednesday, February 5, 2014

Pear OS is no more

Pear OS, or Pear Linux, as it used to be called, has gone from the world of Linux distros.

I first noticed that the website was down a few days ago, and today I, when I saw that it was still down, I did a search and found out why. The creator, David Tavares, released a statement saying that it will no longer be available and that  "Its future is now in hands of a company who wants to remain anonymous for the moment".

There has been quite a bit of speculation about which company it is that is being talked about, and perhaps we'll find out later on, but for now, the only ones who know are the ones involved.

Now, Pear OS was never a hugely successfull distro (in respect to the number of users), and I've read comments both from people who will miss it very much, and from people who had never hear of it before saying that it's a good thing that it's gone.

I wrote a review of the Beta release of Pear OS 8, which was to be the last version of Pear OS. After that, when the final version came out, I installed and used it for a month or so.

It was a nice looking distro which worked quite well. It was far from perfect though, having a "dodge windows" type dock at the bottom, without a panel there, means that I was often triggering the dock when trying to click on something at the bottom of a webpage. This latest version also had a lot more bugs than the 2 previous versions, which were almost as stable as the Ubuntu it was based on. The worst part (for me), and what made me move away from it after a month, was serious bugs, which when reported, was marked as solved with a comment in the bug-report about a command to be executed in the terminal in order to fix it.

All that said, I will actually miss it. It was one of a very small, and apparently diminishing, number of distros that focused on making a truly good looking OS. Obviously, looks aren't the most important part of an OS, but once you have the functionality and stability, looks are a nice little perk.


Tuesday, February 4, 2014

Mazarin Cake

It's been a little while since my latest post, a combination of Christmas and work... But now I can finally give you a new recipe.

A Mazarin is a common Swedish cake, usually served in portion-sized aluminium molds. This is the same cake, only baked in a pie-mold, and cut into wedges to serve. The first time I was going to make this, I had decided to make the portion-sized ones, but I couldn't find the molds in the supermarket. I still remember the shop assistant telling me that they didn't sell them because they were bad for the environment. They did have the pie-sizes molds though, so I guess the smaller ones are worse for the environment than the big ones?

Anyway, this is a Delicious cake, made up of a shortcrust pastry filled with an almond filling. The secret ingredient is potatoes! I know it sounds weird, but trust me on this, it makes a difference.

Mazarin Cake




















Pastry
100g Butter
2 1/2 tbsp Sugar
2 1/4 dl Flour
1/2 Small egg

Filling
75g Butter
2 dl Sugar
2 Eggs
2 Boiled, mashed, medium sized potatoes (Can be replaced by 1 dl instant potato mash powder + 1 dl water, in case you don't have any leftover potatoes and don't want to cook some just to make this cake)
50g Almonds
2 Bitter almonds
3/4 dl Flour
1 1/2 dl Baking powder

Pastry
Since this recipe only uses half of the original recipe for the pastry, there is 1/2 egg in there... Break 1 egg into a glass, whisk with a fork or similar, and use half of it.

Mix all the ingredients in bowl, using your hands, until it comes together. Wrap the pastry in plastic foil and place in the fridge while you make the filling.

Tip: If you want, it is fine to make the pastry up to a day in advance, just keep it wrapped up in the fridge, and it will actually be easier to work with.

Filling
Whisk the butter and sugar together. Whisk in the eggs, 1 at a time, then the potatoes. Grate the almonds, and mix with the flour and baking powder, then whisk that in as well.

Cake
Butter and flour a pie-mold (I use a disposable aluminium one). Line the mold with the pastry, pour in the filling, and even it out.

Bake at 175°C, in the middle of the oven, for 35-40 minutes. Check if it is ready by inserting a toothpick into the center of the cake, it should come out clean.

Once the cake has cooled, spread some icing (powdered sugar, whisked into a little water) on it and let it set in the fridge.