Teamviewer trouble, screen cannot be captured, fast user switching error message

Setting up Teamviewer for unattended access on Windows Server 2012 R2 but having trouble getting it work without first logging on to the server in some other way?

If you get the error “The screen cannot be captured at the moment. This is probably due to fast user switching or a disconnected/minimized Remote Desktop session.”, like in this picture:

chances are that you use a “User ID” instead of a “Server ID” when you connect with TeamViewer to the server. I’ve written on Superuser about this teamviewer problem. It took me some (unnecessary) time to figure out, so I hope this tip saves you some of your time.

[Solved] pfSense 2.1 nanobsd boot from USB automatically

I just configured pfSense 2.1 on a m-itx board that I will use as my main firewall at home.

I’m replacing my Cisco ASA with pfSense, because I only have a ASA license for 10 simultaneous hosts on the inside talking to the outside, which cause some strange errors from time to time.

The first time I came across this license limit, I was really puzzled and started reconfiguring DNS to try to resolve the problem. Glad I eventually looked at the firewall syslog…

Anyway. pfSense is really great, and configuration is a breeze. I made a bootable USB flash drive, and configured it in a few seconds. My problem was that after each reboot, it didn’t find the USB drive unless I chose boot menu option 3.

What I went looking for was a way to make the USB boot option 3 the default.

It turned out that the only thing that option does is introduce a delay in the boot sequence, so that the kernel/modules have time to probe the USB buses.

The solution was easy:

  • enter the Shell (choice 8 after pfSense has booted)
  • remount the root filesystem rw to be able to:
  • add /boot/loader.conf/local containing:


X11 connection rejected because of wrong authentication – X11 forwarding suddenly fails

After ages of flawless X11 forwarding over SSH, today I started getting authentication errors and couldn’t even get a remote xterm to display locally over my ssh tunnel.


I tried ssh -Y, ssh -X and changes in sshd_conf on the remote server and ssh_conf locally, even though I knew that nothing had changed except a few patches to unrelated software on the local machine. Of course that didn’t help.

I ran xauth on the remote server, no indication of any errors.

It turned out that the remote /home filesystem was out of space, and this prevented the ssh X11 forwarding from working properly. I write this as a note-to-self, as it could happen again…

Outlook hangs with new account with missing credentials

Yesterday, at work, I was adding a group mailbox that I believed that I had access to, to my outlook 2010 client. For some reason only Microsoft knows about, this forces a restart of the outlook client.

It turned out that I didn’t have the permissions required to this shared mailbox, and when I started outlook it kept asking for username and password for that mailbox.

When I clicked “cancel”, outlook stopped responding for a long time, so navigating to the menu where I could remove the account again took an eternity.

The quick way to remove the account from outlook is, surprisingly, to use the control panel. There is a “Mail” function there. It takes you to the same mail account management dialog as from whithin outlook, only difference being that because outlook is closed, it doesn’t try to open the mailboxes, so I could remove the shared mailbox until I got the permission for it today.

gentoo gnunet build fails with MHD_post_process linker error

gnunet ebuild (zugaina layman overlay) fails with linker errors about MHD_destroy_post_processor and MHD_post_process ?

Add to /etc/portage/package.use:

net-libs/libmicrohttpd  messages

emerge libmicrohttpd again, and then emerge gnunet.


(at least for me)

Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

I tried installing EPEL on a fresh install of RHEL6, and after adding the repo, yum fails with the above error. I have RHEL6.1 (Santiago) and get the above error.

This happens because the RHEL/CentOS installation doesn’t trust the HTTPS certificate used by, that is issued by “GeoTrust SSL CA“.

In my case the package ca-certificates was not installed and the /etc/pki/tls/certs/ folder didn’t contain any ca-bundle.crt or !

Solution: yum install ca-certificates

(I had to temporarily rpm –erase epel-release first, to get yum working again)

I once got the same error message eventhout ca-certificates was installed and up to date. Then it was a firewall blocking https (port 443) traffic.

I worked around that by changing from https to http in /etc/yum.repos.d/epel.repo

Howto install perl modules

I often find myself trying to install (binary) packages that have dependencies to perl modules.

Because I work on varying platforms, sometimes RHEL/RedHat, CentOS, sometimes Debian based, like Ubuntu, and sometimes, less often now, but maybe I will go back again, to Gentoo. In many ways my ideal platform.

However, Perl is wicked, and the concept of perl modules in a package manager is even more crazy.

What are we going to do when we need a new version of a software (say, amavisd-new) that is not available in the distros package library?

