anders tonfeldt

Opt out of prism

2014-05-05 11:06

Time goes by, people forget or ignore the fact that everything they do online is stored, analysed and read by foreign governments. Maybe because it's too inconvenient to prevent or maybe because they think "well, I have nothing to hide, what do I care if they read my e-mail?" Which is a valid point. Life is too short to worry about non-problems. But what about the people for whom it is a problem? The people who's very lives depend on it.

Journalists having their electronics confiscated due to illegally obtained digital eavesdropping? Their sources' anonymity compromised so that governments can silence them? Because, you know, silencing critics and whistleblowers is what we do in democracies these days. It isn't the illegal activities of the governments that is the problem, it's the fact that people talk about said activities. Apparently.

Before this post derails entirely into the realm of political vitriol let's get back on track. Switching from software that we know is compromised by governments really isn't hard but finding out about it can be quite tricky.

A while back I found a cleverly named site called Prism break which does just that. Inform you about software and services you can use with a much greater degree of security. Do these applications guarantee your integrity? No they don't, but they're a heck of a lot better than alternatives that directly feed your data to surveillance organizations.

Please consider the people who risk their lives and liberty to give the rest of us a degree of freedom we used to think was our right. It's not just about us regular Joes. What you do and the choices you make have consequences, whether or not you do it knowingly.

Prism break

Old games in wine

2014-05-03 13:28

Hello, my name is Anders. And I'm an old-game-aholic. A common complaint in gaming under linux is that games simply don't run there, a fact that has become incorrect in the last few years as all of my favorite games have native linux clients. But what about older games? The ones that have been abandoned by their developers and now linger in a technical limbo. They work great.

In fact, I'd say it's a lot easier to get a game running with wine under linux than it is to coax a modern windows to run it reliably. Or at least that's my experience. But there are problems, resolution and bizarre input related ones. I'll attempt to address both with this post.

  1. Use PlayOnLinux would be my first tip. It makes managing each wine bottle (a sort of fake windows installation) much easier and quicker.

  2. Do not run old games in fullscreen, use wine's virtual desktop. Amerzone, which I'm playing now, is a good example. It runs fine in fullscreen, but it stretches and interlaces all graphics. Then it runs the cutscenes in the top left corner only. In windowed mode it works exactly as expected. This is true for running the game in both windows and with wine.

  3. If the game runs at a miniscule resolution natively then simply change the resolution of your monitor (script below). Amerzone runs in 640x480 so I run it in a 640x480 virtual wine desktop and change my monitor's resolution to 800x600. I can still multi-task and it fills most of the screen.

  4. A 15 year old game that tries to smooth out your mouse's movement will screw it up. Inevitably. Again, Amerzone.. oh how I love thee, but you are one major problem child. To fix this I run a script that removes all mouse acceleration deceleration, resulting in picture perfect mouse movement in the game (script below).

I might update this list as I uncover more problem areas but those have been the major ones for me. That said, every single game I've thrown at wine has worked flawlessly for the last 22 tries. No crashes, no hangs, no bugs that aren't caused by the games themselves. This can be compared with trying to run windows 95 (or even 3.11) era games on windows 8.. that was an interesting experience.

Script for quickly changing resolutions and turning off my second monitor.

## For old games.
#xrandr --output HDMI-0 --primary --mode 800x600
#xrandr --output LVDS-1-0 --off

## For regular desktop use.
xrandr --output HDMI-0 --primary --mode 1920x1080
xrandr --output LVDS-1-0 --mode 1920x1080

## Fancy full option, not really needed for most of you.
#xrandr --fb 3840x1080 --output HDMI-0 --mode 1920x1080 --pos 0x0 --primary --panning 1920x1080+0+0/1920x1080+0+0 --left-of LVDS-1-0 --output LVDS-1-0 --mode 1920x1080 --right-of HDMI-0

Script for fixing the mouse sensitivity and acceleration.

