New Blog, New Post - all running on Mono and Ubuntu!

New Blog, New Post - all running on Mono and Ubuntu!
- with Nginx proxy and HyperFastCgi server.
- and of course, BlogEnging.NET. This ASP.NET MVC 3/4 Open Source Blog software.

Seems that Comments are not working.!
But Contact Email is working fine!

Improved a bit... The admin's Gallery feed is now working!



Test Post from OpenLiveWriter

I initially thought OpenLiveWriter didn’t support BlogEngine, but by fiddling with the options – perhaps it was using dasBlog that did it, it logged in succesfully and I have posted this as a test.

Seems OpenLiveWriter is the last of the Blog authoring tools, as the other names I searched for have gone.

Teamviewer 11 for Ubuntu Server 15.10 running in Virtualbox

In Teamviewer 11 a feature to manage a headless server has been introduced. The trouble is that Teamviewer’s FAQ leaves out a crucial piece of information on how to get this going.

The following instructions are for Ubuntu Server 15.10 running on Virtualbox 5.0.14, using Teamview 11.0.53254

1. Install Ubuntu Server 64bit as per normal.

2. Log in with the account you created during the install.

3. sudo to root

$sudo -i

4. Activate the root account with passwd


5. Bring Ubuntu up to date with

#apt update

#apt upgrade

With following if necessary

#apt-get dist-upgrade

#apt-get autoremove

6. Now install Teamviewer

#dpkg --add-architecture i386

#apt-get update

7. Now download the latest version of Teamviewer. This URL appears to point always to the latest copy.


8. Install Teamviewer. This will most likely fail. Do not install gdebi as this will add a whole lot of unnecessary libraries to your server.

#dpkg -i teamviewer_i386.deb

9. Repair the install with

#apt-get install -f

10. Repeat the install Teamviewer. This will succeed.

#dpkg -i teamviewer_i386.deb

11. Try to run Teamserver headless setup. This will hang and fail.

#teamviewer setup

You'll get a message saying the /dev/fb0 can't be found.

Teamviewer's FAQ makes no mention of this or how to fix it.

What Teamviewer is expecting is Framebuffer Console turned on in the Kernel.

Carry out the following to activate uvesafb. Note you do not need Xorg.

Do not install Xorg as your Teamviewer account will not connect to the framebuffer console if you run X.
12. Install v86d, so that we can use uvesafb:

#apt-get install v86d

13. Edit the file /etc/initramfs-tools/modules and add this line. 1024X768 is a convient size but the depth of 32 is a requirement of Teamviewer.

#uvesafb mode_option=1024x768-32

14. Edit /etc/default/grub to this




15. Update the boot image and grub.

#update-initramfs -u

16. Update grub. At the time of writing update-grub gives some error messages, but does not stop the actual operation.


17. Disable plymouth daemon. Possibly not necessary.

mv /etc/init/plymouth.conf /etc/init/plymouth.conf.disabled

18. Optional.

#dpkg --remove-architecture i386

19. Now reboot. During the boot, the Virtualbox window will increase to 1024x768.


20. Login in again as root and check for the presence of /dev/fb0
#ll /dev/f*

21. Now run Teamviewer, accept the licence and enter your account details.

#teamviewer setup

22. Now ensure that Teamviewer will start on boot

#teamviewer –daemon enable

23. Now reboot again to check.


Go to your Teamviewer account and see that the hostname of the Ubuntu Virtualbox instance is present. Activate and see that Teamview will duplicate the Virtualbox console.

If you chose a NAT network note that you are connecting without any routing to the NAT network from you local network – the beauty of Teamviewer!




PDF Version - Teamview-Ubuntu-Virtualbox.pdf (34.3KB)


Post two

This post is just an example using Post List widget with image in the post body.

Post List widget should find first image in the post body and display it in the post list when this option selected in the widget admin.

Welcome to BlogEngine.NET

If you see this post it means that BlogEngine.NET is running and the hard part of creating your own blog is done. There is only a few things left to do.

Write Permissions

To be able to log in, write posts and customize blog, you need to enable write permissions on the App_Data and Custom folders. If your blog is hosted at a hosting provider, you can either log into your account’s admin page or call the support.

If you wish to use a database to store your blog data, we still encourage you to enable this write access for an images you may wish to store for your blog posts.  If you are interested in using Microsoft SQL Server, MySQL, SQL CE, or other databases, please see the BlogEngine docs to get started.