I’m thinking, build from source and you can’t go wrong, right?

In the case of amavisd-new, these are the listed prerequisites:

Archive::Zip   (Archive-Zip-x.xx) (1.14 or later, currently 1.23)
Compress::Zlib (Compress-Zlib-x.xx) (1.35 or later, currently 2.008)
Compress::Raw::Zlib (Compress-Raw-Zlib) (2.017 or later)
Convert::TNEF  (Convert-TNEF-x.xx)
Convert::UUlib ( (1.08 or later, stick to new versions!)
MIME::Base64   (MIME-Base64-x.xx)
MIME::Parser   (MIME-Tools-x.xxxx) (latest version from CPAN - currently 5.425)
Mail::Internet (MailTools-1.58 or later have workarounds for Perl 5.8.0 bugs)
Net::Server    (Net-Server-x.xx) (version 0.88 finally does setuid right)
Digest::MD5    (Digest-MD5-x.xx) (2.22 or later)
IO::Stringy    (
Time::HiRes    (Time-HiRes-x.xx) (use 1.49 or later, older can cause problems)
Unix::Syslog   (
BerkeleyDB     with bdb library (preferably 4.4.20 or later)
Mail::DKIM     (Mail-DKIM-0.31 or later)

So, if I’m going to install amavisd-new, from souce, on a RHEL6 server, what do I need to do? -Well, I’ll show what I did. Not neccessarily what is the best thing to do… OK?

yum install cpan
perl -MCPAN -e shell

(going with the defaults, automatic is nice)

When I attempted to install the first module (Archive::Zip), I discovered that I did not have web access from my server, so I had to download the CPAN modules by hand. I did this by using the powerful search tool, and just pasting the package name (Archive::Zip) in the search box and then downloading the tar.gz packages one at a time.

Manual installation of 1 CPAN package:

tar zxf Archive-Zip-1.31_04.tar.gz
cd Archive-Zip-1.31_04
perl Makefile.PL
make test
sudo make install

Had I had internet connection available:

perl -MCPAN -e 'install Archive::Zip'

The beauty of CPAN installation is that it resolves dependencies automatically.

authorized_keys SELinux pubkey authentication on RHEL / CentOS

So, you have correct permissions on your home directory and all the way up to /, with no other-writable directories in the path, as well as correct permissions on the .ssh directory in $HOME, and it still doesn’t work? You probably have SELinux, and need to put the newly created files in the correct security context. Do it with restorecon like this:

chmod 700 ~/.ssh
cd ~/.ssh
chmod 600 ~/.ssh/*
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts
chmod 644 ~/.ssh/config
restorecon -R -v ~/.ssh


Collaborative Storytelling!

Great news for everybody that loves to read and write fictional litterature!

I’ve found a really good site for collaborative storytelling: CoST.LI – where writing stories together is great fun! The site is very new, and improving with new features almost daily. Currently it features a nice ranking system, quite similar to the reputation mechanism of sites like StackOverflow and its sister sites in the stack exchange community. There is also a nice toplist where you can compare yourself to others.

Best of all, it’s totally free (some google ads are meant to support it, good luck on that one!), and it uses OpenID for authentication.
Give it a try! Its multilingual, currently with free stories in English and there are some impressive ones in Swedish too.

So, what is Collaborative storytelling? Simply put: someone writes a story, and another one can continue on it. One of the most interesting features on this site is that each chapter can have several continuations, so there can be potentially an unlimited number of stories in the end.

Get rid of fruit flies!

Have you ever forgotten a tomato in a window, or perhaps a banana skid in a not-so-well-closed container? Has it resulted in a family of fruit flies? (Also called vinegar flies)?

Do you want to get rid of them? Here’s how…

1. take away everything they can eat and lay their eggs in. This is important, since the females can produce up to 1000 eggs each day, and it takes only a week for them to hatch.

2. take a glass or metal container you don’t love that much – this will be their graveyard

3. add 2 part of something sweet, for instance honey or syrup

4. add 1 part of vinegar (guess why they’re called vinegar flies?)

5. add 1 or 2 parts of water, and make sure everything blends well.

6. Place it near the flies to see if they’re interested in the treat. The purpose is to mimic the smell of old/ripe fruit, where they prefer to lay their eggs and breed.

7. Finally, add a drop or two of washing-up liquid. This will get rid of the surface tension, making a nasty surprise for the flies when they try to land on the drink you prepared for them. They will sink to the bottom and drown.

8. wait and enjoy the show. Silly flies.