# This command will list all devices on your system.
xinput list

# My mouse is listed as number 10, so let's check it.
xinput list-props 10

# Turn off device acceleration.
xinput set-prop 10 275 0

## For regular use
# Set constant mouse deceleration to 1.5, I've got a high DPI mouse.
xinput set-prop 10 276 1.5
# Set acceleration velocity scaling to 1, no variations.
xinput set-prop 10 278 1

## For old games
# Drastically reduce the mouse deceleration.
#xinput set-prop 10 276 0.02

Happy 50th birthday, BASIC!

2014-05-01 19:06
50 GOTO 10  

"In 1964, John G. Kemeny and Thomas E. Kurtz designed the original BASIC language at Dartmouth College in New Hampshire. They wanted to enable students in fields other than science and mathematics to use computers. At the time, nearly all use of computers required writing custom software, which was something only scientists and mathematicians tended to learn how to use."

We're getting old guys.

Basic on Wikipedia

View/record a webcam with VLC

2014-05-01 12:04

There's a wide, wide variety of ways to record webcams in unices but I've come to rely on just one, VLC. Yes, it's a video viewer more than a recorder but it does both quite well. Let's detail how to view a live webcam stream first, just keep in mind that the drivers for your webcam need to be v4l compatible (most are, of course).

vlc -vvv v4l2:///dev/video0:chroma=mjpg:width=1920:height=1080:fps=30 :input-slave=pulse://alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone-00-Microphone.analog-stereo

-vvv = Verbosity
v4l2:///dev/video0 = Video input device
:chroma=mjpg = MJPEG Codec
:width=1920:height=1080 = Resolution
:fps=30 = Frames per second

The :input-slave simply loops my external microphone into the stream, this is something I want but it's naturally up to your preference. That command line looked complex at first but really it's quite straight forward. Let's move on to recording said stream to a file and also previewing it at the same time.

vlc -vvv v4l2:///dev/video0:chroma=mjpg:width=1920:height=1080:fps=30 :input-slave=pulse://alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone-00-Microphone.analog-stereo --sout="#duplicate{dst=std{access=file,fps=30,mux=avi,dst=/mnt/misc/test.avi},dst=display}"

First part is exactly the same so let's move straight to the output bit.

--sout="#duplicate{ = Define a duplicate stream, both preview and file output.
dst=std{access=file, = First stream destination is a std-file.
fps=30,mux=avi, = 30 FPS, avi muxing.
dst=/mnt/misc/test.avi}, = Output file path and name.
dst=display}" = Second stream destination is the display/preview.

This has worked reliably with all devices and distributions I've tried it on. Every single other application has had its own set of quirks that required elaborate workarounds, this did not.

There's one final thing to keep in mind. If your camera supports multiple output streams, like my Logitech C920 has both YUV, MJPEG and H.264, then you might be required to set it before entering either of these commands. It can be set as simply as this.

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=2

Everything should be clear there, pixelformat refers to the stream. You will need to either simply try each format to figure out what your camera outputs there or refer to its driver documentation. pixelformat=2 for the C920 is MJPEG, which I found to have a consistently higher quality than its built in H.264 encoder.

Something old, something new


With no fanfare nor pomp my blog has returned to the land of the digital. Like a ghost nobody missed it returns to haunt my existence.

In all seriousness I'm just tired of social networks. Figured that if I'm going to be helpful I might as well be so in a way that remains available beyond the IPO of startup companies.

I'll be ripping select content from my six (6!) previous blogs over the coming months. But this time around I want to keep the blog pure, that boils down to the following:

  1. Helpful guides and videos as I stop cursing and figure something out.
  2. Shameless promotion of my own projects.
  3. Shoutouts when I stumble across something particularly enjoyable, be it a game, book or movie.

That will be all.

Nokia Play 360 NFC using Android