When you`ve got write permissions set, you need to change the username and password. Find the sign-in link located either at the bottom or top of the page depending on your current theme and click it. Now enter "admin" in both the username and password fields and click the button. You will now see an admin menu appear. It has a link to the "Users" admin page. From there you can change password, create new users and set roles and permissions. Passwords are hashed by default so you better configure email in settings for password recovery to work or learn how to do it manually.

Configuration and Profile

Now that you have your blog secured, take a look through the settings and give your new blog a title.  BlogEngine.NET is set up to take full advantage of many semantic formats and technologies such as FOAF, SIOC and APML. It means that the content stored in your BlogEngine.NET installation will be fully portable and auto-discoverable.  Be sure to fill in your author profile to take better advantage of this.

Themes and Plugins

One last thing to consider is customizing the look and behavior of your blog. We have themes and plugins available right out of the box. You can install more right from admin panel under Custom.

On the web

You can find news about BlogEngine.NET on the official website. For tutorials, documentation, tips and tricks visit our docs site. The ongoing development of BlogEngine.NET can be followed at Github. You can also subscribe to our Youtube channel.

Good luck and happy writing.

The BlogEngine.NET team

X2go Server on Ubuntu 15.04

X2go is a great way of remotely connecting to a headless Ubuntu server (assuming you’re the type of person that wants to manage Ubuntu graphically). In my case my headless Ubuntu is just a hobbyist’s server and I think it’s cheaper to have one hosted for me, than to pay for the electricity and with the added fire risk of hosting a physical server myself. (Except for disk space considerations).
I’ve been using DigitalOcean droplets and I think their control panel is great.

I’m just writing up the steps here, because I’m sure to forget if I need to create another one sometime in the future,

Ubuntu 15.04 now uses systemd. (well that could be another post, because it’s a bit of a kludge it seems to me. But it might be a stepping stone).

1. Create the Ubuntu 15.04 droplet.

2. Ensure you can connect with PuTTY (ssh) or equivalent.

3. Update the droplet with apt-get as per normal.

4. Install Lubuntu. I installed lubuntu.desktop and then removed it as I thought I had problems. I’m sure lubuntu.core is sufficient. [TBA]

5. Now reboot. You’ll see that a graphical login is shown in the DigitalOcean’s console. But it is unusable as the mouse cursor does not align properly.
DigitalOcean’s support don’t help here if you ask, as they say they don’t support graphical droplets.
You can now see why PuTTY must be working! This means SSH is working too.

6. Go to /etc/default and edit grub with nano to this
this puts the droplet into a non-graphical mode on the next reboot.
[TBA. I did a few other things while testing this, but I think this is the key change. I’ll need to update once I’ve repeated this procedure once again]

7. You might as well reboot to see the effect.
Once logged back in again, ps –ef will show the parameters passed to init
root         1     0  0 19:05 ?        00:00:01 /sbin/init 4 4
This run level 4 is supposed to be a custom level same as 3, where 5 is the graphical level we don’t want.

8. Install X2goserver, as follows
     sudo add-apt-repository ppa:x2go/stable
     sudo apt-get update
     sudo apt-get install x2goserver x2goserver-xsession

9. The install process has started the x2goserver already. You can check with
     systemctl –l status x2goserver.
But this is where a pure Arch system and Ubuntu differ.
A startup file has been put in /etc/init.d, x2goserver, and Ubuntu’s handling has created a x2goserver.service.
I did a
     systemctl enable x2goserver.service
to be consistent and sure!

10. Now try and connect using the X2goclient. I bet it will fail with a “kex error”.
It seems it can be fixed with adding the below to /etc/sshd_config, and restarting sshd or rebooting.
PuTTY has the great feature of a right click paste into nano to avoid typing all this!

11. Set your X2goclient to LXDE of course, and you should be in.


Nginx, PHP FPM, try_files and path_info

In the post,, the author gives an URL example for testing various parameters, especially PATH_INFO and $fastcgi_path_info.

This URL is, http://lemp.test/test.php/foo/bar.php?v=1 (this URL is not a hyperlink and does not work, of course)

I was interested to find what Location clause would be necessary to test this on my own server.

In my case, I wanted to test in a separate sub-directory, so the test string becomes:- (this URL does not work either. It’s intended you construct a test on your own server)

As the article says, the test.php file is:-


I’m the type of person that fears Regex. I don’t know why, but with a lot of patience and a late night, I’ve got this:-

location ~* ^/mytest/(.+\.php)(/.*)?$

and the steps are:-

“~*” the nginx command for case insensitive matching.
”^/mytest/” the sub-directory off the site’s root where the test.php file is present.
”(.+\.php)” the regex specification that will match one or more characters before the .php extension of the filename, where \. escapes the dot. This protects against a file, “.php” being processed.
“(/.*)?” the regex specification that will match zero or more characters after a slash, where the ? makes this optional.
”$” and finally the $ marks the end of the string. Note that the “?v=1” is never considered by the location matching.

If you think that two php filenames in the URL is a bit odd, various authors suggest it’s a possible construct and give OwnCloud as an example (I’ve not investigated this).

Now we have got the Location sorted, we need to consider whether try_files being included in the location block where fastcgi_split_path_info is also used.
It would appear there is a bug/feature, that PATH_INFO will not be correct if both are present.
And it’s true – I’m using version 1.8.0 when writing this.
Seems it won’t be fixed – see

My complete but minimalistic Location block I’ve used to test and correct the issue is as follows:-

    #At least one char before the .php, then an optional / with 0 or more chars after
    location ~* ^/mytest/(.+\.php)(/.*)?$
        index index.php;       
        try_files $uri $uri/ /mytest/index.php$args; #You can comment this out, and PATH_INFO will be same
        include fastcgi_params; #Put here first so we can override
        fastcgi_split_path_info ^(.+\.php)(/.*)$; #Slightly different from others, and matches my Location regex command
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        set $real_script_name $fastcgi_script_name;
        if ($document_uri ~* "^(.+?\.php)(/.*)$") #Note using $document_uri as this avoids including the query string in the test
            set $real_script_name $1;
            set $path_info $2;
        fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
        fastcgi_param SCRIPT_NAME $real_script_name;
        fastcgi_param PATH_INFO $path_info;
        #Check to see if the file does really exist
        if (!-f $document_root$real_script_name)
            return 404;

DigitalOcean droplet without X running on Console

Since my Ubuntu DigitalOcean droplet is for non-serious use I find it useful to have X running so I can use graphical tools to manage it, and I’ve installed LXDE.

It works really well. With X2GoServer installed and X2GoClient on my Windows 8.1 laptop, server maintenance is very convenient.

Unfortunately, once I installed LXDE, the Console window available via the DigitalOcean web control panel also showed the X server and the lightdm login prompt.

This couldn’t be used successful. There were two offset cursors and the click points didn’t coincide. Since I mainly use Windows as the client I could kill X running on the console with Ctrl-Alt-F1, but it was annoying me.

What I really wanted was X not to start on the DigitalOcean console and X to only start for the X2GoClient logins.

I eventually got this to work as follows:-

1. /etc/default/grub
edit the lines to this


2. run update-grub

3. run systemctl set-default
this sets a symbolic link

Now the DigitalOcean console does not run X, and can be used in emergencies to log into the server when might not have my laptop available.
X2Go starts it’s own startlxde session.
No more tty7!

The downside, is that TeamViewer now does not work, as there is no “display” for TeamViewer to connect to. But since there is no phyiscal display, TeamViewer gave such a limited screen  resolution, that it’s probably not much of a problem.
X2Go is great as the screen resolution can be maximised to my laptops’s screen resolution.
Hope this helps you.

A New Hosting Provider since Summer 2013

Almost a year without any new posts. How time flies.

In the summer last year as my yearly contract with my hosting provider was due for renewal, I noticed that the price for a Virtual Windows Server 2012 had come down considerably. After a month's trial with Netcetera which went well I decided on I chose them because they allow me to take up to 5 snapshots of the virtual image, and restore myself on demand. One hosting provider wanted to charge £99 for that! Whereas the yearly price of about £240 is more than shared hosting, it has proved to be much more fun, and equally - perhaps more so - reliable. It might be on the bit of the slow side and I wouldn't want to use for a really active site, but 4 processors, 2GB Ram and 80G disk was a good deal, and better than their current offering for plan B. It is a pity that more disk space would be quite expensive, as I'd love to use OwnCloud for my own cloud backup service.

So I intend to keep it for my Blog and SQL Server, and look forward to more price reductions as the competition is large. It confirms my belief that Windows Server 2012 is a good relaible product with excellent virtualisation technology.

Caliburn.Micro and HelloScreens (WPF and Decoupled)

Caliburn.Micro has a very useful demo called HelloScreens. The original is available in the samples directory of the sources on CodePlex. Currently it’s a SilverLight 4 xap.

Over the years a number of people have made their own versions – there is a Silverlight Decoupled version and two WPF versions.

Attached here is a decoupled WPF version.
Nothing spectacular, it has separate DLLs for Orders and Customers loaded by MEF and it’s working with Caliburn.Micro 1.4.1 and .Net 4.5.

I’ve had to change the code in some places to reflect changes in Caliburn.Micro – hopefully I’ve got it right!
On the whole it’s a very nice little demo to show off the ease and convenience of Caliburn.Micro.

Enjoy! (284.5KB)