I’ve been getting into the NFC groove lately and must admit I find it tremendously useful. When we picked up the Nokia Play bluetooth speaker it didn’t want to cooperate out of the box though. The (read-only) NFC inside it would report a string that only makes sense for Nokia mobiles and naturally left my Android phone scratching its head. There’s an easy fix though, just retag it.

I use the excellent Tasker app on my phones for automation, there’s a plugin for it called Locale NFC (made by a swedish dev too). Install it, add a new event -> plugin -> NFC, scan the 360 and reference a task. You’re done. It’ll automatically fix it. If you’re not using Tasker and/or want a free way then there’s an NFC retagger available in the Play Store. Unfortunately both ways won’t automatically perform any action on android since the tag is read-only, which means you can’t retag it to something unique for your phone which will prompt you to select an action for it every single time you scan it.

There’s a fix though, go to settings – apps – all apps – tags, and disable it. That way android’s native tag handler won’t be referenced and you won’t get the “Select an action” whenever you scan an NFC tag, instead the tag will simply execute as you specified. Incredibly handy to automatically have my phone turn on bluetooth, raise the volume to 90% and connect to the 360 whenever I swipe it over the speaker. Also begun using NFC tags for handshaking various password scenarios, saves time and leads to additional security since the keys aren’t stored on any of my computer networks any more. But I’ll leave those scenarios for another post.

Migrating categories in Daz Studio 4


Please note that what I describe below is for migrating content categories from OSX to Windows. I have not attempted the reverse and cannot state with any accuracy if the process is identical the other way, but it should give you a head start. It’s rather peculiar that an application of Daz Studio’s quality doesn’t have this functionality built-in, but once I figured out how to do it the process was mostly painless.

  1. Do not make any modifications on your mac during this entire process. You can keep it entirely as it is and will end up with two functional installations. This is heartily recommended since it’s easy to make a mistake.

  2. Install DS4 on the windows machine. When installing make sure to manually enter the CMS (Content Management Service) database location to a directory of your choosing.

  3. Let the installation finish and then start DS4. Enter any serials you need, do whatever you wish, it doesn’t matter. Now go to the content manager and add the poser and DS runtime locations for the content you’ve copied from your mac. Make sure you do not re-organize it but keep the file hierarchy identical. When you’re done simply close DS4.

  4. Manually stop the CMS, this can be done via the start menu or by simply searching for “daz” via windows search.

  5. Navigate to the CMS database directory and delete -everything- in it.

  6. Copy the CMS database files from the mac to the windows machine.

  7. Download the Valentina studio database editor from it’s ,free but will only function for 10 minutes at a time. This will be plenty enough for our purposes.

  8. Start Valentina studio and go file-open database, navigate to your CMS directory and open Master.vdb. Switch the view by going view-as tree, or simply hit ctrl+2.

  9. Now navigate to database-master-tables-sysdatabase and update the two entries there to reflect your proper path. In my case they were;
    d:\daz 3d\database\master.vdb
    d:\daz 3d\database\ContentDB

  10. File-save the database and exit Valentina studio.

  11. Now copy the file ContentDB in the CMS directory and name the new file ContentDB.vdb. This is vitally important since Valentina studio will not be able to locate the data otherwise.

  12. Open Valentina studio again and open the database ContentDB.vdb.

  13. Navigate to databases-contentdb-tables-tblBasePath. Update all of these to reflect wherever you put your old content on your Windows machine.

  14. File-save the database and exit Valentina studio.

  15. Restart the Daz CMS. Start DS4 and marvel at your categories being intact.

Getting DayZ to run with Arma 2: Reinforcements


I truly don’t see what all the fuss is about DayZ after having played it for a while, but I’m determined to give it at least a week of regular playtime. Especially after all the trouble I had to get it running in the first place. Let me start off by saying that you can save yourself quite a bit of problems by simply buying Arma 2: Combined Operations from the developer, but this post is dedicated to those of us that already had Arma 2: Reinforcements and want to get DayZ running with it.

There’s a very specific reason why you don’t need to buy CO when you already have Reinforcements, namely that PMC is included in it and thus you get the high quality models and textures not available in the basic version of Operation Arrowhead.

  1. Install reinforcements.

  2. Download the appropriate patch from, I picked the Install it.

  3. Download Arma II Lite/Free and install it (in a separate directory!). The site was by far the fastest for me. Do note that the arma 2 free registration site didn’t work for me, I couldn’t log in with any of the openid sites.
    Instead I began downloading the demo on steam, immediately cancelled, then right clicked the game in my steam library and copied the code from there. I suspect you can download it entirely from steam and use that installation for the below, but I didn’t so I’m not 100% about it.

  4. Launch both the reinforcements and Arma 2 free installations once each.

  5. Get from
    Rename arma2rft.exe in your reinforcements directory to a backup name (arma2rft.exeold), copy Expansion/Beta/arma2rft.exe to the main directory.

  6. Create a new directory called “@DayZ” in your reinforcements directory. Then create another directory called “Addons” in that directory. Download all the files at and unrar them into the newly created Addons directory. There’s a handy installer available but for whatever reason it refused to function for me stating that the rar files were missing on all download servers.

  7. Download The Arma II launcher. When configuring the launch options choose the locations for arma 2 (lite) but choose arma2rft.exe in the reinforcements directory when configuring OA.

  8. Add “-beta=Expansion\beta;Expansion\beta\Expansion -nosplash -mod=@dayz” to additional parameters in the launcher, choose game version Arma II – CO.

  9. Pray.

  10. Start the game.

This was a somewhat nostalgic experience, I haven’t had to jump through quite so many hoops since the early 90s. There’s multiple points where this entire endeavor can fail, make sure you copy both the reinforcements installation and the arma 2 lite installation before you apply any of the patches and such. It’ll save you time if you screw up and have to reinstall.

Is the hill not that silent?


So, I posted a sad realization a while back which stated I was done with my favorite pure survival horror series (Silent Hill). Yet observant readers of this blog mailed me questioning my statement since the majority of SH games have since popped up on my games played list. Did I speak out of turn, do I, in fact, still enjoy Silent Hill? No and no. I decided to play through the entire series one last time and then that’ll be that. While I’m still rating the first three games as recommended it’s simply because I still find them quite excellent, but I’m not enjoying them anymore.

One reader took issue with the fact that I gave SH4 a lower score than Homecoming, and I can certainly see his reasoning, but here’s mine. Homecoming isn’t a great game, but it’s not a terrible one either. The PC port is extremely buggy, almost to the point of being unusable, but once you learn the quirks most of the game will work just fine. The combat system might not be great, or Silent Hill’y, but it works. SH4 on the other hand.. it’s one gigantic inventory management, backtracking, escort quest with immortal enemies. It pretty much took everything I despise and rolled it up into a ball of pure annoyance. I don’t like it. At all. Even though I think the concept and story of SH4 is a lot more interesting than Homecoming and, even, SH3.

Having beat Homecoming I’ve only got two games left, Shattered memories and Downpour. I’m rather looking forward to Shattered Memories since I’ve never played it and I’ve heard it does a couple of interesting things with the Silent Hill concept. Downpour I won’t actually play, I’ll either watch when a mate plays it (if I can beat SM in time) or just check out a Let’s Play. The Vita only game just fills me with regret by proxy. “focusing on cooperative multiplayer action rather than traditional psychological horror.” Why would you.. why couldn’t you.. just why?!

UPDATE: Just figured I’d add that I really enjoyed shattered memories. I do understand why people object to it and I, also, found many aspects of it to be flawed (especially the repetitive and unvaried otherworld chase sequences).

But this shattered memories symbolizes what I really enjoyed about Silent Hill; it’s a journey within, not without. SH is as much a part of you, as a part of the world that you visit. I’d play more SH games like this for sure.

<< 3 >>

RSS Feed